/* ============================================
   JOBTRACK PRO - LIGHT / FLAT UI
   GitLab-inspired: white surfaces, thin gray
   borders, flat orange/red primary, no glass,
   no gradients on interactive elements.
   Drop-in replacement for the old style.css —
   same class names, same HTML/JS, new skin.
   ============================================ */

/* ---------- IMPORTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---------- ROOT VARIABLES ---------- */
:root {
    /* Primary - GitLab-inspired orange/red */
    --primary: #1B5E9E;
    --primary-dark: #16497B;
    --primary-light: #3B82D6;
    --primary-glow: rgba(27, 94, 158, 0.15);

    /* Secondary - purple accent */
    --secondary: #5D9020;
    --accent: #3B82D6;

    /* Status Colors (Data Viz) */
    --status-applied: #1F75CB;
    --status-phone: #FC9403;
    --status-interview: #108548;
    --status-technical: #6E49CB;
    --status-final: #CC2952;
    --status-offer: #108548;
    --status-rejected: #DD2B0E;
    --status-ghosted: #737278;

    /* Surfaces - Soft Grey (not stark white) */
    --bg-primary: #EDEBE6;
    --bg-secondary: #F7F6F3;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F7F6F3;
    --bg-glass: #F2F0EC;
    --active-tint: rgba(27, 94, 158, 0.14);

    /* Text */
    --text-primary: #1A1A1A;
    --text-secondary: #5C5C60;
    --text-muted: #94949A;

    /* Borders */
    --border-color: #E1DED7;
    --border-hover: #1B5E9E;

    /* Shadows - flat & subtle */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-glow: 0 0 0 3px rgba(27, 94, 158, 0.12);

    /* Sizes */
    --sidebar-width: 280px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- DARK THEME OVERRIDES ---------- */
/* The browser draws the date/time picker icon in near-black, which
   disappears on dark input backgrounds. invert() flips it to light. */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.7;
    cursor: pointer;
}

[data-theme="dark"] {
    /* The deep navy used for badge text reads fine on light surfaces
       but vanishes against the dark theme's tinted backgrounds, so
       badges switch to the lighter blue here. */
    --badge-text: #6BA6E8;
    --bg-primary: #14151A;
    --bg-secondary: #1B1C22;
    --bg-card: #202128;
    --bg-card-hover: #262730;
    --bg-glass: #24252C;
    --active-tint: rgba(27, 94, 158, 0.18);

    --text-primary: #F2F2F3;
    --text-secondary: #A9A9AF;
    --text-muted: #6E6E76;

    --border-color: #2E2F38;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: #C9C9CE;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scalePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(27, 94, 158, 0.1); }
    50% { box-shadow: 0 0 40px rgba(27, 94, 158, 0.25); }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.fade-in-up-delay-1 { animation-delay: 0.05s; }
.fade-in-up-delay-2 { animation-delay: 0.1s; }
.fade-in-up-delay-3 { animation-delay: 0.15s; }
.fade-in-up-delay-4 { animation-delay: 0.2s; }
.fade-in-up-delay-5 { animation-delay: 0.25s; }
.fade-in-up-delay-6 { animation-delay: 0.3s; }
.fade-in-up-delay-7 { animation-delay: 0.35s; }
.fade-in-up-delay-8 { animation-delay: 0.4s; }

/* ---------- LANDING PAGE ---------- */
.landing {
    min-height: 100vh;
    padding-top: 96px;
    background: #E8EAFB;
    background-image:
        radial-gradient(circle, rgba(26, 26, 26, 0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    position: relative;
    overflow: hidden;
}

.landing::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background:
        radial-gradient(circle at 22% 28%, rgba(27, 94, 158, 0.22) 0%, transparent 45%),
        radial-gradient(circle at 78% 18%, rgba(110, 73, 203, 0.18) 0%, transparent 42%),
        radial-gradient(circle at 65% 75%, rgba(27, 94, 158, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 15% 80%, rgba(110, 73, 203, 0.14) 0%, transparent 45%);
    filter: blur(10px);
    animation: floatBackground 22s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes floatBackground {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(-4%, -4%) rotate(2deg) scale(1.04); }
}

.landing > * {
    position: relative;
    z-index: 1;
}

/* Keep landing-page header fixed while scrolling */
.landing > nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    z-index: 9999;

    /* Keep the ENTIRE header area fixed */
    box-sizing: border-box;
}

.landing nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;

    /* FIXED LANDING PAGE HEADER */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    width: 100%;
    max-width: none;
    margin: 0;

    z-index: 9999;

    /* Fixed header */
background: #E8EAFB;
backdrop-filter: none;
-webkit-backdrop-filter: none;
border-bottom: none;
box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.2rem;
    background: var(--primary);
    border-radius: var(--radius-sm);
    padding: 6px 12px;
    color: #fff;
    display: inline-block;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn-primary {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 0.95rem;
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    background: var(--primary-dark);
    box-shadow: none;
}

.btn-secondary {
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: inline-block;
    font-size: 0.95rem;
    background: var(--bg-glass);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    text-align: center;
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-add {
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.9rem;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(27, 94, 158, 0.3);
}

.btn-danger {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(27, 94, 158, 0.12);
    color: #1B5E9E;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    font-size: 0.8rem;
}

.btn-danger:hover {
    background: rgba(27, 94, 158, 0.22);
    transform: scale(1.05);
}
.btn-icon-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border-radius: var(--radius-sm);
    border: none;
    background: rgba(31, 117, 203, 0.13);
    color: #1F75CB;
    cursor: pointer;
    transition: var(--transition-base);
    vertical-align: middle;
    margin-right: 0.3rem;
}
.btn-icon-view:hover {
    background: rgba(31, 117, 203, 0.3);
    transform: scale(1.05);
}
.btn-sync {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.4rem;
    border-radius: 50px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.btn-sync:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(27, 94, 158, 0.3);
}

.btn-sync .sync-icon {
    flex-shrink: 0;
    transition: transform 0.5s ease;
}

.btn-sync.syncing .sync-icon {
    animation: syncSpin 0.8s linear infinite;
}

@keyframes syncSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 5%;
    min-height: 80vh;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

/* Parallax blobs — driven by JS scroll listener, landing page only */
.hero-blobs {
    position: absolute;
    inset: -10% -20%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.55;
    will-change: transform;
}

.hero-blob-1 {
    top: 5%;
    left: 8%;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(27, 94, 158, 0.35) 0%, transparent 70%);
}

.hero-blob-2 {
    top: 20%;
    right: 6%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(110, 73, 203, 0.28) 0%, transparent 70%);
}

.hero-blob-3 {
    bottom: -5%;
    left: 38%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(31, 117, 203, 0.22) 0%, transparent 70%);
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    background: rgba(27, 94, 158, 0.15);
    border: 1px solid rgba(27, 94, 158, 0.2);
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    animation: glowPulse 3s ease-in-out infinite;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stats-banner {
    display: flex;
    gap: 3rem;
    margin-top: 4rem;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================
   HERO PRODUCT MOCKUP
   Browser-frame preview of the dashboard so
   visitors see the product before signing up.
   ============================================ */
.hero-mockup-wrap {
    width: 100%;
    max-width: 960px;
    margin: 4.5rem auto 0;
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mockup-wrap.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.browser-frame {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(26, 26, 26, 0.14);
    overflow: hidden;
    text-align: left;
}

.browser-frame-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.browser-dot.red { background: #FF5F57; }
.browser-dot.yellow { background: #FEBC2E; }
.browser-dot.green { background: #28C840; }

.browser-address {
    flex: 1;
    margin-left: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.3rem 0.9rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.mockup-dashboard {
    display: flex;
    min-height: 400px;
}

.mockup-sidebar {
    width: 158px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.25rem 0.85rem;
}

.mockup-logo {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding: 0 0.4rem;
}

/* Section headings in the landing page's dashboard preview, matching
   the grouped sidebar in the real app. */
.mockup-nav-section {
    font-size: 0.5rem;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0.5rem 0 0.15rem;
    padding-left: 0.2rem;
}

.mockup-panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.mockup-recent-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
}

.mockup-avatar {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.55rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mockup-recent-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mockup-recent-text b {
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mockup-recent-text i {
    font-size: 0.52rem;
    font-style: normal;
    color: var(--text-muted);
}

.mockup-pill {
    font-size: 0.45rem;
    padding: 1px 5px;
    border-radius: 999px;
    background: var(--status-applied-bg, #E6F1FB);
    color: var(--status-applied, #185FA5);
    flex-shrink: 0;
}

.mockup-goal-num {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.mockup-goal-num span {
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--text-muted);
}

.mockup-nav-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    /* Tighter than the real app's sidebar: the preview has 14 items
       plus 4 headings, which at full spacing ran far below the widget
       area and left a long empty column. */
    padding: 0.28rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 0.05rem;
}

.mockup-nav-item .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.5;
}

.mockup-nav-item.active {
    background: var(--active-tint);
    color: var(--primary);
    font-weight: 600;
}

.mockup-main {
    flex: 1;
    padding: 1.4rem 1.6rem;
    background: var(--bg-primary);
    min-width: 0;
}

.mockup-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.mockup-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem;
    margin-bottom: 1.1rem;
}

.mockup-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.75rem;
    border-left: 3px solid var(--primary);
}

.mockup-stat:nth-child(2) { border-left-color: var(--accent); }
.mockup-stat:nth-child(3) { border-left-color: var(--status-interview); }
.mockup-stat:nth-child(4) { border-left-color: var(--secondary); }

.mockup-stat .num {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.mockup-stat .lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.mockup-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem 1rem;
}

.mockup-panel-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.mockup-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.mockup-bar-row .mbl {
    width: 78px;
    flex-shrink: 0;
}

.mockup-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.mockup-bar-fill {
    height: 100%;
    border-radius: 4px;
    width: 0%;
    transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mockup-wrap.in-view .mockup-bar-fill {
    width: var(--w);
}

.mockup-bar-row .mct {
    width: 22px;
    text-align: right;
    flex-shrink: 0;
    font-weight: 600;
}

@media (max-width: 768px) {
    /* Show the COMPLETE dashboard mockup on mobile */
    .mockup-sidebar {
        display: block;
    }

    .mockup-stats-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .hero-mockup-wrap {
    width: 100%;
    max-width: 100%;
    height: 160px;
    margin: 2.5rem auto 0;
    overflow: visible;
}

    .browser-frame {
        width: 960px;
        max-width: none;
        position: relative;
        left: 50%;
        transform: translateX(-50%) scale(0.40);
        transform-origin: top center;
    }

    .mockup-dashboard {
        min-height: 400px;
    }
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FAFAFA;
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.6s ease;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .logo {
    font-size: 2rem;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.social-login {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.social-btn.google { border-color: rgba(234, 67, 53, 0.3); }
.social-btn.linkedin { border-color: rgba(0, 119, 181, 0.3); }

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hover);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition-base);
    font-family: 'Inter', sans-serif;
}

/* Wider + shorter entry boxes, scoped to the Goals, Applications,
   Companies, Networking, and Job Portals add/edit forms only
   (dashboard.js adds class="compact-entry-fields" to those <form>
   tags). Interviews and any other modal are untouched. */
.compact-entry-fields .form-group input {
  padding: 0.45rem 1.4rem;
  height: 45px;
}
.compact-entry-fields .form-group textarea {
  padding: 0.45rem 1.4rem;
}

.compact-entry-fields .form-group textarea {
  height: 80px;
}
.compact-entry-fields .form-group select {
    padding: 0.45rem 1.4rem;
}

.compact-entry-fields .form-group textarea {
    min-height: 48px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select option {
    background: var(--bg-secondary);
}

/* ---------- GLOBAL FALLBACK BORDER ----------
   Catches any textarea/input/select that isn't
   wrapped in .form-group (or another class with
   its own border rule) — e.g. the Goal modal
   fields (Description, Why, Specific, Measurable)
   which use plain tags with no matching class here.
   Lower specificity than class selectors, so it
   never overrides .search-bar input, .swot-input,
   .applications-filters input, etc.
   ============================================ */
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
select {
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, 0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* equal width columns */
  gap: 1rem;
}
.form-row select,
.form-row input[type="date"] {
  height: 45px !important;
  box-sizing: border-box !important;
  padding: 0.5rem 0.75rem !important;
  line-height: 1.2 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.error-message {
    color: var(--status-rejected);
    font-size: 0.9rem;
    margin-top: 0.75rem;
    text-align: center;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: rgba(221, 43, 14, 0.1);
    border: 1px solid rgba(221, 43, 14, 0.2);
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ============================================
   SIDEBAR - VERTICAL WITH H5 HEADERS
   ============================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    padding: 1.5rem 1rem;
    z-index: 100;
    transition: width var(--transition-base), transform var(--transition-base);
}

.sidebar-header {
    padding: 0 0.5rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    font-size: 1.3rem;
}

.sidebar-header .logo .logo-icon {
    font-size: 1.1rem;
    padding: 6px 10px;
    display: inline-block;
    color: #fff;
    letter-spacing: 0.01em;
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* MAIN AND TRACKING HEADERS - INCREASED TO H5 SIZE */
.sidebar-nav .nav-label {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    margin-top: 0.75rem;
    font-weight: 800;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    width: 100%;
    position: relative;
    margin-bottom: 2px;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    transform: translateY(-50%);
    transition: height var(--transition-base);
}

.sidebar-nav a.active::before {
    height: 60%;
}

.sidebar-nav a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--active-tint);
    color: var(--primary-dark);
    font-weight: 600;
}

.sidebar-nav a .icon {
    font-size: 0.85rem;
    font-weight: inherit;
    width: auto;
    flex: 1;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav a .badge {
    margin-left: auto;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    font-size: 0.65rem;
    background: rgba(27, 94, 158, 0.15);
    color: var(--primary-light);
}

.sidebar-nav a.active .badge {
    background: rgba(27, 94, 158, 0.25);
    color: var(--primary-light);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 0.5rem 0 0.5rem;
    border-top: 1px solid var(--border-color);
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    transition: var(--transition-base);
}

.user-card:hover {
    border-color: var(--border-hover);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.user-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    line-height: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--avatar-color, var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22C55E;
    border: 2px solid var(--bg-card);
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-plan-tag {
    display: inline-block;
    margin-top: 2px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--primary-light);
    background: var(--primary-glow);
    padding: 1px 6px;
    border-radius: 999px;
}

.user-settings-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-base);
}

.user-settings-btn:hover {
    background: var(--bg-glass);
    color: var(--text-primary);
}

.user-email {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.6rem;
    padding-left: 2.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-logout-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-left: auto;
    margin-top: 0.5rem;
    padding: 0.3rem 0.4rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.user-logout-btn:hover {
    color: var(--primary);
    background: var(--primary-glow);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 7rem 2.5rem 2rem;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    position: fixed !important;
    top: 0;
    left: 280px;
    right: 0;
    z-index: 9999;

    background: var(--bg-primary);

    padding: 1.5rem 2.5rem 1rem;
    margin: 0;

    border-bottom: 1px solid var(--border-color);
}

.top-bar h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);

    /* Align main heading with module heading */
    margin-left: 14px;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #0A0A0A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -1px;
    flex-shrink: 0;
    margin-left: auto;
}

.tb-j { color: #ffffff; }
.tb-t { color: #1B5E9E; font-family: Arial, sans-serif; }

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.3rem 0.3rem 1rem;
    transition: var(--transition-base);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, 0.1);
}

.search-bar input {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.3rem 0;
    font-size: 0.85rem;
    width: 160px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar input:focus {
    outline: none;
}

.search-bar button {
    background: var(--primary);
    border: none;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    transition: var(--transition-base);
}

.search-bar button:hover {
    transform: scale(1.05);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition-base);
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.stat-card {
    border-left: 3px solid var(--primary);
}

.stat-card:nth-of-type(4n+2) { border-left-color: #1F75CB; }
.stat-card:nth-of-type(4n+3) { border-left-color: #108548; }
.stat-card:nth-of-type(4n+4) { border-left-color: #6E49CB; }

.stat-card .stat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-card .stat-icon {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

.stat-card .stat-change {
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    background: rgba(16, 133, 72, 0.15);
    color: var(--status-interview);
}

@media (max-width: 768px) {
    .stat-card .stat-header {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .stat-card .stat-change {
        white-space: nowrap;
        align-self: center;
    }
}

.stat-card .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ============================================
   DASHBOARD IMPROVEMENTS
   Greeting, quick actions, and new widgets
   ============================================ */
.dashboard-greeting {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.btn-quick {
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    border: 1px solid rgba(27, 94, 158, 0.25);
    background: rgba(27, 94, 158, 0.08);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.btn-quick:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-emoji {
    font-size: 0.95rem;
    margin-right: 0.15rem;
}

.dashboard-widgets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-widgets-grid .status-breakdown,
.dashboard-widgets-grid .recent-apps,
.goals-widget,
.upcoming-widget {
    margin-bottom: 0;
    height: 100%;
}

.goals-widget,
.upcoming-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.goals-widget .section-header,
.upcoming-widget .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.goals-widget h2,
.upcoming-widget h2 {
    font-size: 1rem;
    font-weight: 600;
}

.goals-widget .view-all {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-base);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(27, 94, 158, 0.2);
    background: rgba(27, 94, 158, 0.08);
    display: inline-block;
}

.goals-widget .view-all:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(27, 94, 158, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 158, 0.2);
}

.goals-widget-summary {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}

.goals-widget-count {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

.goals-widget-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.goals-widget-bar {
    height: 8px;
    background: var(--bg-glass);
    border-radius: 4px;
    overflow: hidden;
}

.goals-widget-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.upcoming-item:last-child {
    border-bottom: none;
}

.upcoming-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.upcoming-title {
    font-weight: 500;
    font-size: 0.88rem;
}

.upcoming-date {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 0.1rem;
}

.empty-widget {
    text-align: center;
    padding: 1.5rem 1rem;
    color: var(--text-muted);
}

.empty-widget p {
    margin-bottom: 0.85rem;
    font-size: 0.9rem;
}

/* Status Breakdown */
.status-breakdown {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.5s ease 0.2s forwards;
    opacity: 0;
}

.status-breakdown .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-breakdown h2 {
    font-size: 1rem;
    font-weight: 600;
}

/* VIEW ALL BUTTON - Consistent styling */
.status-breakdown .view-all {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-base);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(27, 94, 158, 0.2);
    background: rgba(27, 94, 158, 0.08);
    display: inline-block;
}

.status-breakdown .view-all:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(27, 94, 158, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 158, 0.2);
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.6rem;
    animation: slideInLeft 0.4s ease forwards;
    opacity: 0;
}

.status-bar:nth-child(1) { animation-delay: 0.1s; }
.status-bar:nth-child(2) { animation-delay: 0.15s; }
.status-bar:nth-child(3) { animation-delay: 0.2s; }
.status-bar:nth-child(4) { animation-delay: 0.25s; }
.status-bar:nth-child(5) { animation-delay: 0.3s; }

.status-bar .label {
    width: 100px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.status-bar .bar {
    flex: 1;
    height: 6px;
    background: var(--bg-glass);
    border-radius: 3px;
    overflow: hidden;
}

.status-bar .fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.status-bar .fill.animate {
    width: var(--progress);
}

.status-bar .count {
    width: 30px;
    text-align: right;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Recent Apps */
.recent-apps {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    animation: fadeInUp 0.5s ease 0.3s forwards;
    opacity: 0;
}

.recent-apps .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.recent-apps h2 {
    font-size: 1rem;
    font-weight: 600;
}

/* VIEW ALL BUTTON - Consistent styling (same as above) */
.recent-apps .view-all {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-base);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    border: 1px solid rgba(27, 94, 158, 0.2);
    background: rgba(27, 94, 158, 0.08);
    display: inline-block;
}

.recent-apps .view-all:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    background: rgba(27, 94, 158, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 94, 158, 0.2);
}

.app-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--bg-secondary);
    transition: var(--transition-base);
    animation: slideInLeft 0.4s ease forwards;
    opacity: 0;
}

.app-item:nth-child(1) { animation-delay: 0.1s; }
.app-item:nth-child(2) { animation-delay: 0.15s; }
.app-item:nth-child(3) { animation-delay: 0.2s; }
.app-item:nth-child(4) { animation-delay: 0.25s; }
.app-item:nth-child(5) { animation-delay: 0.3s; }

.app-item:last-child {
    border-bottom: none;
}

.app-item:hover {
    background: var(--bg-card-hover);
    border-radius: var(--radius-sm);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.app-item .app-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.app-item .app-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
}

.app-item .app-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.app-item .app-company {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.app-status {
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.app-status.pulse {
    animation: scalePulse 0.15s ease;
}

.status-applied { background: rgba(31, 117, 203, 0.13); color: var(--status-applied); }
.status-interview { background: rgba(16, 133, 72, 0.13); color: var(--status-interview); }
.status-offer { background: rgba(16, 133, 72, 0.13); color: var(--status-offer); }
.status-offer-accepted { background: rgba(16, 133, 72, 0.13); color: var(--status-offer); }
.status-rejected { background: rgba(221, 43, 14, 0.13); color: var(--status-rejected); }
.status-phone-screen { background: rgba(252, 148, 3, 0.15); color: var(--status-phone); }
.status-technical-test { background: rgba(110, 73, 203, 0.13); color: var(--status-technical); }
.status-final-round { background: rgba(204, 41, 82, 0.13); color: var(--status-final); }
.status-ghosted { background: rgba(115, 114, 120, 0.13); color: var(--status-ghosted); }

/* ---------- MODULES ---------- */
.module-page {
    display: none;
    animation: fadeInUp 0.4s ease;
}

.module-page.active {
    display: block;
}

.module-header {
    margin-bottom: 1.5rem;
}

.module-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.module-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: var(--primary);
}

.module-header p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}
.module-header-with-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.module-header-with-actions h2 {
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.module-header-with-actions h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: var(--primary);
}

.module-header-with-actions p {
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.btn-download-pdf {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-hover);
    background: var(--bg-card);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition-base);
}

.btn-download-pdf:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(27, 94, 158, 0.15);
}

.btn-track {
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    transition: var(--transition-base);
}

.btn-track.on-track {
    background: rgba(16, 133, 72, 0.15);
    color: var(--status-interview);
}

.btn-track.on-track:hover {
    background: rgba(16, 133, 72, 0.3);
    transform: scale(1.05);
}

.btn-track.off-track {
    background: rgba(252, 148, 3, 0.15);
    color: var(--status-phone);
}

.btn-track.off-track:hover {
    background: rgba(252, 148, 3, 0.3);
    transform: scale(1.05);
}
.btn-track.dismiss-style {
    background: rgba(27, 94, 158, 0.12);
    color: #1B5E9E;
}

.btn-track.dismiss-style:hover {
    background: rgba(27, 94, 158, 0.22);
    transform: scale(1.05);
}

.goal-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Goals Module */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.goal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: var(--transition-base);
    /* No entrance animation. fadeInUp starts at opacity 0, and with a
       hundred-plus suggestion cards rendering at once the browser
       couldn't finish them all — cards further down the page stayed
       stuck part-way through the fade and looked greyed out. A
       decorative animation should never decide whether content is
       readable. */
    /* Cards are visible by default. Previously this was opacity: 0,
       relying on the animation to reveal them — so any card whose
       animation didn't complete stayed invisible or half-faded. That
       showed up once a user had more than a handful of suggestions.
       The animation is decoration; it should never decide whether
       content is readable. */
}

/* Only the first few are staggered — beyond that a delay would mean
   waiting a noticeable time before later cards settle. */


.goal-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.goal-card .goal-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.goal-card .goal-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.4rem 0;
}

.goal-card .goal-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0.4rem 0;
    line-height: 1.5;
}

.goal-card .goal-deadline {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.goal-card .goal-progress {
    margin-top: 0.75rem;
}

.goal-card .goal-progress-bar {
    height: 4px;
    background: var(--bg-glass);
    border-radius: 2px;
    overflow: hidden;
}

.goal-card .goal-progress-fill {
    height: 100%;
    border-radius: 2px;
    background: var(--primary);
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.goal-card .goal-progress-fill.animate {
    width: var(--progress);
}

/* SWOT Module */
/* SWOT Module */
.swot-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
}

.swot-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-height: 340px;
    transition: var(--transition-base);
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.swot-card:nth-child(1) { animation-delay: 0.05s; }
.swot-card:nth-child(2) { animation-delay: 0.1s; }
.swot-card:nth-child(3) { animation-delay: 0.15s; }
.swot-card:nth-child(4) { animation-delay: 0.2s; }

.swot-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.swot-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 1.1rem;
}

.swot-card.strengths {
    border-left: 4px solid var(--status-interview);
    background: rgba(16, 133, 72, 0.05);
}
.swot-card.strengths h3 { color: var(--status-interview); }

.swot-card.weaknesses {
    border-left: 4px solid var(--status-rejected);
    background: rgba(221, 43, 14, 0.05);
}
.swot-card.weaknesses h3 { color: var(--status-rejected); }

.swot-card.opportunities {
    border-left: 4px solid var(--status-applied);
    background: rgba(31, 117, 203, 0.05);
}
.swot-card.opportunities h3 { color: var(--status-applied); }

.swot-card.threats {
    border-left: 4px solid var(--status-phone);
    background: rgba(252, 148, 3, 0.05);
}
.swot-card.threats h3 { color: var(--status-phone); }

.swot-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    animation: slideInLeft 0.3s ease forwards;
    opacity: 0;
}

.swot-item:nth-child(1) { animation-delay: 0.05s; }
.swot-item:nth-child(2) { animation-delay: 0.1s; }
.swot-item:nth-child(3) { animation-delay: 0.15s; }

.swot-item {
    justify-content: space-between;
}

.swot-item span {
    flex: 1;
    word-break: break-word;
}

.swot-item .remove-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.7rem;
    background: rgba(27, 94, 158, 0.1);
    border: 1px solid rgba(27, 94, 158, 0.25);
    border-radius: var(--radius-sm);
    color: var(--primary);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 600;
    transition: var(--transition-base);
}

.swot-item .remove-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--status-rejected);
}

.swot-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hover);
    background: var(--bg-card);
    color: var(--text-primary);
    margin-top: 0.6rem;
    font-size: 0.95rem;
    transition: var(--transition-base);
}

.btn-add-swot {
    display: none;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.swot-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, 0.1);
}

/* Elevator Pitch */
.pitch-container{
    margin-top: 0;
    padding-top: 30px;   /* keep only the inner spacing */
}

.pitch-textarea {
    width: 100%;
    min-height: 180px;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hover);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    transition: var(--transition-base);
}

.pitch-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 94, 158, 0.1);
}

.pitch-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.pitch-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.pitch-stats .stat .value {
    font-weight: 700;
    font-size: 1.1rem;
}

.pitch-stats .stat .value.good { color: var(--status-interview); }
.pitch-stats .stat .value.bad { color: var(--status-rejected); }
.pitch-stats .stat .value.ok { color: var(--status-phone); }

/* Company Table */
.company-table-container {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .company-table-container {
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    .company-table {
        min-width: 600px;
    }

    /* Desktop keeps all three action buttons on one row by not
       wrapping. On a narrow screen that would push the table wider
       still, so wrapping is allowed back here. */
    .app-actions-row {
        flex-wrap: wrap;
    }

    /* The Actions column used to be pinned to the right edge here so its
       buttons stayed reachable while the table scrolled. In practice it
       read as a stuck column rather than a helpful one — every other
       column moved and this one didn't. It now scrolls with the rest. */
    #module-applications .company-table th:last-child,
    #module-applications .company-table td:last-child {
        white-space: nowrap;
    }
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th {
    text-align: left;
    padding: 0.6rem 1rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.company-table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.company-table tr {
    transition: var(--transition-base);
}

.company-table tr:hover td {
    background: var(--bg-secondary);
}

/* Applications Filters */
.applications-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .applications-filters {
        align-items: center;
    }
    .applications-filters input {
        width: 100%;
        min-width: 0;
        height: 42px;
        box-sizing: border-box;
        flex: none;
    }

    #module-applications .vision-category-pills {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    #module-suggestions .module-header-with-actions {
        flex-direction: column;
        align-items: stretch;
    }
    #module-suggestions .module-header-with-actions > div:last-child {
        align-items: flex-start !important;
        width: 100%;
        margin-top: 0.5rem;
    }
    #module-suggestions .btn-sync {
        width: 100%;
        justify-content: center;
    }

    #module-goals .vision-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    #module-goals .vision-category-pills {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    #module-goals .vision-pill {
        white-space: normal;
        text-align: center;
    }
}

.applications-filters select,
.applications-filters input {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.85rem;
    transition: var(--transition-base);
}

.applications-filters select:focus,
.applications-filters input:focus {
    outline: none;
    border-color: var(--primary);
}

.applications-filters select option {
    background: var(--bg-secondary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition-base);
}

.mobile-toggle:hover {
    color: var(--primary-light);
}

/* ============================================
   FEATURES SECTION (Landing Page)
   ============================================ */
.features-section {
    padding: 5rem 5%;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.features-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-card {
    /* Warm tint tying the feature grid to the brand colour, rather
       than plain white cards on a grey background. */
    background: #EBF2FA;
    border: 1px solid #CFE0F2;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(26, 26, 26, 0.05);
    text-align: center;
    opacity: 0;
    transform: translateY(36px) scale(0.96);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color var(--transition-base),
                box-shadow var(--transition-base),
                background var(--transition-base);
}

/* No per-card stagger. The delays ran card-by-card rather than
   row-by-row, so cards sitting mid-sequence appeared noticeably after
   the ones beside them. Each card already animates as it scrolls into
   view, and cards in the same row cross that line together — so they
   now appear as a row, at any column count. */

.feature-card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.features-cta {
    text-align: center;
    margin-top: 2rem;
}

/* Landing Footer */
.landing-footer {
    text-align: center;
    padding: 2rem 5%;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============================================
   SOCIAL BUTTONS
   ============================================ */
.social-login {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.social-btn.google {
    border-color: rgba(234, 67, 53, 0.3);
}

.social-btn.google:hover {
    border-color: #EA4335;
    background: rgba(234, 67, 53, 0.1);
}

.social-btn.linkedin {
    border-color: rgba(0, 119, 181, 0.3);
}

.social-btn.linkedin:hover {
    border-color: #0A66C2;
    background: rgba(10, 102, 194, 0.1);
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .swot-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        padding: 0;
        overflow: hidden;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        width: var(--sidebar-width);
        padding: 1.5rem 1rem;
        transform: translateX(0);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    nav {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem 5%;
    }

    .logo {
        font-size: 1.1rem;
        width: 100%;
        justify-content: center;
    }

    .logo-icon {
        font-size: 0.95rem;
        padding: 5px 10px;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .nav-signup-hint {
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .btn-secondary {
        padding: 0.5rem 1.1rem;
        font-size: 0.85rem;
    }

    .main-content {
    margin-left: 0;
    padding: 6rem 1rem 1rem;
}
    .top-bar {
    left: 0;
    right: 0;
    padding: 1rem;
}
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .stats-banner {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.6rem;
    }
    .stat-card { padding: 0.85rem; }
    .stat-card .stat-number { font-size: 1.4rem; }
    .stat-card .stat-label { font-size: 0.7rem; }

    .quick-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.6rem;
    }
    .btn-quick { width: 100%; padding: 0.65rem 0.5rem; font-size: 0.78rem; }

    .top-bar {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }
    .top-bar h1 { font-size: 1.3rem; }

    .main-content {
        min-width: 0;
    }
    .module-header h2 { font-size: 1.2rem; }
    .topbar-left {
        flex-shrink: 0;
    }
    .top-bar-actions {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Previously flex-wrap: wrap here pushed the count/trend badges onto
       their own line below the heading on narrow screens. Keeping the row
       intact holds them in the top-right corner; the heading column
       shrinks instead, which reads better than a full-width badge row. */
    .module-header-with-actions {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .module-header-with-actions > div:first-child {
        flex: 1;
        min-width: 0;
    }

    .module-header-with-actions > div:last-child {
        flex-shrink: 0;
    }

    /* Applications puts its trend badge directly in the header rather
       than inside a wrapper div, so it needs matching treatment to stay
       in the top-right corner instead of dropping below the heading. */
    /* Applications puts its trend badge directly in the header rather
       than inside a wrapper div, so it needs matching treatment to stay
       in the top-right corner instead of dropping below the heading.
       The narrow max-width forces the "this week / this month" halves
       onto separate lines within the one pill, rather than letting the
       text wrap at an arbitrary point mid-phrase. */
    /* Applications puts its trend badge directly in the header rather
       than inside a wrapper div, so it needs matching treatment to stay
       in the top-right corner instead of dropping below the heading. */
    .module-header-with-actions > .module-trend-badge {
        flex-shrink: 0;
        align-self: flex-start;
    }

    /* Smaller badges on mobile so the module description keeps enough
       width to read on two lines instead of four. */
    .module-trend-badge,
    .module-count-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.55rem;
        white-space: nowrap;
        max-width: 45vw;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Scoped to .module-trend-badge so these beat the global
       .trend-short rule defined later in the file — with equal
       specificity the later rule would win and hide both spans. */
    .module-trend-badge .trend-full { display: none; }
    .module-trend-badge .trend-short { display: inline; }

    .module-trend-badge {
        white-space: normal;
        text-align: right;
        max-width: 100%;
    }
    
    /* Row action buttons stack vertically once the Actions column
       narrows. Without a gap they sit flush against each other, which
       makes them easy to mis-tap. */
    .company-table td .btn-small,
    .company-table td .btn-add,
    .company-table td .btn-danger,
    .company-table td .btn-view {
        margin-bottom: 0.4rem;
        margin-right: 0.4rem;
    }

    .vision-stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    .vision-stat-card { padding: 0.75rem; }
    .vision-stat-num { font-size: 1.3rem; }

    .swot-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .btn-add-swot {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        padding: 0;
        border-radius: 50%;
        font-size: 1.1rem;
        line-height: 1;
        flex-shrink: 0;
    }
    .swot-add-row {
        align-items: center;
    }
    .swot-card { padding: 0.85rem; min-height: 220px; }
    .swot-card h3 { font-size: 0.85rem; }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .feature-card { padding: 1rem; }
    .feature-card h3 { font-size: 0.95rem; }
    .feature-card p { font-size: 0.78rem; }
    
    .search-bar {
        width: 100%;
    }
    
    .search-bar input {
        width: 100%;
    }
    
    .mobile-toggle {
        display: block !important;
        font-size: 18px;
    }

    .topbar-logo {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    /* One column on mobile. Two columns at this width couldn't shrink
       below the cards' natural content width, so the right-hand card
       overflowed off-screen and got clipped. minmax(0, 1fr) stops grid
       items refusing to shrink below their content. */
    .goals-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.6rem;
    }
    .goal-card { padding: 0.85rem; }
    .goal-card .goal-title { font-size: 0.9rem; }
    .goal-card .goal-description { font-size: 0.8rem; }
    
    .status-bar .label {
        width: 70px;
        font-size: 0.7rem;
    }

    .dashboard-widgets-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        flex-direction: column;
    }

    .btn-quick {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .pitch-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .applications-filters {
        flex-direction: column;
    }
}
/* Sidebar Badge - Right aligned */
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    width: 100%;
    position: relative;
}

.sidebar-nav a .badge {
    margin-left: auto;
    padding: 0.05rem 0.5rem;
    border-radius: 50px;
    font-size: 0.65rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-weight: 600;
    flex-shrink: 0;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav a.active .badge {
    background: rgba(27, 94, 158, 0.12);
    color: var(--primary);
}
/* ============================================
   SCROLL FADE-IN (pure CSS, no JS required)
   Uses native CSS scroll-driven animations
   (Chrome/Edge 115+). Browsers without support
   simply show the element already visible —
   safe, no-JS fallback, nothing ever hidden.
   ============================================ */
@supports (animation-timeline: view()) {
    /* .goal-card is deliberately excluded. This is a scroll-driven
       animation — each element's opacity is tied to how far it has
       scrolled into view. That reads nicely for a handful of cards,
       but the suggestions grid can hold a hundred-plus goal-cards, and
       everything below the fold sat frozen part-way through the ramp
       (measured opacity around 0.24), leaving most of the page
       unreadable. */
    .stat-card,
    .swot-card,
    .app-item,
    .recent-apps,
    .status-breakdown,
    .company-table-container,
    .pitch-container,
    .auth-card {
        opacity: 0;
        animation: fadeInUp linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 30%;
    }
}

/* ============================================
   EXTRA HOVER POLISH (flat, GitLab-style —
   color/border shift instead of glow/scale)
   ============================================ */
.company-table tr {
    cursor: default;
}

.goal-card,
.swot-card {
    transition: var(--transition-base);
}

.goal-card:hover,
.swot-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   SETTINGS PANEL (modal content)
   ============================================ */
.settings-section {
    margin-bottom: 1.5rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-row-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.settings-row-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .toggle-track {
    position: absolute;
    inset: 0;
    background: var(--border-color);
    border-radius: 999px;
    transition: var(--transition-base);
}

.toggle-switch .toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.toggle-switch input:checked + .toggle-track {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-track .toggle-thumb {
    transform: translateX(18px);
}

/* Theme toggle (light/dark segmented control) */
.theme-toggle {
    display: flex;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 3px;
}

.theme-toggle button {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-base);
}

.theme-toggle button.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Avatar color swatches */
.swatch-row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    padding: 0;
    transition: var(--transition-base);
}

.color-swatch:hover {
    transform: scale(1.08);
}

.color-swatch.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card);
}

/* Settings action button (export etc) */
.settings-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.settings-action-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.export-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
    max-width: 220px;
}

.export-btn-group .settings-action-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    min-width: 58px;
    justify-content: center;
}

.settings-help-item {
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    display: block;
}

.settings-help-item strong {
    color: var(--text-primary);
    display: block;
    font-size: 0.85rem;
    margin-bottom: 2px;
}
/* ==========================================
   ELEVATOR PITCH MODULE
========================================== */
.pitch-layout{

    display:grid;

    grid-template-columns:0.9fr 1.1fr;

    gap:28px;
   

}

@media (max-width: 900px) {
    .pitch-layout {
        grid-template-columns: 1fr;
    }
}

.pitch-guide-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.pitch-guide-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.pitch-guide-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.pitch-guide-list strong {
    color: var(--text-primary);
}

.pitch-guide-divider {
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

.pitch-example {
    background: rgba(99,102,241,.08);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-style: italic;
    font-size: .87rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pitch-container{
    background:var(--bg-secondary);
    border:1px solid var(--border-color);
    border-radius:18px;
    padding:30px;
    min-height:540px;
    display:flex;
    flex-direction:column;
}

.pitch-write-title{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:30px;
    font-weight:700;
    color:var(--text-primary);
    margin-bottom:22px;
}
.pitch-container textarea{
    width:100%;
    height:300px;
    resize:none;

    border:2px solid var(--border-hover);
    border-radius:14px;
    padding:18px;
    font-size:18px;
    line-height:1.7;
    outline:none;
    background:var(--bg-card);
    color:var(--text-primary);
}
.pitch-container textarea:focus{

    border-color:#1B5E9E;

    box-shadow:0 0 0 4px rgba(255,75,43,.12);

}
.pitch-footer{

    display:flex;

    justify-content:flex-end;

    margin-top:10px;

    color:#6b7280;

    font-size:18px;

}
.pitch-stats{
    display:flex;
    margin-top:30px;
    border-radius:14px;
    overflow:hidden;
    border:1px solid var(--border-color);
    background:var(--bg-card);
}
.pitch-stat{

    flex:1;

    padding:22px;

    text-align:center;

}
.pitch-stat:not(:last-child){

    border-right:1px solid #e5e5e5;

}
.pitch-stat-title{

    font-size:15px;

    color:#666;

    margin-bottom:10px;

}
.pitch-stat-value{

    font-size:36px;

    font-weight:700;

    color:#202020;

}
.pitch-status{

    color:#1B5E9E;

    font-weight:700;

    font-size:20px;

}
.save-pitch-btn{

    width:100%;

    margin-top:28px;

    height:64px;

    border:none;

    border-radius:14px;

    background:linear-gradient(90deg,#3B82D6,#1B5E9E);

    color:#fff;

    font-size:24px;

    font-weight:700;

    cursor:pointer;

    transition:.3s;

}
.save-pitch-btn:hover{

    transform:translateY(-2px);

    box-shadow:0 12px 24px rgba(255,76,48,.35);

}
/* ============================================
   VISION BOARD MODULE
   ============================================ */
.vision-statement-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
}

.vision-statement-box:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-sm);
}

.vision-statement-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vision-statement-text {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.vision-statement-edit-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.vision-statement-edit-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.vision-statement-edit-box textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-hover);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
}

.vision-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vision-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem;
    text-align: left;
}

.vision-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
}

.vision-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}

.vision-overall-progress {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.vision-overall-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.vision-overall-progress-header span:last-child {
    font-weight: 700;
    color: var(--primary);
}

.vision-overall-progress-bar {
    height: 8px;
    background: var(--bg-glass);
    border-radius: 4px;
    overflow: hidden;
}

.vision-overall-progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.vision-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.vision-pill {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

.vision-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.vision-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Goal card extensions (category + priority badges, achieve button) */
.goal-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.goal-card-badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.goal-category-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: var(--active-tint);
    color: var(--primary-dark);
    white-space: nowrap;
}

.goal-priority-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    white-space: nowrap;
}

.goal-priority-badge.high {
    background: rgba(221, 43, 14, 0.13);
    color: var(--status-rejected);
}

.goal-priority-badge.medium {
    background: rgba(252, 148, 3, 0.15);
    color: var(--status-phone);
}

.goal-priority-badge.low {
    background: rgba(31, 117, 203, 0.13);
    color: var(--status-applied);
}

.goal-achieved-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    background: rgba(16, 133, 72, 0.15);
    color: var(--status-interview);
    white-space: nowrap;
}

.goal-card.is-achieved {
    opacity: 0.75;
}

.goal-card.is-achieved .goal-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.goal-card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.goal-timeleft {
    font-size: 0.78rem;
    font-weight: 600;
}

.goal-timeleft.overdue { color: var(--status-rejected); }
.goal-timeleft.upcoming { color: var(--text-secondary); }
.goal-timeleft.none { color: var(--text-muted); }

.goal-card-icon-actions {
    display: flex;
    gap: 0.4rem;
}

.goal-icon-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
}

.goal-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.goal-icon-btn.achieve-btn.is-achieved {
    background: rgba(16, 133, 72, 0.15);
    border-color: var(--status-interview);
    color: var(--status-interview);
}
.module-count-badge {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: var(--active-tint);
    color: var(--badge-text, var(--primary-dark));
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.module-status-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.module-status-badge {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--bg-glass);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.module-status-badge.has-count {
    background: var(--active-tint);
    color: var(--primary-dark);
    border-color: transparent;
}
.user-actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.user-actions-row .user-logout-btn,
.user-actions-row .user-profile-btn {
    flex: 1;
    white-space: nowrap;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.45rem 0.25rem;
    border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border-color, #e5e7eb);
    background: transparent;
    color: var(--text-secondary, #4b5563);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base, all 0.15s ease);
}

.user-profile-btn:hover {
    background: var(--bg-tertiary, rgba(0,0,0,0.04));
    color: var(--text-primary, #111827);
}
.module-period-stat {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    font-weight: 500;
    white-space: nowrap;
}
.module-trend-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 50px;
    white-space: nowrap;
}

/* The badge renders both wordings; desktop shows the full one and the
   mobile media query swaps to the short one. */
.trend-short { display: none; }

.module-trend-badge.positive {
    background: rgba(16, 133, 72, 0.15);
    color: #10B981;
}

.module-trend-badge.negative {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.module-trend-badge.neutral {
    background: var(--bg-glass);
    color: var(--text-secondary);
}
@media (max-width: 768px) {
    #module-appraisals .vision-category-pills {
        display: flex;
        flex-wrap: wrap;
    }
    #module-appraisals .vision-pill:nth-child(1) { order: 1; font-size: 0.68rem; padding: 0.3rem 0.6rem; }
    #module-appraisals .vision-pill:nth-child(2) { order: 4; }
    #module-appraisals .vision-pill:nth-child(3) { order: 5; }
    #module-appraisals .vision-pill:nth-child(4) { order: 2; font-size: 0.68rem; padding: 0.3rem 0.6rem; }
    #module-appraisals .vision-pill:nth-child(5) { order: 3; }
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-card) inset;
    box-shadow: 0 0 0 1000px var(--bg-card) inset;
    -webkit-text-fill-color: var(--text-primary);
    caret-color: var(--text-primary);
    transition: background-color 5000s ease-in-out 0s;
}

/* ===== Landing page icons ===== */

.features-grid {
    row-gap: 3rem;
}

.feature-card {
    position: relative;
    overflow: visible;
    border: 1px solid var(--primary, #1B5E9E);
    border-radius: 14px;
    margin-top: 30px;
    padding-top: 2.75rem;
}

.feature-icon {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary, #1B5E9E);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 4px solid var(--bg-primary, #ffffff);
    font-size: 0 !important;
    line-height: 0;
    margin: 0;
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.35rem;
}

.mockup-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mk-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* ===== Terms consent checkbox ===== */

.terms-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    margin-bottom: 1rem;
    background: var(--bg-secondary, #f4f7fb);
    border-radius: 8px;
}

.terms-consent input[type="checkbox"] {
    margin: 3px 0 0;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary, #1B5E9E);
}

.terms-consent label {
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary, #555);
    cursor: pointer;
}

.terms-consent a {
    color: var(--primary, #1B5E9E);
    text-decoration: underline;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Landing page FAQ ===== */

.faq-section {
    padding: 4rem 1.5rem 5rem;
}

.faq-heading {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.faq-subheading {
    text-align: center;
    color: var(--text-secondary, #666);
    margin-bottom: 2.5rem;
}

#landingFaqList {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 10px;
    margin-bottom: 0.6rem;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary, #1a1a1a);
    text-align: left;
    cursor: pointer;
}

.faq-toggle {
    color: var(--text-muted, #999);
    flex-shrink: 0;
}

.faq-answer {
    padding: 0 1.25rem 1.1rem;
    font-size: 0.94rem;
    line-height: 1.65;
    color: var(--text-secondary, #555);
    white-space: pre-wrap;
}

.faq-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* ===== FAQ link band on landing page ===== */

.faq-link-section {
    text-align: center;
    padding: 3.5rem 1.5rem 4rem;
}

.faq-link-section h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.faq-link-section p {
    color: var(--text-secondary, #666);
    margin-bottom: 1.5rem;
}

/* ===== Constrain sidebar children ===== */

.sidebar {
    box-sizing: border-box;
    max-width: var(--sidebar-width);
}

.sidebar-nav {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sidebar-nav a {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.sidebar-header,
.sidebar-footer {
    max-width: 100%;
    box-sizing: border-box;
}

/* ===== Brand logo image ===== */

.brand-logo {
    height: 100px;
    width: auto;
    display: block;
}

.landing nav {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.sidebar-header .brand-logo {
    image-rendering: -webkit-optimize-contrast;
    height: 87px;
}

@media (max-width: 560px) {
    .brand-logo {
        height: 26px;
    }
}

/* ===== Clear the fixed top bar on mobile ===== */

@media (max-width: 768px) {
    .sidebar.open {
        padding-top: 92px;
    }

    .sidebar-header .brand-logo {
        height: 46px;
    }
}

/* ===== Modals sit above the fixed top bar ===== */

#modal {
    z-index: 20000 !important;
}

/* ===== Mobile nav collapse ===== */

@media (max-width: 768px) {
    .landing nav #navHamburger {
        display: block !important;
    }

    .landing nav .nav-links {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column !important;
        align-items: stretch !important;
        background: var(--bg-secondary);
        padding: 1rem 5%;
        gap: 0.75rem !important;
        border-bottom: 1px solid var(--border-color);
    }

    .landing nav .nav-links.mobile-open {
        display: flex !important;
    }

    .landing nav .nav-links a {
        justify-content: center !important;
    }
}

/* ===== Mobile logo sizes ===== */

@media (max-width: 768px) {
    .brand-logo {
        height: 64px;
    }

    .sidebar-header .brand-logo {
        height: 72px;
    }
}

@media (max-width: 400px) {
    .brand-logo {
        height: 54px;
    }

    .sidebar-header .brand-logo {
        height: 62px;
    }
}

/* ===== Dark mode logo ===== */

[data-theme="dark"] .brand-logo {
    content: url("../img/logo-full-dark.svg");
}

/* ===== Dark mode contrast on blue-tinted elements ===== */

[data-theme="dark"] .quick-actions button,
[data-theme="dark"] .quick-actions a,
[data-theme="dark"] .goals-widget .view-all,
[data-theme="dark"] .status-breakdown .view-all,
[data-theme="dark"] .recent-apps .view-all {
    color: #9CC6F0;
    border-color: rgba(107, 166, 232, 0.45);
    background: rgba(107, 166, 232, 0.10);
}

[data-theme="dark"] .quick-actions button:hover,
[data-theme="dark"] .quick-actions a:hover,
[data-theme="dark"] .goals-widget .view-all:hover,
[data-theme="dark"] .status-breakdown .view-all:hover,
[data-theme="dark"] .recent-apps .view-all:hover {
    color: #C6DFF7;
    border-color: rgba(107, 166, 232, 0.75);
    background: rgba(107, 166, 232, 0.18);
}

[data-theme="dark"] .sidebar-nav a.active {
    color: #DCE9F7;
    background: rgba(107, 166, 232, 0.14);
}

[data-theme="dark"] .sidebar-nav a.active::before {
    background: #6BA6E8;
}

[data-theme="dark"] .sidebar-nav a.active .icon,
[data-theme="dark"] .sidebar-nav a.active .nav-icon {
    color: #DCE9F7;
}

/* ===== Auth pages in dark mode ===== */

[data-theme="dark"] .auth-header img {
    content: url("../img/logo-full-dark.svg");
}

[data-theme="dark"] .social-btn,
[data-theme="dark"] .social-login > div,
[data-theme="dark"] .g_id_signin {
    background: #262730;
    border: 1px solid #3A3B45;
    border-radius: 9999px;
    color: #E8E8EA;
}

[data-theme="dark"] .social-btn:hover {
    background: #2F303A;
    border-color: #4A4B57;
}

[data-theme="dark"] .auth-card a {
    color: #9CC6F0;
}

[data-theme="dark"] .auth-card a:visited {
    color: #9CC6F0;
}

[data-theme="dark"] .auth-card a:hover {
    color: #C6DFF7;
}

[data-theme="dark"] .terms-consent {
    background: #262730;
}

[data-theme="dark"] .terms-consent label {
    color: #C9C9CF;
}

/* ===== Auth page background in dark mode ===== */

[data-theme="dark"] body.auth-page,
[data-theme="dark"] .auth-page,
[data-theme="dark"] .auth-container {
    background: var(--bg-primary);
    background-image: none;
}

[data-theme="dark"] body.legal-page {
    background: var(--bg-primary);
}

/* ===== Nav links in dark mode ===== */

[data-theme="dark"] .nav-signup-hint a,
[data-theme="dark"] .nav-signup-hint a:visited {
    color: #9CC6F0;
}

[data-theme="dark"] .nav-signup-hint a:hover {
    color: #C6DFF7;
}

[data-theme="dark"] .nav-signup-hint {
    color: #C9C9CF;
}

/* ===== Feature cards in dark mode ===== */

[data-theme="dark"] .feature-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .feature-card:hover {
    background: var(--bg-card-hover);
}

[data-theme="dark"] .feature-card .feature-name,
[data-theme="dark"] .feature-card h2,
[data-theme="dark"] .feature-card h3,
[data-theme="dark"] .feature-card h4,
[data-theme="dark"] .feature-card strong,
[data-theme="dark"] .feature-card b {
    color: var(--text-primary);
}

[data-theme="dark"] .feature-card p {
    color: var(--text-secondary);
}

[data-theme="dark"] .features-section h2,
[data-theme="dark"] .features-section > .container > p {
    color: var(--text-primary);
}

/* ===== Stories section on landing page ===== */

.stories-section {
    padding: 4rem 1.5rem 3rem;
}

.stories-heading {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stories-sub {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin: 0 auto;
}

.story-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.story-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.story-thumb {
    height: 150px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-thumb-fallback {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-muted);
}

.story-body {
    padding: 1.25rem 1.4rem 1.35rem;
}

.story-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 0.55rem;
}

.story-card p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.story-author {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.story-author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.story-author-info strong {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.story-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stories-cta {
    text-align: center;
    margin-top: 2.25rem;
}

.stories-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2.5rem 0;
    font-size: 0.95rem;
}

