/* ================================================
   AltisAI — "Neon Command Center" Theme
   Matches the premium mockup aesthetic:
   Deep navy bg, cyan/purple accents, neon glows
   ================================================ */

:root {
    --bg-dark:       #1a212f;
    --bg-card:       rgba(70, 77, 89, 0.6);
    --bg-card-alt:   rgba(255, 255, 255, 0.03);
    --side-bg:       rgba(26, 33, 47, 0.8);
    --border-neon:   rgba(67, 134, 206, 0.3);
    --border-purple: rgba(123, 183, 240, 0.3);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --accent-cyan:   #4386ce;
    --accent-purple: #7bb7f0;
    --accent-pink:   #99b2d4;
    --accent-green:  #7bb7f0;
    --accent-yellow: #9dcff9;
    --text-main:     #cdd9ec;
    --text-muted:    #99b2d4;
    --text-label:    #627da3;
    --glass-blur:    blur(20px);
    --sidebar-width: 260px;
    --neon-cyan-glow:   0 0 20px rgba(67, 134, 206, 0.35);
    --neon-purple-glow: 0 0 20px rgba(123, 183, 240, 0.35);
    --card-shadow:      0 8px 32px rgba(0, 0, 0, 0.3);
    --brand-gradient: linear-gradient(135deg, #4386ce 0%, #7bb7f0 100%);
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;700;800;900&family=Inter:wght@400;500&display=swap');

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

body, input, button, textarea, select {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 16px;
}

/* Force FontAwesome font for icon elements */
[class^="fa-"], [class*=" fa-"], .fas, .fab, .far, .fa-solid, .fa-brands, .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "Font Awesome 5 Free", "FontAwesome", sans-serif !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.fa-solid, .fas {
    font-weight: 900 !important;
}
.fa-brands, .fab {
    font-weight: 400 !important;
}

html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
}

/* ── ANIMATED BACKGROUND ORBS ── */
body::before, body::after {
    display: none;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    width: 100%;
    overflow-x: hidden;
}

/* ═══════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--side-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    padding: 1.8rem 0;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    top: 0; left: 0;
}

.sidebar-brand {
    padding: 0 1.6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-purple);
    border-radius: 6px;
    flex-shrink: 0;
}

.logo {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0;
}

.gradient-text {
    background: linear-gradient(45deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 0 0.8rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 2px;
    transition: all 0.25s ease;
    letter-spacing: 0.2px;
}

.nav-item i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
}

.nav-item:hover {
    background: var(--bg-card-alt);
    color: var(--accent-blue);
}

.nav-item.active {
    background: var(--bg-card-alt);
    color: var(--accent-purple);
    border-radius: 6px;
}

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

/* ═══════════════════════════════════════
   MAIN VIEW
   ═══════════════════════════════════════ */
.main-view {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem 2.5rem;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

body.first-run .sidebar {
    display: none;
}
body.first-run .main-view {
    margin-left: 0;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.5rem;
}
body.first-run #features-section {
    display: none !important;
}
body.first-run .dashboard-header p.desktop-only {
    display: none !important;
}
body.first-run .dashboard-header h1 {
    font-size: 1.7rem;
}

.container { width: 100%; }

/* ── TOP HEADER ── */
.dashboard-header {
    margin-bottom: 2rem;
    text-align: left;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ═══════════════════════════════════════
   GLASS CARDS
   ═══════════════════════════════════════ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: none;
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: var(--card-shadow);
}

.glass-card:hover {
    box-shadow: 0 12px 24px rgba(97, 109, 190, 0.15);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════ */
.input-group { margin-bottom: 1.5rem; }

label {
    font-size: 0.75rem;
    color: var(--text-label);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    display: block;
}

input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    backdrop-filter: var(--glass-blur);
}

input::placeholder { color: var(--text-muted); }

input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0,0,0,0.4);
    box-shadow: var(--neon-cyan-glow);
}

/* ── CTA BUTTON ── */
.glow-button {
    width: 100%;
    padding: 0 1.5em;
    line-height: 48px;
    height: 48px;
    background: var(--brand-gradient);
    border: none;
    border-radius: 48px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--neon-cyan-glow);
}

.glow-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 25px rgba(140, 69, 255, 0.6);
}

.glow-button.outline {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    line-height: 44px; /* Account for border */
    box-shadow: none;
}
.glow-button.outline:hover {
    background: rgba(0, 229, 255, 0.1);
    color: var(--accent-cyan);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.2), 0 0 15px rgba(0, 229, 255, 0.3);
}

/* ═══════════════════════════════════════
   DASHBOARD COMMAND GRID
   ═══════════════════════════════════════ */
.command-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    min-width: 0;
}

.grid-main-col, .grid-side-col {
    /* Grid items default to min-width: auto, which refuses to shrink below
       the widest child's natural content width -- on narrow viewports this
       silently forced the whole dashboard wider than the screen instead of
       letting cards wrap/shrink. */
    min-width: 0;
}

/* ── SCORE HERO ── */
.score-big {
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
}

.score-delta.positive {
    color: var(--accent-green);
}

.score-delta.negative { color: #ff1744; }

.trend-chart-container {
    flex: 1;
    min-height: 180px;
    position: relative;
}

/* ── ACTION PLAN CARD ── */
.action-plan-card {
    border-color: var(--border-subtle);
    background: var(--bg-card);
}

.plan-item-card {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-subtle);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.plan-item-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-cyan);
    box-shadow: var(--neon-cyan-glow);
}

/* ═══════════════════════════════════════
   RESPONSIVE UTILITIES
   ═══════════════════════════════════════ */
.desktop-only { display: block; }
.mobile-only  { display: none; }

@media (max-width: 1200px) {
    .command-grid { grid-template-columns: 1fr; }
    .score-big { font-size: 5rem; }
}

@media (max-width: 992px) {
    .diagnostic-grid { grid-template-columns: 1fr 1fr; }
    #prompt-stack-content, #why-not-cited-content { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only  { display: block !important; }
    .sidebar      { display: none !important; }
    .sidebar.mobile-active {
        display: flex !important;
        position: fixed;
        top: 0; left: 0;
        width: 280px;
        height: 100%;
        z-index: 99999;
        background: var(--bg-dark);
        box-shadow: 4px 0 25px rgba(0,0,0,0.9);
        overflow-y: auto;
    }
    .main-view    { margin-left: 0 !important; padding: 1rem; padding-bottom: 2rem; max-width: 100vw; box-sizing: border-box; }
    
    .nav-search-bar { 
        flex-direction: column; 
        gap: 1rem; 
        align-items: stretch !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .search-input-wrapper { width: 100% !important; }
    
    .score-hero-content {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center !important;
        text-align: center;
    }
    .score-big { font-size: 4rem; }
    .glass-card { padding: 1.2rem !important; border-radius: 16px !important; }
    
    #search-card { padding: 1.5rem !important; }
    .flex-row { flex-direction: column; gap: 0 !important; }
    
    .metrics-row {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .dashboard-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .glass-card:not(.modal-content) > .card-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    .glass-card:not(.modal-content) > .card-header > button,
    .glass-card:not(.modal-content) > .card-header > .btn,
    .glass-card:not(.modal-content) > .card-header > div > button:not(.glow-button) {
        width: 100% !important;
    }
    
    .hide-mobile { display: none !important; }
    
    .user-hub {
        width: 100%;
        justify-content: space-between;
        gap: 0.8rem;
        flex-wrap: wrap;
    }

    #user-logged-in {
        max-width: 100%;
        overflow: hidden;
    }

    #user-email-display {
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    #search-view .logo {
        width: 180px !important;
    }

    .diagnostic-grid { grid-template-columns: 1fr; }
    
    /* Modals on mobile */
    .modal-content {
        max-width: 95% !important;
        padding: 1.5rem !important;
    }
    
    #pricing-grid {
        grid-template-columns: 1fr !important;
    }

    #pitch-audit-form {
        grid-template-columns: 1fr !important;
    }

    #pitch-audit-form button {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .score-big { font-size: 3.5rem; }
    .sentiment-gauge { padding: 0.8rem; }
    .sentiment-emoji { font-size: 1.5rem; }
    .sentiment-count { font-size: 1.2rem; }
    
    .hub-status { display: none; } /* Hide status badge to save space */

    .modal-backdrop {
        padding: 0.75rem !important;
    }
    .modal-content {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }
}

/* Mobile bottom nav removed */

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

/* ═══════════════════════════════════════
   PHASE 3: ADVANCED INSIGHTS STYLES
   ═══════════════════════════════════════ */

/* -- ROADMAP PHASES -- */
.roadmap-phase {
    position: relative;
    padding-left: 2.5rem;
    padding-bottom: 1.5rem;
    border-left: 1px solid rgba(114, 75, 183, 0.2);
    margin-left: 0.5rem;
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.roadmap-phase:last-child {
    padding-bottom: 0.5rem;
}

.roadmap-phase::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
    z-index: 1;
}

.roadmap-phase-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-timeframe {
    margin-bottom: 1.25rem;
}
.plan-timeframe-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 0.6rem;
}
.plan-task {
    position: relative;
    padding: 0.75rem 0.2rem 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
}
.plan-task:last-child {
    border-bottom: none;
}
.plan-task-why {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.25rem;
}
.plan-task-steps {
    margin: 0.5rem 0 0 1.1rem;
    padding: 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.plan-task-meta {
    display: inline-block;
    margin-top: 0.35rem;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-cyan);
}
.plan-task-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.plan-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    font-size: 0.68rem;
    line-height: 1.3;
    color: var(--text-main);
    background: rgba(67, 134, 206, 0.12);
    border: 1px solid rgba(67, 134, 206, 0.28);
    border-radius: 999px;
    padding: 4px 10px;
    text-decoration: none;
}
.plan-source-chip:hover {
    border-color: var(--accent-cyan);
    color: #fff;
}
.plan-source-engine {
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    font-size: 0.58rem;
}
.review-prompt-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.55rem;
}
.review-prompt-meta {
    font-size: 0.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent-cyan);
    margin-bottom: 0.35rem;
}
.cited-page-link {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    text-decoration: none;
    line-height: 1.4;
}
.cited-page-link:hover { text-decoration: underline; }

/* -- TECHNICAL DIAGNOSTIC -- */
.diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

#why-not-cited-content,
#prompt-stack-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.diagnostic-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(97, 109, 190, 0.05);
}

.diagnostic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(97, 109, 190, 0.1);
}

.diag-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.diagnostic-item.success .diag-icon { color: var(--text-main); filter: none; }
.diagnostic-item.error .diag-icon   { color: var(--text-muted); filter: none; }
.diagnostic-item.warning .diag-icon { color: var(--text-muted); filter: none; }

.diag-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.3rem;
}

.diag-status {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.6rem;
    color: var(--text-muted);
}

.diagnostic-item.success .diag-status { color: var(--text-main); }
.diagnostic-item.error .diag-status   { color: var(--text-muted); }
.diagnostic-item.warning .diag-status { color: var(--text-muted); }

.diag-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.audit-point {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-main);
    padding: 10px 14px;
    background: var(--bg-card-alt);
    border-radius: 8px;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.audit-point:hover {
    transform: translateX(4px);
    background: rgba(255,255,255,0.05);
}

.audit-point.success {
    background: rgba(67, 134, 206, 0.08);
    border-color: rgba(67, 134, 206, 0.15);
    border-left-color: var(--accent-cyan);
}
.audit-point.success i {
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 5px rgba(67, 134, 206, 0.4));
}

.audit-point.error {
    background: rgba(123, 183, 240, 0.08);
    border-color: rgba(123, 183, 240, 0.15);
    border-left-color: var(--accent-purple);
}
.audit-point.error i {
    color: var(--accent-purple);
    filter: drop-shadow(0 0 5px rgba(123, 183, 240, 0.4));
}

.audit-point.warning {
    background: rgba(153, 178, 212, 0.08);
    border-color: rgba(153, 178, 212, 0.15);
    border-left-color: var(--accent-pink);
}
.audit-point.warning i {
    color: var(--accent-pink);
    filter: drop-shadow(0 0 5px rgba(153, 178, 212, 0.4));
}

/* -- WHY NOT CITED CARDS -- */
.wnc-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.1rem;
    animation: fadeUp 0.5s ease-out both;
}

.wnc-competitor-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wnc-badge {
    font-size: 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid var(--border-subtle);
}

.wnc-reason {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
    font-style: italic;
}

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

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

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

@keyframes pulseNeon {
    from { box-shadow: 0 0 5px rgba(36, 136, 225, 0.3); }
    to   { box-shadow: 0 0 20px rgba(36, 136, 225, 0.7); }
}

/* ═══════════════════════════════════════
   USER HUB NAV (HEADER)
   ═══════════════════════════════════════ */
.user-hub {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 100;
}

.hub-status { display: flex; align-items: center; }

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

.hub-link {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.25s;
}

.hub-link:hover { color: var(--accent-cyan); }

.hub-btn {
    background: var(--text-main);
    color: var(--bg-dark);
    border: 1px solid transparent;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hub-btn:hover {
    background: #ffffff;
}

/* ═══════════════════════════════════════
   PILL BADGES & STATUS BADGES
   ═══════════════════════════════════════ */
.pill-badge {
    background: rgba(36, 136, 225, 0.08);
    border: 1px solid rgba(36, 136, 225, 0.2);
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: inline-block;
}

.badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
}

#scan-tier-badge {
    background: rgba(122, 143, 166, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(122, 143, 166, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#scan-tier-badge.economy {
    background: rgba(122, 143, 166, 0.1);
    color: var(--text-muted);
    border-color: rgba(122, 143, 166, 0.2);
}

#scan-tier-badge.boosted {
    background: linear-gradient(135deg, rgba(36, 136, 225, 0.1), rgba(114, 75, 183, 0.1));
    color: var(--accent-cyan);
    border-color: rgba(36, 136, 225, 0.2);
}

#scan-tier-badge.pro {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    color: #FFFFFF;
    border: none;
    box-shadow: 0 4px 12px rgba(114, 75, 183, 0.25);
}

#scan-tier-badge.agency {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 12px rgba(67, 134, 206, 0.35);
}

#scan-tier-badge.flagship {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 0 10px rgba(67, 134, 206, 0.4);
    animation: pulseBlue 1.8s ease-in-out infinite alternate;
}

@keyframes pulseBlue {
    0% { box-shadow: 0 0 10px rgba(67, 134, 206, 0.4); }
    100% { box-shadow: 0 0 20px rgba(67, 134, 206, 0.8); }
}

#pitch-audit-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

#pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    #pricing-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════
   MODALS
   ═══════════════════════════════════════ */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(36, 59, 83, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-neon);
    border-radius: 22px;
    box-shadow: var(--card-shadow), var(--neon-cyan-glow);
    width: 100%;
    opacity: 1;
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlide {
    from { transform: translateY(24px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.close-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
}

.close-btn:hover {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.4);
    color: #ff4757;
}

/* ─── LOADER SPINNER ─── */
.spinner {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(36, 136, 225, 0.1);
    border-top-color: var(--accent-cyan);
    border-right-color: var(--accent-purple);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    box-shadow: 0 0 20px rgba(36, 136, 225, 0.2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── HISTORY TABLE ─── */
#history-table {
    width: 100%;
    border-collapse: collapse;
}

#history-table th {
    padding: 0.8rem 1rem;
    text-align: left;
    color: var(--text-label);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-subtle);
}

#history-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.88rem;
    color: var(--text-muted);
    transition: background 0.2s;
}

#history-table tr:hover td {
    background: rgba(36, 136, 225, 0.03);
}

/* ─── FEATURE STAT CARDS ─── */
.stat-card {
    border-radius: 14px !important;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 4px 12px rgba(98, 187, 193, 0.3) !important;
    transform: translateY(-4px);
}

/* ═══════════════════════════════════════
   NEON ACCENTS — SEARCH VIEW HERO
   ═══════════════════════════════════════ */
#search-view .logo {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: #fff;
    text-shadow: 0 0 40px rgba(36, 136, 225, 0.2);
}

/* Search card neon top line */
#search-card {
    border-color: rgba(36, 136, 225, 0.15);
    border-top: 2px solid var(--accent-cyan);
    background: linear-gradient(180deg, rgba(36, 136, 225,0.04) 0%, var(--bg-card) 8%);
}

/* ─── PROMPT / ACTION CARDS (in results) ─── */
.prompt-badge {
    display: inline-block;
    background: rgba(36, 136, 225, 0.06);
    border: 1px solid rgba(36, 136, 225, 0.15);
    color: var(--accent-cyan);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 4px;
    transition: all 0.2s;
}

.prompt-badge:hover {
    background: rgba(36, 136, 225, 0.12);
    box-shadow: 0 0 12px rgba(36, 136, 225, 0.2);
}

.copy-btn {
    background: rgba(114, 75, 183, 0.12);
    border: 1px solid var(--border-purple);
    color: var(--accent-purple);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background: var(--accent-purple);
    color: #fff;
    box-shadow: var(--neon-purple-glow);
}

.prompt-box {
    position: relative;
    margin-bottom: 1rem;
    background: rgba(114, 75, 183, 0.05);
    border: 1px solid var(--border-purple);
    border-radius: 14px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #d0d8e8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ═══════════════════════════════════════
   PREMIUM MOBILE TIER TWEAKS
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    body.premium-view .dashboard-header { padding-top: 0.5rem; }
    body.premium-view #upsell-container { display: none !important; }
}

/* ═══════════════════════════════════════
   TOAST NOTIFICATION SYSTEM
   ═══════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border-left: 4px solid var(--accent-cyan);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    box-shadow: 0 10px 25px rgba(36, 59, 83, 0.15);
    pointer-events: all;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-body { 
    flex: 1; 
    line-height: 1.5; 
}

.toast.success {
    border-left-color: var(--accent-green);
}
.toast.success .toast-icon { color: var(--accent-green); }

.toast.error {
    border-left-color: #e74c3c;
}
.toast.error .toast-icon { color: #e74c3c; }

.toast.info {
    border-left-color: var(--accent-cyan);
}
.toast.info .toast-icon { color: var(--accent-cyan); }

.toast.warning {
    border-left-color: var(--accent-yellow);
}
.toast.warning .toast-icon { color: var(--accent-yellow); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to   { opacity: 0; transform: translateX(30px) scale(0.95); }
}

/* ═══════════════════════════════════════
   DISABLED NAV ITEMS
   ═══════════════════════════════════════ */
.nav-item.disabled {
    opacity: 0.35;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
}

.nav-item.disabled .nav-lock-badge {
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: rgba(124, 77, 255, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(124, 77, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Pro users see a softer "SOON" badge */
.nav-item.disabled.coming-soon {
    opacity: 0.5;
}

.nav-item.disabled.coming-soon .nav-lock-badge {
    background: rgba(36, 136, 225, 0.08);
    color: var(--accent-cyan);
    border-color: rgba(36, 136, 225, 0.15);
}

/* ═══════════════════════════════════════
   SCAN PROGRESS BAR (Step Pipeline)
   ═══════════════════════════════════════ */
.scan-steps {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 2rem;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.scan-step {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: color 0.4s ease;
}

.scan-step.active { color: var(--accent-cyan); }
.scan-step.done   { color: var(--accent-cyan); }

.step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    transition: all 0.4s ease;
}

.scan-step.active .step-icon {
    border-color: var(--accent-cyan);
    background: rgba(36, 136, 225,0.1);
    color: var(--accent-cyan);
    box-shadow: 0 0 14px rgba(36, 136, 225,0.4);
    animation: pulseNeon 1.2s ease-in-out infinite alternate;
}

.scan-step.done .step-icon {
    border-color: var(--accent-cyan);
    background: rgba(36, 136, 225,0.15);
    color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(36, 136, 225,0.3);
}

.step-progress-track {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 2px;
    overflow: hidden;
}

.step-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 6px rgba(36, 136, 225,0.3);
}

.scan-step.done .step-progress-fill {
    width: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    box-shadow: 0 0 10px rgba(36, 136, 225,0.4);
}

/* ═══════════════════════════════════════
   AUTOMATED REPORTS MODAL SIDEBAR BUTTON
   ═══════════════════════════════════════ */
.sidebar-reports-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    margin-bottom: 0.75rem;
}

.sidebar-reports-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    transform: translateY(-1px);
    border-color: var(--border-subtle);
}

/* ═══════════════════════════════════════
   ADMIN LOGIN MODAL
   ═══════════════════════════════════════ */
#admin-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 5, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#admin-login-overlay .glass-card {
    width: 100%;
    max-width: 380px;
    border-color: var(--border-neon);
    box-shadow: var(--card-shadow), var(--neon-cyan-glow);
    opacity: 1;
    animation: modalSlide 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.25);
    color: #ff4757;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* ═══════════════════════════════════════
   SENTIMENT ANALYSIS COMPONENT
   ═══════════════════════════════════════ */
.sentiment-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 1rem 1.4rem;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    flex: 1;
    transition: all 0.3s ease;
}

.sentiment-gauge:hover {
    background: rgba(255,255,255,0.06);
    transform: translateY(-3px);
}

.sentiment-emoji {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.sentiment-count {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
}

.sentiment-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

#sentiment-positive.active .sentiment-count { color: var(--text-main); text-shadow: none; }
#sentiment-positive.active { border-color: var(--border-subtle); background: rgba(255, 255, 255, 0.04); }

#sentiment-neutral.active .sentiment-count { color: var(--text-main); text-shadow: none; }
#sentiment-neutral.active { border-color: var(--border-subtle); background: rgba(255, 255, 255, 0.04); }

#sentiment-negative.active .sentiment-count { color: var(--text-main); text-shadow: none; }
#sentiment-negative.active { border-color: var(--border-subtle); background: rgba(255, 255, 255, 0.04); }

/* ═══════════════════════════════════════
   SHARE-OF-VOICE COMPONENT
   ═══════════════════════════════════════ */
.sov-model-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.sov-model-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 80px;
    flex-shrink: 0;
}

.sov-model-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 3px;
    overflow: hidden;
}

.sov-model-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.sov-model-pct {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-cyan);
    width: 40px;
    text-align: right;
    flex-shrink: 0;
}

.sov-model-pct.failed {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    width: auto;
    min-width: 40px;
    letter-spacing: 0.02em;
}

.sov-model-failed .sov-model-bar-fill {
    background: rgba(255,255,255,0.12);
}

.sov-model-error {
    flex-basis: 100%;
    font-size: 0.65rem;
    color: var(--text-muted);
    line-height: 1.35;
    padding-left: calc(80px + 0.75rem);
}

/* ═══════════════════════════════════════
   WHY WASN'T I CITED? COMPONENT
   ═══════════════════════════════════════ */
.wnc-card {
    background: rgba(67, 134, 206, 0.04);
    border: 1px solid rgba(67, 134, 206, 0.18);
    border-left: 3px solid #4386ce;
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    transition: all 0.3s ease;
}

.wnc-card:hover {
    background: rgba(67, 134, 206, 0.08);
    border-color: rgba(67, 134, 206, 0.35);
    transform: translateX(4px);
    box-shadow: 0 0 20px rgba(67, 134, 206, 0.1);
}

.wnc-competitor-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: #7bb7f0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wnc-reason {
    font-size: 0.83rem;
    color: #c0cfe0;
    line-height: 1.6;
}

.wnc-badge {
    font-size: 0.62rem;
    background: rgba(67, 134, 206, 0.12);
    color: #4386ce;
    border: 1px solid rgba(67, 134, 206, 0.2);
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ─── Responsive: stack SoV+Sentiment on small screens ─── */
@media (max-width: 900px) {
    .sov-card, .sentiment-card {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .sov-sentiment-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ═══════════════════════════════════════
   AEO ROADMAP PHASES — Expandable
   ═══════════════════════════════════════ */
.roadmap-phase {
    position: relative;
    padding: 0.9rem 1rem 0.9rem 1.8rem;
    border-left: 2px solid rgba(114, 75, 183,0.25);
    margin-left: 6px;
    transition: all 0.3s ease;
}

.roadmap-phase::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 1.2rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 10px rgba(114, 75, 183,0.5);
}

.roadmap-phase:hover {
    background: rgba(114, 75, 183,0.04);
    border-left-color: var(--accent-purple);
}

.roadmap-phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.roadmap-phase-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.3rem;
}

.roadmap-phase-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.roadmap-phase-full {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.7;
    animation: fadeInDown 0.3s ease;
}

/* ═══════════════════════════════════════
   BLADE RUNNER APP TYPOGRAPHY overrides
   ═══════════════════════════════════════ */

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

/* ─── PAYWALL UI ───────────────────────────────────────────────────────── */
.paywalled {
    position: relative !important;
    overflow: hidden;
}
.paywall-blurred-content {
    filter: blur(6px);
    opacity: 0.4;
    user-select: none;
    pointer-events: none;
    transition: filter 0.3s ease;
}
.paywall-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 15, 26, 0.4);
    z-index: 10;
    text-align: center;
    padding: 2rem;
}

