/**
 * Bluejay Communications - Visual Design System (v2.2)
 * Clean, modern multi-route architecture: /, /login, /app, /settings.
 * Features: Dark/Light Mode, Geometric Title Fonts, Zero Glow Halos,
 * Bold Monogram Letter Avatars, Responsive Layout for Mobile & Chromebooks.
 */

:root, [data-theme="dark"] {
    --bg-main: #060b14;
    --bg-surface: #0a1120;
    --bg-card: rgba(14, 23, 42, 0.9);
    --bg-card-hover: rgba(20, 32, 58, 0.95);
    --bg-glass: rgba(14, 23, 42, 0.7);
    --bg-glass-hover: rgba(22, 36, 64, 0.85);
    --bg-input: #090f1d;
    --bg-modal: #0d1527;

    --primary: #00a8ff;
    --primary-hover: #0088dd;
    --primary-gradient: linear-gradient(135deg, #0077ff 0%, #00c3ff 100%);
    --accent: #38bdf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --text-primary: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    --border: rgba(255, 255, 255, 0.09);
    --border-hover: rgba(255, 255, 255, 0.18);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-popover: 0 20px 50px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-hover: #f1f5f9;
    --bg-input: #f1f5f9;
    --bg-modal: #ffffff;

    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #d97706;
    --danger: #dc2626;

    --text-primary: #0f172a;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.16);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-heading: 'Outfit', 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-popover: 0 20px 50px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.45);
}

.page-view {
    width: 100%;
    min-height: 100vh;
}
.hidden { display: none !important; }

/* Buttons & Common Controls */
.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}
.btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}

.btn-primary-gradient {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 168, 255, 0.3);
}
.btn-primary-gradient:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
}

/* Standardized Outline Button (No Browser Default White) */
.btn-outline {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-full);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
[data-theme="light"] .btn-outline {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #0f172a;
}
[data-theme="light"] .btn-outline:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: #475569;
}
[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.btn-theme-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .btn-theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

/* Monogram Avatar Component */
.avatar-monogram {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.avatar-monogram.sm {
    width: 28px;
    height: 28px;
    font-size: 12px;
}
.avatar-monogram.lg {
    width: 48px;
    height: 48px;
    font-size: 20px;
}
.avatar-monogram.xl {
    width: 64px;
    height: 64px;
    font-size: 28px;
}
.avatar-img-custom {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}


/* ======================================================== */
/* 1. LANDING PAGE STYLES (Route: /) */
/* ======================================================== */
#landingView {
    background: radial-gradient(circle at 50% 10%, rgba(15, 36, 74, 0.4) 0%, var(--bg-main) 65%);
    overflow-y: auto;
    height: 100vh;
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 11, 20, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    height: 68px;
    display: flex;
    align-items: center;
}
[data-theme="light"] .landing-header {
    background: rgba(255, 255, 255, 0.88);
}

.landing-nav-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.brand-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none; /* Removed weird halo glow */
}
.brand-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.landing-links {
    display: flex;
    gap: 28px;
}
.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}
.nav-item:hover {
    color: var(--text-primary);
}

.landing-auth-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Landing Hero */
.landing-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 70px 24px 50px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.3);
    color: var(--accent);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}
.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(34px, 5.5vw, 62px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    max-width: 860px;
}

.hero-desc {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-muted);
    max-width: 700px;
    margin-top: 18px;
    line-height: 1.6;
}

.hero-cta-group {
    display: flex;
    gap: 16px;
    margin-top: 36px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-hero-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 15px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 6px 22px rgba(0, 168, 255, 0.35);
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 168, 255, 0.45);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 15px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}
.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}
[data-theme="light"] .btn-hero-secondary {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Hero Showcase Card */
.hero-showcase-card {
    width: 100%;
    max-width: 900px;
    margin-top: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-popover);
    overflow: hidden;
    backdrop-filter: blur(20px);
}
.showcase-topbar {
    height: 44px;
    padding: 0 18px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.window-dots {
    display: flex;
    gap: 6px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.showcase-title {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-dim);
}
.badge-status-online {
    font-size: 11px;
    color: var(--success);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge-status-online i { font-size: 7px; }

.showcase-body {
    display: flex;
    height: 320px;
}
.showcase-sidebar {
    width: 220px;
    background: rgba(0, 0, 0, 0.18);
    border-right: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}
.showcase-sidebar-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-bottom: 4px;
}
.showcase-item {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}
.showcase-item.active {
    background: rgba(0, 168, 255, 0.12);
    color: var(--accent);
}
.showcase-item.call-active {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    justify-content: space-between;
}
.showcase-call-count {
    font-size: 10px;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
}

.showcase-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.showcase-chat-header {
    height: 48px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
.showcase-channel-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
}
.showcase-topic {
    font-size: 12px;
    color: var(--text-dim);
}
.showcase-messages {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.showcase-bubble {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.showcase-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.showcase-bubble-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    text-align: left;
}
[data-theme="light"] .showcase-bubble-content {
    background: #f1f5f9;
}
.showcase-bubble-author {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.showcase-time {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 500;
    margin-left: 6px;
}
.showcase-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}
.showcase-call-banner {
    margin-top: auto;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Landing Sections */
.landing-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 90px 24px;
    text-align: center;
}
.landing-section.bg-alt {
    max-width: 100%;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 90px 24px;
}
[data-theme="light"] .landing-section.bg-alt {
    background: rgba(0, 0, 0, 0.02);
}

.section-tag {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 10px;
}
.section-heading {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.section-subheading {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 12px auto 0 auto;
    line-height: 1.5;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 50px;
    text-align: left;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(0, 168, 255, 0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 50px;
    text-align: left;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
}
.step-num {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 900;
    color: rgba(0, 168, 255, 0.35);
    margin-bottom: 12px;
}
.step-icon {
    font-size: 22px;
    color: var(--accent);
    margin-bottom: 14px;
}
.step-card h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}
.step-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Voice Spotlight Box */
.landing-spotlight-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 50px;
    text-align: left;
}
.spotlight-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 16px 0 24px 0;
}
.spotlight-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}
.spotlight-list li {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.spotlight-list li i {
    color: var(--success);
    font-size: 14px;
}
.spotlight-visual {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.audio-visualizer-mock {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 70px;
}
.vis-bar {
    width: 8px;
    border-radius: 4px;
    background: var(--accent);
    animation: barPulse 1.2s ease-in-out infinite alternate;
}
.bar1 { height: 30%; animation-delay: 0.1s; }
.bar2 { height: 60%; animation-delay: 0.2s; }
.bar3 { height: 90%; animation-delay: 0.4s; }
.bar4 { height: 45%; animation-delay: 0.15s; }
.bar5 { height: 75%; animation-delay: 0.3s; }
.bar6 { height: 100%; animation-delay: 0.5s; }
.bar7 { height: 50%; animation-delay: 0.25s; }
.bar8 { height: 35%; animation-delay: 0.35s; }

@keyframes barPulse {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}
.visualizer-label {
    font-size: 12px;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

/* FAQ Grid */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    margin-top: 50px;
    text-align: left;
}
.faq-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 26px;
}
.faq-card h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.faq-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* CTA Bottom Banner */
.landing-cta-banner {
    max-width: 1000px;
    margin: 60px auto 80px auto;
    padding: 60px 30px;
    background: radial-gradient(circle at 50% 50%, rgba(0, 168, 255, 0.15) 0%, var(--bg-card) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: center;
}
.landing-cta-banner h2 {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 800;
}
.landing-cta-banner p {
    font-size: 16px;
    color: var(--text-muted);
    margin: 12px 0 28px 0;
}

/* Landing Footer */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 30px 24px;
    background: var(--bg-surface);
}
.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}
.footer-brand span {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 16px;
}
.footer-copy {
    font-size: 13px;
    color: var(--text-dim);
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}
.footer-links a:hover {
    color: var(--text-primary);
}


/* ======================================================== */
/* 2. AUTHENTICATION PAGE (Route: /login) */
/* ======================================================== */
#loginView {
    background: radial-gradient(circle at 50% 30%, rgba(15, 36, 74, 0.5) 0%, var(--bg-main) 70%);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.auth-page-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-top-bar {
    height: 68px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}
.btn-back-home {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}
.btn-back-home:hover {
    color: var(--text-primary);
}

.auth-top-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.brand-logo-img-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}
.auth-brand-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    color: var(--text-primary);
}

.auth-centered-box {
    width: 100%;
    max-width: 460px;
    margin: 40px auto 60px auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-popover);
    backdrop-filter: blur(20px);
}

.auth-box-header {
    text-align: center;
    margin-bottom: 24px;
}
.auth-box-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none; /* No weird glow */
}
.auth-box-header h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}
.auth-box-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

.auth-mode-tabs {
    display: flex;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 4px;
    margin-bottom: 24px;
}
.auth-mode-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 9px;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.auth-mode-tab.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 168, 255, 0.3);
}

.auth-alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.auth-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.auth-alert.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #86efac;
}

.auth-form-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    text-align: left;
}
.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.form-group input, .form-group select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}
.form-group input:focus, .form-group select:focus {
    border-color: var(--accent);
}

.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrap input {
    width: 100%;
    padding-right: 40px;
}
.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 14px;
}

.form-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-auth-submit {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    padding: 13px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 168, 255, 0.3);
}
.btn-auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 168, 255, 0.4);
}

.verification-notice-card {
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.25);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    text-align: left;
}
.verification-notice-card i {
    color: var(--accent);
    font-size: 20px;
    margin-top: 2px;
}

.live-code-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.live-code-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--success);
}
.live-code-left strong {
    font-family: var(--font-mono);
    font-size: 15px;
    letter-spacing: 2px;
}

.resend-row {
    display: flex;
    justify-content: space-between;
    margin-top: -6px;
}
.btn-resend {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.auth-bottom-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 10px;
}
.btn-switch-link {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
}


/* ======================================================== */
/* 3. COMMUNICATIONS APP (Route: /app) */
/* ======================================================== */
#appView {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.app-navbar {
    height: 60px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    z-index: 50;
}

.app-logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.app-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none; /* Removed logo glow */
}
.app-logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.hub-tabs-dock {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
}
.hub-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: var(--transition);
}
.hub-btn.active {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 168, 255, 0.25);
}
.active-call-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    animation: pulseDot 1s infinite alternate;
}
@keyframes pulseDot {
    0% { transform: scale(0.8); opacity: 0.6; }
    100% { transform: scale(1.3); opacity: 1; }
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-install-pwa {
    background: rgba(0, 168, 255, 0.1);
    border: 1px solid rgba(0, 168, 255, 0.3);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-icon-nav {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.btn-icon-nav:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}
[data-theme="light"] .btn-icon-nav {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
}

.user-chip-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 3px 12px 3px 3px;
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.user-chip-menu:hover {
    border-color: var(--border-hover);
}
.user-chip-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.status-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

/* App Main Workspace */
.app-main-workspace {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Sidebar Navigator */
.navigator-sidebar {
    width: 300px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.nav-hub-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.nav-hub-header {
    height: 52px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}
.nav-hub-header h3 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
}
.btn-action-round {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
}
.btn-action-round:hover {
    background: var(--primary-gradient);
    color: #fff;
}

.nav-search-bar {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}
.nav-search-bar input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-primary);
    width: 100%;
}

.chats-directory-list, .communities-selector-list, .channels-scroll-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.convo-item-card {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}
.convo-item-card:hover {
    background: rgba(255, 255, 255, 0.05);
}
.convo-item-card.active {
    background: rgba(0, 168, 255, 0.12);
    border: 1px solid rgba(0, 168, 255, 0.25);
}
[data-theme="light"] .convo-item-card:hover {
    background: #f1f5f9;
}
.convo-item-meta {
    flex: 1;
    overflow: hidden;
}
.convo-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.convo-item-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-dock {
    height: 58px;
    padding: 0 14px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    overflow: hidden;
}
.sidebar-user-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-status {
    font-size: 11px;
    color: var(--success);
}
.sidebar-user-actions {
    display: flex;
    gap: 4px;
}
.btn-dock-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-dock-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
.btn-dock-icon.active-mute {
    color: var(--danger);
}

/* Conversation Canvas */
.conversation-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-main);
    position: relative;
}

.convo-top-header {
    height: 60px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface);
    flex-shrink: 0;
}
.convo-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.btn-mobile-return {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
}
.convo-header-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
}
.convo-header-sub {
    font-size: 12px;
    color: var(--text-muted);
}
.convo-header-right {
    display: flex;
    gap: 8px;
}
.btn-convo-call {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-convo-call:hover {
    background: var(--primary-gradient);
    color: #fff;
}

/* Messages Stream */
.messages-flow-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.stream-empty-prompt {
    margin: auto;
    text-align: center;
    max-width: 360px;
}
.empty-prompt-logo {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    margin-bottom: 16px;
    opacity: 0.8;
}
.stream-empty-prompt h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
}
.stream-empty-prompt p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Chat Message Item */
.chat-msg-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.chat-msg-body {
    flex: 1;
    text-align: left;
}
.chat-msg-author {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 3px;
}
.chat-msg-time {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 500;
}
.chat-msg-bubble {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-break: break-word;
}
.chat-msg-attachment {
    margin-top: 8px;
    max-width: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}
.chat-msg-attachment img {
    width: 100%;
    display: block;
    cursor: pointer;
}
.chat-yt-embed {
    margin-top: 8px;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    border: none;
}

/* Message Composer Dock */
.composer-container-dock {
    padding: 12px 20px 20px 20px;
    background: transparent;
}
.composer-pill-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.composer-pill-bar textarea {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 14px;
    color: var(--text-primary);
    resize: none;
    padding: 6px 4px;
    max-height: 120px;
}
.btn-pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.btn-pill-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
.btn-pill-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

/* Active Call Stage Dock */
.call-stage-bar {
    background: rgba(8, 15, 28, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.stage-room-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stage-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--success);
    font-size: 14px;
}
.live-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}
.stage-videos-wrap {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.stage-tile {
    width: 220px;
    height: 130px;
    background: #000;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid transparent;
}
.stage-tile.speaking {
    border-color: var(--success);
}
.stage-tile video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.stage-tile-name {
    position: absolute;
    bottom: 6px;
    left: 8px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
}
.stage-actions-dock {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.btn-dock-tool {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-dock-tool.active {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
}
.btn-leave-call {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}


/* ======================================================== */
/* 4. BIG DEDICATED SETTINGS PAGE (Route: /settings) */
/* ======================================================== */
#settingsView {
    background: var(--bg-main);
    overflow-y: auto;
    height: 100vh;
}

.settings-page-wrapper {
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 24px 60px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.settings-top-header {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 24px;
}
.settings-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}
.settings-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.settings-brand-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.settings-dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Settings Left Nav */
.settings-nav-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.settings-user-card-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}
.settings-mini-details strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
}
.settings-mini-details span {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-menu-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.settings-menu-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    transition: var(--transition);
}
.settings-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.settings-menu-btn.active {
    background: rgba(0, 168, 255, 0.12);
    color: var(--accent);
}
[data-theme="light"] .settings-menu-btn.active {
    background: #e0f2fe;
}

.btn-logout-action {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--danger);
    padding: 10px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.btn-logout-action:hover {
    background: var(--danger);
    color: #fff;
}
.w-100 { width: 100%; }

/* Settings Right Content */
.settings-content-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.settings-panel-header {
    margin-bottom: 8px;
    text-align: left;
}
.settings-panel-header h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
}
.settings-panel-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 26px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.settings-card h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
}
.settings-card-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Theme Cards in Settings */
.theme-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 8px;
}
.theme-choice-card {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(0, 0, 0, 0.15);
}
.theme-choice-card:hover {
    border-color: var(--border-hover);
}
.theme-choice-card.active {
    border-color: var(--accent);
    background: rgba(0, 168, 255, 0.08);
}
.theme-preview {
    height: 70px;
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.dark-preview {
    background: #060b14;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.dark-preview .preview-bar { height: 10px; width: 60%; background: #0077ff; border-radius: 4px; }
.dark-preview .preview-bubble { height: 20px; width: 80%; background: #1e293b; border-radius: 6px; }

.light-preview {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.light-preview .preview-bar { height: 10px; width: 60%; background: #0284c7; border-radius: 4px; }
.light-preview .preview-bubble { height: 20px; width: 80%; background: #e2e8f0; border-radius: 6px; }

.theme-choice-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.theme-choice-info strong {
    font-size: 14px;
    color: var(--text-primary);
}
.theme-choice-info span {
    font-size: 12px;
    color: var(--text-muted);
}

/* Accent Swatches */
.accent-swatches-grid {
    display: flex;
    gap: 14px;
    margin-top: 6px;
}
.accent-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}
.accent-swatch:hover {
    transform: scale(1.1);
}
.accent-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 10px rgba(0, 168, 255, 0.5);
}

/* Profile Section in Settings */
.settings-profile-row {
    display: flex;
    align-items: center;
    gap: 20px;
}
.settings-large-avatar {
    width: 64px;
    height: 64px;
}
.settings-profile-meta h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
}
.email-verified-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}
.email-verified-chip i {
    color: var(--success);
}
.badge-verified {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border-radius: var(--radius-full);
}

/* Radio Group in Settings */
.radio-settings-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.radio-setting-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
}
.radio-setting-item input {
    margin-top: 3px;
}
.radio-setting-item strong {
    display: block;
    font-size: 14px;
}
.radio-setting-item span {
    font-size: 12px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.toggle-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.toggle-setting-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Mic & Camera Test in Settings */
.mic-test-container {
    display: flex;
    align-items: center;
    gap: 16px;
}
.mic-meter-bar {
    flex: 1;
    height: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.mic-meter-fill {
    width: 0%;
    height: 100%;
    background: var(--success);
    transition: width 0.1s ease;
}

.camera-test-box {
    width: 100%;
    max-width: 360px;
    height: 200px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}
.camera-test-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.camera-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 13px;
}

/* System Metrics Grid */
.system-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.status-metric-card {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.status-metric-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-dim);
}
.status-badge-green {
    font-size: 12px;
    color: var(--success);
    font-weight: 700;
}


/* ======================================================== */
/* 5. MODALS, POPOVERS & LIGHTBOX */
/* ======================================================== */
.modal-backdrop, .popover-backdrop, .lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-modal);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-popover);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    height: 56px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}
.btn-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.modal-body {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.modal-footer {
    height: 60px;
    padding: 0 20px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Device Install Guide */
.device-install-guide {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.device-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
}
.device-card i {
    font-size: 22px;
    color: var(--accent);
    margin-top: 2px;
}
.device-card strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}
.device-card span {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Popover Cards (GIF & Emoji Pickers) */
.popover-card {
    width: 100%;
    max-width: 420px;
    max-height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-popover);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.popover-search-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.popover-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    padding: 6px 14px;
}
.popover-input-wrap input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--font);
    font-size: 13px;
    color: var(--text-primary);
    width: 100%;
}
.btn-popover-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
}

.popover-chips-scroll {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}
.chip-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.chip-item.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

.popover-grid-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 320px;
}
.gif-thumb-item {
    width: 100%;
    height: 120px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    transition: var(--transition);
}
.gif-thumb-item:hover {
    transform: scale(1.02);
}

.emojis-matrix-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
    max-height: 320px;
}
.emoji-grid-btn {
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}
.emoji-grid-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.2);
}

/* Lightbox */
.lightbox-frame {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
}
.lightbox-frame img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}
.lightbox-dismiss {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ======================================================== */
/* 6. RESPONSIVE BREAKPOINTS (Mobile & Chromebooks) */
/* ======================================================== */
@media (max-width: 900px) {
    .settings-dashboard-container {
        grid-template-columns: 1fr;
    }
    .landing-spotlight-box {
        grid-template-columns: 1fr;
        padding: 30px;
    }
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .landing-links { display: none; }
    .navigator-sidebar {
        position: absolute;
        inset: 0;
        z-index: 40;
        width: 100%;
    }
    .btn-mobile-return { display: inline-flex; }
    .hub-btn span { display: none; }
    .btn-install-pwa span { display: none; }
    .showcase-sidebar { display: none; }
    .theme-cards-grid { grid-template-columns: 1fr; }
    .system-status-grid { grid-template-columns: 1fr; }
}
