/* ─── Caunsel App Styles ─────────────────────────────────────────────────────
   Styles for all app pages (auth, dashboard, chat, etc.)
   Uses same design tokens as style.css
──────────────────────────────────────────────────────────────────────────── */

:root {
    --primary: #0C53A6;
    --primary-dark: #0a4085;
    --accent: #FC698C;
    --text: #1a1a2e;
    --text-light: #6b7280;
    --bg: #f8fafc;
    --surface: #ffffff;
    --border: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 24px rgba(12, 83, 166, 0.08);
    --shadow-lg: 0 8px 40px rgba(12, 83, 166, 0.14);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* ─── Spinner ────────────────────────────────────────────────────────────── */
.spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── App Layout ─────────────────────────────────────────────────────────── */
.app-layout {
    min-height: 100vh;
    background: var(--bg);
    font-family: 'Poppins', sans-serif;
    display: flex;
    flex-direction: column;
}

/* ─── App Navbar ─────────────────────────────────────────────────────────── */
.app-navbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.app-navbar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-navbar-logo img { height: 36px; }
.app-navbar-logo span { font-size: 20px; font-weight: 700; color: var(--primary); }
.app-navbar-actions { display: flex; align-items: center; gap: 16px; }
.app-navbar-link { text-decoration: none; color: var(--text-light); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.app-navbar-link:hover { color: var(--primary); }

/* ─── Avatar ─────────────────────────────────────────────────────────────── */
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px;
    cursor: pointer; overflow: hidden; flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ─── Main Content ───────────────────────────────────────────────────────── */
.app-main { flex: 1; padding: 32px 24px; max-width: 1100px; margin: 0 auto; width: 100%; }
.app-main.full-width { max-width: 100%; padding: 0; }

/* ─── Auth Page ──────────────────────────────────────────────────────────── */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 50%, #fce8f0 100%);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Poppins', sans-serif;
    padding: 20px;
}
.auth-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo img { height: 52px; }
.auth-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 8px; text-align: center; }
.auth-subtitle { font-size: 14px; color: var(--text-light); margin-bottom: 32px; text-align: center; }
.auth-divider { text-align: center; color: var(--text-light); font-size: 13px; margin: 20px 0; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: var(--border); }
.auth-divider::before { left: 0; } .auth-divider::after { right: 0; }

/* ─── Form Styles ────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.form-input {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    font-family: 'Poppins', sans-serif; font-size: 14px; color: var(--text);
    background: #fff; transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,83,166,0.1); }
.form-input::placeholder { color: #9ca3af; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 5px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; }

.phone-input-group { display: flex; gap: 8px; }
.phone-input-group .dial-code { width: 110px; flex-shrink: 0; }
.phone-input-group .phone-number { flex: 1; }

/* OTP inputs */
.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-input {
    width: 52px; height: 56px; text-align: center; font-size: 22px; font-weight: 700;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    font-family: 'Poppins', sans-serif; color: var(--text);
}
.otp-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,83,166,0.1); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius); font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(12,83,166,0.3); }
.btn-secondary { background: var(--surface); color: var(--primary); border: 1.5px solid var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--primary); background: #f0f7ff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-large { padding: 15px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.btn-google {
    background: #fff; color: #333; border: 1.5px solid var(--border);
    width: 100%; font-size: 15px;
}
.btn-google:hover { background: #f8f8f8; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.btn-google img { width: 20px; height: 20px; }

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 17px; font-weight: 700; color: var(--text); margin: 0; }

/* ─── Dashboard ──────────────────────────────────────────────────────────── */
.dashboard-greeting { margin-bottom: 28px; }
.dashboard-greeting h2 { font-size: 24px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.dashboard-greeting p { color: var(--text-light); font-size: 14px; margin: 0; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.action-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    border: 1.5px solid var(--border);
    transition: all 0.25s;
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.action-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.action-card-icon {
    width: 60px; height: 60px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
}
.action-card-icon.blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: var(--primary); }
.action-card-icon.pink { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #be185d; }
.action-card-icon.green { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.action-card-icon.purple { background: linear-gradient(135deg, #ede9fe, #ddd6fe); color: #5b21b6; }
.action-card h4 { font-size: 15px; font-weight: 600; color: var(--text); margin: 0; }
.action-card p { font-size: 12px; color: var(--text-light); margin: 0; }

/* ─── Online/Offline toggle ──────────────────────────────────────────────── */
.status-banner {
    padding: 20px 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}
.status-banner.online { background: linear-gradient(135deg, #d1fae5, #a7f3d0); border: 1.5px solid #6ee7b7; }
.status-banner.offline { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); border: 1.5px solid #d1d5db; }
.status-banner-info { display: flex; align-items: center; gap: 12px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,0.2); animation: pulse-green 2s infinite; }
.status-dot.offline { background: #9ca3af; }
@keyframes pulse-green { 0%,100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.2); } 50% { box-shadow: 0 0 0 6px rgba(16,185,129,0.08); } }

.toggle-switch { position: relative; width: 56px; height: 28px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #d1d5db; border-radius: 28px; transition: 0.3s;
}
.toggle-slider:before {
    content: ''; position: absolute;
    height: 22px; width: 22px; left: 3px; bottom: 3px;
    background: #fff; border-radius: 50%; transition: 0.3s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(28px); }

/* ─── Consultation request card ──────────────────────────────────────────── */
.consultation-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 20px;
    border: 1.5px solid var(--border);
    margin-bottom: 12px;
    transition: all 0.2s;
}
.consultation-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.consultation-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.consultation-card-name { font-weight: 600; color: var(--text); }
.consultation-card-time { font-size: 12px; color: var(--text-light); }
.consultation-card-desc { font-size: 14px; color: var(--text-light); margin-bottom: 14px; line-height: 1.5; }
.consultation-card-actions { display: flex; gap: 10px; }

/* ─── Chat Page ──────────────────────────────────────────────────────────── */
.chat-layout {
    display: flex; flex-direction: column;
    height: calc(100vh - 64px);
    background: var(--bg);
}
.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 16px;
}
.chat-message { display: flex; gap: 12px; max-width: 80%; }
.chat-message.user { flex-direction: row-reverse; margin-left: auto; }
.chat-bubble {
    padding: 14px 18px; border-radius: 18px;
    font-size: 14px; line-height: 1.6;
    max-width: 100%;
}
.chat-message.ai .chat-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-message.user .chat-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: #dbeafe; color: var(--primary); }
.chat-message.user .chat-avatar { background: var(--primary); color: #fff; }

.chat-input-area {
    padding: 16px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex; gap: 12px; align-items: flex-end;
}
.chat-input {
    flex: 1; resize: none;
    border: 1.5px solid var(--border); border-radius: 12px;
    padding: 12px 16px; font-family: 'Poppins', sans-serif; font-size: 14px;
    min-height: 48px; max-height: 120px; line-height: 1.5;
    color: var(--text); outline: none;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
    width: 48px; height: 48px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 12px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0; transition: all 0.2s;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.typing-indicator { display: flex; gap: 4px; align-items: center; padding: 8px; }
.typing-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-light); animation: typing 1.2s ease-in-out infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { transform: translateY(0); opacity: 0.4; } 50% { transform: translateY(-6px); opacity: 1; } }

/* ─── Chat header toolbar ────────────────────────────────────────────────── */
.chat-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; }
.chat-header p { font-size: 12px; color: var(--success); margin: 0; }

/* ─── Consultation finding flow ──────────────────────────────────────────── */
.finding-screen {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 24px; text-align: center; gap: 24px;
}
.finding-animation {
    position: relative; width: 100px; height: 100px;
}
.finding-circle {
    position: absolute; inset: 0; border-radius: 50%;
    border: 2px solid var(--primary); opacity: 0;
    animation: ripple 2s ease-out infinite;
}
.finding-circle:nth-child(2) { animation-delay: 0.5s; }
.finding-circle:nth-child(3) { animation-delay: 1s; }
.finding-inner {
    position: absolute; inset: 20px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px;
}
@keyframes ripple { 0% { transform: scale(0.8); opacity: 0.8; } 100% { transform: scale(2.5); opacity: 0; } }

/* ─── Legal Panel ────────────────────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border); border-radius: var(--radius);
    padding: 40px 24px; text-align: center;
    cursor: pointer; transition: all 0.2s;
    background: var(--bg);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--primary); background: #f0f7ff; }
.upload-zone input[type=file] { display: none; }
.upload-zone-icon { font-size: 36px; color: var(--text-light); margin-bottom: 12px; }
.upload-zone h4 { font-size: 15px; color: var(--text); margin: 0 0 4px; }
.upload-zone p { font-size: 13px; color: var(--text-light); margin: 0; }
.uploaded-files { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.uploaded-file {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 8px;
}
.uploaded-file-name { flex: 1; font-size: 13px; color: var(--text); truncate: true; }
.uploaded-file-remove { color: var(--danger); cursor: pointer; font-size: 16px; }

/* ─── Legal panel status ─────────────────────────────────────────────────── */
.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.processing { background: #dbeafe; color: #1e40af; }
.status-badge.completed { background: #d1fae5; color: #065f46; }
.status-badge.failed { background: #fee2e2; color: #991b1b; }

/* ─── Profile Page ───────────────────────────────────────────────────────── */
.profile-header {
    display: flex; align-items: center; gap: 20px; margin-bottom: 28px;
    padding: 28px; background: var(--surface); border-radius: var(--radius);
    box-shadow: var(--shadow); border: 1px solid var(--border);
}
.profile-avatar-large {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px; font-weight: 700;
    flex-shrink: 0; overflow: hidden;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-info h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.profile-info p { font-size: 14px; color: var(--text-light); margin: 0 0 2px; }

.profile-menu { display: flex; flex-direction: column; gap: 4px; }
.profile-menu-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; border-radius: var(--radius); cursor: pointer;
    text-decoration: none; color: var(--text); transition: background 0.15s;
    font-size: 15px; font-weight: 500;
}
.profile-menu-item:hover { background: var(--bg); }
.profile-menu-item.danger { color: var(--danger); }
.profile-menu-item .menu-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.profile-menu-item .menu-icon.blue { background: #dbeafe; color: var(--primary); }
.profile-menu-item .menu-icon.green { background: #d1fae5; color: #065f46; }
.profile-menu-item .menu-icon.purple { background: #ede9fe; color: #5b21b6; }
.profile-menu-item .menu-icon.red { background: #fee2e2; color: var(--danger); }
.profile-menu-item .menu-chevron { margin-left: auto; color: var(--text-light); }

/* ─── Specialization checkboxes ──────────────────────────────────────────── */
.specialization-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.spec-checkbox { display: none; }
.spec-label {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: 8px;
    border: 1.5px solid var(--border); cursor: pointer;
    font-size: 13px; color: var(--text); transition: all 0.2s;
    background: var(--surface);
}
.spec-label:hover { border-color: var(--primary); background: #f0f7ff; }
.spec-checkbox:checked + .spec-label { border-color: var(--primary); background: #dbeafe; color: var(--primary); font-weight: 600; }
.spec-label::before {
    content: ''; width: 16px; height: 16px; border-radius: 4px;
    border: 1.5px solid var(--border); flex-shrink: 0; transition: all 0.2s;
}
.spec-checkbox:checked + .spec-label::before {
    background: var(--primary); border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

/* ─── File upload chip ───────────────────────────────────────────────────── */
.file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: #dbeafe; color: var(--primary);
    padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: 500;
}
.file-chip-remove { cursor: pointer; font-size: 14px; opacity: 0.7; }
.file-chip-remove:hover { opacity: 1; }

/* ─── Step wizard ────────────────────────────────────────────────────────── */
.step-wizard { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 32px; }
.wizard-step { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; flex: 1; }
.wizard-step:not(:last-child)::after { content: ''; position: absolute; top: 18px; left: 50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.wizard-step.active:not(:last-child)::after, .wizard-step.done:not(:last-child)::after { background: var(--primary); }
.wizard-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; z-index: 1; border: 2px solid var(--border); background: var(--surface); color: var(--text-light); }
.wizard-step.active .wizard-dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.wizard-step.done .wizard-dot { background: var(--success); border-color: var(--success); color: #fff; }
.wizard-label { font-size: 11px; color: var(--text-light); font-weight: 500; text-align: center; }
.wizard-step.active .wizard-label { color: var(--primary); font-weight: 600; }

/* ─── Account type selector ──────────────────────────────────────────────── */
.account-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-type-card {
    border: 2px solid var(--border); border-radius: 16px; padding: 28px 20px;
    text-align: center; cursor: pointer; transition: all 0.25s;
}
.account-type-card:hover { border-color: var(--primary); background: #f0f7ff; }
.account-type-card.selected { border-color: var(--primary); background: #dbeafe; }
.account-type-card .icon { font-size: 40px; margin-bottom: 12px; }
.account-type-card h3 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 6px; }
.account-type-card p { font-size: 13px; color: var(--text-light); margin: 0; }

/* ─── Business type radio ────────────────────────────────────────────────── */
.business-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.business-radio { display: none; }
.business-radio-label {
    padding: 14px 10px; border-radius: 10px;
    border: 1.5px solid var(--border); cursor: pointer;
    font-size: 13px; color: var(--text); text-align: center;
    transition: all 0.2s; background: var(--surface); display: block;
}
.business-radio-label:hover { border-color: var(--primary); }
.business-radio:checked + .business-radio-label { border-color: var(--primary); background: #dbeafe; color: var(--primary); font-weight: 600; }

/* ─── Video call ─────────────────────────────────────────────────────────── */
.video-call-page {
    background: #0d1117; min-height: 100vh;
    display: flex; flex-direction: column;
}
.video-stage {
    flex: 1; position: relative; display: flex;
    align-items: center; justify-content: center;
    overflow: hidden;
}
video { border-radius: 0; background: #1a1a2e; }
.remote-video { width: 100%; height: 100%; object-fit: cover; }
.local-video {
    position: absolute; bottom: 100px; right: 20px;
    width: 140px; height: 100px; border-radius: 12px;
    object-fit: cover; border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.video-controls {
    display: flex; align-items: center; justify-content: center;
    gap: 16px; padding: 20px; background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px); position: sticky; bottom: 0;
}
.control-btn {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; font-size: 22px;
    transition: all 0.2s;
}
.control-btn.mute { background: rgba(255,255,255,0.15); color: #fff; }
.control-btn.mute.active { background: var(--danger); }
.control-btn.camera { background: rgba(255,255,255,0.15); color: #fff; }
.control-btn.camera.active { background: var(--danger); }
.control-btn.end { background: var(--danger); color: #fff; width: 68px; height: 68px; font-size: 26px; }
.control-btn:hover { transform: scale(1.1); }
.video-participant-name {
    position: absolute; bottom: 12px; left: 12px;
    background: rgba(0,0,0,0.5); color: #fff; padding: 4px 12px;
    border-radius: 20px; font-size: 13px; font-weight: 500;
}
.video-placeholder {
    width: 100%; height: 400px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #9ca3af; gap: 16px; font-size: 48px;
}
.video-placeholder p { font-size: 16px; color: #6b7280; margin: 0; }

/* ─── History list ───────────────────────────────────────────────────────── */
.history-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; transition: background 0.15s;
}
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: var(--bg); }
.history-item-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.history-item-content { flex: 1; min-width: 0; }
.history-item-title { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.history-item-right { text-align: right; flex-shrink: 0; }
.history-item-amount { font-size: 14px; font-weight: 700; color: var(--text); }
.history-item-date { font-size: 11px; color: var(--text-light); }

/* ─── Earnings summary ───────────────────────────────────────────────────── */
.earnings-summary {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 24px;
}
.earnings-card {
    background: var(--surface); border-radius: var(--radius);
    padding: 20px; border: 1px solid var(--border); text-align: center;
}
.earnings-card-amount { font-size: 24px; font-weight: 700; color: var(--primary); }
.earnings-card-label { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* ─── Empty state ────────────────────────────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 24px; text-align: center; color: var(--text-light);
}
.empty-state-icon { font-size: 56px; margin-bottom: 16px; opacity: 0.4; }
.empty-state h4 { font-size: 16px; font-weight: 600; color: var(--text); margin: 0 0 6px; }
.empty-state p { font-size: 14px; margin: 0; }

/* ─── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab {
    padding: 10px 20px; font-size: 14px; font-weight: 600;
    color: var(--text-light); cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.2s;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-backdrop.hidden { display: none; }
.modal {
    background: var(--surface); border-radius: 20px;
    padding: 32px; width: 100%; max-width: 500px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 20px; }

/* ─── Page header ────────────────────────────────────────────────────────── */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.page-back-btn { width: 38px; height: 38px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-light); text-decoration: none; transition: all 0.2s; font-size: 16px; }
.page-back-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-header h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; }

/* ─── TNC Modal ──────────────────────────────────────────────────────────── */
.tnc-content { max-height: 300px; overflow-y: auto; font-size: 13px; color: var(--text-light); line-height: 1.8; margin: 16px 0; padding: 16px; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }

/* ─── Notification Badge ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 20px; height: 20px; padding: 0 6px;
    background: var(--accent); color: #fff;
    border-radius: 10px; font-size: 11px; font-weight: 700;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .auth-card { padding: 32px 24px; }
    .app-main { padding: 20px 16px; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .account-type-grid { grid-template-columns: 1fr; }
    .profile-header { flex-direction: column; text-align: center; }
    .chat-message { max-width: 90%; }
    .local-video { width: 110px; height: 80px; }
    .step-wizard { gap: 0; }
    .wizard-label { display: none; }
    .otp-input { width: 44px; height: 50px; font-size: 20px; }
}
