/* =================================================================
   Oost Dashboard - Sidebar, Dock, Speech Bubble, Favourites, Stats
   Ported from v1 dark theme into Horizon Teal light theme
   ================================================================= */

/* =================================================================
   1. DASHBOARD GRID LAYOUT
   ================================================================= */
.oost-dashboard {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0 10px;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
}

/* =================================================================
   2. SIDEBAR AREA (Avatar + Dock)
   ================================================================= */
.sidebar-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0 8px;
    position: sticky;
    top: 0;
    height: fit-content;
    z-index: 50;
}

/* --- Avatar --- */
.sidebar-oost {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sidebar-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.15);
}
.sidebar-avatar:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.25);
}
.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Speech Bubble --- */
.sidebar-speech-bubble {
    position: absolute;
    left: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 14px 38px 14px 16px;
    min-width: 280px;
    max-width: 380px;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    animation: fadeInBubble 0.5s ease forwards;
    animation-delay: 0.3s;
    z-index: 100;
    white-space: normal;
}

/* Speech bubble arrow */
.sidebar-speech-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #E2E8F0;
}
.sidebar-speech-bubble::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #FFFFFF;
}

.sidebar-speech-bubble strong {
    color: #0891B2;
}

/* Close button on speech bubble */
.bubble-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    background: #F1F5F9;
    border-radius: 50%;
    color: #94A3B8;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}
.bubble-close:hover {
    background: #E2E8F0;
    color: #475569;
}

/* Countdown ring */
.countdown-ring {
    position: absolute;
    top: 6px;
    right: 30px;
    width: 20px;
    height: 20px;
}
.countdown-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.countdown-ring circle {
    fill: none;
    stroke: #E2E8F0;
    stroke-width: 2;
}
.countdown-ring circle.progress {
    stroke: #0891B2;
    stroke-dasharray: 78.5; /* 2 * PI * 12.5 */
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 20s linear;
}
.countdown-ring.active circle.progress {
    stroke-dashoffset: 78.5;
}

/* Hidden state for auto-close */
.sidebar-speech-bubble.bubble-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-10px);
    transition: all 0.3s ease;
}

@keyframes fadeInBubble {
    from { opacity: 0; transform: translateY(-50%) translateX(-10px); }
    to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

/* =================================================================
   3. DOCK NAVIGATION
   ================================================================= */
.glass-dock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dock-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    padding: 0;
}
.dock-icon:hover {
    background: #F1F5F9;
}
.dock-icon.active {
    background: rgba(8, 145, 178, 0.08);
    box-shadow: inset 0 0 0 1.5px rgba(8, 145, 178, 0.2);
}

/* Tooltip on hover */
.dock-icon::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #1E293B;
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 200;
}
.dock-icon:hover::after {
    opacity: 1;
}

/* Favourites badge */
.dock-icon .fav-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.dock-icon .fav-count.hidden { display: none; }

/* --- Dock Divider + Theme Toggle (inside glass-dock) --- */
.dock-divider {
    width: 28px;
    height: 1px;
    background: #E2E8F0;
    margin: 2px auto;
}
.dock-theme-slot {
    display: flex;
    align-items: center;
    justify-content: center;
}
.dock-theme-slot .theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}
[data-theme="dark"] .dock-divider {
    background: #334155;
}

/* =================================================================
   4. DASHBOARD MAIN CONTENT
   ================================================================= */

/* --- Dashboard Topbar (theme toggle + sign in) --- */
.dashboard-main-area {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 24px 0 12px;
    flex-shrink: 0;
}

.dashboard-content {
    padding: 0 24px 16px 20px;
    flex: 1;
    overflow-x: hidden;
}

/* --- Dashboard Title --- */
.dashboard-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

/* --- Stats Bar --- */
.dash-stats {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

/* --- Search Row (search + stats inline) --- */
.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.search-row .search-display {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 70%;
    margin-bottom: 0;
}
.search-row .dash-stats {
    flex-shrink: 0;
    margin-bottom: 0;
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 99px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
}
.stat-pill .stat-icon { font-size: 0.9rem; }

/* --- Search Query Display --- */
.search-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    max-width: 70%;
    width: auto;
}
.search-display-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94A3B8;
    font-weight: 600;
    flex-shrink: 0;
}
.search-display-input {
    flex: 0 1 auto;
    min-width: 60px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.88rem;
    color: #1E293B;
    outline: none;
}
.search-refine-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #0891B2;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    font-family: inherit;
}
.search-refine-btn:hover { background: #0E7490; }
.search-refine-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- View Switcher --- */
.view-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.view-controls .results-label {
    font-size: 0.85rem;
    color: #64748B;
}
.view-switcher {
    display: flex;
    gap: 4px;
    background: #F1F5F9;
    border-radius: 8px;
    padding: 3px;
}
.view-btn {
    padding: 5px 14px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.view-btn:hover { color: #1E293B; }
.view-btn.active {
    background: #FFFFFF;
    color: #0891B2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* =================================================================
   5. RESULT CARDS (Dashboard Override)
   ================================================================= */
/* Masonry / mosaic layout using CSS columns */
.dash-results-grid {
    column-count: 1;
    column-gap: 16px;
}

/* Desktop: 3-column masonry */
@media (min-width: 1024px) {
    .dash-results-grid:not(.timeline-view) {
        column-count: 3;
        column-gap: 18px;
    }
}
/* Tablet: 2-column masonry */
@media (min-width: 768px) and (max-width: 1023px) {
    .dash-results-grid:not(.timeline-view) {
        column-count: 2;
        column-gap: 16px;
    }
}

/* Timeline view: single column */
.dash-results-grid.timeline-view {
    column-count: 1;
}
.dash-results-grid.timeline-view .result-item {
    border-left: 3px solid #0891B2;
    padding-left: 18px;
}

/* Favourite button on cards (inline in actions row) */
.fav-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.fav-btn:hover {
    background: #FEF2F2;
    transform: scale(1.1);
}
.fav-btn.favourited {
    background: #FEF2F2;
    color: #EF4444;
}

/* Make result items work in masonry layout */
.oost-dashboard .result-item {
    position: relative;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.oost-dashboard .result-item:hover {
    border-color: #0891B2;
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.1);
}
.oost-dashboard .result-item:active {
    transform: scale(0.985);
}

/* Score circle (top-right of card) */
.score-circle {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2.5px solid currentColor;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Title clamp: max 2 lines then ellipsis */
.card-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    padding-right: 48px; /* leave room for score circle */
}

/* Description: keep short */
.card-desc {
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748B;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Fact chips row */
.fact-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.fact-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.chip-funding {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}
.chip-deadline {
    background: #FFF7ED;
    color: #D97706;
    border: 1px solid #FDE68A;
}
.chip-audience {
    background: #F0F9FF;
    color: #0284C7;
    border: 1px solid #BAE6FD;
}

/* Actions row (Apply + Fav at bottom of card) */
.result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
}

/* =================================================================
   6. FAVOURITES VIEW
   ================================================================= */
.favourites-view,
.settings-view {
    padding: 20px 0;
}

.favourites-empty {
    text-align: center;
    padding: 48px 20px;
    color: #94A3B8;
}
.favourites-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}
.favourites-empty h3 {
    color: #64748B;
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.favourites-empty p {
    font-size: 0.85rem;
}

/* =================================================================
   7. SETTINGS VIEW
   ================================================================= */
.settings-section {
    margin-bottom: 24px;
}
.settings-section h3 {
    font-size: 0.95rem;
    color: #1E293B;
    margin-bottom: 10px;
    font-weight: 600;
}
.settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.settings-btn:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}
.settings-btn.danger {
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.2);
}
.settings-btn.danger:hover {
    background: #FEF2F2;
    border-color: rgba(239, 68, 68, 0.4);
}

/* Version info */
.settings-version {
    font-size: 0.75rem;
    color: #94A3B8;
    margin-top: 32px;
}

/* =================================================================
   7. OPPORTUNITY DETAIL VIEW
   ================================================================= */

/* Detail button on card */
.detail-btn {
    width: 36px;
    height: 36px;
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s;
    flex-shrink: 0;
}
.detail-btn:hover {
    background: #E0F2FE;
    border-color: #0891B2;
}

.result-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Back button */
.detail-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.2s;
}
.detail-back-btn:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

/* Detail card container */
.opp-detail {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    max-width: 860px;
}

/* Header: title + score */
.opp-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.opp-detail-header-left {
    flex: 1;
    min-width: 0;
}
.opp-detail-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.badge-org-type {
    background: #F1F5F9;
    color: #475569;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 99px;
    font-weight: 600;
    text-transform: capitalize;
}
.opp-detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1E293B;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.opp-detail-org {
    font-size: 0.95rem;
    color: #64748B;
    margin: 0;
    font-weight: 500;
}

/* Score circle (detail) */
.opp-detail-score {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid currentColor;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.opp-detail-score-pct {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
}
.opp-detail-score-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Key facts grid */
.opp-detail-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid #F1F5F9;
    border-bottom: 1px solid #F1F5F9;
    margin-bottom: 24px;
}
.opp-fact {
    padding: 0;
}
.opp-fact-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94A3B8;
    font-weight: 600;
    margin-bottom: 4px;
}
.opp-fact-value {
    font-size: 0.92rem;
    color: #1E293B;
    font-weight: 600;
}

/* Section blocks */
.opp-detail-section {
    margin-bottom: 24px;
}
.opp-detail-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748B;
    font-weight: 700;
    margin: 0 0 10px;
}
.opp-detail-section p {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.7;
    margin: 0;
}

/* Tags */
.opp-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.opp-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
}
.opp-tag-benefit {
    background: #ECFDF5;
    color: #065F46;
}
.opp-tag-industry {
    background: #EFF6FF;
    color: #1E40AF;
}
.opp-tag-stage {
    background: #FEF3C7;
    color: #92400E;
}

/* Action bar */
.opp-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #F1F5F9;
    margin-top: 8px;
}
.opp-detail-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: #0891B2;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.25);
}
.opp-detail-apply-btn:hover {
    background: #0E7490;
    transform: translateY(-1px);
}
.opp-detail-source-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 12px 20px;
    background: none;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
}
.opp-detail-source-link:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

/* Mobile detail */
@media (max-width: 767px) {
    .opp-detail {
        padding: 20px 16px;
    }
    .opp-detail-header {
        flex-direction: column;
    }
    .opp-detail-score {
        align-self: flex-start;
    }
    .opp-detail-facts {
        grid-template-columns: 1fr 1fr;
    }
    .opp-detail-actions {
        flex-wrap: wrap;
    }
}

/* Dark mode */
[data-theme="dark"] .detail-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .detail-btn:hover {
    background: rgba(8, 145, 178, 0.15);
    border-color: #0891B2;
}
[data-theme="dark"] .detail-back-btn {
    color: #94A3B8;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .detail-back-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .opp-detail {
    background: #1a182d;
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .opp-detail-title { color: #f0f0f0; }
[data-theme="dark"] .opp-detail-org { color: #94A3B8; }
[data-theme="dark"] .opp-detail-score { background: #1a182d; }
[data-theme="dark"] .opp-detail-facts {
    border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .opp-fact-value { color: #e0e0e0; }
[data-theme="dark"] .opp-detail-section h3 { color: #94A3B8; }
[data-theme="dark"] .opp-detail-section p { color: #c0c0d0; }
[data-theme="dark"] .opp-tag-benefit {
    background: rgba(5, 150, 105, 0.15);
    color: #6EE7B7;
}
[data-theme="dark"] .opp-tag-industry {
    background: rgba(30, 64, 175, 0.15);
    color: #93C5FD;
}
[data-theme="dark"] .opp-tag-stage {
    background: rgba(146, 64, 14, 0.15);
    color: #FCD34D;
}
[data-theme="dark"] .opp-detail-actions {
    border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .opp-detail-source-link {
    color: #94A3B8;
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .badge-org-type {
    background: rgba(255, 255, 255, 0.06);
    color: #94A3B8;
}
[data-theme="dark"] .card-desc { color: #94A3B8; }
[data-theme="dark"] .card-title-clamp { color: #F0F0F0; }
[data-theme="dark"] .chip-funding {
    background: rgba(5, 150, 105, 0.15);
    color: #34D399;
    border-color: rgba(5, 150, 105, 0.3);
}
[data-theme="dark"] .chip-deadline {
    background: rgba(217, 119, 6, 0.15);
    color: #FBBF24;
    border-color: rgba(217, 119, 6, 0.3);
}
[data-theme="dark"] .chip-audience {
    background: rgba(2, 132, 199, 0.15);
    color: #7DD3FC;
    border-color: rgba(2, 132, 199, 0.3);
}

/* =================================================================
   8. TOAST NOTIFICATIONS
   ================================================================= */

/* --- Upgrade Pill (header) --- */
.upgrade-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    white-space: nowrap;
}
.upgrade-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

/* --- Upgrade Modal Overlay --- */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.upgrade-modal {
    position: relative;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px 36px 32px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    animation: modalSlideUp 0.3s ease;
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.upgrade-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    border: none;
    background: #F1F5F9;
    border-radius: 50%;
    color: #64748B;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.upgrade-modal-close:hover {
    background: #E2E8F0;
    color: #1E293B;
}

/* More results hint */
.more-results-hint {
    column-span: all;
    text-align: center;
    padding: 16px;
    color: #64748B;
    font-size: 0.88rem;
    background: #F8FAFC;
    border: 1px dashed #CBD5E1;
    border-radius: 10px;
}

/* Dark mode overrides */
[data-theme="dark"] .upgrade-pill {
    background: linear-gradient(135deg, #FFD700, #F59E0B);
    color: #0c0a1f;
}
[data-theme="dark"] .upgrade-modal-overlay {
    background: rgba(0, 0, 0, 0.6);
}
[data-theme="dark"] .upgrade-modal {
    background: #1a182d;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .upgrade-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #94A3B8;
}
[data-theme="dark"] .upgrade-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
[data-theme="dark"] .more-results-hint {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94A3B8;
}
.oost-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    align-items: flex-end;
}
.oost-toast {
    background: #1E293B;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    animation: toastSlideUp 0.3s ease, toastFadeOut 0.3s ease 2.7s forwards;
}
@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes toastFadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* Closing-soon toast variant */
.oost-toast.urgent-toast {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 340px;
    animation: toastSlideUp 0.4s ease, toastFadeOut 0.4s ease 7.6s forwards;
}
.oost-toast.urgent-toast .urgent-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.oost-toast.urgent-toast .urgent-text {
    line-height: 1.4;
}
.oost-toast.urgent-toast .urgent-text strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

/* =================================================================
   9. MOBILE RESPONSIVE
   ================================================================= */
@media (max-width: 767px) {
    /* Stack layout on mobile */
    .oost-dashboard {
        grid-template-columns: 1fr;
        max-height: none;
        height: auto;
        /* Safe area for notched devices */
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Hide desktop sidebar */
    .sidebar-area { display: none; }
    .sidebar-speech-bubble { display: none; }

    /* Search row stacks on mobile */
    .search-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* Dashboard content gets full width */
    .dashboard-main-area {
        max-width: 100%;
    }
    .dashboard-topbar {
        padding: 12px 16px 0;
        gap: 8px;
    }
    .dashboard-content {
        padding: 4px 16px 100px;
        max-height: none;
    }

    /* --- Mobile B2C Polish --- */

    /* Title: larger, tighter */
    .dashboard-title {
        font-size: 1.4rem;
        margin-bottom: 14px;
    }

    /* Search display: taller touch target */
    .search-display {
        padding: 12px 14px;
        border-radius: 12px;
        gap: 8px;
        max-width: 100%;
    }
    .search-display-input {
        font-size: 0.92rem;
        min-height: 24px;
    }
    .search-refine-btn {
        padding: 8px 16px;
        font-size: 0.82rem;
        border-radius: 10px;
    }

    /* Stats pills: horizontal scroll, no wrap */
    .dash-stats {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 2px;
    }
    .dash-stats::-webkit-scrollbar { display: none; }
    .stat-pill {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: 10px;
        flex-shrink: 0;
    }

    /* View controls */
    .view-controls {
        margin-bottom: 12px;
    }
    .view-controls .results-label {
        font-size: 0.8rem;
    }
    .view-btn {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    /* Cards: more breathing room */
    .oost-dashboard .result-item {
        margin-bottom: 12px;
        border-radius: 16px;
        padding: 18px 16px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    }
    .result-item h3 {
        font-size: 1.02rem;
        line-height: 1.35;
    }
    .card-title-clamp {
        padding-right: 44px;
    }
    .card-desc {
        font-size: 0.82rem;
        -webkit-line-clamp: 2;
        margin-top: 4px;
    }
    .result-org-line {
        font-size: 0.78rem;
        margin-bottom: 4px;
    }

    /* Score circle: slightly smaller on mobile */
    .score-circle {
        width: 36px;
        height: 36px;
        font-size: 0.62rem;
        top: 14px;
        right: 14px;
    }

    /* Badges row */
    .result-badges {
        margin-bottom: 6px;
        gap: 6px;
    }
    .badge {
        padding: 3px 10px;
        font-size: 0.7rem;
    }

    /* Fact chips */
    .fact-chips {
        gap: 6px;
        margin-top: 10px;
    }
    .fact-chip {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    /* Action buttons: bigger touch targets */
    .fav-btn,
    .detail-btn {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }
    .result-actions {
        padding-top: 10px;
    }

    /* Upgrade pill in topbar */
    .upgrade-pill {
        padding: 8px 14px;
        font-size: 0.78rem;
    }

    /* Ghost CTA */
    .ghost-cta-box {
        margin: 0 4px;
        padding: 28px 20px;
    }
    .ghost-cta-box h3 {
        font-size: 1.15rem;
    }

    /* Upgrade modal */
    .upgrade-modal {
        padding: 32px 24px 28px;
        border-radius: 20px;
        width: 92%;
    }

    /* --- Mobile Floating Avatar (FAB) --- */
    .mobile-fab {
        position: fixed;
        bottom: 24px;
        right: 20px;
        z-index: 900;
        /* Safe area for iPhone home indicator */
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .mobile-fab-btn {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        border: none;
        background: #FFFFFF;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.04);
        cursor: pointer;
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
        padding: 0;
    }
    .mobile-fab-btn:active {
        transform: scale(0.95);
    }
    .mobile-fab-btn:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    }
    .mobile-fab-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Mobile dock (expandable) */
    .mobile-dock {
        display: none;
        position: absolute;
        bottom: calc(100% + 10px);
        right: 0;
        flex-direction: column;
        gap: 6px;
        padding: 10px;
        background: #FFFFFF;
        border: 1px solid #E2E8F0;
        border-radius: 14px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
    .mobile-fab.open .mobile-dock {
        display: flex;
    }
    .mobile-dock .dock-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        background: #F8FAFC;
        border-radius: 10px;
    }
    .mobile-dock .dock-icon:hover,
    .mobile-dock .dock-icon.active {
        background: rgba(8, 145, 178, 0.08);
    }
}

/* Desktop: hide mobile FAB */
@media (min-width: 768px) {
    .mobile-fab { display: none; }
}

/* =================================================================
   10. DARK MODE OVERRIDES
   ================================================================= */
[data-theme="dark"] .sidebar-speech-bubble {
    background: #1a182d;
    border-color: rgba(255, 215, 0, 0.2);
    color: #e0e0e0;
}
[data-theme="dark"] .sidebar-speech-bubble::before {
    border-right-color: rgba(255, 215, 0, 0.2);
}
[data-theme="dark"] .sidebar-speech-bubble::after {
    border-right-color: #1a182d;
}
[data-theme="dark"] .sidebar-speech-bubble strong {
    color: #FFD700;
}
[data-theme="dark"] .bubble-close {
    background: rgba(255, 255, 255, 0.1);
    color: #888;
}
[data-theme="dark"] .bubble-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}
[data-theme="dark"] .glass-dock {
    background: rgba(15, 14, 25, 0.7);
    border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .dock-icon:hover {
    background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .dock-icon.active {
    background: rgba(255, 215, 0, 0.1);
    box-shadow: inset 0 0 0 1.5px rgba(255, 215, 0, 0.15);
}
[data-theme="dark"] .dock-icon::after {
    background: #FFD700;
    color: #0c0a1f;
}
[data-theme="dark"] .dashboard-title { color: #f0f0f0; }
[data-theme="dark"] .stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #a0a0b0;
}
[data-theme="dark"] .search-display {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .search-display-input { color: #f0f0f0; }
[data-theme="dark"] .view-switcher { background: rgba(255, 255, 255, 0.05); }
[data-theme="dark"] .view-btn { color: #8f9bb3; }
[data-theme="dark"] .view-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: #FFD700;
}
[data-theme="dark"] .fav-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .fav-btn:hover {
    background: rgba(255, 68, 68, 0.1);
}
[data-theme="dark"] .score-circle {
    background: #1a182d;
}
[data-theme="dark"] .oost-toast {
    background: #FFD700;
    color: #0c0a1f;
}
[data-theme="dark"] .settings-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    color: #a0a0b0;
}
[data-theme="dark"] .mobile-fab-btn {
    background: #1a182d;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .mobile-dock {
    background: rgba(20, 20, 35, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* =======================================================================
   PROFILE VIEW (Session 71 - merged with Settings)
   ======================================================================= */

/* --- Signed In: Hero --- */
.profile-hero {
    text-align: center;
    padding: 40px 20px 32px;
}

.profile-avatar-wrap {
    display: inline-block;
    margin-bottom: 16px;
}

.profile-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #0891B2;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.2);
}

.profile-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0891B2, #06B6D4);
    color: #FFFFFF;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.2);
}

.profile-hero-name {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 4px;
}

.profile-hero-email {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0 0 12px;
}

.profile-tier-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(8, 145, 178, 0.08);
    color: #0891B2;
    border: 1px solid rgba(8, 145, 178, 0.15);
}

/* --- Stats Row --- */
.profile-stats-row {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 20px 0;
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    margin: 0 auto 24px;
    max-width: 400px;
}

.profile-stat {
    text-align: center;
}

.profile-stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0F172A;
}

.profile-stat-label {
    font-size: 0.75rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Sections --- */
.profile-section {
    max-width: 480px;
    margin: 0 auto 24px;
    padding: 0 16px;
}

.profile-section-title {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0F172A;
    margin: 0 0 8px;
}

.profile-section-desc {
    font-size: 0.88rem;
    color: #64748B;
    margin: 0 0 12px;
    line-height: 1.5;
}

.profile-upgrade-btn {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0891B2, #06B6D4);
    color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(8, 145, 178, 0.3);
}

.profile-data-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-data-btn {
    padding: 8px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #F8FAFC;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-data-btn:hover {
    background: #F1F5F9;
    border-color: #CBD5E1;
}

.profile-data-btn.danger {
    color: #DC2626;
    border-color: #FECACA;
}

.profile-data-btn.danger:hover {
    background: #FEF2F2;
    border-color: #FCA5A5;
}

.profile-signout-btn {
    display: block;
    width: 100%;
    padding: 10px 20px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: transparent;
    color: #64748B;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-signout-btn:hover {
    background: #F8FAFC;
    color: #1E293B;
}

/* --- About footer --- */
.profile-about {
    text-align: center;
    padding: 24px 0 40px;
}

.profile-about-text {
    font-size: 0.75rem;
    color: #94A3B8;
    margin: 0;
}

/* --- Signed Out: Hero --- */
.profile-signin-hero {
    text-align: center;
    padding: 48px 20px 24px;
}

.profile-signin-avatar {
    font-size: 3.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.profile-signin-title {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 8px;
    line-height: 1.3;
}

.profile-signin-subtitle {
    font-size: 0.95rem;
    color: #64748B;
    margin: 0;
    line-height: 1.5;
    max-width: 420px;
    margin: 0 auto;
}

/* --- Sign In Buttons --- */
.profile-signin-buttons {
    max-width: 360px;
    margin: 28px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 16px;
}

.profile-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #FFFFFF;
    color: #1E293B;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.profile-google-btn:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-google-btn svg {
    flex-shrink: 0;
}

.profile-linkedin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    background: #0A66C2;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.profile-linkedin-btn:hover {
    background: #004182;
    transform: translateY(-1px);
}

/* --- Feature List --- */
.profile-signin-features {
    max-width: 360px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
    color: #334155;
}

.profile-feature-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

/* --- Empty State Enhancement --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon-wrap {
    margin-bottom: 16px;
}

.empty-state-icon-lg {
    font-size: 3rem;
    line-height: 1;
}

.empty-state-heading {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 8px;
}

.empty-state-text {
    font-size: 0.92rem;
    color: #64748B;
    line-height: 1.5;
    max-width: 360px;
    margin: 0 auto 20px;
}

.empty-state-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    background: #0891B2;
    color: #FFFFFF;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.empty-state-btn:hover {
    background: #0E7490;
    transform: translateY(-1px);
}

/* --- Dark Mode Profile --- */
[data-theme="dark"] .profile-hero-name { color: #F1F5F9; }
[data-theme="dark"] .profile-hero-email { color: #94A3B8; }
[data-theme="dark"] .profile-tier-badge {
    background: rgba(34, 211, 238, 0.1);
    color: #22D3EE;
    border-color: rgba(34, 211, 238, 0.2);
}
[data-theme="dark"] .profile-stat-num { color: #F1F5F9; }
[data-theme="dark"] .profile-section-title { color: #F1F5F9; }
[data-theme="dark"] .profile-section-desc { color: #94A3B8; }
[data-theme="dark"] .profile-data-btn {
    background: #1E293B;
    border-color: #334155;
    color: #CBD5E1;
}
[data-theme="dark"] .profile-data-btn:hover {
    background: #334155;
}
[data-theme="dark"] .profile-data-btn.danger {
    color: #FCA5A5;
    border-color: rgba(252, 165, 165, 0.3);
}
[data-theme="dark"] .profile-signout-btn {
    border-color: #334155;
    color: #94A3B8;
}
[data-theme="dark"] .profile-signout-btn:hover {
    background: #1E293B;
    color: #F1F5F9;
}
[data-theme="dark"] .profile-signin-title { color: #F1F5F9; }
[data-theme="dark"] .profile-signin-subtitle { color: #94A3B8; }
[data-theme="dark"] .profile-google-btn {
    background: #1E293B;
    border-color: #334155;
    color: #F1F5F9;
}
[data-theme="dark"] .profile-google-btn:hover {
    background: #334155;
}
[data-theme="dark"] .profile-linkedin-btn {
    background: #0A66C2;
    color: #FFFFFF;
}
[data-theme="dark"] .profile-feature { color: #CBD5E1; }
[data-theme="dark"] .empty-state-heading { color: #F1F5F9; }
[data-theme="dark"] .empty-state-text { color: #94A3B8; }

/* -----------------------------------------------------------------------
   Ghost cards: grayed-out placeholders for free tier upsell
   ----------------------------------------------------------------------- */
.ghost-results-wrapper {
    position: relative;
    column-span: all;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 8px;
}
.ghost-card {
    opacity: 0.25;
    pointer-events: none;
    user-select: none;
    filter: blur(2px);
}
.ghost-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
    z-index: 10;
    pointer-events: auto;
}
.ghost-cta-box {
    text-align: center;
    background: rgba(250, 251, 252, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 420px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}
.ghost-cta-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}
.ghost-cta-box h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 10px 0;
}
.ghost-cta-box p {
    font-size: 0.95rem;
    color: #6B7280;
    margin: 0 0 20px 0;
    line-height: 1.5;
}
.ghost-cta-btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-bottom: 10px;
    background: #0891B2;
    color: #fff;
}
.ghost-cta-btn:hover {
    background: #0E7490;
    transform: translateY(-1px);
}
.ghost-cta-secondary {
    background: transparent;
    color: #0891B2;
    border: 1px solid #0891B2;
}
.ghost-cta-secondary:hover {
    background: rgba(8, 145, 178, 0.06);
}

/* Dark mode ghost cards */
[data-theme="dark"] .ghost-cta-box {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .ghost-cta-box h3 {
    color: #F1F5F9;
}
[data-theme="dark"] .ghost-cta-box p {
    color: #94A3B8;
}
[data-theme="dark"] .ghost-cta-btn {
    background: #22D3EE;
    color: #0F172A;
}
[data-theme="dark"] .ghost-cta-btn:hover {
    background: #06B6D4;
}
[data-theme="dark"] .ghost-cta-secondary {
    background: transparent;
    color: #22D3EE;
    border-color: #22D3EE;
}
[data-theme="dark"] .ghost-cta-secondary:hover {
    background: rgba(34, 211, 238, 0.08);
}

/* Ghost grid responsive */
@media (max-width: 900px) {
    .ghost-results-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .ghost-results-wrapper {
        grid-template-columns: 1fr;
    }
    .ghost-cta-box {
        margin: 0 16px;
        padding: 28px 24px;
    }
}

/* =======================================================================
   NETFLIX-STYLE CATEGORY ROWS (Session 71)
   ======================================================================= */

/* Container for all category rows */
.category-rows-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 60px;
}

/* Single category row */
.category-row {
    padding: 0;
}

/* Row header: title + count */
.category-row-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
    padding: 0 4px;
}

.category-row-title {
    font-family: 'Fraunces', 'Georgia', serif;
    font-size: 1.25rem;
    font-weight: 700;
    font-optical-sizing: auto;
    color: #0F172A;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.category-row-count {
    font-size: 0.8rem;
    color: #94A3B8;
    white-space: nowrap;
}

/* Horizontal scrolling card track */
.category-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 6px 2px;
    scroll-padding-left: 2px;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

/* Category cards (fixed width for horizontal scroll) */
.category-card {
    min-width: 280px;
    max-width: 300px;
    flex: 0 0 280px;
    scroll-snap-align: start;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 145, 178, 0.12);
}

/* Card title clamping */
.card-title-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    margin: 8px 0 4px;
}

/* Card description clamping */
.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.85rem;
    color: #64748B;
    line-height: 1.5;
    margin: 4px 0 8px;
}

/* ---- DARK MODE ---- */
[data-theme="dark"] .category-row-title {
    color: #F1F5F9;
}

[data-theme="dark"] .category-row-count {
    color: #64748B;
}

[data-theme="dark"] .card-desc {
    color: #94A3B8;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .category-rows-container {
        gap: 10px;
    }

    .category-row-title {
        font-size: 1.1rem;
    }

    .category-card {
        min-width: 250px;
        max-width: 270px;
        flex: 0 0 250px;
    }
}

@media (max-width: 480px) {
    .category-card {
        min-width: 230px;
        max-width: 250px;
        flex: 0 0 230px;
    }
}
