/* ========================================
   SmartHire247 — Dashboard Layout
   ======================================== */

/* ── Layout ── */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--clr-bg-2);
    border-right: 1px solid var(--clr-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--t-mid);
    overflow: hidden;
}

.sidebar-brand {
    padding: var(--sp-lg);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    text-decoration: none;
}

.sidebar-logo {
    width: 38px;
    height: 38px;
    background: var(--grad-primary);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 16px hsla(270, 78%, 55%, 0.4);
}

.sidebar-brand-name {
    font-size: 1.05rem;
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-brand-tag {
    font-size: 0.7rem;
    color: var(--clr-primary-lt);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    opacity: 0.8;
}

.sidebar-nav {
    flex: 1;
    padding: var(--sp-md) 0;
    overflow-y: auto;
}

.nav-section-label {
    padding: var(--sp-sm) var(--sp-lg);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-dim);
    margin-top: var(--sp-sm);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px var(--sp-lg);
    color: var(--clr-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--t-fast);
    border-left: 3px solid transparent;
    position: relative;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--clr-text);
    background: hsla(270, 78%, 60%, 0.06);
}

.nav-link.active {
    color: var(--clr-primary-lt);
    background: hsla(270, 78%, 60%, 0.1);
    border-left-color: var(--clr-primary);
}

.nav-link.active .nav-icon {
    color: var(--clr-primary-lt);
}

.nav-icon {
    font-size: 1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--clr-danger);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
    min-width: 20px;
    text-align: center;
}

.sidebar-user {
    padding: var(--sp-md) var(--sp-lg);
    border-top: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--clr-text-dim);
    text-transform: capitalize;
}

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: 60px;
    background: hsla(225, 25%, 6%, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-lg);
    gap: var(--sp-md);
    z-index: 99;
    transition: left var(--t-mid);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    min-width: 0;
    flex-shrink: 1;
}

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

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Search box — responsive */
.topbar-search {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-full);
    padding: 6px 14px;
    transition: all var(--t-fast);
}
.topbar-search:focus-within {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px hsla(270, 78%, 60%, 0.12);
}
.topbar-search input {
    background: none;
    border: none;
    color: var(--clr-text);
    font-family: var(--font-primary);
    font-size: 0.855rem;
    outline: none;
    width: 160px;
}
.topbar-search input::placeholder { color: var(--clr-text-dim); }
/* Keep legacy .search-box working */
.search-box {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-full);
    padding: 6px 14px;
    transition: all var(--t-fast);
}
.search-box:focus-within {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px hsla(270, 78%, 60%, 0.12);
}
.search-box input {
    background: none;
    border: none;
    color: var(--clr-text);
    font-family: var(--font-primary);
    font-size: 0.855rem;
    outline: none;
    width: 160px;
}
.search-box input::placeholder { color: var(--clr-text-dim); }

.search-icon {
    color: var(--clr-text-dim);
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ── Topbar User Pill ── */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-full);
    flex-shrink: 0;
}
.topbar-user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-text);
    white-space: nowrap;
}
.topbar-logout {
    white-space: nowrap;
}

/* ── Plan Badges (topbar) ── */
.topbar-plan-chip {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.topbar-plan-premium {
    background: linear-gradient(135deg, hsla(265,85%,55%,.25), hsla(190,85%,55%,.2));
    color: var(--clr-primary-lt);
    border: 1px solid hsla(265,85%,60%,.35);
}
.topbar-plan-free {
    background: hsla(220,15%,70%,.1);
    color: var(--clr-text-dim);
    border: 1px solid var(--clr-border);
    transition: all var(--t-fast);
}
.topbar-plan-free:hover {
    background: hsla(265,85%,55%,.15);
    color: var(--clr-primary-lt);
    border-color: hsla(265,85%,60%,.3);
}

/* ── Plan Badges (sidebar) ── */
.sidebar-plan-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--r-full);
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.sidebar-plan-premium {
    background: linear-gradient(135deg, hsla(265,85%,55%,.3), hsla(190,85%,55%,.25));
    color: var(--clr-primary-lt);
    border: 1px solid hsla(265,85%,60%,.3);
}
.sidebar-plan-free {
    background: hsla(220,12%,45%,.15);
    color: var(--clr-text-dim);
    border: 1px solid var(--clr-border);
}

/* ── Premium lock on nav items ── */
.nav-link-locked {
    opacity: 0.7;
}
.nav-link-locked:hover {
    opacity: 1;
}
.nav-lock-badge {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, hsl(265,85%,55%), hsl(190,85%,50%));
    color: #fff;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Nav link text — allows proper truncation */
.nav-link-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    padding-top: 60px;
    min-height: 100vh;
}

.page-content {
    padding: var(--sp-xl);
    max-width: 1400px;
}

.page-header {
    margin-bottom: var(--sp-xl);
}

.page-header h1 {
    font-size: 1.7rem;
    margin-bottom: 4px;
}

.page-header p {
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* ── Stats Grid ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

/* ── Two Column Layout ── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-lg);
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-md);
}

/* ── Panel ── */
.panel {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    transition: all var(--t-mid);
}

.panel:hover {
    border-color: var(--clr-primary-lt);
    box-shadow: var(--shadow-md);
}

.panel-header {
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsla(225, 20%, 15%, 0.5);
}

.panel-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.panel-body {
    padding: var(--sp-lg);
}

/* ── Job Card ── */
.job-card {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    transition: all var(--t-mid);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity var(--t-fast);
}

.job-card:hover {
    border-color: var(--glass-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.job-card:hover::before {
    opacity: 1;
}

.job-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.job-company {
    color: var(--clr-text-muted);
    font-size: 0.85rem;
    margin-bottom: var(--sp-sm);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    margin-bottom: var(--sp-md);
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ── Application Status ── */
.status-applied {
    background: hsla(210, 85%, 60%, 0.15);
    color: var(--clr-info);
}

.status-reviewing {
    background: hsla(38, 95%, 55%, 0.15);
    color: var(--clr-warning);
}

.status-offered {
    background: hsla(145, 65%, 45%, 0.15);
    color: var(--clr-success);
}

.status-rejected {
    background: hsla(0, 72%, 58%, 0.15);
    color: var(--clr-danger);
}

/* ── Resume Upload Zone ── */
.upload-zone {
    border: 2px dashed var(--clr-border);
    border-radius: var(--r-lg);
    padding: var(--sp-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--t-mid);
    position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--clr-primary);
    background: hsla(270, 78%, 60%, 0.05);
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--sp-md);
    opacity: 0.6;
}

.upload-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.upload-hint {
    color: var(--clr-text-muted);
    font-size: 0.85rem;
}

/* ── Profile Card ── */
.profile-card {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90px;
    background: var(--grad-primary);
    opacity: 0.15;
}

.profile-avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: var(--sp-md);
    margin-top: var(--sp-lg);
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.profile-sub {
    color: var(--clr-text-muted);
    font-size: 0.85rem;
}

/* ── Progress Bar ── */
.progress-bar-wrap {
    background: var(--clr-bg-3);
    border-radius: var(--r-full);
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--grad-primary);
    border-radius: var(--r-full);
    transition: width 1s ease;
}

/* ── Activity Feed ── */
.activity-item {
    display: flex;
    gap: var(--sp-md);
    padding: var(--sp-md) 0;
    border-bottom: 1px solid var(--clr-border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--clr-primary);
    margin-top: 6px;
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--clr-primary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--clr-text-dim);
}

/* ── Hamburger ── */
/* ── Hamburger Toggle Button ── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--clr-text);
    font-size: 1.4rem;
    border-radius: var(--r-md);
    transition: background var(--t-fast);
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.hamburger:hover { background: hsla(270, 78%, 60%, 0.1); }
.hamburger:active { background: hsla(270, 78%, 60%, 0.2); transform: scale(0.95); }

/* ── Sidebar Overlay (mobile backdrop) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ── Sidebar Close Button (mobile) ── */
.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 12px;
    background: none;
    border: none;
    color: var(--clr-text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--r-sm);
    z-index: 10;
    -webkit-tap-highlight-color: transparent;
}
.sidebar-close:hover { color: var(--clr-text); background: hsla(0,0%,100%,0.05); }

/* ── Desktop Sidebar Collapse Toggle ── */
.sidebar-toggle-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    right: -14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: var(--clr-bg-2);
    border: 1px solid var(--clr-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    z-index: 101;
    transition: all var(--t-fast);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.sidebar-toggle-desktop:hover { color: var(--clr-primary-lt); border-color: var(--clr-primary); }

/* Desktop collapsed state */
.sidebar.collapsed {
    width: 68px;
    overflow: hidden;
}
.sidebar.collapsed .sidebar-brand-name,
.sidebar.collapsed .sidebar-brand-tag,
.sidebar.collapsed .nav-section-label,
.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-user button,
.sidebar.collapsed .nav-link-text,
.sidebar.collapsed .nav-lock-badge,
.sidebar.collapsed .nav-link .badge,
.sidebar.collapsed .achievement-count-pill,
.sidebar.collapsed .sidebar-plan-badge {
    display: none;
}
.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: var(--sp-md);
}
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px;
    border-left: none;
    gap: 0;
    overflow: hidden;
    font-size: 0;
    white-space: nowrap;
}
.sidebar.collapsed .nav-icon { font-size: 1.15rem; width: auto; }
.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: var(--sp-sm);
}
.sidebar.collapsed .sidebar-toggle-desktop { right: -14px; }
.sidebar.collapsed + .topbar,
body.sidebar-collapsed .topbar { left: 68px; }
body.sidebar-collapsed .main-content { margin-left: 68px; }

/* ── Medium screen: hide search box to prevent topbar crowding ── */
@media (max-width: 1100px) {
    .topbar-search, .search-box.topbar-search { display: none; }
}

/* ── Mobile Responsive ── */
@media (max-width: 1024px) {
    .two-col { grid-template-columns: 1fr; }
    .three-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
        width: 280px !important;
    }
    .sidebar.collapsed { width: 280px !important; }
    .sidebar.collapsed .sidebar-brand-name,
    .sidebar.collapsed .sidebar-brand-tag,
    .sidebar.collapsed .nav-section-label,
    .sidebar.collapsed .sidebar-user-info,
    .sidebar.collapsed .sidebar-user button,
    .sidebar.collapsed .nav-link-text,
    .sidebar.collapsed .nav-lock-badge,
    .sidebar.collapsed .nav-link .badge,
    .sidebar.collapsed .achievement-count-pill,
    .sidebar.collapsed .sidebar-plan-badge { display: unset; }
    .sidebar.collapsed .sidebar-brand { justify-content: unset; padding: var(--sp-lg); }
    .sidebar.collapsed .nav-link { justify-content: unset; padding: 10px var(--sp-lg); border-left: 3px solid transparent; gap: 12px; font-size: 0.92rem; overflow: visible; white-space: normal; }
    .sidebar.collapsed { overflow: visible; }
    .sidebar.collapsed .sidebar-user { justify-content: unset; padding: var(--sp-md) var(--sp-lg); }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 25px rgba(0,0,0,0.3);
    }
    .sidebar-close { display: block; }
    .sidebar-toggle-desktop { display: none !important; }

    .topbar { left: 0 !important; padding: 0 var(--sp-md); gap: 8px; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: var(--sp-sm) var(--sp-md); }
    .hamburger { display: flex; }
    .three-col { grid-template-columns: 1fr; }
    .topbar-search, .search-box { display: none; }
    .topbar-user { display: none; }
    .topbar-logout { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; }

    /* Better touch targets */
    .nav-link { padding: 13px var(--sp-lg); font-size: 0.92rem; min-height: 44px; }
    .btn { min-height: 44px; }
    .form-control { min-height: 44px; font-size: 16px; } /* 16px prevents zoom on iOS */

    /* Page header responsive */
    .page-header { flex-direction: column; align-items: flex-start !important; gap: 10px !important; }
    .page-header h1 { font-size: 1.4rem; }

    /* Profile card responsive */
    .profile-card { margin-bottom: 16px; }

    /* Table responsive */
    table { font-size: 0.82rem; }
    td, th { padding: 8px 6px; }

    /* Modal responsive */
    .modal { width: 95vw !important; max-width: 95vw !important; margin: 10px; padding: var(--sp-md) !important; }
    .modal-header h3 { font-size: 1.05rem; }

    /* Job card responsive */
    .job-card { padding: var(--sp-md); }
    .job-card-header { flex-wrap: wrap; gap: 10px; }
    .job-meta { flex-wrap: wrap; }
    .job-actions { flex-direction: column; }
    .job-actions .btn { width: 100%; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .topbar-right .search-box { display: none; }
    .page-header h1 { font-size: 1.2rem; }
    .panel-header h3 { font-size: 0.95rem; }
    .topbar { height: 52px; }
    .main-content { padding-top: 52px; }

    /* Stack buttons on very small screens */
    .flex { flex-wrap: wrap; }
    .two-col { gap: 12px; }
}

/* ── Notification dot ── */
.notif-btn {
    position: relative;
}

.notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: var(--clr-danger);
    border-radius: 50%;
    border: 2px solid #0f172a;
    box-shadow: 0 0 10px hsla(0, 84%, 60%, 0.4);
    z-index: 2;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: -10px;
    width: 340px;
    background: #111827;
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    overflow: hidden;
    display: none;
    animation: slideInDown 0.2s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
}

.notif-list {
    max-height: 480px;
    overflow-y: auto;
}

.notif-item {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
    background: hsla(270, 78%, 60%, 0.05);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--clr-primary);
}

.notif-item-title {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 3px;
    color: var(--clr-text);
}

.notif-item-desc {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    line-height: 1.4;
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--clr-text-dim);
    margin-top: 6px;
}

/* ── Section Title ── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--sp-md);
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--clr-border);
}
/* SaaS Animations & Empty States */
.empty-state { padding: 40px; text-align: center; color: var(--clr-text-muted); }

/* ── Responsive Sidebar (dash.js) ── */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 200;
    }
    .sidebar.open,
    .sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: 4px 0 32px rgba(0,0,0,0.4);
    }
    .topbar {
        left: 0 !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
    .hide-mobile {
        display: none !important;
    }
    .sidebar-toggle {
        display: flex !important;
    }
}

/* Sidebar overlay backdrop on mobile */
.sidebar.sidebar-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: -1;
}

/* Sidebar toggle button */
.sidebar-toggle {
    background: none;
    border: 1px solid var(--clr-border);
    border-radius: var(--r-sm);
    padding: 6px 10px;
    cursor: pointer;
    color: var(--clr-text);
    font-size: 1.1rem;
    line-height: 1;
    display: none;
}

/* Dash footer */
.dash-footer a:hover { text-decoration: underline; }
.empty-state-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }

/* ═══════════════════════════════════════════════
   OVERVIEW PAGE — ACTION-DRIVEN REDESIGN
   ═══════════════════════════════════════════════ */

/* ── Zone 1: Hero Row ── */
.ov-hero {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-lg);
    align-items: start;
}

/* Profile Strength Card */
.ov-strength-card {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    position: relative;
    overflow: hidden;
}

.ov-strength-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--grad-primary);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
}

.ov-strength-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.ov-welcome     { font-size: 1.5rem; margin: 0 0 4px; line-height: 1.2; }
.ov-welcome-sub { color: var(--clr-text-muted); font-size: 0.88rem; margin: 0; }

.ov-strength-body { display: flex; flex-direction: column; gap: 14px; }

.ov-strength-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ov-strength-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-dim);
}

.ov-strength-level-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: var(--r-full);
    letter-spacing: 0.04em;
    transition: all var(--t-fast);
}
.ov-strength-level-badge.level-low      { background: hsla(0,70%,55%,.15);  color: hsl(0,70%,65%);   border: 1px solid hsla(0,70%,55%,.25); }
.ov-strength-level-badge.level-medium   { background: hsla(38,95%,55%,.15); color: hsl(38,95%,62%);  border: 1px solid hsla(38,95%,55%,.25); }
.ov-strength-level-badge.level-strong   { background: hsla(145,65%,45%,.15);color: hsl(145,65%,55%); border: 1px solid hsla(145,65%,45%,.25); }
.ov-strength-level-badge.level-complete { background: hsla(265,85%,55%,.15);color: var(--clr-primary-lt); border: 1px solid hsla(265,85%,60%,.25); }

.ov-strength-pct {
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--clr-text);
    letter-spacing: -0.03em;
}

.ov-strength-bar-track {
    height: 10px;
    background: var(--clr-bg-3);
    border-radius: var(--r-full);
    overflow: hidden;
}

.ov-strength-bar {
    height: 100%;
    width: 0%;
    background: var(--grad-primary);
    border-radius: var(--r-full);
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.ov-strength-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #fff;
    opacity: 0.6;
    border-radius: var(--r-full);
}

.ov-strength-motivation {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-primary-lt);
    background: hsla(265, 85%, 55%, 0.1);
    border: 1px solid hsla(265, 85%, 60%, 0.18);
    border-radius: var(--r-md);
    padding: 9px 14px;
    line-height: 1.4;
}

.ov-strength-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

.ov-primary-cta { flex-shrink: 0; }

.ov-missing-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.ov-missing-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-full);
    color: var(--clr-text-muted);
    cursor: pointer;
    transition: all var(--t-fast);
    white-space: nowrap;
}
.ov-missing-chip:hover {
    border-color: var(--clr-primary);
    color: var(--clr-primary-lt);
    background: hsla(265, 85%, 55%, 0.08);
}

/* Score Card */
.ov-score-card {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-xl);
    padding: var(--sp-lg);
}

.ov-score-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-dim);
    margin-bottom: var(--sp-md);
}

.ov-score-gauge-row {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    justify-content: center;
    margin-bottom: var(--sp-md);
    flex-wrap: wrap;
}

.ov-score-insights-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--clr-text-dim);
    margin-bottom: 8px;
}

.ov-score-insights { display: flex; flex-direction: column; gap: 6px; }

/* ── Zone 2: Next Actions Strip ── */
.ov-actions-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.ov-action-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px var(--sp-lg);
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    cursor: pointer;
    transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ov-action-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity var(--t-fast);
}

.ov-action-card:hover {
    border-color: hsla(270, 78%, 60%, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.ov-action-card:hover::before { opacity: 1; }

.ov-action-card.ov-action-primary {
    border-color: hsla(265, 85%, 60%, 0.35);
    background: linear-gradient(135deg, var(--grad-card), hsla(265, 85%, 55%, 0.07));
}

.ov-action-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    line-height: 1;
}

.ov-action-body  { flex: 1; min-width: 0; }

.ov-action-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--clr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ov-action-desc {
    font-size: 0.71rem;
    color: var(--clr-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ov-action-arrow {
    font-size: 0.9rem;
    color: var(--clr-text-dim);
    flex-shrink: 0;
    transition: transform var(--t-fast);
}
.ov-action-card:hover .ov-action-arrow { transform: translateX(3px); }

.ov-action-pro-badge {
    font-size: 0.58rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--r-full);
    background: linear-gradient(135deg, hsl(265,85%,55%), hsl(190,85%,50%));
    color: #fff;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

/* ── Zone 4: Content Grid ── */
.ov-content-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

/* ── Enhanced Skill Items ── */
.ov-skill-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--clr-bg-3);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-md);
    transition: border-color var(--t-fast), background var(--t-fast);
    margin-bottom: 6px;
}

.ov-skill-item:last-child { margin-bottom: 0; }

.ov-skill-item:hover {
    border-color: hsla(265, 85%, 60%, 0.3);
    background: hsla(265, 85%, 55%, 0.05);
}

.ov-skill-info  { flex: 1; min-width: 0; }
.ov-skill-name  { font-size: 0.85rem; font-weight: 600; color: var(--clr-text); }
.ov-skill-why   { font-size: 0.68rem; color: var(--clr-text-dim); margin-top: 1px; }

.ov-skill-demand {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--r-full);
    white-space: nowrap;
    flex-shrink: 0;
}
.ov-skill-demand.demand-hot    { background: hsla(0,70%,55%,.15);  color: hsl(0,70%,62%);   border: 1px solid hsla(0,70%,55%,.2); }
.ov-skill-demand.demand-rising { background: hsla(38,95%,55%,.15); color: hsl(38,95%,60%);  border: 1px solid hsla(38,95%,55%,.2); }
.ov-skill-demand.demand-key    { background: hsla(145,65%,45%,.15);color: hsl(145,65%,55%); border: 1px solid hsla(145,65%,45%,.2); }

/* ── Responsive Overrides ── */
@media (max-width: 1280px) {
    .ov-hero { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1080px) {
    .ov-hero { grid-template-columns: 1fr; }
    .ov-score-card { display: none; }
    .ov-actions-strip { grid-template-columns: repeat(2, 1fr); }
    .ov-content-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .ov-actions-strip { grid-template-columns: 1fr 1fr; }
    .ov-content-grid { grid-template-columns: 1fr; }
    .ov-welcome { font-size: 1.3rem; }
    .ov-strength-header { flex-wrap: wrap; }
}

@media (max-width: 480px) {
    .ov-actions-strip { grid-template-columns: 1fr; }
    .ov-strength-actions { flex-direction: column; align-items: flex-start; }
    .ov-primary-cta { width: 100%; }
}

/* ═══════════════════════════════════════════════
   BENTO GRID LAYOUT
   ═══════════════════════════════════════════════ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

.bento-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.bento-main  { grid-column: 1 / 9; }
.bento-side  { grid-column: 9 / -1; }
.bento-full  { grid-column: 1 / -1; }

.bento-bottom {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--sp-md);
}

/* ═══════════════════════════════════════════════
   KPI CARDS
   ═══════════════════════════════════════════════ */
.kpi-card {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--t-mid), box-shadow var(--t-mid), transform var(--t-mid);
}

.kpi-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--kpi-glow, var(--grad-primary));
    opacity: 0;
    transition: opacity var(--t-fast);
    pointer-events: none;
}

.kpi-card:hover {
    border-color: hsla(270, 78%, 60%, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.kpi-card:hover::after { opacity: 0.04; }

.kpi-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 2px;
}

.kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--clr-text-dim);
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--clr-text);
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.74rem;
    font-weight: 700;
}
.kpi-trend.up   { color: var(--clr-success); }
.kpi-trend.down { color: var(--clr-danger);  }
.kpi-trend.neutral { color: var(--clr-text-dim); }

.kpi-sub {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    margin-top: 2px;
}

/* Plan-gated KPI overlay */
.kpi-card.kpi-locked { cursor: pointer; }

.kpi-locked-overlay {
    position: absolute;
    inset: 0;
    background: hsla(225, 25%, 8%, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: inherit;
}

.kpi-locked-icon  { font-size: 1.4rem; }
.kpi-locked-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--clr-primary-lt);
    background: hsla(265, 85%, 55%, 0.2);
    border: 1px solid hsla(265, 85%, 60%, 0.3);
    padding: 2px 10px;
    border-radius: var(--r-full);
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════
   COLLAPSIBLE SIDEBAR SECTIONS
   ═══════════════════════════════════════════════ */
.nav-section-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--sp-sm) var(--sp-lg);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--clr-text-dim);
    margin-top: var(--sp-sm);
    cursor: pointer;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    transition: color var(--t-fast), background var(--t-fast);
    border-radius: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-section-toggle:hover { color: var(--clr-text-muted); background: hsla(270,78%,60%,0.03); }

.nav-section-chevron {
    margin-left: auto;
    font-size: 0.55rem;
    display: inline-block;
    transition: transform 0.25s ease;
    opacity: 0.6;
    flex-shrink: 0;
}

.nav-section-toggle.collapsed .nav-section-chevron {
    transform: rotate(-90deg);
}

.nav-section-body {
    max-height: 800px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease;
    opacity: 1;
}

.nav-section-body.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* Hide collapsible chrome when sidebar itself is collapsed on desktop */
.sidebar.collapsed .nav-section-chevron,
.sidebar.collapsed .nav-section-toggle { display: none; }
.sidebar.collapsed .nav-section-body   { max-height: none !important; opacity: 1; }

/* ═══════════════════════════════════════════════
   CHART CONTAINER
   ═══════════════════════════════════════════════ */
.chart-container {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    position: relative;
    transition: border-color var(--t-mid);
    height: 100%;
}

.chart-container:hover { border-color: hsla(270, 78%, 60%, 0.25); }

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-md);
}

.chart-title { font-size: 0.9rem; font-weight: 700; }

.chart-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--r-full);
    background: hsla(265, 85%, 55%, 0.12);
    color: var(--clr-primary-lt);
    border: 1px solid hsla(265, 85%, 60%, 0.2);
}

/* ═══════════════════════════════════════════════
   ACTIVITY FEED PANEL
   ═══════════════════════════════════════════════ */
.activity-feed {
    background: var(--grad-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.activity-feed-header {
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: hsla(225, 20%, 12%, 0.5);
    flex-shrink: 0;
}

.activity-feed-title { font-size: 0.9rem; font-weight: 700; }

.activity-feed-body {
    overflow-y: auto;
    max-height: 340px;
    flex: 1;
}

.activity-feed-item {
    display: flex;
    gap: 12px;
    padding: 11px var(--sp-lg);
    border-bottom: 1px solid hsla(225, 20%, 18%, 0.6);
    transition: background var(--t-fast);
    align-items: flex-start;
}

.activity-feed-item:last-child { border-bottom: none; }
.activity-feed-item:hover { background: hsla(265, 85%, 55%, 0.04); }

.activity-feed-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--clr-primary);
    margin-top: 5px;
    flex-shrink: 0;
    box-shadow: 0 0 5px var(--clr-primary);
}

.activity-feed-text {
    font-size: 0.81rem;
    color: var(--clr-text-muted);
    line-height: 1.45;
    flex: 1;
    min-width: 0;
}

.activity-feed-time {
    font-size: 0.68rem;
    color: var(--clr-text-dim);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   MICRO-ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    from { background-position: -200% 0; }
    to   { background-position:  200% 0; }
}

.animate-in {
    animation: fadeInUp 0.32s ease both;
    opacity: 0;
}
.animate-in-delay-1 { animation-delay: 0.04s; }
.animate-in-delay-2 { animation-delay: 0.09s; }
.animate-in-delay-3 { animation-delay: 0.14s; }
.animate-in-delay-4 { animation-delay: 0.19s; }
.animate-in-delay-5 { animation-delay: 0.24s; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--clr-bg-3) 25%,
        hsla(225, 25%, 20%, 0.9) 50%,
        var(--clr-bg-3) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--r-md);
}

.skeleton-line {
    height: 11px;
    border-radius: var(--r-full);
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════
   BENTO GRID RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .bento-main { grid-column: 1 / 8; }
    .bento-side { grid-column: 8 / -1; }
}

@media (max-width: 960px) {
    .bento-main,
    .bento-side { grid-column: 1 / -1; }
    .activity-feed-body { max-height: 240px; }
}

@media (max-width: 600px) {
    .bento-kpi-strip { grid-template-columns: 1fr 1fr; }
    .kpi-value { font-size: 1.55rem; }
}
