/* Premium SaaS Base Variables */
:root {
    /* TFA redesign tokens (Phase 1) */
    --accent: #7c5cff;
    --accent-2: #a084ff;
    --pos: #3ddc97;
    --neg: #ff5d6e;
    --amber: #ffb547;
    --bg: #0a0b10;
    --bg-3: #1a1d2b;
    --panel: #0e1016;
    --panel-2: #141621;
    --stroke: rgba(255,255,255,0.08);
    --line-strong: #2b2f42;
    --ink: #e7e9f3;
    --ink-dim: #9095a8;
    --ink-mute: #5e6379;
    --accent-soft: #7c5cff1a;
    --pos-soft: #3ddc9720;
    --neg-soft: #ff5d6e20;
    --glow: 0 0 0 1px #7c5cff40, 0 8px 32px -8px #7c5cff55;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 20px;
    --font-ui: 'Inter Tight', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

    --bg-dark: #070709;
    --bg-darker: #000000;
    --surface-light: rgba(255, 255, 255, 0.06);
    --surface-glass: rgba(255, 255, 255, 0.03);
    --surface-border: rgba(255, 255, 255, 0.08);

    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur-md: 12px;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-blue: #6366f1;
    --accent-blue-light: #818cf8;
    --accent-gold: #ffb547;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #a78bfa;
    --accent-cyan: #38bdf8;
    --accent-danger: #ff5d6e;
    --accent-red-light: #f87171;
    --accent-success: #3ddc97;

    --modal-bg: #0f172a;
    --modal-border: rgba(255, 255, 255, 0.08);

    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.3);

    /* Design system v2 aliases */
    --bg-1: #0e1016;
    --bg-2: #141621;
    --fg: #e7e9f3;
    --fg-dim: #9095a8;
    --fg-mute: #5e6379;
    --line: #20233180;
    --shadow-lg: 0 30px 60px -30px #00000090;
}

/* Light Mode Theme */
:root[data-theme="light"] {
    /* TFA redesign tokens (Phase 1) — light */
    --accent: #6b4dff;
    --accent-2: #8a6bff;
    --pos: #12a76b;
    --neg: #e5405a;
    --amber: #d98e17;
    --bg: #f6f6f2;
    --bg-3: #f0f0ea;
    --panel: #ffffff;
    --panel-2: #ffffff;
    --stroke: rgba(10,11,16,0.08);
    --line-strong: #d4d4c8;
    --ink: #0f1018;
    --ink-dim: #5b6070;
    --ink-mute: #8a8f9e;
    --accent-soft: #5b3ff012;
    --pos-soft: #0f9d5820;
    --neg-soft: #d93a4a15;
    --glow: 0 0 0 1px #5b3ff040, 0 8px 24px -8px #5b3ff035;

    --bg-dark: #ffffff;
    --bg-darker: #f5f5f5;
    --surface-light: rgba(0, 0, 0, 0.05);
    --surface-glass: rgba(255, 255, 255, 0.8);
    --surface-border: rgba(0, 0, 0, 0.1);

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.08);
    --blur-md: 12px;

    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;

    --accent-blue: #5b5bff;
    --accent-blue-light: #7c7cff;
    --accent-gold: #d99114;
    --accent-purple: #7c3aed;
    --accent-purple-light: #a855f7;
    --accent-cyan: #0891b2;
    --accent-danger: #d93a4a;
    --accent-red-light: #f87171;
    --accent-success: #0f9d58;

    --modal-bg: #f3f4f6;
    --modal-border: rgba(0, 0, 0, 0.08);

    --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.2);

    /* Design system v2 aliases — light */
    --bg-1: #ffffff;
    --bg-2: #f5f5f5;
    --fg: #0f1018;
    --fg-dim: #5b6070;
    --fg-mute: #8a8f9e;
    --line: rgba(10,11,16,0.12);
    --shadow-lg: 0 30px 60px -30px rgba(0,0,0,0.2);
}

/* Auto-detect OS light mode preference */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg-dark: #ffffff;
        --bg-darker: #f5f5f5;
        --surface-light: rgba(0, 0, 0, 0.05);
        --surface-glass: rgba(255, 255, 255, 0.8);
        --surface-border: rgba(0, 0, 0, 0.1);

        --glass-bg: rgba(255, 255, 255, 0.7);
        --glass-border: rgba(0, 0, 0, 0.08);

        --text-primary: #1a1a1a;
        --text-secondary: #666666;
        --text-muted: #999999;

        --accent-blue: #5b5bff;
        --accent-blue-light: #7c7cff;
        --accent-gold: #d97706;
        --accent-purple: #7c3aed;
        --accent-purple-light: #a855f7;
        --accent-cyan: #0891b2;
        --accent-danger: #dc2626;
        --accent-red-light: #f87171;
        --accent-success: #059669;

        --modal-bg: #f3f4f6;
        --modal-border: rgba(0, 0, 0, 0.08);

        --shadow-premium: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
        --shadow-glow: 0 0 15px rgba(99, 102, 241, 0.2);
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter Tight', 'Inter', system-ui, sans-serif;
    font-feature-settings: "ss01", "cv11";
    background-color: var(--bg);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* Vertical flow so footer is at bottom */
    -webkit-tap-highlight-color: transparent; /* Remove mobile tap highlight */
}

/* Layout */
.saas-container {
    display: flex;
    flex-direction: column; /* Default: vertical stack for landing page */
    width: 100%;
    flex: 1; /* Grow to fill screen */
    overflow-x: hidden;
}

body.user-logged-in .saas-container {
    flex-direction: row; /* Sidebar layout for dashboard */
}

/* Sidebar */
.saas-sidebar {
    width: 280px;
    background-color: var(--bg-darker);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    position: relative;
    z-index: 100;
    flex-shrink: 0; /* Stabilize width */
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.deck-super-sub {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    margin-bottom: 2px;
    opacity: 0.6;
}

.text-gold { color: var(--accent-gold); }

/* ============ NOTIFICATION BELL ============ */
.notif-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
/* When bell is inside avatar-icon-btn, inherit that styling */
.avatar-icon-btn.notif-bell {
    font-size: 0.95rem;
}
.notif-bell:hover {
    color: var(--accent-gold);
    background: rgba(255,255,255,0.06);
}
.notif-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    background: #ef4444;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: #0f172a;
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 14px;
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    background: #0f172a;
    border-radius: 14px 14px 0 0;
}
.notif-dropdown-header button {
    background: none;
    border: 1px solid rgba(99,102,241,0.3);
    color: var(--accent-blue);
    font-size: 0.68rem;
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.15s;
    text-transform: none;
    letter-spacing: 0;
}
.notif-dropdown-header button:hover {
    background: rgba(99,102,241,0.12);
}
.notif-list { padding: 6px 0; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
    cursor: default;
}
.notif-item:last-child { border-bottom: none; }
.notif-item-read { opacity: 0.55; }
.notif-icon {
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-msg {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}
.notif-time {
    font-size: 0.65rem;
    color: #475569;
    margin-top: 4px;
}
.notif-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
    margin-top: 5px;
}
.notif-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.notif-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}
.notif-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
}
/* Notification action buttons */
.notif-actions {
    display: flex;
    gap: 6px;
    margin-top: 7px;
}
.notif-btn {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s;
}
.notif-btn:hover { opacity: 0.8; }
.notif-btn-book {
    background: #fbbf24;
    color: #000;
}
.notif-btn-scout {
    background: rgba(99,102,241,0.15);
    color: #818cf8;
    border: 1px solid rgba(99,102,241,0.3);
}
/* Mobile bell: inherit header-icon-btn look */
.header-icon-btn.notif-bell {
    position: relative;
    font-size: 1rem;
}
/* ============ END NOTIFICATION BELL ============ */

.pro-badge {
    background: linear-gradient(135deg, var(--accent-gold), #f59e0b);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.pro-badge.individual-badge { background: #334155 !important; color: #94a3b8 !important; }
.pro-badge.business-badge { background: linear-gradient(135deg, #3b82f6, #2563eb) !important; color: white !important; }
.pro-badge.elite-badge { background: linear-gradient(135deg, #8b5cf6, #6366f1) !important; color: white !important; }
.pro-badge.free-badge { background: rgba(255,255,255,0.1) !important; color: var(--text-secondary) !important; border: 1px solid rgba(255,255,255,0.1); }


.sidebar-menu {
    list-style: none;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative; /* Anchor for the active indicator */
}

.sidebar-menu li a:hover {
    background-color: var(--surface-light);
    color: var(--text-primary);
}

.sidebar-menu li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background-color: var(--accent-blue);
    border-radius: 0 4px 4px 0;
}

.sidebar-icon {
    width: 24px;
    display: flex;
    justify-content: center;
    font-size: 1.1rem;
}

.mobile-promo-link {
    color: var(--accent-gold) !important;
    font-weight: 600 !important;
    border: 1px dashed rgba(251, 191, 36, 0.3);
    margin-top: 1rem;
}

.mobile-promo-link:hover {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: var(--accent-gold) !important;
}

.sidebar-actions {
    padding: 0;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
}

#btn-new-watch-sidebar {
    height: 44px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: 0.75rem;
}

.btn-sidebar-utility:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.sidebar-utility {
    margin-top: auto;
    padding: 2.5rem 0 1.5rem 0; /* Increased space above Need Support */
}

.support-quick-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary);
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center !important;
    gap: 0.75rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.support-quick-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--surface-border);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.back-link:hover { color: var(--text-primary); }

/* Main Content */
.saas-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2.5rem 4rem;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 50%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.05), transparent 50%);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

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

.header-icon-btn.mobile-only {
    display: none;
}

.header-icon-btn {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    color: white;
}

.header-icon-btn.onboarding-trigger {
    color: var(--accent-gold);
}

.header-icon-btn.onboarding-trigger:hover {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 15px rgba(251, 191, 36, 0.15);
}

.content-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4), var(--shadow-glow);
}

.btn-secondary {
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--surface-border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Dashboard Grid System */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 1.5rem;
    margin-bottom: 3rem;
}

.grid-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-premium);
}

.grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--glass-border);
}

/* Row 1: Metrics (3 columns each for 4 cards) */
.stat-card.grid-card { grid-column: span 3; }

.stat-viz-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.mini-radial-container {
    width: 60px;
    height: 60px;
}

/* Specific Card Layouts */
.card-briefing { grid-column: span 8; }
.card-status {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.card-activity { grid-column: span 8; }
.card-advisory { grid-column: span 4; }

/* Mobile Adaptability */
@media (max-width: 1024px) {
    .card-briefing, .card-activity { grid-column: span 12; }
    .card-status, .card-advisory { grid-column: span 6; }
    .stat-card.grid-card { grid-column: span 6; }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 0.75rem;
    }
    /* Stat cards: 2-per-row grid (2×2) */
    .stat-card.grid-card { grid-column: span 1 !important; }
    /* Other dashboard cards: full width */
    .card-briefing, .card-status, .card-activity, .card-advisory {
        grid-column: span 2 !important;
    }
}

/* Internal Card Elements */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.card-header h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    color: var(--text-secondary);
}

.briefing-content {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.status-indicator-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    position: relative;
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.ring-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--accent-blue);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.card-status {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-state {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.status-mini-log {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 0 auto;
}

.interception-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.advisory-box {
    background: rgba(251, 191, 36, 0.05);
    border-left: 3px solid var(--accent-gold);
    padding: 1rem;
    border-radius: 0 12px 12px 0;
    margin-bottom: 1.5rem;
    text-align: left;
}

.stat-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.stat-card {
    flex: 1;
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--surface-border);
    padding: 1.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.stat-header i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.stat-header h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 700;
}

.stat-card:hover {
    background: var(--surface-light);
    border-color: var(--glass-border);
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
}

.stat-card.disabled { opacity: 0.5; }

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-limit {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.text-accent {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Forms */
.hidden { display: none !important; }


.glass-card {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    width: 100%;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from { transform: scale(0.9) translateY(20px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.glass-card h2 { 
    margin-bottom: 2rem; 
    font-size: 1.6rem; 
    font-weight: 800;
    background: linear-gradient(135deg, white 0%, var(--text-secondary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.3px;
}

.form-group label i {
    color: var(--accent-blue);
}

.form-group input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    color-scheme: dark;
}

.form-group input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(99, 102, 241, 0.08);
}

.form-group input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.form-group select {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f1f5f9;
    padding: 0.8rem 1rem;
    padding-right: 2.5rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.65em auto;
    cursor: pointer;
}

.form-group select option {
    background: #111318;
    color: #f1f5f9;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Empty State / Grid */
.active-list h2 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface-glass);
    border: 1px dashed var(--surface-border);
    border-radius: 12px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Watch Card Grid - Force Single Column List */
.active-list {
    max-width: 100%;
}

.tactical-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: transparent;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tactical-tabs::-webkit-scrollbar {
    display: none;
}

.tactic-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tactic-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tactic-tab.active {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.watches-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100% !important;
    margin-left: 0 !important;
}

/* View Switcher */
.list-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-switch-group {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    padding: 3px;
    border-radius: 12px;
    display: flex;
    gap: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Fleet Matrix Grid */
.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 0.75rem;
    margin-bottom: 4rem;
    animation: fadeIn 0.3s ease;
}

.matrix-tile {
    aspect-ratio: 1/1;
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px;
}

.matrix-tile:hover {
    background: var(--surface-light);
    transform: translateY(-5px) scale(1.1);
    border-color: var(--accent-blue);
    z-index: 10;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

.matrix-route {
    font-size: 0.6rem;
    font-weight: 850;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.1;
}

.matrix-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    box-shadow: 0 0 10px currentColor;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Watch Card UI - Premium Refinement */
.watch-card {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-md));
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    display: flex; /* Default fallback */
    flex-direction: column;
    overflow: visible;
    cursor: pointer;
}

/* Mobile & Tablet Ultra-Compact Layout (Up to 1024px) */
@media (max-width: 1024px) {
    .watch-card {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        grid-template-areas: 
            "status route actions";
        padding: 0.85rem 1.25rem;
    }

    .watch-status-cell { grid-area: status; display: flex; align-items: center; }
    .watch-status-cell .status-label { display: none; }
    
    .watch-actions-cell { grid-area: actions; display: flex; gap: 0.4rem; justify-content: flex-end; align-items: center; }
    
    .watch-card > .watch-route-cell { grid-area: route; }
    .watch-card > .watch-route-cell .deck-sub { display: none; }
    
    .watch-card > .watch-budget-cell,
    .watch-card > .watch-pulse-cell { display: none; }
}

/* Explicit Fix for Action Buttons */
.watch-action-btn { background: transparent !important; border: none !important; box-shadow: none !important; }
.watch-action-btn i { background: transparent !important; }
.btn-info { color: var(--accent-blue) !important; }

.watch-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.watch-card.expanded {
    border-color: rgba(124,92,255,0.3);
}

.watch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 44px;
    gap: 2rem;
}

.watch-header-main {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex: 1;
}

.watch-route {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: -0.2px;
}

.watch-route i {
    font-size: 0.9rem;
    opacity: 0.4;
    color: var(--text-secondary);
}

.compact-threshold {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    font-weight: 700;
    font-family: 'Outfit';
    font-size: 1.1rem;
}

.compact-threshold .label {
    display: none;
}

.watch-status-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}

.watch-status {
    padding: 0;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.btn-expand {
    background: rgba(255,255,255,0.12); /* Brighter for visibility */
    border: 1px solid rgba(255,255,255,0.25);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.watch-card.expanded .btn-expand {
    background: var(--accent-blue);
    color: white;
    transform: rotate(180deg);
}

.watch-card-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.watch-card.expanded .watch-card-content {
    max-height: 2000px;
    opacity: 1;
    visibility: visible;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.watch-status .pulsing-indicator {
    margin-right: 0;
}

.watch-budget {
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 1.5rem;
    font-family: 'Outfit', sans-serif;
    margin-top: 0.25rem;
}

.watch-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 14px;
    border: 1px solid var(--surface-border);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-item i {
    width: 16px;
    color: var(--accent-blue);
    opacity: 0.7;
}

.watch-card-actions {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--surface-border);
    padding-top: 1.25rem;
}

.btn-delete {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-delete:hover {
    color: var(--accent-danger);
    background: rgba(239, 68, 68, 0.1);
}

.btn-pause {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-pause:hover {
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.1);
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* ── Onboarding Wizard ───────────────────────────────── */
.onboarding-wizard {
    width: min(440px, calc(100vw - 32px));
    background: #0f172a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}

.owiz-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.owiz-dots { display: flex; gap: 8px; align-items: center; }
.owiz-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: all 0.3s ease;
}
.owiz-dot.active { background: #6366f1; width: 24px; border-radius: 4px; }
.owiz-dot.done { background: #10b981; width: 8px; border-radius: 50%; }
.owiz-close {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.owiz-close:hover { background: rgba(255,255,255,0.1); color: #f1f5f9; }

.owiz-steps { position: relative; min-height: 240px; }
.owiz-step { display: none; flex-direction: column; align-items: center; text-align: center; }
.owiz-step.active { display: flex; }

.owiz-icon {
    width: 56px; height: 56px; border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 16px;
}
.owiz-icon--indigo { background: rgba(99,102,241,0.12); border: 1px solid rgba(99,102,241,0.25); color: #818cf8; }
.owiz-icon--purple { background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25); color: #a78bfa; }
.owiz-icon--gold   { background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.25); color: #fbbf24; }

.owiz-title { font-size: 1.1rem; font-weight: 800; color: #f1f5f9; margin-bottom: 10px; }
.owiz-body  { font-size: 0.82rem; color: #64748b; line-height: 1.65; margin-bottom: 24px; max-width: 340px; }

.owiz-btn-primary {
    width: 100%; padding: 13px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white; font-size: 0.9rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
    margin-bottom: 8px;
}
.owiz-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.owiz-btn-ghost {
    width: 100%; padding: 11px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8; font-size: 0.85rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.2s;
}
.owiz-btn-ghost:hover { background: rgba(255,255,255,0.08); color: #f1f5f9; }

.owiz-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.owiz-btn-back {
    background: none; border: none; color: #475569; font-size: 0.8rem;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
    padding: 4px 0; transition: color 0.2s;
}
.owiz-btn-back:hover { color: #94a3b8; }
.owiz-btn-back.hidden { visibility: hidden; pointer-events: none; }
.owiz-skip {
    background: none; border: none; color: #475569; font-size: 0.78rem;
    cursor: pointer; transition: color 0.2s; padding: 4px 0;
}
.owiz-skip:hover { color: #94a3b8; }

.modal-card {
    position: relative;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.form-card {
    max-width: 700px;
    text-align: left;
    background: #0f1117 !important;
    border: 1px solid rgba(99, 102, 241, 0.25) !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7) !important;
    max-height: 90vh;
    overflow-y: auto;
}

.form-card h2 {
    text-align: center;
    color: #f1f5f9;
}

@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-icon {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    outline: none;
    font-size: 1.1rem;
}

.modal-close:hover {
    background: rgba(253, 186, 116, 0.1);
    color: var(--accent-gold);
    transform: rotate(90deg);
}

.modal-card h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-card p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Mobile App Specific Modal Styles */
.mobile-modal {
    max-width: 450px;
}

.qr-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-glow {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.2);
    pointer-events: none;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--surface-border);
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-num {
    width: 24px;
    height: 24px;
    background: var(--accent-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step p {
    margin: 0 !important;
    font-size: 0.9rem;
    color: var(--text-primary) !important;
}

/* User Profile Tab */
.profile-card {
    max-width: 600px;
}

.profile-header {
    display: flex;
    flex-direction: column; /* Centered layout */
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--surface-border);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.profile-info h2 {
    margin-bottom: 0.3rem;
}

.profile-tier-badge {
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 0 auto 2.5rem auto; /* Centered container */
    width: 100%;
    max-width: 450px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.detail-value {
    font-weight: 500;
}

.profile-actions {
    display: flex;
    gap: 1rem;
}

.btn-danger-outline {
    background: transparent;
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-danger);
}

/* Pricing / Billing Tab */
.pricing-header {
    text-align: center;
    margin-bottom: 6rem; /* Increased to fix overlap with higher badges */
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface-glass);
    backdrop-filter: blur(var(--blur-lg));
    border: 1px solid var(--surface-border);
    border-radius: 32px;
    display: flex;
    flex-direction: column;
    padding: 3rem 2rem 2.5rem; /* Reduced top/bottom padding */
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.current-plan-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.1);
    letter-spacing: 0.5px;
    z-index: 15;
}

.pricing-card:hover {
    transform: translateY(-12px);
    border-color: var(--glass-border);
    background: var(--surface-light);
    box-shadow: var(--shadow-premium), 0 20px 40px rgba(0,0,0,0.4);
}

.pricing-card.featured {
    border: 2px solid var(--accent-blue);
    background: rgba(59, 130, 246, 0.08);
    transform: scale(1.08);
    z-index: 10;
}

.pricing-card.featured:hover {
    transform: scale(1.1) translateY(-12px);
}

.pricing-card.elite-glow {
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: linear-gradient(135deg, rgba(15, 16, 18, 0.8), rgba(251, 191, 36, 0.05));
}

.pricing-card.elite-glow:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.15);
}

.plan-badge {
    position: absolute;
    top: -12px; /* Position above the card slightly to avoid overlap */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: var(--accent-blue);
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    z-index: 20;
}

.pricing-card-header h3 {
    font-size: 1.35rem; /* Slightly smaller */
    font-weight: 850;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.25rem;
    color: white;
    letter-spacing: -0.5px;
}

.plan-price {
    font-size: 3rem; /* Slightly smaller */
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1.5rem; /* Reduced margin */
    background: linear-gradient(135deg, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plan-price span {
    font-size: 1.1rem;
    font-weight: 500;
    -webkit-text-fill-color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    margin-bottom: 1.5rem; /* Reduced margin */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem; /* More compact features */
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.plan-features li i {
    color: var(--accent-blue);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.plan-features li.disabled {
    opacity: 0.35;
    text-decoration: line-through;
}

.plan-features li.disabled i {
    color: var(--text-muted);
}

.extra-agent-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-success);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-card button {
    width: 100%;
    padding: 1.25rem !important;
    font-size: 1rem !important;
    justify-content: center;
    border-radius: 16px !important;
}

/* --- Sidebar User Info --- */
.user-profile-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s, border-color 0.2s;
}
.user-profile-mini:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}
/* Persistent top-right avatar overlay */
.user-avatar-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: background 0.2s, border-color 0.2s;
}
.user-avatar-pill:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
}
.user-avatar-pill .mini-avatar {
    border-radius: 50%;
}
.avatar-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.avatar-icon-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: white;
}
.avatar-icon-btn--danger:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.4);
    color: #ef4444;
}

.mini-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-blue);
    background: #333; /* Placeholder background */
}

.user-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logout-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.logout-link:hover {
    color: var(--danger);
}

.sidebar-help-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}
.sidebar-help-btn:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

/* --- Scout Stats Tooltip --- */
.scout-tooltip {
    background: rgba(13, 18, 30, 0.98);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 12px;
    padding: 12px 14px;
    min-width: 210px;
    max-width: calc(100vw - 16px);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    pointer-events: none;
}
.scout-tip-title {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #475569;
    margin-bottom: 8px;
}
.scout-tip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 0.78rem;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #64748b;
}
.scout-tip-row:last-child { border-bottom: none; }
.scout-tip-row span:last-child { color: #e2e8f0; font-weight: 600; text-align: right; }

/* --- Auth Modal --- */
.auth-card {
    max-width: 400px;
    text-align: center;
}

.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: white;
    color: #333 !important;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 20px;
}

.btn-google:hover {
    transform: translateY(-2px);
    background: #f8f8f8;
}

.btn-google img {
    width: 18px;
}

.auth-divider {
    margin: 25px 0;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #0f1012; /* Match modal card background */
    padding: 0 15px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.auth-footer {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.btn-primary-outline {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1.5px solid var(--accent-blue);
    color: var(--accent-blue);
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 15px;
}

.btn-primary-outline:hover {
    background: var(--accent-blue);
    color: white;
}


#email-auth-form .form-group {
    margin-bottom: 0;
}

/* ===========================================
   Mobile Responsive Optimizations
   =========================================== */

/* Hide mobile header by default */
.mobile-app-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--surface-border);
    z-index: 1000;
    align-items: center;
    padding: 0 1.5rem;
    justify-content: space-between;
}

.mobile-logo {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

.sidebar-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    body.user-logged-in .mobile-app-header {
        display: flex;
    }

    body {
        display: block; /* Stack header and container */
    }

    .saas-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .saas-sidebar {
        position: fixed;
        left: -280px; /* Hidden by default */
        top: 0;
        height: 100% !important;
        z-index: 1001 !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 20px 0 50px rgba(0,0,0,0.5);
    }

    .btn-sidebar-close {
        display: flex !important;
    }

    .saas-sidebar.mobile-active {
        transform: translateX(280px);
        display: flex !important; /* Override .auth-only if not logged in */
    }

    .sidebar-mobile-overlay.active {
        display: block;
        opacity: 1;
        z-index: 1001; /* Ensure it's above other elements */
    }

    .saas-content {
        padding: 5rem 1.5rem 2rem; /* Account for mobile header */
        width: 100%;
        min-height: 100vh;
    }

    .stats-row {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-card {
        padding: 0.9rem 1rem;
        border-radius: 14px;
        gap: 0.25rem;
    }

    .stat-value {
        font-size: 1.6rem;
        font-weight: 800;
    }

    .stat-header {
        margin-bottom: 0;
        gap: 0.4rem;
    }

    .stat-header h3,
    .stat-header .stat-label {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .stat-header i {
        font-size: 0.9rem;
    }

    .stat-limit {
        font-size: 0.8rem;
    }

    .stat-unit {
        font-size: 0.7rem;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .content-header h1 {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem !important;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-actions button {
        width: 100%;
        margin-top: 0 !important;
        margin-right: 0 !important;
    }

    .hero-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .watches-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .glass-card {
        padding: 1.5rem;
    }
}

/* ===========================================
   Tactical Map (Shadowbroker Style)
   =========================================== */

.map-tab-container {
    height: 600px; /* Reliable height for dashboard view */
    min-height: 60vh;
    position: relative;
    margin-top: 1rem;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-darker);
    border: 1px solid var(--surface-border);
}

#tab-map {
    display: none;
    padding: 0 !important; /* Full screen map */
}

#tab-map.active {
    display: block;
}

#tactical-map {
    width: 100%;
    height: 100%;
    background: #0b0c0e;
}

.map-container-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-overlay-tactical {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
}

.tactical-status {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.5rem 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.scan-line {
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
    animation: scanMove 3s infinite linear;
}

@keyframes scanMove {
    from { left: -50%; }
    to { left: 150%; }
}

.map-stats-mini {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.m-stat {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

.m-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.m-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

.tactical-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--surface-border);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.leg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.leg-dot.origin { background: var(--accent-blue); box-shadow: 0 0 10px var(--accent-blue); }
.leg-dot.deal { background: var(--accent-gold); box-shadow: 0 0 10px var(--accent-gold); }
.leg-line {
    width: 20px;
    height: 2px;
    background: rgba(59, 130, 246, 0.3);
}

/* Custom Marker Styling for MapLibre */
.tactical-marker {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    pointer-events: auto !important;
}

.marker-core {
    width: 10px;
    height: 10px;
    background: var(--accent-blue);
    border-radius: 50%;
    z-index: 2;
    border: 2px solid white;
}

.marker-core.gold {
    background: var(--accent-gold);
}

.marker-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(59, 130, 246, 0.4);
    border-radius: 50%;
    animation: markerPulse 2s infinite ease-out;
    z-index: 1;
}

.marker-pulse.gold {
    background: rgba(251, 191, 36, 0.4);
}

@keyframes markerPulse {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

.tactical-popup {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--accent-gold);
}

.maplibregl-popup-content {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5) !important;
}

.maplibregl-popup-tip {
    border-top-color: var(--accent-gold) !important;
}

/* AI Agent Intelligence Insights */
.ai-insight-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ai-insight-box:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.ai-insight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: #818cf8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-insight-header i {
    font-size: 0.9rem;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
}

.ai-insight-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #cbd5e1;
    font-style: italic;
    opacity: 0.95;
    font-family: 'Inter', sans-serif;
}

.ai-glow-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #818cf8, transparent);
    animation: aiSweep 4s infinite linear;
}

@keyframes aiSweep {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* AI Top Command Bar */
.ai-command-container {
    margin-bottom: 25px;
    position: relative;
    z-index: 100;
}

.ai-command-bar {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-command-bar:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

/* AI Templates */
.ai-command-container {
    position: relative;
    z-index: 10;
}

.ai-templates {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    position: relative;
    z-index: 11;
}

.ai-templates::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.ai-template-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-template-chip i {
    font-size: 0.85rem;
    opacity: 0.7;
}

.ai-template-chip:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.ai-template-chip:active {
    transform: scale(0.96);
}

/* Pulsing Status Animation */
@keyframes pulse-dot {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.pulsing-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    animation: pulse-dot 2s infinite;
}

.pulsing-indicator.blue { background: var(--accent-blue); }
.pulsing-indicator.gold { background: var(--accent-gold); }
.pulsing-indicator.success { background: var(--accent-success); }

.ai-icon-pulse {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #6366f1, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
}

.ai-icon-pulse::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.5;
}

.ai-input-wrapper {
    flex-grow: 1;
    position: relative;
}

#ai-chat-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 5px 45px 5px 0; /* Extra right padding for mic */
}

#ai-chat-input::placeholder {
    color: #64748b;
}

.ai-voice-btn {
    background: transparent;
    border: none;
    color: var(--ink-mute);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 6px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ai-voice-btn:hover {
    color: var(--ink);
}

.ai-voice-btn.recording {
    color: var(--accent-danger);
    animation: mic-pulse 1.5s infinite;
}

@keyframes mic-pulse {
    0% { transform: translateY(-50%) scale(1); opacity: 1; }
    50% { transform: translateY(-50%) scale(1.3); opacity: 0.7; }
    100% { transform: translateY(-50%) scale(1); opacity: 1; }
}

/* --- Butler Interactive Widgets --- */
.setup-widget {
    background: rgba(10, 16, 32, 0.7);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-top: 2px solid #6366f1;
    border-radius: 14px;
    padding: 0.75rem 0.85rem 0.7rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* Header row */
.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.widget-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.widget-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #818cf8;
    flex-shrink: 0;
}
.widget-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.3px;
}

/* Progress dots */
.widget-progress {
    display: flex;
    align-items: center;
    gap: 5px;
}
.wp-step {
    width: 22px;
    height: 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.1);
    transition: background 0.3s, box-shadow 0.3s;
}
.wp-step.wp-done {
    background: #6366f1;
    box-shadow: 0 0 6px rgba(99,102,241,0.5);
}
.wp-step.wp-optional.wp-done {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16,185,129,0.4);
}

/* Steps container — horizontal row */
.widget-steps {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.widget-step {
    flex: 1;
    min-width: 0;
    border-top: 2px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(255,255,255,0.05);
    padding: 0.45rem 0.55rem 0.4rem;
    transition: border-color 0.3s;
}
.widget-step:last-child {
    border-right: none;
}
.widget-step.step-done {
    border-top-color: #6366f1;
}
.widget-step-optional.step-done {
    border-top-color: #10b981;
}

/* Route Intel Banner — market rate hint in budget step */
.route-intel-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}
.route-intel-banner strong { color: #e2e8f0; }
.ri-loading { color: #64748b; font-size: 0.72rem; }

/* Budget warning — shows when selected budget is below market floor */
.budget-warning {
    display: none;
    align-items: flex-start;
    gap: 7px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    line-height: 1.4;
    margin-bottom: 8px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}
.budget-warning i { margin-top: 2px; flex-shrink: 0; }

/* Date inputs — anytime chip + from/to range */
.widget-date-inputs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 0.2rem;
}
.widget-date-range {
    display: flex;
    gap: 5px;
    width: 100%;
}
.widget-date-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 85px;
}
.widget-date-field label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
}
.widget-date-input {
    width: 100%;
    color-scheme: dark;
    padding: 5px 8px !important;
    min-height: 32px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    cursor: pointer;
}
@media (max-width: 600px) {
    .widget-date-range { flex-direction: column; gap: 4px; }
    .widget-date-field { min-width: auto; }
    .widget-date-field label { font-size: 0.55rem; }
    .widget-date-input { font-size: 0.75rem; padding: 6px 8px !important; min-height: 34px; }
}
@media (max-width: 480px) {
    .widget-date-range { flex-direction: column; }
}

/* Step header */
.step-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}
.step-num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    font-size: 0.65rem;
    font-weight: 800;
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
}
.step-done .step-num {
    background: rgba(99,102,241,0.25);
    border-color: #6366f1;
}
.widget-step-optional.step-done .step-num {
    background: rgba(16,185,129,0.2);
    border-color: #10b981;
    color: #10b981;
}
.step-icon {
    font-size: 0.7rem;
    color: #64748b;
}
.step-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.step-optional-tag {
    font-size: 0.6rem;
    font-weight: 600;
    color: #475569;
    text-transform: none;
    letter-spacing: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 1px 5px;
    margin-left: 4px;
}
.step-check {
    font-size: 0.75rem;
    color: #6366f1;
    opacity: 0;
    transition: opacity 0.3s;
    flex-shrink: 0;
}
.step-done .step-check { opacity: 1; }
.widget-step-optional.step-done .step-check { color: #10b981; }

/* Selected value shown in collapsed accordion header (hidden on desktop) */
.step-val {
    font-size: 0.63rem;
    color: #6366f1;
    font-weight: 600;
    display: none;
    margin-left: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90px;
    flex-shrink: 0;
}
/* Chevron for accordion toggle (hidden on desktop) */
.step-chevron {
    display: none;
    font-size: 0.6rem;
    color: #475569;
    transition: transform 0.25s;
    flex-shrink: 0;
    margin-left: 4px;
}
.widget-step.open .step-chevron { transform: rotate(180deg); }

/* step-body: block on desktop (always visible) */
.step-body { display: block; }

/* Chips */
.widget-options {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.widget-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.18s;
    color: #94a3b8;
    white-space: nowrap;
    user-select: none;
}
.widget-chip:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
}
.widget-chip.selected {
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(79,70,229,0.3));
    border-color: #6366f1;
    color: #e0e7ff;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

/* Flight tier grid */
.widget-tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 4px 0;
}
.widget-tier-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.widget-tier-chip:hover {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.4);
}
.widget-tier-chip.selected {
    background: linear-gradient(135deg, rgba(99,102,241,0.3), rgba(79,70,229,0.3));
    border-color: #6366f1;
    box-shadow: 0 0 8px rgba(99,102,241,0.25);
}
.widget-tier-chip .tier-icon { font-size: 1.3rem; }
.widget-tier-chip .tier-name { font-size: 0.75rem; font-weight: 700; color: var(--ink); }
.widget-tier-chip .tier-desc { font-size: 0.6rem; color: var(--ink-mute); line-height: 1.3; }
.widget-tier-chip.selected .tier-name { color: #e0e7ff; }
.widget-tier-chip.selected .tier-desc { color: #a5b4fc; }

/* Budget custom row */
.budget-custom-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}
.budget-min-row {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.widget-min-label {
    display: block;
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}
.widget-min-input {
    width: 100%;
    box-sizing: border-box;
}
.widget-input {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 10px;
    color: white;
    font-size: 0.8rem;
    flex: 1;
    min-width: 0;
    outline: none;
    transition: border-color 0.2s;
}
.widget-input:focus { border-color: #6366f1; }
.widget-currency-select {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 5px 8px;
    color: #94a3b8;
    font-size: 0.75rem;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}
.widget-currency-select:focus { border-color: #6366f1; }

/* Footer */
.widget-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.widget-summary {
    font-size: 0.72rem;
    color: #64748b;
    flex: 1;
    line-height: 1.4;
}
.widget-summary strong { color: #cbd5e1; }

.btn-deploy-agent {
    background: rgba(255,255,255,0.06);
    color: #475569;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    flex-shrink: 0;
    white-space: nowrap;
}
.btn-deploy-agent.btn-deploy-ready {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}
.btn-deploy-agent.btn-deploy-ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.5);
}

/* Shake + highlight for validation errors */
@keyframes stepShake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-3px); }
    80%       { transform: translateX(3px); }
}
.step-error { animation: stepShake 0.4s ease; border-top-color: #ef4444 !important; }

/* ============================================================
   MOBILE WIDGET — dedicated rules, isolated from desktop CSS
   ============================================================ */
@media (max-width: 600px) {
    .setup-widget {
        white-space: normal !important;
        padding: 0.6rem 0.6rem 0.55rem;
        gap: 0.5rem;
    }

    /* Stack steps vertically */
    .widget-steps {
        display: block !important;
        width: 100% !important;
    }

    /* Each step: 52px collapsed, auto when open */
    .widget-step {
        flex: none !important;
        min-height: 0 !important;
        height: 52px !important;
        overflow: hidden !important;
        border-top: none !important;
        border-right: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.06) !important;
        border-left: 3px solid rgba(255,255,255,0.07) !important;
        padding: 0 !important;
        margin: 0 !important;
        transition: border-left-color 0.3s !important;
    }
    .widget-step.open {
        height: auto !important;
        overflow: visible !important;
    }
    .widget-step.step-done           { border-left-color: rgba(99,102,241,0.55) !important; }
    .widget-step-optional.step-done  { border-left-color: rgba(16,185,129,0.5) !important; }
    .widget-step.step-error          { border-left-color: #ef4444 !important; }

    /* Step header */
    .widget-step .step-header {
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
        padding: 0.6rem 0.65rem !important;
        margin: 0 !important;
        cursor: pointer !important;
        user-select: none !important;
    }
    .step-val     { display: block !important; margin-left: auto !important; }
    .step-chevron { display: flex !important; align-items: center !important; }
    .widget-step.open .step-chevron { transform: rotate(180deg) !important; }

    /* Step body */
    .widget-step .step-body {
        padding: 0 0.65rem 0.65rem !important;
    }

    /* Footer */
    .widget-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .btn-deploy-agent { justify-content: center; }
    .widget-summary   { text-align: center; }
}

.ai-action-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #818cf8;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

/* Butler Response — inline below prompt, matches dark trading-terminal theme */
.ai-response-area {
    display: none;
    margin-top: 14px;
    border-top: 1px solid var(--stroke, rgba(255,255,255,0.07));
    padding-top: 14px;
    color: var(--ink-dim, #9095a8);
    font-size: 0.85rem;
    line-height: 1.7;
    animation: butlerFadeIn 0.25s ease-out;
}

.ai-response-area.active {
    display: block;
}

.ai-response-area strong {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent, #7c5cff);
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    opacity: 0.75;
}

.ai-response-area strong::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-success, #3ddc97);
    flex-shrink: 0;
}

#ai-response-text {
    white-space: pre-wrap;
    color: var(--ink, #e7e9f3);
    font-size: 0.875rem;
    line-height: 1.65;
}

@keyframes butlerFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ── AI Pill Loader (Butler) ──────────────────────────── */
.mini-ai-loader {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-top: 2px;
}

.ai-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    background: none;
    border: none;
    padding: 0;
}
.ai-pill-text {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 400;
    min-width: 140px;
}
.ai-pill-cancel {
    color: var(--accent-gold, #e8950a);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-left: 4px;
}
.ai-pill-cancel:hover { opacity: 0.75; }

.ai-icon-wrap {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}
.ai-star-svg {
    width: 24px;
    height: 24px;
    overflow: visible;
    animation: ai-rotate 5s linear infinite;
    transform-origin: 12px 12px;
}
@keyframes ai-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ai-layer-solid   { transform-origin: 50px 50px; animation: ai-solid  8s ease-in-out infinite; }
.ai-layer-hollow  { transform-origin: 50px 50px; animation: ai-hollow 8s ease-in-out infinite; }
.ai-layer-atomic-base { transform-origin: 50px 50px; animation: ai-atomic-base 8s ease-in-out infinite; }
.ai-layer-atomic  { transform-origin: 50px 50px; animation: ai-atomic 8s ease-in-out infinite; }

@keyframes ai-solid {
    0%,  20%  { fill-opacity: 1; }
    32%        { fill-opacity: 0; }
    84%        { fill-opacity: 0; }
    96%, 100%  { fill-opacity: 1; }
}
@keyframes ai-hollow {
    0%,  18%   { opacity: 0; }
    32%, 84%   { opacity: 1; }
    96%, 100%  { opacity: 0; }
}
@keyframes ai-atomic-base {
    0%,  40%   { opacity: 0; }
    52%, 64%   { opacity: 1; }
    76%, 100%  { opacity: 0; }
}
@keyframes ai-atomic {
    0%,  38%   { opacity: 0; transform: rotate(0deg); }
    52%        { opacity: 1; transform: rotate(45deg); }
    64%        { opacity: 1; transform: rotate(45deg); }
    78%        { opacity: 0; transform: rotate(0deg); }
    100%       { opacity: 0; transform: rotate(0deg); }
}

@media (max-width: 768px) {
    .content-header {
        margin-bottom: 1.5rem;
    }
    .content-header h1 {
        font-size: 1.5rem;
    }
    .header-actions {
        display: none !important;
    }
    .header-icon-btn.mobile-only {
        display: flex;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .ai-command-container {
        margin: 0 10px 20px 10px;
    }
    .ai-command-bar {
        padding: 10px 12px;
        gap: 10px;
    }
    /* Hide robot icon on mobile to save space */
    .ai-icon-pulse {
        display: none;
    }
    .ai-action-btn span {
        display: none;
    }
    .ai-action-btn {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .ai-command-bar {
        gap: 6px;
    }
    .header-actions {
        gap: 8px;
    }
}

/* Auth Visibility Helpers */
.auth-only { display: none !important; }
.guest-only { display: flex !important; }

body.user-logged-in .auth-only { 
    display: block !important; 
}
body.user-logged-in nav.auth-only.saas-sidebar {
    display: flex !important;
}
body.user-logged-in #user-sidebar-info {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

body.user-logged-in .guest-only,
body.user-logged-in .hero-landing,
body.user-logged-in #guest-view,
body.user-logged-in #landing-social {
    display: none !important;
}

/* App Loading Overlay */
#app-loading-overlay {
    position: fixed;
    inset: 0;
    background: #020617;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s;
}

#app-loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
}

.loading-icon-pulse {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    font-size: 24px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.pulse-ring {
    position: absolute;
    inset: -5px;
    border: 1px solid var(--accent-blue);
    border-radius: 50%;
    animation: loadingRingPulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes loadingRingPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.5); opacity: 0; }
}

.loading-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    margin: 1.5rem auto 0;
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    width: 40%;
    height: 100%;
    background: var(--accent-blue);
    box-shadow: 0 0 10px var(--accent-blue);
    animation: loadingProgressMove 1.5s infinite ease-in-out;
}

@keyframes loadingProgressMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(250%); }
}

/* ── AI Splash Loader (page load) ─────────────────────── */
.ai-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.ai-splash-icon {
    width: 80px;
    height: 80px;
}
.ai-splash-svg {
    width: 80px;
    height: 80px;
    overflow: visible;
    animation: ai-splash-rotate 5s linear infinite;
    transform-origin: 40px 40px;
}
@keyframes ai-splash-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ai-splash-text {
    color: rgba(255,255,255,0.55);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    animation: ai-splash-pulse 2s ease-in-out infinite;
    transition: opacity 0.4s ease;
}
@keyframes ai-splash-pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 1; }
}

.ai-sp-layer-solid   { transform-origin: 50px 50px; animation: ai-sp-solid  8s ease-in-out infinite; }
.ai-sp-layer-hollow  { transform-origin: 50px 50px; animation: ai-sp-hollow 8s ease-in-out infinite; }
.ai-sp-layer-atomic-base { transform-origin: 50px 50px; animation: ai-sp-atomic-base 8s ease-in-out infinite; }
.ai-sp-layer-atomic  { transform-origin: 50px 50px; animation: ai-sp-atomic 8s ease-in-out infinite; }

@keyframes ai-sp-solid {
    0%,  20%  { fill-opacity: 1; }
    32%        { fill-opacity: 0; }
    84%        { fill-opacity: 0; }
    96%, 100%  { fill-opacity: 1; }
}
@keyframes ai-sp-hollow {
    0%,  18%   { opacity: 0; }
    32%, 84%   { opacity: 1; }
    96%, 100%  { opacity: 0; }
}
@keyframes ai-sp-atomic-base {
    0%,  40%   { opacity: 0; }
    52%, 64%   { opacity: 1; }
    76%, 100%  { opacity: 0; }
}
@keyframes ai-sp-atomic {
    0%,  38%   { opacity: 0; transform: rotate(0deg); }
    52%        { opacity: 1; transform: rotate(45deg); }
    64%        { opacity: 1; transform: rotate(45deg); }
    78%        { opacity: 0; transform: rotate(0deg); }
    100%       { opacity: 0; transform: rotate(0deg); }
}

/* ── Scout Status Cards ───────────────────────────────── */
.scout-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255,255,255,0.06);
    border-left: 3px solid #22c55e;
    border-radius: 10px;
    padding: 12px 14px;
    margin: 6px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.scout-card--paused { border-left-color: #f59e0b; }

.scout-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.scout-card-route {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}
.scout-card-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
}
.scout-badge--active { background: rgba(34,197,94,0.15); color: #22c55e; }
.scout-badge--paused { background: rgba(245,158,11,0.15); color: #f59e0b; }

.scout-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}
.scout-stat {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scout-card-deal {
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 2px;
}
.scout-deal--found {
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.2);
    color: #86efac;
}
.scout-deal--none {
    background: rgba(255,255,255,0.03);
    color: #64748b;
    font-style: italic;
}

/* Guest Landing Page */
.hero-landing {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
    background: #020617;
    text-align: center;
    overflow-y: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent-blue);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.hero-actions .btn-primary {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(59, 130, 246, 0.6);
}

.hero-stats {
    display: flex;
    gap: 4rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.mini-stat {
    font-size: 1rem;
    color: var(--text-secondary);
}

.mini-stat b {
    display: block;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Paper Plane Animation */
/* Live Vibrancy Styles */
.hero-landing {
    position: relative;
    overflow: hidden;
}

.radar-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    animation: radar-pulse 4s infinite ease-out;
}

@keyframes radar-pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
    50% { opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* ── Hero Upgrade ──────────────────────────────────────── */
.hero-inner {
    display: flex;
    align-items: center;
    gap: 60px;
    max-width: 1100px;
    width: 100%;
    min-height: 100vh;
    padding: 48px 2rem 60px;
    position: relative;
    z-index: 1;
}
.hero-copy { flex: 1; text-align: left; }
.hero-visual { flex-shrink: 0; position: relative; width: 280px; }

.hero-badge {
    background: rgba(99,102,241,0.1);
    color: #818cf8;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99,102,241,0.2);
}
.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1.2rem;
    letter-spacing: -2px;
    color: #f1f5f9;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 480px;
}
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.hero-cta {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 700;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    box-shadow: 0 8px 32px rgba(99,102,241,0.4);
    border-radius: 12px;
    border: none;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(99,102,241,0.55); }
.hero-link-btn {
    color: #64748b;
    font-size: 0.88rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.hero-link-btn:hover { color: #f1f5f9; }
.hero-trust {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #64748b;
}
.hero-trust span { display: flex; align-items: center; gap: 6px; }

.hero-deal-card {
    background: rgba(15,23,42,0.92);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.hero-deal-card--secondary {
    margin-top: -10px;
    margin-left: 20px;
    opacity: 0.7;
    transform: scale(0.94);
}
.hero-deal-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #10b981;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
.hero-deal-route {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.hero-deal-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.hero-deal-amount { font-size: 2rem; font-weight: 900; color: #f1f5f9; }
.hero-deal-badge {
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.25);
    color: #10b981;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}
.hero-deal-meta { font-size: 0.78rem; color: #64748b; margin-bottom: 10px; }
.hero-deal-footer {
    font-size: 0.75rem;
    color: #475569;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
}

.hero-hiw {
    width: 100%;
    max-width: 860px;
    padding: 60px 2rem;
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.hiw-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #475569;
    text-align: center;
    margin-bottom: 36px;
}
.hiw-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.hiw-step { flex: 1; text-align: center; padding: 0 16px; }
.hiw-num {
    font-size: 0.65rem;
    font-weight: 800;
    color: #334155;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.hiw-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #818cf8;
    margin: 0 auto 14px;
}
.hiw-step h3 { font-size: 0.95rem; font-weight: 700; color: #f1f5f9; margin-bottom: 8px; }
.hiw-step p { font-size: 0.8rem; color: #64748b; line-height: 1.5; }
.hiw-connector {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, rgba(99,102,241,0.3), rgba(99,102,241,0.1));
    flex-shrink: 0;
    /* align with center of icon: num(~24px) + margin(10px) + half icon(26px) = ~60px from top */
    margin-top: 60px;
    margin-bottom: 0;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 700px;
    padding: 0 2rem 40px;
    position: relative;
    z-index: 1;
}
.hero-feat {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 30px;
    padding: 8px 16px;
    font-size: 0.8rem;
    color: #94a3b8;
}
.hero-bottom-cta {
    text-align: center;
    padding: 20px 2rem 70px;
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .hero-inner {
        flex-direction: column;
        min-height: 100svh;
        padding: 48px 1.5rem 40px;
        gap: 32px;
        text-align: center;
        justify-content: center;
    }
    .hero-copy { text-align: center; }
    .hero-subtitle { max-width: 100%; }
    .hero-visual { width: 100%; max-width: 300px; }
    .hero-actions { justify-content: center; }
    .hero-trust { justify-content: center; }
    .hero-title { font-size: 2.6rem !important; letter-spacing: -1px; }
    .hiw-steps { flex-direction: column; align-items: center; gap: 20px; }
    .hiw-connector { width: 1px; height: 24px; margin-top: 0; background: rgba(99,102,241,0.2); }
    .hiw-step { padding: 0; max-width: 280px; }
}
/* ─────────────────────────────────────────────────────── */

.live-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 10px #10b981;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 768px) {
    /* Responsive adjustments */
}



/* Tactical Map Container */
#tactical-map {
    width: 100%;
    height: 600px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.2);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: #09090b;
}

.map-container-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tactical Overlay */
.map-overlay-tactical {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tactical-status {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 3px solid var(--accent-gold);
    color: var(--accent-gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-gold);
    box-shadow: 0 0 10px var(--accent-gold);
    animation: scan-move 3s infinite linear;
}

@keyframes scan-move {
    0% { left: 0; }
    100% { left: 100%; }
}

.map-stats-mini {
    display: flex;
    gap: 10px;
}

.m-stat {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.m-label {
    display: block;
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
}

.m-value {
    font-size: 14px;
    color: white;
    font-weight: 700;
}

/* Markers */
.tactical-marker {
    position: relative;
    width: 20px;
    height: 20px;
}

.marker-core {
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.marker-core.gold { background: #fbbf24; }

.marker-pulse {
    width: 30px;
    height: 30px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: marker-pulse 2s infinite ease-out;
}

.marker-pulse.gold { border-color: #fbbf24; }

@keyframes marker-pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* Popups */
.tactical-popup {
    background: #1e293b;
    color: white;
    padding: 10px;
    font-size: 13px;
    border-radius: 8px;
}

.maplibregl-popup-content {
    background: #1e293b !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px !important;
    color: white !important;
    padding: 15px !important;
}

.maplibregl-popup-tip {
    border-top-color: #1e293b !important;
}

.tactical-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leg-item {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.leg-dot { width: 8px; height: 8px; border-radius: 50%; }
.leg-dot.origin { background: #3b82f6; }
.leg-dot.deal { background: #fbbf24; }
.leg-line { width: 12px; height: 2px; background: #fbbf24; opacity: 0.6; border-radius: 2px; }

/* Auth Gate & Landing Hero */
.hero-landing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100vw;
    background: radial-gradient(circle at top, #0f172a 0%, #000 100%);
    position: relative;
    overflow: hidden;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .ai-command-container {
        margin: 0 15px 20px 15px;
    }
    .ai-action-btn span {
        display: none;
    }
    .hero-landing {
        padding: 4rem 1.5rem;
        min-height: auto;
    }
    .hero-title { 
        font-size: 2.2rem !important; 
        line-height: 1.2;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-actions { 
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
        gap: 1rem; 
    }
    .hero-actions .btn-primary, .hero-actions .btn-secondary {
        width: 100%;
        margin-top: 0 !important;
    }
    .hero-stats { 
        flex-direction: column;
        align-items: center;
        gap: 1.5rem; 
    }
    .mini-stat b { font-size: 1.5rem; }
}

/* Subtle Legal Footer */
.premium-footer {
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--surface-border);
    font-size: 0.7rem;
    background: var(--bg-darker);
    opacity: 0.3;
    transition: opacity 0.3s;
    z-index: 1000;
}

.premium-footer:hover {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--accent-blue-light);
}

/* Ensure the main container can grow to push footer down */
.saas-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Demo Modal Styling */
.demo-card {
    max-width: 500px !important;
    padding: 2.5rem !important;
}

.demo-step {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid var(--surface-border);
    transition: transform 0.3s ease;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.demo-step:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

/* --- User Bottom Navigation (Mobile Only) --- */
.user-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(13, 17, 23, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--surface-border);
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding: 0 10px;
}

.user-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    gap: 4px;
    transition: all 0.2s;
    background: none;
    border: none;
    padding: 0;
    min-width: 60px;
}

.user-bottom-nav .nav-item.active {
    color: var(--accent-blue);
}

.user-bottom-nav .fab-center {
    width: 56px !important;
    height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    flex-shrink: 0;
    background: var(--accent-blue);
    color: white;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: -30px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5);
    border: 4px solid #0d1117;
    transition: transform 0.2s;
}

.user-bottom-nav .fab-center:active {
    transform: scale(0.9);
}

.user-bottom-nav .nav-item i {
    font-size: 1.25rem;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-bottom-nav .nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
}

/* ── Tactical Briefing Modal ──────────────────────────── */
.briefing-prompt-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    background: rgba(99,102,241,0.06);
    border: 1px solid rgba(99,102,241,0.14);
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 0.83rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.briefing-prompt-btn:hover {
    background: rgba(99,102,241,0.14);
    border-color: rgba(99,102,241,0.3);
    color: #f1f5f9;
}
.briefing-prompt-btn i {
    color: #818cf8;
    width: 14px;
    flex-shrink: 0;
}

/* ── Feedback FAB ──────────────────────────────────────── */
.feedback-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 8000;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    background: #6366f1;
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99,102,241,0.45);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feedback-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99,102,241,0.55);
}
.feedback-fab i { font-size: 0.95rem; }
body.user-logged-in .feedback-fab { display: flex; }

@media (max-width: 768px) {
    .feedback-fab {
        bottom: 80px;
        right: 14px;
        padding: 9px 13px;
    }
    .feedback-fab-label { display: none; }
}

.feedback-star {
    font-size: 1.8rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.15);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    padding: 0;
    line-height: 1;
}
.feedback-star.selected,
.feedback-star.hover { color: #fbbf24; transform: scale(1.15); }

/* ── Mobile More Menu ──────────────────────────────────── */
.mobile-more-menu {
    position: fixed;
    bottom: 70px;
    right: 8px;
    background: rgba(15, 23, 42, 0.97);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 6px;
    z-index: 1100;
    min-width: 160px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    animation: moreMenuIn 0.18s ease;
}
@keyframes moreMenuIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.more-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}
.more-menu-item:hover,
.more-menu-item.active {
    background: rgba(255,255,255,0.06);
    color: var(--accent-blue);
}
.more-menu-item i {
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

/* --- Mobile App Header --- */
.mobile-app-header {
    display: none;
    align-items: center;
    padding: 0.75rem 1.25rem;
    height: 60px;
    background: #020617;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
}

/* --- Global Header Actions --- */
.header-action-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

/* Duplicate support-quick-btn block removed for alignment fix */

/* --- Mobile Specific Overrides (768px) --- */
@media (max-width: 768px) {
    .saas-sidebar {
        display: none !important;
    }

    /* Only show app navigation on mobile if logged in */
    body.user-logged-in .user-bottom-nav {
        display: flex;
    }

    .saas-content {
        padding-bottom: 85px !important; /* Prevent overlap with bottom nav */
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    body.user-logged-in .mobile-app-header {
        display: flex !important;
        position: sticky;
        top: 0;
        z-index: 1001;
        background: rgba(2, 6, 23, 0.8);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--surface-border);
    }

    .mobile-logo {
        flex-grow: 1;
        text-align: center;
        font-weight: 800;
        letter-spacing: -0.5px;
    }
    
    #mobile-header-title {
        color: var(--text-primary);
        font-family: 'Outfit', sans-serif;
        text-transform: capitalize;
    }

    .saas-main {
        padding: 1rem 0 !important;
    }

    .content-header {
        margin-bottom: 2rem !important;
    }

    .content-header h1 {
        font-size: 1.5rem !important;
    }

    /* Tab-specific mobile overrides */
    
    /* Alerts */
    .notification-group {
        padding-bottom: 1rem;
    }
    
    .checkbox-label {
        font-size: 0.95rem;
    }
    
    .group-desc, .telegram-config-box {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    /* Billing */
    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding: 0 1rem;
    }

    .pricing-card.featured {
        transform: none !important;
        order: -1; /* Show Pro first on mobile */
    }

    .pricing-card {
        padding: 2.5rem 1.5rem !important;
    }

    .plan-price {
        font-size: 2.5rem !important;
    }

    /* Profile */
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-details {
        margin-top: 2rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 1rem 0;
    }

    .profile-actions {
        flex-direction: column;
        width: 100%;
    }

    .profile-actions button {
        width: 100%;
    }

    /* Support */
    .support-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* New Final Mobile UX Refinements */
    #mobile-menu-toggle {
        display: none !important; /* Hide redundant hamburger */
    }

    .mobile-logo {
        flex-grow: 1;
        text-align: left !important;
        padding-left: 0.5rem;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        padding-right: 0.5rem;
    }

    .mobile-profile-trigger {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        overflow: hidden;
        border: 2px solid var(--accent-blue);
        cursor: pointer;
        background: #333;
        transition: transform 0.2s;
    }

    .mobile-profile-trigger:active {
        transform: scale(0.9);
    }

    .mobile-profile-trigger img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .header-action-group {
        gap: 0.75rem;
        width: 100%;
        margin-top: 1.5rem;
        margin-bottom: 2rem;
    }

    .header-action-group button {
        flex: 1;
        width: auto !important;
        margin: 0 !important;
        padding: 0.9rem 0.5rem !important;
        font-size: 0.85rem !important;
    }

    /* AI Template Horizontal Scroll on Mobile */
    .ai-templates {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 0.5rem !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .ai-templates::-webkit-scrollbar {
        display: none;
    }
    
    .ai-template-chip {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        justify-content: center;
        font-size: 0.75rem !important;
        padding: 0.4rem 0.75rem !important;
    }

    /* Scout Cards Mobile Adjustments */
    .tactical-table-header {
        display: none !important;
    }

    .watch-card > .watch-deck-cell:nth-of-type(1) {
        padding: 0.6rem 0;
        border-top: 1px solid rgba(255,255,255,0.05);
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    /* + Add Scout modal: fit viewport and stack form rows */
    .form-card {
        width: 92vw;
        max-width: 92vw;
        padding: 1.5rem !important;
    }
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Profile sub-tabs: compact on small screens */
    .profile-nav-tabs {
        gap: 0.2rem;
        padding: 0.25rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    .profile-sub-tab {
        padding: 0.5rem 0.2rem;
        font-size: 0.72rem;
        gap: 0.25rem;
    }
    .profile-sub-tab i {
        font-size: 0.85rem;
    }
}

/* --- Notification Settings Styles (Base) --- */
.notification-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.notification-group:last-child {
    border-bottom: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.4rem;
    height: 1.4rem;
    accent-color: var(--accent-blue);
}

.group-desc {
    color: var(--text-secondary);
    margin-left: 2.4rem;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.25rem;
}

.telegram-config-box {
    margin-left: 2.4rem;
    margin-top: 1.25rem;
    padding: 1.5rem;
    background: rgba(0, 136, 204, 0.08);
    border-radius: 16px;
    border: 1px solid rgba(0, 136, 204, 0.2);
}

.mini-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.input-action-row {
    display: flex;
    gap: 0.75rem;
}

.input-action-row input {
    flex: 1;
    padding: 0.8rem 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    color: white;
    font-family: monospace;
}

.config-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* --- Intelligence Feed Styles --- */
.intelligence-feed-wrapper {
    padding: 1rem 0;
}

.intelligence-card.news-card {
    border-left: 4px solid var(--accent-gold);
    background: rgba(251, 191, 36, 0.05);
}

.intelligence-card.news-card .card-status {
    color: var(--accent-gold);
}

.impact-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    text-transform: uppercase;
}

.impact-positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.impact-negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.intelligence-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .intelligence-feed {
        grid-template-columns: 1fr;
    }
}

.intelligence-card {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--surface-border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeIn 0.5s ease-out;
}

.intelligence-card.new-item {
    animation: slideInGlow 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-color: var(--accent-gold);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInGlow {
    0% { opacity: 0; transform: scale(0.9) translateY(-20px); filter: brightness(2); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: brightness(1); }
}

.intelligence-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.card-image {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.intelligence-card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--surface-dark));
}

.card-content-wrapper {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-status {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.system-card .card-status { color: #60a5fa; }
.news-card .card-status { color: var(--accent-gold); }
.intercept-card .card-status { color: #f472b6; }

.card-body h3 {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.6rem;
    line-height: 1.4;
    font-weight: 700;
}

.intelligence-card .card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 3;
    max-height: 4.5em; /* Fallback: 1.5 line-height * 3 lines */
}

.intel-link {
    color: var(--accent-gold);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.intel-link:hover {
    color: white;
}

.card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-source {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.card-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.active-pulse-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--accent-gold);
    background: rgba(251, 191, 36, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 100px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

/* Tactical Table View (Enterprise Style - Desktop only) */
@media (min-width: 1025px) {
    .watches-grid {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-width: 100% !important;
    }

    /* ── Shared grid for header + card rows ── */
    :root { --scout-cols: minmax(160px,2.5fr) 110px 100px 120px 90px 160px; }

    .tactical-table-header {
        display: grid;
        grid-template-columns: var(--scout-cols);
        align-items: center;
        gap: 12px;
        padding: 8px 16px;
        color: var(--ink-mute);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-family: 'JetBrains Mono', monospace;
        background: var(--panel-2, rgba(255,255,255,0.02));
        border-bottom: 1px solid var(--stroke);
    }

    .watch-card {
        display: flex;
        flex-direction: column;
        background: var(--panel);
        border: none;
        border-bottom: 1px solid var(--stroke);
        border-radius: 0;
        transition: background 0.15s;
        cursor: default;
        overflow: hidden;
    }
    .watch-card:last-child { border-bottom: none; }
    .watch-card:hover { background: rgba(255,255,255,0.025); }

    .watch-card-row {
        display: grid;
        grid-template-columns: var(--scout-cols);
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
    }

    .watch-card:hover {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.15);
    }

    .watch-card.expanded {
        background: rgba(255, 255, 255, 0.08);
    }

    .watch-header {
        display: contents; /* Allows children to participate in the grid */
    }

    /* Status Column */
    .watch-status-cell {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        font-weight: 700;
    }
    .watch-status-cell.active { color: var(--accent-success); }
    .watch-status-cell.paused { color: var(--text-secondary); }
    .watch-status-cell.hit { color: var(--accent-gold); }

    .watch-status-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        box-shadow: 0 0 10px currentColor;
        flex-shrink: 0;
    }

    .watch-status-dot.active { background-color: var(--accent-success); color: var(--accent-success); }
    .watch-status-dot.paused { background-color: var(--text-secondary); color: var(--text-secondary); }
    .watch-status-dot.hit { background-color: var(--accent-success); color: var(--accent-success); box-shadow: 0 0 10px var(--accent-success); }

    /* Double Deck Text */
    .watch-deck-cell {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.2rem;
    }

    .deck-title {
        font-size: 0.95rem;
        font-weight: 700;
        color: white;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .deck-sub {
        font-size: 0.75rem;
        color: var(--text-muted);
    }

    .watch-budget-cell {
        display: none; /* Replaced by deck-cell */
    }

    .watch-route {
        display: none; /* Replaced by deck-cell */
    }

    .watch-last-scan {
        display: none; /* Replaced by deck-cell */
    }

    .watch-actions-cell {
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
    }

    .watch-action-btn {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid transparent;
        color: var(--text-secondary);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .watch-action-btn:hover {
        background: var(--surface-light);
        color: white;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .watch-action-btn.btn-delete:hover { color: var(--accent-danger); border-color: rgba(239, 68, 68, 0.2); background: rgba(239, 68, 68, 0.1); }
    .watch-action-btn.btn-pause:hover { color: var(--accent-gold); border-color: rgba(251, 191, 36, 0.2); background: rgba(251, 191, 36, 0.1); }
    .watch-action-btn.btn-info:hover { color: var(--accent-blue); border-color: rgba(99, 102, 241, 0.2); background: rgba(99, 102, 241, 0.1); }
}

/* Remove old Tactical Hub components no longer needed */
.agents-operational-view,
.satellite-feed-panel,
.feed-header,
.feed-content,
.feed-item {
    display: none !important;
}

/* Inner Navigation Tabs */
.inner-nav-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--surface-border);
    padding-bottom: 0px;
    max-width: 900px;
    margin-left: 0;
}

.inner-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inner-tab:hover {
    color: white;
}

.inner-tab.active {
    color: white;
    border-bottom-color: var(--accent-blue);
}

.inner-panel {
    display: none !important;
    animation: fadeIn 0.3s ease-out;
}

.inner-panel.active {
    display: block !important;
}

/* Profile Sub-Tabs Styling */
.profile-nav-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    border-radius: 14px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--surface-border);
}

.profile-sub-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-sub-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.profile-sub-tab.active {
    color: white;
    background: var(--surface-light);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.profile-section-panel {
    display: none;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.profile-section-panel.active {
    display: flex !important; /* Centered layout */
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Ensure cards inside panels are centered and text-aligned */
.profile-section-panel .glass-card {
    width: 100%;
    max-width: 700px;
    text-align: center;
    margin: 0 auto;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.notification-group {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 1.5rem auto;
}

/* --- Tactical Onboarding Modal --- */
.onboarding-card {
    max-width: 550px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 3rem;
    text-align: center;
    position: relative;
    border: 1px solid rgba(251, 191, 36, 0.3);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6), 0 0 20px rgba(251, 191, 36, 0.1);
}

.onboarding-header {
    margin-bottom: 2.5rem;
}

.onboarding-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(251, 191, 36, 0.4));
}

.onboarding-header h2 {
    font-size: 2rem;
    font-weight: 850;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.onboarding-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 2.5rem;
}

.onboarding-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.onboarding-step:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(251, 191, 36, 0.2);
}

.step-num {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--accent-gold);
    font-family: 'Outfit', sans-serif;
    opacity: 0.6;
}

.step-content h4 {
    font-size: 1rem;
    color: white;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.onboarding-footer .btn-primary {
    width: 100%;
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* --- Tactical Launchpad (Empty State) --- */
.tactical-launchpad {
    padding: 4rem 2rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    margin: 2rem 0;
}

.launchpad-icon i {
    font-size: 3.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.pulse-gold {
    animation: gold-glow 2s infinite alternate;
}

@keyframes gold-glow {
    from { filter: drop-shadow(0 0 5px rgba(251, 191, 36, 0.4)); }
    to { filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.8)); }
}

.tactical-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
    width: 100%;
    max-width: 800px;
}

.tactical-chip {
    background: var(--surface-glass);
    border: 1px solid var(--surface-border);
    padding: 1.25rem;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.tactical-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-gold);
    opacity: 0.5;
}

.tactical-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.chip-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
}

.chip-price {
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 600;
    text-transform: uppercase;
}

/* --- UI Highlighting --- */
.ui-highlight-ping {
    position: relative;
}

.ui-highlight-ping::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--accent-gold);
    border-radius: inherit;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* --- Support Center & FAQ --- */
.support-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .support-grid { grid-template-columns: 1fr; }
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-question {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.95rem;
}

.faq-question:hover { background: rgba(255, 255, 255, 0.04); }

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: none;
    line-height: 1.5;
}

.faq-item.active .faq-answer { display: block; }
.faq-item.active .faq-question i { transform: rotate(180deg); color: var(--accent-gold); }

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* --- Landing Social Proof Marquee --- */
#landing-social {
    padding: 4rem 0;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.05), transparent);
}

.intel-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.intel-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 0.5rem;
}

.intel-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 10px 0;
}

.marquee-content {
    display: inline-block;
    animation: marquee 40s linear infinite;
}

.intel-chip {
    display: inline-flex;
    align-items: center;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 100px;
    margin-right: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- Professional Footer --- */
.app-footer {
    padding: 3rem 2rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 0;
    text-align: center;
    width: 100%;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: white; }

.app-footer p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================================ */
/* EMERGENCY LAYOUT FIXES - DO NOT REMOVE                       */
/* ============================================================ */

/* 1. Force hide landing/guest elements when logged in */
body.user-logged-in .hero-landing,
body.user-logged-in #guest-view,
body.user-logged-in .guest-only,
body.user-logged-in #landing-social,
body.user-logged-in .landing-social,
body.user-logged-in #landing-intel-feed,
body.user-logged-in .radar-bg {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -9999 !important;
}

/* 2. Viewport-locked layout — desktop only, never override mobile */
@media (min-width: 769px) {
    body.user-logged-in .saas-container {
        display: flex !important;
        flex-direction: row !important;
        height: 100vh !important;
        overflow: hidden !important;
        align-items: stretch !important;
    }

    body.user-logged-in .saas-sidebar.tfa-sidebar {
        height: 100vh !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        flex-shrink: 0 !important;
        position: sticky !important;
        top: 0 !important;
    }

    body.user-logged-in .saas-content {
        overflow-y: auto !important;
        height: 100vh !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Push plan card to bottom of sidebar (all sizes) */
.tfa-sidebar .sidebar-menu {
    flex: 1 !important;
}

@media (max-width: 1024px) {
    body.user-logged-in .saas-container {
        flex-direction: column !important;
    }
}

/* 3. Onboarding Modal Responsiveness Fix */
.modal-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-y: auto !important; /* Essential for scrolling on small viewports */
    padding: 20px 0 !important;
}

.onboarding-card {
    max-height: 85vh !important;
    overflow-y: auto !important;
    margin: auto !important; /* Helps with centering in scroll environments */
    display: flex;
    flex-direction: column;
}

/* Ensure header and footer don't disappear */
.onboarding-header, .onboarding-footer {
    flex-shrink: 0;
}
.onboarding-steps {
    overflow-y: auto;
    flex-grow: 1;
}

/* Weather Integration Styles (TREK Inspired) */
.weather-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    background: var(--surface-light);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.weather-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.weather-badge i {
    color: var(--accent-gold);
    font-size: 0.9rem;
}

.weather-estimate-tag {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-purple);
    margin-left: 0.3rem;
    font-weight: 800;
}

.weather-temp {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.weather-condition {
    color: var(--text-secondary);
    font-weight: 500;
}

/* AI Butler Weather Insight Widget */
.butler-weather-widget {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.butler-weather-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.butler-weather-location {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
}



/* --- Market Intel Tab --- */
#intel-feed-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.intel-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 14px;
    padding: 1rem;
    transition: border-color 0.2s;
}
.intel-card:hover { border-color: rgba(99,102,241,0.3); }
.intel-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.intel-impact {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.intel-time {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.intel-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.4rem 0;
    line-height: 1.3;
}
.intel-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
}
.intel-link {
    font-size: 0.75rem;
    color: var(--accent-blue);
    text-decoration: none;
    display: block;
    margin-bottom: 0.4rem;
}
.intel-link:hover { text-decoration: underline; }
.intel-source {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================================
   MARKET INTELLIGENCE — Trending, Avoid, AI Reco sections
   ============================================================ */
.intel-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* AI Recommendation card */
.intel-reco-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(139,92,246,0.08));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}
.intel-reco-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.intel-reco-header i { color: #818cf8; font-size: 1rem; }
.intel-reco-header span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #818cf8;
}
.intel-reco-items { display: flex; flex-direction: column; gap: 0.65rem; }
.intel-reco-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.83rem;
    color: var(--text-primary);
    line-height: 1.5;
}
.intel-reco-item .reco-tag {
    display: inline-block;
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.4rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* Trending destinations strip */
.intel-trending-strip {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.intel-trending-chip {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.09);
    border-radius: 50px;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
}
.intel-trending-chip:hover {
    border-color: rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.1);
}
.intel-trending-chip .chip-flag { font-size: 1.1rem; }
.intel-trending-chip .chip-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}
.intel-trending-chip .chip-badge {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #f59e0b;
    white-space: nowrap;
}
.intel-trending-chip .chip-why {
    font-size: 0.68rem;
    color: var(--text-muted);
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Avoid destinations list */
.intel-avoid-list { display: flex; flex-direction: column; gap: 0.55rem; }
.intel-avoid-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.18);
    border-radius: 10px;
    padding: 0.75rem 1rem;
}
.intel-avoid-item.sev-critical { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.1); }
.intel-avoid-item.sev-high     { border-color: rgba(245,158,11,0.3); background: rgba(245,158,11,0.07); }
.intel-avoid-item.sev-medium   { border-color: rgba(100,116,139,0.25); background: rgba(100,116,139,0.05); }
.intel-avoid-flag { font-size: 1.25rem; margin-top: 0.05rem; flex-shrink: 0; }
.intel-avoid-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.intel-avoid-reason { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }
.intel-avoid-badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    align-self: flex-start;
}
.intel-avoid-badge.sev-critical { background: rgba(239,68,68,0.25); color: #fca5a5; }
.intel-avoid-badge.sev-high     { background: rgba(245,158,11,0.2); color: #fcd34d; }
.intel-avoid-badge.sev-medium   { background: rgba(100,116,139,0.2); color: #94a3b8; }

/* ============================================================
   TFA REDESIGN — Phase 1 (sidebar shell + topbar)
   ============================================================ */

body.user-logged-in {
    font-family: var(--font-ui);
}

/* Sidebar — narrower (220px) and quieter surface */
body.user-logged-in .saas-sidebar.tfa-sidebar {
    width: 240px;
    background: var(--panel);
    border-right: 1px solid var(--stroke);
    padding: 1.25rem 0.9rem 1rem;
}

/* Brand row */
.tfa-brand-row {
    margin-bottom: 1.25rem !important;
}
.tfa-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}
.tfa-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 20px -8px rgba(124, 92, 255, 0.55);
    flex-shrink: 0;
}
.tfa-brand-text { min-width: 0; }
.tfa-brand-name {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.1;
}
.tfa-brand-tag {
    font-size: 0.65rem;
    color: var(--ink-mute);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 3px;
}

/* Sidebar menu refresh */
.tfa-sidebar .sidebar-menu {
    gap: 0.15rem;
}
.tfa-sidebar .sidebar-menu li a {
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    color: var(--ink-dim);
    border-radius: 10px;
}
.tfa-sidebar .sidebar-menu li:hover a,
.tfa-sidebar .sidebar-menu li a:hover {
    background: var(--panel-2);
    color: var(--ink);
}
.tfa-sidebar .sidebar-menu li.active a {
    background: var(--panel-2);
    color: var(--ink);
}
.tfa-sidebar .sidebar-menu li.active a::before {
    background: var(--accent);
    left: -0.9rem;
    width: 3px;
    top: 25%;
    height: 50%;
    border-radius: 0 3px 3px 0;
}
.tfa-sidebar .sidebar-icon {
    font-size: 0.95rem;
    color: var(--ink-mute);
    width: 20px;
}
.tfa-sidebar .sidebar-menu li.active .sidebar-icon,
.tfa-sidebar .sidebar-menu li a:hover .sidebar-icon {
    color: var(--accent-2);
}

/* NEW SCOUT button: purple gradient */
.tfa-sidebar #btn-new-watch-sidebar {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    box-shadow: 0 8px 24px -10px rgba(124, 92, 255, 0.55);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    height: 40px;
    border-radius: 10px;
}
.tfa-sidebar #btn-new-watch-sidebar:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px -10px rgba(124, 92, 255, 0.7);
}

/* Plan card */
.tfa-plan-card {
    margin: 1rem 0 0.5rem;
    padding: 0.75rem 0.85rem;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 12px;
}
.tfa-plan-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.tfa-plan-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--ink-mute);
}
.tfa-plan-tier {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-2);
}
.tfa-plan-usage {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--ink-dim);
    margin-bottom: 0.45rem;
}
.tfa-plan-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    overflow: hidden;
}
:root[data-theme="light"] .tfa-plan-bar { background: rgba(10,11,16,0.08); }
.tfa-plan-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Topbar strip */
.tfa-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--stroke);
    gap: 1rem;
    flex-wrap: wrap;
}
.tfa-crumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
}
.tfa-crumb-muted { color: var(--ink-mute); }
.tfa-crumb-sep { color: var(--ink-mute); opacity: 0.5; }
.tfa-crumb-active { color: var(--ink); font-weight: 600; }

.tfa-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.tfa-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.38rem 0.75rem;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ink-dim);
    letter-spacing: 0.04em;
}
.tfa-live-pill > span:nth-child(2) { color: var(--pos); font-weight: 700; }
.tfa-live-sep { opacity: 0.4; }
#tfa-live-count {
    font-family: var(--font-mono);
    color: var(--ink);
    font-weight: 600;
}
.tfa-live-suffix { color: var(--ink-mute); }
.tfa-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pos);
    box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.7);
    animation: tfa-pulse 1.6s infinite;
}
@keyframes tfa-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(61, 220, 151, 0); }
    100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); }
}

.tfa-theme-toggle {
    display: inline-flex;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.tfa-theme-btn {
    width: 30px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--ink-mute);
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    transition: background 0.2s, color 0.2s;
}
.tfa-theme-btn:hover { color: var(--ink); }
.tfa-theme-btn.active {
    background: var(--panel);
    color: var(--accent-2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
:root[data-theme="light"] .tfa-theme-btn.active {
    background: #fff;
    box-shadow: 0 2px 6px rgba(10,11,16,0.08);
}

/* Tighten saas-content top padding since we now have a topbar */
body.user-logged-in .saas-content {
    padding-top: 1.25rem;
}

/* Docked user overlay inside the topbar — undo fixed positioning */
#user-sidebar-info.tfa-user-docked {
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    z-index: auto !important;
}
.tfa-user-docked .user-avatar-pill {
    padding: 3px 10px 3px 3px;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 999px;
}
.tfa-user-docked .avatar-icon-btn {
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    color: var(--ink-dim);
}
.tfa-user-docked .avatar-icon-btn:hover {
    color: var(--ink);
    border-color: var(--accent);
}
.tfa-user-docked #user-name { color: var(--ink); }
.tfa-user-docked .notif-dropdown {
    top: calc(100% + 10px);
    right: 0;
}

/* ============================================================
   TFA REDESIGN — Phase 2 (prompt hero + KPI grid refinements)
   ============================================================ */

/* Prompt hero container */
body.user-logged-in .ai-command-container {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem 1rem;
    position: relative;
    overflow: hidden;
}
body.user-logged-in .ai-command-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(124, 92, 255, 0.08), transparent 40%);
    pointer-events: none;
}

/* Example chips */
body.user-logged-in .ai-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
    position: relative;
    z-index: 1;
}
body.user-logged-in .ai-template-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 999px;
    padding: 0.38rem 0.85rem;
    font-size: 0.78rem;
    color: var(--ink-dim);
    cursor: pointer;
    transition: all 0.18s ease;
}
body.user-logged-in .ai-template-chip i {
    font-size: 0.78rem;
    color: var(--ink-mute);
}
body.user-logged-in .ai-template-chip:hover {
    border-color: var(--accent);
    color: var(--ink);
    background: rgba(124, 92, 255, 0.08);
}
body.user-logged-in .ai-template-chip:hover i {
    color: var(--accent-2);
}

/* Input row */
body.user-logged-in .ai-command-bar {
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: 14px;
    padding: 0.5rem 0.6rem 0.5rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s;
}
body.user-logged-in .ai-command-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
body.user-logged-in .ai-icon-pulse {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px -6px rgba(124, 92, 255, 0.6);
}
body.user-logged-in .ai-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
}
body.user-logged-in #ai-chat-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.92rem;
    outline: none;
    padding: 0.35rem 0.2rem;
}
body.user-logged-in #ai-chat-input::placeholder {
    color: var(--ink-mute);
}
body.user-logged-in #ai-send-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border: none;
    color: #fff;
    padding: 0.5rem 0.95rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 6px 18px -8px rgba(124, 92, 255, 0.6);
}

/* Inner nav tabs (Dashboard / Active Scouts) */
body.user-logged-in .inner-nav-tabs {
    border-bottom: 1px solid var(--stroke);
    margin-top: 1.5rem;
    display: flex;
    gap: 0.25rem;
}
body.user-logged-in .inner-tab {
    background: transparent;
    border: none;
    color: var(--ink-mute);
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
body.user-logged-in .inner-tab:hover { color: var(--ink); }
body.user-logged-in .inner-tab.active {
    color: var(--ink);
}
body.user-logged-in .inner-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
body.user-logged-in .inner-tab .badge {
    background: var(--panel-2) !important;
    border: 1px solid var(--stroke);
    color: var(--ink-dim);
    font-family: var(--font-mono);
}

/* Page title — tighter per mockup */
body.user-logged-in .content-header h1 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.3rem;
}
body.user-logged-in .content-header p {
    font-size: 0.85rem;
    color: var(--ink-mute);
}

/* KPI cards (.stat-card) — TFA look, tightened per mockup */
body.user-logged-in .dashboard-grid .stat-card.grid-card {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 0.85rem 0.95rem 0.8rem;
    position: relative;
    overflow: hidden;
    min-height: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: none;
}
body.user-logged-in .dashboard-grid .stat-card.grid-card::before { display: none; }
body.user-logged-in .dashboard-grid .stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0;
    min-height: 28px;
}
body.user-logged-in .dashboard-grid .stat-header h3,
body.user-logged-in .dashboard-grid .stat-header .stat-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
body.user-logged-in .dashboard-grid .stat-header i {
    font-size: 0.78rem;
    color: var(--ink-mute);
}
body.user-logged-in .dashboard-grid .stat-value {
    font-family: var(--font-mono) !important;
    font-size: 1.55rem !important;
    font-weight: 600;
    color: var(--ink) !important;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0;
}
body.user-logged-in .dashboard-grid .stat-value.text-accent {
    color: var(--accent-2) !important;
}
body.user-logged-in .dashboard-grid .stat-limit,
body.user-logged-in .dashboard-grid .stat-unit {
    font-size: 0.78rem;
    color: var(--ink-mute);
    font-family: var(--font-mono);
    font-weight: 400;
    margin-left: 2px;
}

/* Sparkline docked into stat-header (top-right); delta text sits below value */
.tfa-kpi-spark-inline {
    width: 72px;
    height: 22px;
    display: block;
    flex-shrink: 0;
}
.tfa-kpi-spark-inline path.line {
    fill: none;
    stroke: var(--accent-2);
    stroke-width: 1.4;
    stroke-linejoin: round;
    stroke-linecap: round;
}
.tfa-kpi-delta-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--ink-mute);
    margin-top: 0.15rem;
}
.tfa-kpi-delta-text.pos { color: var(--pos); }
.tfa-kpi-delta-text.neg { color: var(--neg); }
.tfa-kpi-delta-text .tfa-arr { font-size: 0.7rem; }

/* Legacy extras block from Phase 2 first pass — hide if present */
.tfa-kpi-extras { display: none; }

/* Sidebar nav tighter */
body.user-logged-in .tfa-sidebar .sidebar-menu li a {
    padding: 0.5rem 0.7rem;
    font-size: 0.84rem;
}
body.user-logged-in .tfa-sidebar .sidebar-icon { font-size: 0.88rem; }

/* Prompt hero tighter */
body.user-logged-in .ai-command-container { padding: 1rem; }
body.user-logged-in .ai-templates { margin-bottom: 0.75rem; gap: 0.4rem; }
body.user-logged-in .ai-template-chip { padding: 0.32rem 0.75rem; font-size: 0.75rem; }
body.user-logged-in .ai-command-bar { padding: 0.4rem 0.5rem 0.4rem 0.75rem; }
body.user-logged-in .ai-icon-pulse { width: 32px; height: 32px; font-size: 0.88rem; }
body.user-logged-in #ai-chat-input { font-size: 0.86rem; }
body.user-logged-in #ai-send-btn { padding: 0.42rem 0.85rem; font-size: 0.78rem; }


/* Responsive: below 900px, hide "scouts scanning" suffix; below 640px simplify */
@media (max-width: 900px) {
    .tfa-live-suffix { display: none; }
}
@media (max-width: 640px) {
    .tfa-topbar { padding-bottom: 0.85rem; }
    .tfa-brand-tag { display: none; }
    body.user-logged-in .saas-sidebar.tfa-sidebar { width: 260px; }
}

/* On mobile, hide Dispatch label — show arrow icon only */
@media (max-width: 640px) {
    .dispatch-label { display: none; }
    #ai-send-btn { padding: 7px 10px; }
}

/* On mobile, mobile-app-header handles user icons — hide duplicates in tfa-topbar */
@media (max-width: 1024px) {
    body.user-logged-in .tfa-topbar #user-sidebar-info,
    body.user-logged-in .tfa-topbar #user-sidebar-info.tfa-user-docked { display: none !important; }
    .tfa-topbar .tfa-theme-toggle { display: none !important; }
}

/* ============================================================
   SKYLARK DESIGN SYSTEM — NEW COMPONENT CLASSES
   ============================================================ */

/* Monospace utility */
.mono {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace;
    font-feature-settings: "zero";
}

/* Sidebar nav section labels */
.nav-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    padding: 0 0.5rem;
    margin: 1.25rem 0 0.4rem;
}
.nav-label:first-child { margin-top: 0.25rem; }

/* Live indicator (topbar) */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--ink-dim);
    letter-spacing: 0.02em;
    width: auto;
    height: auto;
    background: none;
    box-shadow: none;
    animation: none;
    border-radius: 0;
    margin-right: 0;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-success);
    box-shadow: 0 0 0 0 var(--pos-soft);
    animation: livePulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes livePulse {
    0%   { box-shadow: 0 0 0 0 rgba(61,220,151,0.5); }
    70%  { box-shadow: 0 0 0 5px rgba(61,220,151,0); }
    100% { box-shadow: 0 0 0 0 rgba(61,220,151,0); }
}

/* Topbar avatar */
.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: default;
    user-select: none;
    letter-spacing: 0;
}

/* KPI delta line */
.kpi-delta {
    font-size: 0.68rem;
    color: var(--ink-mute);
    margin-top: 2px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
}
.kpi-delta.pos { color: var(--accent-success); }
.kpi-delta.neg { color: var(--accent-danger); }

/* KPI sparkline */
.kpi-spark {
    width: 80px;
    height: 28px;
    display: block;
    margin-top: 6px;
    opacity: 0.7;
}

/* Status pill (scout cards) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.status-pill .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-pill.running {
    background: var(--pos-soft);
    color: var(--accent-success);
    border: 1px solid rgba(61,220,151,0.25);
}
.status-pill.running .dot {
    background: var(--accent-success);
    animation: livePulse 2s ease-in-out infinite;
}
.status-pill.paused {
    background: rgba(255,181,71,0.12);
    color: var(--amber);
    border: 1px solid rgba(255,181,71,0.25);
}
.status-pill.paused .dot { background: var(--amber); }
.status-pill.deal {
    background: rgba(124,92,255,0.12);
    color: var(--accent-2);
    border: 1px solid rgba(124,92,255,0.25);
}
.status-pill.deal .dot {
    background: var(--accent-2);
    animation: livePulse 1.5s ease-in-out infinite;
}

/* Mini bar chart */
.mini-bar {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 20px;
}
.mini-bar div {
    width: 4px;
    border-radius: 2px 2px 0 0;
    background: var(--accent-soft);
    transition: background 0.2s;
}
.mini-bar div:last-child { background: var(--accent); }

/* Prompt hero */
.prompt-hero {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 18px 20px 14px;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s;
}
.prompt-hero:focus-within {
    box-shadow: var(--glow);
    border-color: rgba(124,92,255,0.4);
}
.prompt-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--ink-dim);
    margin-bottom: 12px;
    line-height: 1.5;
}
.agent-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Inter Tight', sans-serif;
}
.prompt-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-bottom: 10px;
}
.prompt-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--ink);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.84rem;
    padding: 0;
}
.prompt-box input::placeholder { color: var(--ink-mute); }
.prompt-submit {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
}
.prompt-submit:hover { opacity: 0.88; }
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip-row .ai-template-chip {
    font-size: 0.68rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--panel-2);
    border: 1px solid var(--stroke);
    color: var(--ink-dim);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    font-family: 'Inter Tight', sans-serif;
    white-space: nowrap;
}
.chip-row .ai-template-chip:hover {
    border-color: var(--accent);
    color: var(--accent-2);
}

/* Activity log card */
.activity-card {
    background: var(--panel);
    border: 1px solid var(--stroke);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 1.25rem;
}
.activity-card .card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.activity-card .card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}
.activity-card .card-title .tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--pos-soft);
    color: var(--accent-success);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.73rem;
    line-height: 1.45;
}
.activity-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 8px;
}
.activity-icon.pos { background: var(--pos-soft); color: var(--accent-success); }
.activity-icon.warn { background: rgba(255,181,71,0.15); color: var(--amber); }
.activity-icon.err  { background: var(--neg-soft); color: var(--accent-danger); }
.activity-icon.info { background: var(--accent-soft); color: var(--accent-2); }
.activity-text { flex: 1; color: var(--ink-dim); }
.activity-text .code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    background: var(--panel-2);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--ink);
}
.activity-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    color: var(--ink-mute);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Scout card redesign */
.watch-card-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
}
.watch-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.watch-cell-route { flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.watch-cell-actions { flex-direction: row; align-items: center; gap: 4px; }
.watch-route-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
    background: var(--bg-3);
    border: 1px solid var(--stroke);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    flex-shrink: 0;
}
.watch-name {
    font-size: 11.5px;
    color: var(--ink-dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.watch-budget {
    font-size: 11.5px;
    color: var(--ink-dim);
    white-space: nowrap;
}
.watch-hits { align-items: flex-start; }
@media (max-width: 768px) {
    .watch-card-row {
        grid-template-columns: 1fr auto auto;
    }
    .watch-cell.watch-hits,
    .watch-cell.watch-budget { display: none; }
}

/* Mobile scout card: route full-width on top, status+price+actions in a row below */
@media (max-width: 600px) {
    .watch-card-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        padding: 14px 14px 12px;
    }
    /* Route spans full width, stacks badge above city name */
    .watch-cell-route {
        flex: 1 1 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .watch-cell-route .watch-route-badge { font-size: 12px; padding: 4px 10px; }
    .watch-cell-route .watch-name { font-size: 11px; color: var(--ink-mute); }
    /* Second row: status | price (flex-1) | actions */
    .watch-cell-status { flex: 0 0 auto; }
    .watch-cell-price { flex: 1 1 auto; padding-left: 4px; }
    .watch-cell-actions {
        flex: 0 0 auto;
        flex-direction: row;
        gap: 6px;
        align-items: center;
    }
    .watch-action-btn { width: 32px; height: 32px; font-size: 0.75rem; }
    /* Expanded deal panel: full-bleed, no side radius */
    .deal-expanded-info {
        border-radius: 0 0 var(--radius) var(--radius) !important;
        padding: 14px !important;
        margin-top: 0 !important;
    }
}

/* ===== DESIGN SYSTEM v2 — Dashboard layout ===== */

/* Content grid: main column + 340px right rail */
.dashboard-grid-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  padding: 20px 22px 40px;
  align-content: start;
}
.dashboard-grid-v2 .full-width { grid-column: 1 / -1; }

/* Page head */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 4px;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 4px; }
.page-sub { font-size: 13px; color: var(--fg-dim); margin: 0; }
.page-actions { display: flex; gap: 8px; }

/* KPI grid inside dashboard */
.kpi-grid-v2 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}
.kpi-label-v2 {
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600;
  display: flex; align-items: center; gap: 6px;
}
.kpi-value-v2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.03em;
  margin-top: 8px; font-family: "JetBrains Mono", monospace;
}
.kpi-value-v2 .unit { font-size: 13px; color: var(--ink-mute); margin-left: 3px; font-weight: 500; }
.kpi-delta-v2 {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; font-size: 11px; font-weight: 600;
  font-family: "JetBrains Mono", monospace;
}
.kpi-delta-v2.pos { color: var(--accent-success); }
.kpi-delta-v2.neg { color: var(--accent-danger); }
.kpi-spark-v2 {
  position: absolute; right: 12px; top: 12px; bottom: 12px; width: 80px; opacity: .85;
}

/* Dash card */
.dash-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  overflow: hidden;
}
.dash-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--stroke);
}
.dash-card-title {
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
}
.dash-tag {
  font-family: "JetBrains Mono", monospace; font-size: 10px; font-weight: 500;
  color: var(--ink-mute); padding: 2px 6px; background: var(--panel-2);
  border-radius: 4px;
}

/* Chart */
.chart-card-v2 { grid-column: 1; }
.chart-wrap { padding: 16px; position: relative; height: 220px; }
.chart-legend {
  display: flex; gap: 14px; align-items: center;
  padding: 10px 16px 14px; font-size: 11px; color: var(--ink-mute);
  border-top: 1px solid var(--stroke);
  font-family: "JetBrains Mono", monospace;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 2px; border-radius: 1px; }

/* Live deals feed (right rail) */
.feed-card-v2 { grid-column: 2; grid-row: span 2; }
.feed-item {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--stroke);
  cursor: pointer; transition: background .15s;
}
.feed-item:hover { background: var(--panel-2); }
.feed-item:last-child { border-bottom: none; }
.feed-route {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600; font-size: 12.5px;
  display: flex; align-items: center; gap: 6px;
}
.feed-route .arrow { color: var(--ink-mute); font-weight: 400; }
.feed-meta { display: flex; gap: 8px; font-size: 10.5px; color: var(--ink-mute); font-family: "JetBrains Mono", monospace; margin-top: 2px; }
.feed-price { font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 13px; text-align: right; }
.feed-price.pos { color: var(--accent-success); }
.feed-was { font-size: 10.5px; color: var(--ink-mute); text-decoration: line-through; margin-top: 2px; text-align: right; font-family: "JetBrains Mono", monospace; }

/* Section tabs */
.section-tabs {
  display: flex; gap: 2px;
  border-bottom: 1px solid var(--stroke);
  padding: 0 4px;
  margin-bottom: -1px;
}
.section-tab {
  padding: 8px 14px; font-size: 12.5px; color: var(--ink-mute);
  border-bottom: 2px solid transparent; cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: color .15s;
  font-weight: 500;
}
.section-tab:hover { color: var(--ink); }
.section-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.section-tab .count {
  font-size: 10.5px; background: var(--panel-2); padding: 1px 6px;
  border-radius: 999px; color: var(--ink-dim);
}

/* Activity log v2 */
.activity-card-v2 { grid-column: 1 / -1; }
.activity-item-v2 {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--stroke);
  font-size: 12.5px;
}
.activity-item-v2:last-child { border-bottom: none; }
.activity-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.activity-dot.success { background: var(--accent-success); }
.activity-dot.warn { background: var(--amber); }
.activity-dot.error { background: var(--accent-danger); }
.activity-dot.info { background: var(--accent); }
.activity-text-v2 { flex: 1; color: var(--ink-dim); line-height: 1.4; }
.activity-time-v2 { font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--ink-mute); white-space: nowrap; }

/* Responsive: collapse to 1 col below 900px */
@media (max-width: 900px) {
  .dashboard-grid-v2 { grid-template-columns: 1fr; padding: 16px; }
  .feed-card-v2 { grid-column: 1; grid-row: auto; }
  .chart-card-v2 { grid-column: 1; }
  .kpi-grid-v2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .kpi-grid-v2 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-value-v2 { font-size: 22px; }
}

/* ======================================================
   LANDING PAGE V2 — Skylark design
   All styles scoped under #guest-view
   ====================================================== */
#guest-view {
  --bg: #07080c; --bg-1: #0e1016; --bg-2: #141621; --bg-3: #1a1d2b;
  --line: rgba(32,35,49,0.5); --line-strong: #2b2f42;
  --fg: #e7e9f3; --fg-dim: #9095a8; --fg-mute: #5e6379;
  --accent: #7c5cff; --accent-2: #a084ff; --accent-soft: #7c5cff1a;
  --pos: #3ddc97; --pos-soft: #3ddc9720; --amber: #ffb547; --neg: #ff5d6e;
  background: var(--bg); color: var(--fg);
  font-family: "Inter Tight", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; overflow-x: hidden;
  flex-direction: column !important;
}
@keyframes lp-pulse { 50% { opacity: .35; } }
@keyframes lp-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
#guest-view .bg-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(800px 500px at 12% 30%, #7c5cff20, transparent 60%),
              radial-gradient(700px 400px at 90% 80%, #3ddc9712, transparent 60%);
}
#guest-view .bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black, transparent 80%);
}
#guest-view .nav {
  position: relative; z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 18px 36px; border-bottom: 1px solid var(--line); backdrop-filter: blur(8px);
}
#guest-view .brand { display: flex; align-items: center; gap: 10px; }
#guest-view .brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 18px -4px var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 11px; letter-spacing: 0.02em;
}
#guest-view .brand-name { font-weight: 700; letter-spacing: -0.02em; }
#guest-view .nav-links { display: flex; gap: 4px; margin-left: 24px; }
#guest-view .nav-link { padding: 7px 12px; font-size: 13px; color: var(--fg-dim); border-radius: 6px; cursor: pointer; transition: all .15s; }
#guest-view .nav-link:hover { background: var(--bg-2); color: var(--fg); }
#guest-view .nav-spacer { flex: 1; }
#guest-view .nav-status {
  display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--fg-dim);
  font-family: "JetBrains Mono", monospace; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px;
}
#guest-view .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pos); animation: lp-pulse 2s infinite; }
#guest-view .btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; font-weight: 500;
  border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--fg);
  cursor: pointer; font-family: inherit; transition: background .15s, border-color .15s; text-decoration: none;
}
#guest-view .btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
#guest-view .btn.primary { background: var(--accent); color: #fff; border-color: transparent; box-shadow: 0 6px 24px -8px var(--accent); }
#guest-view .btn.primary:hover { background: var(--accent-2); }
#guest-view .btn .icon { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 1.8; }
#guest-view .main {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px; max-width: 1280px; margin: 0 auto; padding: 64px 36px 80px; align-items: start; min-width: 0;
}
#guest-view .hero { min-width: 0; }
#guest-view .panels { min-width: 0; }
#guest-view .eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px 5px 8px;
  border: 1px solid var(--line-strong); background: var(--bg-1); border-radius: 999px;
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-dim); letter-spacing: 0.08em; text-transform: uppercase;
}
#guest-view .eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
#guest-view .eyebrow b { color: var(--accent-2); font-weight: 600; }
#guest-view .eyebrow .sep { color: var(--fg-mute); }
#guest-view h1.headline { margin: 22px 0 18px; font-size: clamp(48px, 6.4vw, 88px); line-height: 0.96; letter-spacing: -0.04em; font-weight: 800; }
#guest-view h1.headline .accent { color: transparent; background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; font-style: italic; }
#guest-view .lede { max-width: 520px; color: var(--fg-dim); font-size: 16px; line-height: 1.55; margin: 0 0 32px; }
#guest-view .lede b { color: var(--fg); font-weight: 500; }
#guest-view .cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
#guest-view .cta-primary {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 22px; font-size: 15px; font-weight: 600;
  background: var(--accent); color: #fff; border: none; border-radius: 10px; cursor: pointer;
  box-shadow: 0 12px 40px -10px var(--accent), inset 0 1px 0 #ffffff20;
  font-family: inherit; text-decoration: none; position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s;
}
#guest-view .cta-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 50px -12px var(--accent), inset 0 1px 0 #ffffff20; }
#guest-view .cta-primary .icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
#guest-view .cta-secondary { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-dim); font-size: 14px; font-weight: 500; text-decoration: none; padding: 10px 4px; }
#guest-view .cta-secondary:hover { color: var(--fg); }
#guest-view .cta-secondary .icon { width: 14px; height: 14px; }
#guest-view .trust-row { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 28px; font-size: 13px; color: var(--fg-dim); }
#guest-view .trust-row .item { display: flex; align-items: center; gap: 7px; }
#guest-view .trust-row .check { width: 16px; height: 16px; border-radius: 50%; background: var(--pos-soft); color: var(--pos); display: inline-flex; align-items: center; justify-content: center; }
#guest-view .trust-row .check svg { width: 9px; height: 9px; stroke: currentColor; fill: none; stroke-width: 2.4; }
#guest-view .ticker { margin-top: 44px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, var(--bg-1), transparent); overflow: hidden; position: relative; min-width: 0; }
#guest-view .ticker-viewport { overflow: hidden; width: 100%; min-width: 0; }
#guest-view .ticker-label { font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
#guest-view .ticker-label .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--pos); animation: lp-pulse 2s infinite; }
#guest-view .ticker-track { display: flex; gap: 28px; font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: nowrap; animation: lp-scroll 36s linear infinite; width: max-content; }
#guest-view .ticker-track .item { display: inline-flex; gap: 8px; align-items: baseline; }
#guest-view .ticker-track .route { color: var(--fg); font-weight: 500; }
#guest-view .ticker-track .price { color: var(--accent-2); font-weight: 600; }
#guest-view .ticker-track .delta-pos { color: var(--pos); }
#guest-view .ticker-track .delta-neg { color: var(--neg); }
#guest-view .ticker-track .sep { color: var(--fg-mute); }
#guest-view .panels { display: flex; flex-direction: column; gap: 16px; position: relative; }
#guest-view .panel { background: linear-gradient(180deg, var(--bg-1), var(--bg)); border: 1px solid var(--line-strong); border-radius: 14px; padding: 18px 18px 16px; position: relative; overflow: hidden; box-shadow: 0 30px 60px -30px #00000090; }
#guest-view .panel.featured { transform: rotate(-1.2deg) translateX(-8px); border-color: var(--accent-soft); box-shadow: 0 40px 80px -30px #7c5cff40, 0 0 0 1px #7c5cff20; }
#guest-view .panel.secondary { transform: rotate(0.8deg) translateX(20px); }
#guest-view .panel.tertiary { transform: rotate(-0.4deg) translateX(-4px); opacity: 0.92; }
#guest-view .panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
#guest-view .panel-status { display: inline-flex; align-items: center; gap: 7px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
#guest-view .panel-status.intercepted { color: var(--pos); }
#guest-view .panel-status.scanning { color: var(--accent-2); }
#guest-view .panel-status.queued { color: var(--amber); }
#guest-view .panel-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: lp-pulse 1.8s infinite; }
#guest-view .panel-time { font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--fg-mute); }
#guest-view .panel-route { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
#guest-view .iata { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 28px; letter-spacing: -0.01em; }
#guest-view .panel-route .arrow { color: var(--fg-mute); font-size: 22px; font-family: "JetBrains Mono", monospace; }
#guest-view .panel-meta-row { display: flex; gap: 14px; font-size: 12px; color: var(--fg-dim); font-family: "JetBrains Mono", monospace; margin-top: -8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); }
#guest-view .panel-meta-row .item { display: flex; align-items: center; gap: 5px; }
#guest-view .panel-meta-row .icon { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 1.7; opacity: .6; }
#guest-view .panel-price-block { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
#guest-view .panel-price { font-family: "JetBrains Mono", monospace; font-weight: 700; font-size: 38px; letter-spacing: -0.025em; line-height: 1; }
#guest-view .panel-price .currency { color: var(--fg-mute); font-size: 22px; }
#guest-view .panel-was { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fg-mute); text-decoration: line-through; margin-top: 4px; }
#guest-view .panel-discount { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; background: var(--pos-soft); color: var(--pos); border-radius: 6px; font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 600; }
#guest-view .panel-discount .arrow { font-size: 11px; }
#guest-view .panel-progress { margin-top: 14px; }
#guest-view .panel-progress-row { display: flex; justify-content: space-between; font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-dim); margin-bottom: 6px; }
#guest-view .panel-progress-bar { height: 4px; background: var(--bg-3); border-radius: 2px; overflow: hidden; }
#guest-view .panel-progress-bar > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 2px; }
#guest-view .panel-spark { position: absolute; inset: 0; pointer-events: none; opacity: .12; }
#guest-view .float-tag { position: absolute; z-index: 5; padding: 6px 10px; background: var(--bg-1); border: 1px solid var(--line-strong); border-radius: 8px; font-family: "JetBrains Mono", monospace; font-size: 10.5px; color: var(--fg-dim); display: flex; align-items: center; gap: 7px; box-shadow: 0 12px 30px -10px #00000090; }
#guest-view .float-tag .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px var(--accent-2); animation: lp-pulse 1.8s infinite; }
#guest-view .float-tag-1 { top: -16px; right: 20%; transform: rotate(2deg); }
#guest-view .float-tag-2 { bottom: -10px; left: -10px; transform: rotate(-3deg); }
#guest-view .strip { position: relative; z-index: 1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; max-width: 1280px; margin: 0 auto; }
#guest-view .stat-label { font-family: "JetBrains Mono", monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; }
#guest-view .stat-value { font-family: "JetBrains Mono", monospace; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin-top: 6px; }
#guest-view .stat-value .unit { color: var(--fg-mute); font-size: 16px; font-weight: 500; }
#guest-view .stat-sub { font-size: 11.5px; color: var(--fg-dim); margin-top: 4px; }
#guest-view .section { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 96px 36px; }
#guest-view .section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 48px; gap: 32px; }
#guest-view .section-eyebrow { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-2); font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
#guest-view .section-eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--accent-2); }
#guest-view .section-title { font-size: clamp(32px, 4vw, 52px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 0; max-width: 720px; }
#guest-view .section-title .accent { color: transparent; background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; font-style: italic; }
#guest-view .section-sub { color: var(--fg-dim); font-size: 15px; max-width: 380px; line-height: 1.55; }
#guest-view .how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
#guest-view .how-card { background: linear-gradient(180deg, var(--bg-1), transparent); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px 24px; position: relative; overflow: hidden; transition: border-color .2s, transform .2s; }
#guest-view .how-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
#guest-view .how-num { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--fg-mute); font-weight: 600; letter-spacing: 0.1em; margin-bottom: 32px; }
#guest-view .how-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
#guest-view .how-icon svg { width: 20px; height: 20px; stroke: var(--accent-2); fill: none; stroke-width: 1.6; }
#guest-view .how-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
#guest-view .how-desc { color: var(--fg-dim); font-size: 13.5px; line-height: 1.55; }
#guest-view .how-card .corner { position: absolute; top: 16px; right: 16px; font-family: "JetBrains Mono", monospace; font-size: 10px; color: var(--fg-mute); letter-spacing: 0.1em; }
#guest-view .features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
#guest-view .feature { padding: 18px 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; text-align: left; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, background .15s; }
#guest-view .feature:hover { border-color: var(--line-strong); background: var(--bg-2); }
#guest-view .feature-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--accent-2); }
#guest-view .feature-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }
#guest-view .feature-name { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
#guest-view .feature-desc { font-size: 11.5px; color: var(--fg-mute); line-height: 1.45; }
#guest-view .pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
#guest-view .price-card { background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; display: flex; flex-direction: column; position: relative; }
#guest-view .price-card.featured { border-color: var(--accent-soft); background: linear-gradient(180deg, #7c5cff10, var(--bg-1) 30%); box-shadow: 0 30px 60px -30px var(--accent); }
#guest-view .price-badge { position: absolute; top: -10px; left: 24px; padding: 4px 10px; font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 0.12em; font-weight: 700; background: var(--accent); color: white; border-radius: 4px; }
#guest-view .price-tier { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-mute); font-weight: 600; font-family: "JetBrains Mono", monospace; margin-bottom: 8px; }
#guest-view .price-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
#guest-view .price-amount { display: flex; align-items: baseline; gap: 4px; margin-bottom: 6px; }
#guest-view .price-amount .currency { font-size: 20px; color: var(--fg-mute); font-family: "JetBrains Mono", monospace; }
#guest-view .price-amount .num { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; font-family: "JetBrains Mono", monospace; }
#guest-view .price-amount .per { font-size: 13px; color: var(--fg-dim); margin-left: 4px; }
#guest-view .price-extra { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--fg-mute); margin-bottom: 24px; }
#guest-view .price-features { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--line); padding-top: 20px; flex: 1; }
#guest-view .price-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--fg-dim); line-height: 1.4; }
#guest-view .price-features li b { color: var(--fg); font-weight: 500; }
#guest-view .price-features .check { width: 14px; height: 14px; border-radius: 50%; background: var(--pos-soft); color: var(--pos); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
#guest-view .price-features .check svg { width: 8px; height: 8px; stroke: currentColor; fill: none; stroke-width: 2.6; }
#guest-view .price-cta { display: flex; align-items: center; justify-content: center; padding: 12px; font-weight: 600; font-size: 13px; border-radius: 8px; cursor: pointer; text-decoration: none; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font-family: inherit; }
#guest-view .price-cta:hover { background: var(--bg-2); }
#guest-view .price-card.featured .price-cta { background: var(--accent); color: white; border-color: transparent; }
#guest-view .price-card.featured .price-cta:hover { background: var(--accent-2); }
#guest-view .final-cta { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto 96px; padding: 64px 48px; background: radial-gradient(800px 300px at 50% 0%, var(--accent-soft), transparent 70%), var(--bg-1); border: 1px solid var(--line-strong); border-radius: 20px; text-align: center; }
#guest-view .final-cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 14px; }
#guest-view .final-cta p { color: var(--fg-dim); font-size: 15px; max-width: 460px; margin: 0 auto 28px; }
#guest-view footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 32px 36px; max-width: 1280px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; color: var(--fg-mute); font-size: 12.5px; font-family: "JetBrains Mono", monospace; }
#guest-view footer .links { display: flex; gap: 20px; }
#guest-view footer a { color: var(--fg-dim); text-decoration: none; }
#guest-view footer a:hover { color: var(--fg); }
@media (max-width: 1100px) {
  #guest-view .nav-links { display: none; }
  #guest-view .nav-status { display: none; }
}
@media (max-width: 980px) {
  #guest-view .main { grid-template-columns: 1fr; padding: 36px 20px 56px; gap: 40px; }
  #guest-view .panel.featured, #guest-view .panel.secondary, #guest-view .panel.tertiary { transform: none; }
  #guest-view .nav { padding: 14px 16px; gap: 10px; }
  #guest-view .strip { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 20px; }
  #guest-view .section { padding: 64px 20px; }
  #guest-view .section-head { flex-direction: column; align-items: flex-start; }
  #guest-view .how-grid { grid-template-columns: 1fr; }
  #guest-view .features { grid-template-columns: repeat(2, 1fr); }
  #guest-view .pricing-grid { grid-template-columns: 1fr; }
  #guest-view .final-cta { padding: 40px 20px; margin: 0 16px 48px; }
}
@media (max-width: 640px) {
  #guest-view .nav { padding: 12px 14px; gap: 8px; }
  #guest-view .brand-name { font-size: 14px; }
  #guest-view .nav-status { display: none; }
  #guest-view .nav .btn { padding: 7px 10px; font-size: 12px; }
  #guest-view .nav .btn.primary .icon { display: none; }
  #guest-view h1.headline { font-size: clamp(40px, 11vw, 64px); }
  #guest-view .lede { font-size: 15px; }
  #guest-view .cta-row { flex-direction: column; align-items: stretch; gap: 10px; }
  #guest-view .cta-primary { justify-content: center; padding: 14px 18px; }
  #guest-view .cta-secondary { justify-content: center; }
  #guest-view .trust-row { gap: 14px; font-size: 12px; }
  #guest-view .ticker { padding: 12px 14px; }
  #guest-view .panel { padding: 16px 14px; }
  #guest-view .iata { font-size: 24px; }
  #guest-view .panel-price { font-size: 32px; }
  #guest-view .panel-meta-row { flex-wrap: wrap; gap: 8px; font-size: 11px; }
  #guest-view .float-tag { font-size: 9.5px; padding: 5px 8px; }
  #guest-view .float-tag-1 { right: 8px; }
  #guest-view .strip { grid-template-columns: 1fr 1fr; gap: 18px; padding: 18px 16px; }
  #guest-view .stat-value { font-size: 22px; }
  #guest-view .section { padding: 48px 16px; }
  #guest-view .section-title { font-size: clamp(28px, 7vw, 38px); }
  #guest-view .features { grid-template-columns: 1fr 1fr; }
  #guest-view .price-card { padding: 22px 18px; }
  #guest-view .price-amount .num { font-size: 36px; }
  #guest-view .final-cta { padding: 32px 18px; margin: 0 12px 40px; }
  #guest-view .final-cta h2 { font-size: clamp(24px, 6vw, 32px); }
  #guest-view footer { padding: 24px 16px; flex-direction: column; align-items: flex-start; gap: 12px; font-size: 11.5px; }
  #guest-view footer .links { flex-wrap: wrap; gap: 14px; }
}
@media (max-width: 420px) {
  #guest-view .nav { gap: 6px; }
  #guest-view .nav .btn:not(.primary) { display: none; }
  #guest-view .features { grid-template-columns: 1fr; }
  #guest-view .strip { grid-template-columns: 1fr; }
  #guest-view .trust-row { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ── App Footer (dashboard) ─────────────────────────────── */
.app-footer {
    margin-top: auto;
    padding: 14px 24px;
    border-top: 1px solid var(--stroke);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.app-footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.app-footer-links a {
    font-size: 0.75rem;
    color: var(--ink-mute);
    text-decoration: none;
    transition: color 0.15s;
}
.app-footer-links a:hover { color: var(--ink); }
.app-footer-copy {
    font-size: 0.72rem;
    color: var(--ink-mute);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.6;
}
@media (max-width: 600px) {
    .app-footer { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
}

/* ── Active Scouts card overrides (dashboard inline) ───── */
.dashboard-grid-v2 .dash-card .active-list { padding: 0; }

.dashboard-grid-v2 .dash-card .tactical-command-bar {
    padding: 10px 16px 0;
    border-bottom: 1px solid var(--stroke);
}

.dashboard-grid-v2 .dash-card .tactical-tabs {
    margin-bottom: 0;
    gap: 2px;
}

.dashboard-grid-v2 .dash-card .tactic-tab {
    font-size: 0.72rem;
    padding: 6px 12px;
    border-radius: 6px 6px 0 0;
    letter-spacing: 0.06em;
    border-bottom: 2px solid transparent;
}

.dashboard-grid-v2 .dash-card .tactic-tab.active {
    background: transparent !important;
    color: var(--accent, #7c5cff) !important;
    border-bottom: 2px solid var(--accent, #7c5cff) !important;
}

.dashboard-grid-v2 .dash-card .watches-grid {
    padding: 0;
}

.dashboard-grid-v2 .dash-card .watch-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

/* Empty state inside the inline card */
.dashboard-grid-v2 .dash-card .empty-state.tactical-launchpad {
    padding: 32px 20px;
}

/* ── Sidebar legal links (desktop) ─────────────────────── */
.sidebar-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 10px 0 4px;
    border-top: 1px solid var(--stroke);
    margin-top: 8px;
}
.sidebar-legal a {
    font-size: 10px;
    color: var(--ink-mute);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.15s;
}
.sidebar-legal a:hover { color: var(--ink); }

.sidebar-copy {
    font-size: 9px;
    color: var(--ink-mute);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.45;
    padding-bottom: 6px;
}

/* Hide footer in main content on desktop — sidebar has the links */
@media (min-width: 769px) {
    .app-footer--mobile-only { display: none !important; }
}

/* Show footer only on mobile, hide sidebar legal links */
@media (max-width: 768px) {
    .sidebar-legal, .sidebar-copy { display: none !important; }
    .app-footer--mobile-only { display: flex !important; }
}

/* ── Profile legal links (mobile only) ─────────────────── */
.profile-legal-links {
    display: none; /* hidden on desktop — sidebar has links */
    flex-wrap: wrap;
    gap: 8px 16px;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--stroke);
}
.profile-legal-links a {
    font-size: 11px;
    color: var(--ink-mute);
    text-decoration: none;
    transition: color 0.15s;
}
.profile-legal-links a:hover { color: var(--ink); }
.profile-legal-copy {
    width: 100%;
    font-size: 10px;
    color: var(--ink-mute);
    font-family: 'JetBrains Mono', monospace;
    opacity: 0.5;
    margin-top: 2px;
}
@media (max-width: 768px) {
    .profile-legal-links { display: flex; }
}

/* ── Sidebar collapse toggle ────────────────────────────── */

/* Collapse button — now lives at the BOTTOM of the sidebar */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: none;
    border: none;
    border-top: 1px solid var(--stroke);
    color: var(--ink-mute);
    cursor: pointer;
    padding: 10px 8px;
    border-radius: 0;
    font-size: 0.78rem;
    font-family: inherit;
    margin-top: 0.5rem;
    transition: color 0.15s, background 0.15s;
}
.sidebar-collapse-btn:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.sidebar-collapse-btn i {
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: inline-block;
    font-size: 0.75rem;
    flex-shrink: 0;
}

@media (min-width: 769px) {

    /* ── BASE TRANSITIONS ── */
    body.user-logged-in .saas-sidebar.tfa-sidebar {
        transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
                    padding 0.3s cubic-bezier(0.4,0,0.2,1);
        overflow: hidden;
    }

    /* Text labels: fade + shrink horizontally */
    .nav-text {
        display: inline-block;
        overflow: hidden;
        white-space: nowrap;
        max-width: 160px;
        opacity: 1;
        transition: max-width 0.3s cubic-bezier(0.4,0,0.2,1),
                    opacity 0.2s ease;
        vertical-align: middle;
    }

    /* Brand text */
    .tfa-brand-text {
        overflow: hidden;
        max-width: 160px;
        opacity: 1;
        transition: max-width 0.3s cubic-bezier(0.4,0,0.2,1),
                    opacity 0.2s ease;
    }

    /* Plan card, legal, copy */
    .tfa-plan-card, .sidebar-legal, .sidebar-copy {
        overflow: hidden;
        max-height: 120px;
        opacity: 1;
        transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1),
                    opacity 0.2s ease,
                    margin 0.3s ease,
                    padding 0.3s ease;
    }

    /* Nav links */
    .tfa-sidebar .sidebar-menu li a {
        transition: padding 0.3s cubic-bezier(0.4,0,0.2,1),
                    border-radius 0.2s ease,
                    background 0.15s ease,
                    width 0.3s cubic-bezier(0.4,0,0.2,1);
    }

    /* NEW SCOUT button */
    #btn-new-watch-sidebar {
        transition: width 0.3s cubic-bezier(0.4,0,0.2,1),
                    padding 0.3s cubic-bezier(0.4,0,0.2,1),
                    border-radius 0.2s ease;
        overflow: hidden;
    }

    /* ── COLLAPSED STATE ── */
    body.sidebar-collapsed .saas-sidebar.tfa-sidebar {
        width: 62px !important;
        padding: 1rem 0.5rem !important;
        align-items: center;
    }

    /* Header: just TFA mark centered, hide the extra buttons div */
    body.sidebar-collapsed .sidebar-header {
        justify-content: center !important;
        margin-bottom: 0.75rem !important;
    }
    body.sidebar-collapsed .sidebar-header-btns {
        display: none !important;
    }
    body.sidebar-collapsed .tfa-brand { justify-content: center; }

    /* Fade + shrink text labels */
    body.sidebar-collapsed .nav-text {
        max-width: 0;
        opacity: 0;
    }
    body.sidebar-collapsed .tfa-brand-text {
        max-width: 0;
        opacity: 0;
    }
    body.sidebar-collapsed .tfa-plan-card,
    body.sidebar-collapsed .sidebar-legal,
    body.sidebar-collapsed .sidebar-copy {
        max-height: 0;
        opacity: 0;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* NEW SCOUT — icon square */
    body.sidebar-collapsed #btn-new-watch-sidebar {
        width: 40px !important;
        min-width: unset !important;
        padding: 0 !important;
        border-radius: 10px !important;
        justify-content: center !important;
    }

    /* Sidebar actions: zero margin in collapsed */
    body.sidebar-collapsed .sidebar-actions {
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    /* Nav items — center icon */
    body.sidebar-collapsed .sidebar-menu li {
        position: relative;
        display: flex;
        justify-content: center;
        width: 100%;
    }
    body.sidebar-collapsed .sidebar-menu li a {
        padding: 0.65rem !important;
        border-radius: 10px !important;
        justify-content: center !important;
        width: 40px !important;
    }
    body.sidebar-collapsed .sidebar-menu li.active a::before { display: none !important; }

    /* Collapse button in collapsed mode: centered icon, no label */
    body.sidebar-collapsed .sidebar-collapse-btn {
        justify-content: center;
        padding: 10px 0;
        border-top: 1px solid var(--stroke);
    }
    body.sidebar-collapsed .sidebar-collapse-btn i {
        transform: rotate(180deg);
    }

    /* Hover tooltip for nav items */
    body.sidebar-collapsed .sidebar-menu li a::after {
        content: attr(data-label);
        position: absolute;
        left: calc(100% + 10px);
        top: 50%;
        transform: translateY(-50%);
        background: var(--panel-2, #1a1d2b);
        border: 1px solid var(--stroke);
        color: var(--ink);
        padding: 5px 10px;
        border-radius: 6px;
        font-size: 11px;
        font-weight: 500;
        white-space: nowrap;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.15s;
        z-index: 9999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    body.sidebar-collapsed .sidebar-menu li:hover a::after { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════
   AUTH MODAL — Redesigned v2
═══════════════════════════════════════════════════════ */
.auth-modal-card {
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: #0d0f1a;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04);
    animation: authPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authPop {
    from { transform: scale(0.88) translateY(16px); opacity: 0; }
    to   { transform: scale(1) translateY(0);       opacity: 1; }
}

/* Animated gradient top bar */
.auth-glow-bar {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
    background-size: 300% 100%;
    animation: authGlowShift 3s ease infinite;
}

@keyframes authGlowShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Close button */
.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
    z-index: 10;
}
.auth-modal-close:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.3);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Header section */
.auth-modal-header {
    padding: 28px 28px 0;
    text-align: center;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}

.auth-modal-header h2 {
    font-family: var(--font-ui, 'Inter Tight', sans-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.auth-modal-header p {
    font-size: 0.84rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Body padding wrapper */
.auth-modal-card form,
.btn-google-v2,
.auth-or-divider,
.auth-hint {
    padding-left: 28px;
    padding-right: 28px;
}

/* Google button — dark themed */
.btn-google-v2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 56px);
    margin: 22px 28px 0;
    padding: 11px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
    font-family: inherit;
}
.btn-google-v2:hover {
    background: rgba(255,255,255,0.09);
    border-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* OR divider */
.auth-or-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 28px 16px;
}
.auth-or-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.08);
}
.auth-or-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Input fields with icon prefix */
.auth-input-wrap {
    position: relative;
    margin-bottom: 10px;
}
.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #475569;
    font-size: 0.78rem;
    pointer-events: none;
    transition: color 0.2s;
}
.auth-input {
    width: 100%;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 11px 14px 11px 36px;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.auth-input::placeholder { color: #475569; }
.auth-input:focus {
    border-color: rgba(99,102,241,0.5);
    background: rgba(99,102,241,0.06);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.auth-input-wrap:focus-within .auth-input-icon { color: #818cf8; }

/* Submit button */
.auth-submit-btn {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(99,102,241,0.35);
    letter-spacing: 0.01em;
}
.auth-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(99,102,241,0.5);
}
.auth-submit-btn:active { transform: translateY(0); }
.auth-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Form padding */
#email-auth-form { padding-bottom: 0; }

/* Hint text */
.auth-hint {
    font-size: 0.76rem;
    color: #475569;
    text-align: center;
    margin: 14px 0 24px;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 480px) {
    .auth-modal-card { border-radius: 16px; }
    .auth-modal-header { padding: 22px 20px 0; }
    .btn-google-v2 { width: calc(100% - 40px); margin: 18px 20px 0; }
    .auth-or-divider { margin: 16px 20px 12px; }
    #email-auth-form,
    .auth-hint { padding-left: 20px; padding-right: 20px; }
}

/* Inline deal badge (shown next to route code) */
.inline-deal-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.35);
    color: var(--accent-success, #10b981);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

/* Edit button — accent purple so it's distinct from black */
.watch-action-btn.btn-edit {
    color: #818cf8 !important;
}
.watch-action-btn.btn-edit:hover {
    color: #a5b4fc !important;
    border-color: rgba(129,140,248,0.25) !important;
    background: rgba(129,140,248,0.1) !important;
}

/* ============================================================
   PWA Install Banner & iOS Sheet
   ============================================================ */

/* Bottom banner (Android/Chrome) */
#pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1e1b4b;
    border-top: 1px solid rgba(124,92,255,0.35);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
    animation: pwa-slide-up 0.35s ease;
}
@keyframes pwa-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
/* Push banner above bottom nav on mobile */
@media (max-width: 768px) {
    body.user-logged-in #pwa-install-banner {
        bottom: 65px;
    }
}
.pwa-banner-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.pwa-banner-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
}
.pwa-banner-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
}
.pwa-banner-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.pwa-btn-install {
    background: #7c5cff;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.pwa-btn-install:hover { background: #6d4ef0; }
.pwa-btn-dismiss {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}
.pwa-btn-dismiss:hover { color: #e2e8f0; }

/* iOS instruction sheet */
#pwa-ios-sheet {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: pwa-fade-in 0.25s ease;
}
@keyframes pwa-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pwa-ios-inner {
    background: #1e1b4b;
    border: 1px solid rgba(124,92,255,0.3);
    border-radius: 20px 20px 0 0;
    padding: 28px 24px 40px;
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
    animation: pwa-slide-up 0.35s ease;
}
.pwa-ios-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pwa-ios-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
}
.pwa-ios-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 20px;
}
.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}
.pwa-ios-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.9rem;
    color: #cbd5e1;
    line-height: 1.4;
}
.pwa-ios-num {
    background: #7c5cff;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.pwa-ios-share-icon {
    display: inline-block;
    background: rgba(124,92,255,0.2);
    color: #a78bfa;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.85rem;
}
