/* ===================================================
   Career Buddy – Main Stylesheet
   =================================================== */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #185adb;
    --primary-dark: #1e3a8a;
    --accent: #185adb;
    --accent-dark: #1e3a8a;
    --accent-orange: #ff9800;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
    --shadow: 0 4px 16px rgba(0, 0, 0, .10);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .14);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --transition: .25s ease;
    --font: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;

    /* ---------- Employer Portal Design Tokens ---------- */
    --cb-primary: #185adb;
    --cb-primary-dark: #1e3a8a;
    --cb-surface: #ffffff;
    --cb-bg: #f8fafc;
    --cb-border: #e2e8f0;
    --cb-text: #0f172a;
    --cb-text-muted: #64748b;
    --cb-radius: 16px;
    --cb-radius-sm: 10px;
    --cb-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
    --cb-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --cb-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    --cb-font: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --cb-success: #10b981;
    --cb-warning: #f59e0b;
    --cb-danger: #ef4444;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: #f8fafc;
    color: var(--dark-2);
    line-height: 1.65;
    /* The navbar used to be position:fixed, so this padding reserved a strip for
       it. The shared navbar (templates/includes/site_nav.html) is sticky and
       occupies its own space in the flow, so the reservation is now an empty
       band above the header - the root cause, rather than nudging it back up
       with a negative margin somewhere else. */
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
}

/* ---------- Utility ---------- */
.text-accent {
    color: var(--primary) !important;
}

.bg-accent {
    background: var(--primary) !important;
}

.btn-accent {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff !important;
    border: none;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(24, 90, 219, 0.3);
    transition: transform .2s, opacity .2s;
}

.btn-accent:hover {
    transform: translateY(-2px);
    opacity: .92;
}

/* colour helpers for activity cards */
.bg-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.bg-info {
    background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
}

.bg-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
}

.bg-pink {
    background: linear-gradient(135deg, #ec4899, #db2777) !important;
}

.bg-teal {
    background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
}

.bg-orange {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
}

.bg-indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
}

.bg-rose {
    background: linear-gradient(135deg, #f43f5e, #e11d48) !important;
}

.bg-emerald {
    background: linear-gradient(135deg, #34d399, #10b981) !important;
}

/* ---------- Navbar (Light Theme – Global) ---------- */
#mainNav {
    background: rgba(255, 255, 255, 0.98);
    -webkit-backdrop-filter: blur(12px);
    /* Safari / iOS */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    padding: .75rem 0;
    transition: all var(--transition);
}

/* Keep the brand from shrinking and let the links take the remaining width */
#mainNav .navbar-brand {
    flex-shrink: 0;
}

#mainNav .brand-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#mainNav .brand-icon svg {
    display: block;
}

.brand-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -.3px;
    white-space: nowrap;
}

.brand-accent {
    color: var(--primary);
}

/* Breathing room between nav items so they never read as one run-on block */
#mainNav .navbar-nav {
    gap: .5rem;
}

.navbar-nav .nav-link {
    color: #475569 !important;
    font-weight: 500;
    padding: .4rem .8rem !important;
    border-radius: 6px;
    transition: all var(--transition);
    white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: #f1f5f9 !important;
}

/* Right-side auth buttons keep their colour */
.navbar-nav .btn {
    font-weight: 600;
}

/* ---------- Navbar responsive fit (cross-browser) ----------
   The bar carries up to 9 items when a student is logged in
   (Home, Skill Up, Sitemap, Resume Parsing, Grammar, Activities,
   Dashboard + Pro + avatar). It expands to a single horizontal row
   only at >=1200px (navbar-expand-xl); below that it collapses into
   the hamburger menu so items never wrap or overflow the container. */

/* Horizontal bar (>=1200px): give each item a clear gap, keep padding
   trim so all items fit the 1140px container, and never let the row wrap. */
@media (min-width: 1200px) {
    #mainNav .navbar-nav {
        flex-wrap: nowrap;
        gap: .5rem;
    }

    #mainNav .navbar-nav .nav-link {
        padding: .4rem .6rem !important;
    }
}

/* Narrower desktops (1200–1399px): trim spacing a touch more. */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    #mainNav .navbar-nav {
        gap: .3rem;
    }

    #mainNav .navbar-nav .nav-link {
        padding: .4rem .5rem !important;
        font-size: .92rem;
    }

    #mainNav .navbar-brand .brand-text {
        font-size: 1.05rem;
    }
}

/* Collapsed menu (<1200px): give the dropped panel a clean, scrollable
   surface so long menus stay usable on tablets and small laptops. */
@media (max-width: 1199.98px) {
    #mainNav .navbar-collapse {
        margin-top: .5rem;
        padding: .5rem .25rem;
        border-top: 1px solid #e2e8f0;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    #mainNav .navbar-nav.ms-auto {
        align-items: flex-start !important;
    }

    #mainNav .navbar-nav .nav-link {
        padding: .5rem .75rem !important;
    }
}

.nav-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    overflow: hidden;
}

.nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Messages ---------- */
.messages-container {
    position: fixed;
    top: 72px;
    right: 1.5rem;
    z-index: 9999;
    min-width: 300px;
    max-width: 420px;
}

.toast-message {
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    border: none;
}

/* ---------- Main Content ---------- */
.main-content {
    min-height: 100vh;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, .65);
    padding: 2rem 0;
    margin-top: 0;
    font-size: .875rem;
}

.footer-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .25rem;
}

.footer-tagline {
    font-size: .8rem;
    margin: 0;
}

.footer-stats {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-stats span {
    opacity: .75;
}

.footer-copy {
    margin: 0;
    opacity: .6;
}

/* ===================================================
   HOME PAGE
   =================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, #1a2744 50%, #0c1829 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-shapes .shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(37, 99, 235, .12);
    pointer-events: none;
}

.shape-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: rgba(245, 158, 11, .07);
}

.shape-3 {
    width: 250px;
    height: 250px;
    top: 40%;
    left: 30%;
    background: rgba(16, 185, 129, .06);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(245, 158, 11, .15);
    color: var(--accent);
    border: 1px solid rgba(245, 158, 11, .3);
    padding: .4rem 1rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
}

.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin: .75rem 0 1rem;
}

.hero-subtitle {
    color: rgba(255, 255, 255, .7);
    font-size: 1.05rem;
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: .75rem;
    color: rgba(255, 255, 255, .6);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, .15);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    width: 420px;
    height: 380px;
    margin: 0 auto;
}

.illustration-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 0 0 12px rgba(37, 99, 235, .2);
    text-align: center;
}

.illustration-center span {
    font-size: .7rem;
    font-weight: 600;
    margin-top: .25rem;
    line-height: 1.2;
}

.illustration-card {
    position: absolute;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: var(--radius-sm);
    padding: .5rem .8rem;
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
    animation: floatCard 3s ease-in-out infinite;
    white-space: nowrap;
}

.illustration-card i {
    font-size: 1rem;
    color: var(--accent);
}

.card-1 {
    top: 0;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 15%;
    right: 0;
    animation-delay: .4s;
}

.card-3 {
    top: 50%;
    left: 0;
    animation-delay: .8s;
}

.card-4 {
    bottom: 10%;
    right: 5%;
    animation-delay: 1.2s;
}

.card-5 {
    bottom: 0;
    left: 20%;
    animation-delay: 1.6s;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .5);
    font-size: .8rem;
    text-align: center;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator i {
    display: block;
    margin-top: .25rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0)
    }

    50% {
        transform: translateX(-50%) translateY(8px)
    }
}

/* ---------- Section Shared ---------- */
.section-badge {
    display: inline-block;
    background: rgba(37, 99, 235, .1);
    color: var(--primary);
    padding: .3rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: .5rem;
}

.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
}

/* ---------- Categories ---------- */
.categories-section {
    background: #fff;
}

.category-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all var(--transition);
    height: 100%;
}

.category-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.category-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.category-card h6 {
    font-weight: 700;
    font-size: .85rem;
    margin-bottom: .25rem;
}

.category-card p {
    font-size: .75rem;
    color: var(--gray);
    margin: 0;
}

/* ---------- Activity Square Cards ---------- */
.activity-sq-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    background: #fff;
    border: 1px solid var(--border);
}

.activity-sq-card:hover {
    box-shadow: 0 20px 40px rgba(24, 90, 219, 0.18);
    transform: translateY(-6px);
}

.activity-sq-done {
    border-color: #22c55e;
    border-width: 2px;
}

/* Square header — aspect ratio 1:1 */
.activity-sq-header {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
}

/* Large centred icon */
.sq-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.92);
    transition: transform 0.35s ease;
}

.activity-sq-header:hover .sq-icon {
    transform: scale(1.12);
}

/* Number badge top-left */
.sq-num {
    position: absolute;
    top: 12px;
    left: 14px;
    font-size: .72rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

/* Done badge top-right */
.sq-done-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .7rem;
    z-index: 2;
}

/* Progress bar at bottom of square */
.sq-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 5px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0 3px 3px 0;
    transition: width .4s ease;
    z-index: 2;
}

/* Gradient backgrounds per color_class */
.grad-primary {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 60%, #60a5fa 100%);
}

.grad-success {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 60%, #4ade80 100%);
}

.grad-info {
    background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 60%, #38bdf8 100%);
}

.grad-warning {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 60%, #fcd34d 100%);
}

.grad-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 60%, #f87171 100%);
}

.grad-purple {
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 60%, #a78bfa 100%);
}

.grad-teal {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 60%, #2dd4bf 100%);
}

.grad-orange {
    background: linear-gradient(135deg, #c2410c 0%, #f97316 60%, #fb923c 100%);
}

.grad-rose {
    background: linear-gradient(135deg, #be123c 0%, #f43f5e 60%, #fb7185 100%);
}

.grad-emerald {
    background: linear-gradient(135deg, #065f46 0%, #10b981 60%, #34d399 100%);
}

.grad-indigo {
    background: linear-gradient(135deg, #3730a3 0%, #6366f1 60%, #818cf8 100%);
}

.grad-pink {
    background: linear-gradient(135deg, #9d174d 0%, #ec4899 60%, #f472b6 100%);
}

/* Subtle shimmer overlay */
.activity-sq-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.0) 50%,
            rgba(0, 0, 0, 0.18) 100%);
    pointer-events: none;
}

/* Card body */
.activity-sq-body {
    padding: 0.9rem 1rem;
}

.sq-title {
    font-size: .88rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: .4rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sq-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .72rem;
    color: var(--gray);
    margin-bottom: .6rem;
}

.sq-pct {
    font-weight: 700;
    color: var(--primary);
}

.sq-pct.done {
    color: #22c55e;
}

/* Compact button */
.btn-sq {
    display: block;
    width: 100%;
    padding: .45rem .75rem;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all .2s ease;
    border: none;
}

.btn-sq-start {
    background: var(--primary);
    color: #fff;
}

.btn-sq-start:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-sq-cont {
    background: rgba(24, 90, 219, .12);
    color: var(--primary);
    border: 1px solid rgba(24, 90, 219, .25);
}

.btn-sq-cont:hover {
    background: var(--primary);
    color: #fff;
}

.btn-sq-done {
    background: rgba(34, 197, 94, .12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, .3);
}

.btn-sq-done:hover {
    background: #22c55e;
    color: #fff;
}

/* Legacy card styles kept for other pages */
.activity-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
}

.activity-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}

.activity-card-done {
    border-color: var(--success);
}

.activity-card-header {
    padding: 1.75rem 1.5rem;
    position: relative;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.activity-number {
    font-size: .8rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.activity-icon-lg {
    font-size: 2.4rem;
    color: rgba(255, 255, 255, .9);
}

.activity-done-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 28px;
    height: 28px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .75rem;
}

.activity-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-card-body .btn {
    margin-top: auto;
}

/* Activities Page layout styling */
.activities-page {
    padding-top: 0;
}

/* Card components styling */
.activity-meta {
    display: flex;
    gap: .5rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge-level {
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 50px;
    padding: .2rem .7rem;
    font-size: .7rem;
    font-weight: 700;
}

.badge-category {
    background: #f1f5f9;
    color: #475569;
    border-radius: 50px;
    padding: .2rem .7rem;
    font-size: .7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-category i {
    font-size: .75rem;
    color: #475569;
}

.badge-duration {
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 50px;
    padding: .2rem .7rem;
    font-size: .7rem;
    font-weight: 700;
}

.activity-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.activity-objective {
    font-size: .82rem;
    color: #64748b;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 1.25rem;
    /* Forces exact height to avoid jumpiness */
}

.activity-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.sub-count {
    font-size: .75rem;
    color: #94a3b8;
}

/* progress bar */
.progress-sm {
    height: 6px;
    border-radius: 3px;
}

.progress-thin {
    height: 4px;
    border-radius: 2px;
}

/* ---------- How It Works ---------- */
.how-section {
    background: var(--light-gray);
}

.how-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
    position: relative;
    transition: box-shadow var(--transition);
}

.how-card:hover {
    box-shadow: var(--shadow);
}

.how-step {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
}

.how-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 1rem 0 1rem;
}

.how-card h5 {
    font-weight: 700;
    margin-bottom: .5rem;
}

.how-card p {
    color: var(--gray);
    font-size: .9rem;
    margin: 0;
}

/* ---------- CTA ---------- */
.cta-section {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
}

.cta-card {
    padding: 3rem;
    border-radius: var(--radius-lg);
    color: #fff;
}

.cta-card h2 {
    font-weight: 800;
    margin-bottom: .5rem;
}

.cta-card p {
    color: rgba(255, 255, 255, .8);
}

/* ===================================================
   MODULE CATEGORY CARDS (Activities List)
   =================================================== */
.module-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.5rem;
}

/* Clean, attractive pill-style category filters */
.module-card {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: auto;
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    background: #ffffff;
    background-image: none !important;
    border: 1.5px solid #e2e8f0;
    color: #334155 !important;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease,
        border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    overflow: visible;
}

/* Remove the old dark image overlay */
.module-card::before {
    content: none !important;
    display: none !important;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: #185adb;
    color: #185adb !important;
    box-shadow: 0 6px 16px rgba(24, 90, 219, 0.14);
}

.module-card:hover .mod-icon {
    color: #185adb;
}

/* Active pill — blue border, light background, BLACK text (stays readable) */
.module-card.mod-active {
    background: #ffffff;
    border-color: #185adb;
    color: #0f172a !important;
    box-shadow: 0 4px 14px rgba(24, 90, 219, 0.18);
}

.module-card.mod-active:hover {
    color: #0f172a !important;
    transform: translateY(-2px);
}

.module-card.mod-active .mod-label {
    color: #0f172a;
}

.module-card.mod-active .mod-icon {
    color: #185adb;
}

.module-card .mod-icon {
    position: relative;
    z-index: 2;
    width: auto;
    height: auto;
    background: transparent;
    backdrop-filter: none;
    font-size: 1rem;
    color: #185adb;
    transition: color 0.2s ease;
}

.module-card .mod-label {
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

/* Category filters are clean pills — no background photos */
.mod-all,
.mod-grammar,
.mod-speaking,
.mod-writing,
.mod-vocabulary,
.mod-negotiation,
.mod-communication,
.mod-analysis,
.mod-workshop,
.mod-resume {
    background-image: none !important;
}

@media (max-width: 1200px) {
    .module-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .module-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ---------- Page Header Band (Light Theme) ---------- */
.page-header-band {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #cbd5e1;
    padding: 25px 0 2.5rem;
    /* 25px gap below the navbar (body already clears it) */
}

.page-header-title {
    color: #0f172a;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.page-header-sub {
    color: #475569;
    margin: .25rem 0 0;
}

/* ===================================================
   DASHBOARD
   =================================================== */
.dashboard-page {
    background: var(--light-gray);
    min-height: 100vh;
    padding-top: 25px;
}

.dashboard-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-sm);
}

/* Stat Cards */
.stat-card {
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    color: #fff;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.stat-card-blue {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.stat-card-green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-card-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-card-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.stat-card-icon {
    font-size: 1.5rem;
    opacity: .85;
}

.stat-card-value {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.stat-card-label {
    font-size: .8rem;
    opacity: .85;
}

/* Dashboard Cards */
.dashboard-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1rem;
}

.dashboard-card-body {
    padding: 1rem 1.5rem;
}

/* Progress List */
.progress-activity-item {
    border-bottom: 1px solid var(--border);
}

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

.progress-activity-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 0;
    color: inherit;
    text-decoration: none;
    transition: all var(--transition);
}

.progress-activity-link:hover {
    color: var(--primary);
}

.progress-activity-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.progress-activity-info {
    flex: 1;
    min-width: 0;
}

.progress-activity-name {
    font-size: .9rem;
    font-weight: 600;
    color: var(--dark);
}

.progress-activity-pct {
    font-size: .85rem;
    font-weight: 700;
}

/* Recent Results */
.recent-result-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.recent-result-item:last-child {
    border: none;
}

.result-exercise-name {
    font-size: .85rem;
    font-weight: 600;
    flex: 1;
}

.result-activity-name {
    font-size: .75rem;
}

.score-badge {
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
}

.score-high {
    background: var(--success);
}

.score-mid {
    background: var(--warning);
    color: var(--dark);
}

.score-low {
    background: var(--danger);
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
    background: var(--light-gray);
    border-radius: var(--radius-sm);
    padding: .85rem;
    color: var(--dark-3);
    font-size: .78rem;
    font-weight: 600;
    transition: all var(--transition);
    text-decoration: none;
}

.quick-link-item i {
    font-size: 1.2rem;
    color: var(--primary);
}

.quick-link-item:hover {
    background: var(--primary);
    color: #fff;
}

.quick-link-item:hover i {
    color: #fff;
}

/* Empty State */
.empty-state {
    color: var(--gray);
}

/* ===================================================
   ACTIVITY DETAIL
   =================================================== */
.activity-hero {
    padding-top: 80px;
}

.activity-hero-number {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .6);
}

.activity-hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin: .25rem 0 .75rem;
}

.activity-hero-objective {
    color: rgba(255, 255, 255, .8);
    max-width: 600px;
}

.activity-hero-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    color: rgba(255, 255, 255, .75);
    font-size: .9rem;
}

.activity-hero-icon-wrap {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, .15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    margin: 0 auto;
}

.hero-progress-ring {
    text-align: center;
}

.ring-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
}

.ring-label {
    font-size: .75rem;
    color: rgba(255, 255, 255, .65);
}

/* Breadcrumb Light */
.breadcrumb-light .breadcrumb-item a {
    color: rgba(255, 255, 255, .7);
}

.breadcrumb-light .breadcrumb-item.active {
    color: rgba(255, 255, 255, .5);
}

.breadcrumb-light .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, .4);
}

/* Sub-Activity Cards (in detail page) */
.sub-activity-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.sub-activity-card:hover {
    box-shadow: var(--shadow);
}

.sub-activity-card.sub-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.sub-activity-card.sub-active {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.sub-activity-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.sub-number-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
}

.sub-activity-info {
    flex: 1;
}

.sub-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.sub-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .2rem;
    font-size: .8rem;
}

.sub-status-badge {
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.status-in_progress {
    background: #dbeafe;
    color: #1e40af;
}

.status-not_started {
    background: #f1f5f9;
    color: var(--gray);
}

.sub-activity-body {
    padding: .75rem 1.25rem 1rem 4rem;
}

.sub-description {
    font-size: .875rem;
    color: var(--gray);
    margin: 0;
}

/* Info Cards (sidebar) */
.info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.info-card-header {
    padding: .85rem 1.25rem;
    font-weight: 700;
    font-size: .9rem;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
}

.info-card-body {
    padding: 1.25rem;
}

.materials-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.materials-list li {
    padding: .3rem 0;
    font-size: .875rem;
    border-bottom: 1px solid var(--border);
}

.materials-list li:last-child {
    border: none;
}

.assessment-item {
    padding: .4rem 0;
    font-size: .875rem;
}

.login-prompt-card {
    background: linear-gradient(135deg, var(--dark), #1a2744);
    border-radius: var(--radius);
    padding: 1.75rem;
    text-align: center;
    color: #fff;
}

.login-prompt-card i {
    color: var(--accent);
}

.login-prompt-card h6 {
    margin: .5rem 0 .25rem;
    font-weight: 700;
}

.login-prompt-card p {
    font-size: .85rem;
    color: rgba(255, 255, 255, .7);
    margin-bottom: 1.25rem;
}

/* Activity Navigation */
.activity-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===================================================
   SUB-ACTIVITY PAGE
   =================================================== */
.sub-activity-hero {
    padding-top: 80px;
}

.sub-hero-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, .2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* Content Cards */
.content-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.content-card-header {
    padding: .85rem 1.25rem;
    font-weight: 700;
    font-size: .9rem;
    background: var(--light-gray);
    border-bottom: 1px solid var(--border);
}

.content-card-body {
    padding: 1.25rem;
}

.instructions-text p {
    margin-bottom: .75rem;
    color: var(--gray);
    font-size: .9rem;
}

/* Exercise Cards in Sub-Activity */
.exercises-grid {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}

.exercise-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    transition: box-shadow var(--transition);
}

.exercise-card:hover {
    box-shadow: var(--shadow);
}

.exercise-type-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

.exercise-mcq {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.exercise-fill_blank {
    background: linear-gradient(135deg, #10b981, #059669);
}

.exercise-matching {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.exercise-ordering {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.exercise-bingo {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.exercise-writing {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.exercise-timer {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.exercise-card-body {
    flex: 1;
    min-width: 0;
}

.exercise-type-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray);
    font-weight: 600;
}

.exercise-title {
    font-weight: 700;
    font-size: .9rem;
    margin: .1rem 0;
}

.exercise-last-score {
    font-size: .78rem;
    margin-top: .25rem;
}

.exercise-card-action {
    flex-shrink: 0;
}

/* Mark Complete / Completed Banner */
.mark-complete-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.completed-banner {
    background: linear-gradient(135deg, var(--success), #059669);
    color: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    font-weight: 600;
    text-align: center;
}

/* Sub Nav Items (sidebar) */
.sub-nav-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    color: var(--dark-3);
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
    transition: background var(--transition);
    text-decoration: none;
}

.sub-nav-item:last-child {
    border: none;
}

.sub-nav-item:hover {
    background: var(--light-gray);
    color: var(--primary);
}

.sub-nav-active {
    background: #eff6ff !important;
    color: var(--primary) !important;
    font-weight: 700;
}

.sub-nav-num {
    width: 24px;
    height: 24px;
    background: var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sub-nav-active .sub-nav-num {
    background: var(--primary);
    color: #fff;
}

.tips-card .info-card-header {
    background: #fffbeb;
    border-color: #fde68a;
}

.tips-list {
    padding-left: 1.2rem;
    margin: 0;
}

.tips-list li {
    font-size: .875rem;
    color: var(--gray);
    padding: .25rem 0;
}

/* ===================================================
   EXERCISE PAGE
   =================================================== */
.exercise-hero {
    padding-top: 80px;
}

.exercise-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.exercise-icon-mcq {
    background: rgba(37, 99, 235, .3) !important;
}

.exercise-icon-fill_blank {
    background: rgba(16, 185, 129, .3) !important;
}

.exercise-icon-matching {
    background: rgba(139, 92, 246, .3) !important;
}

.exercise-icon-bingo {
    background: rgba(236, 72, 153, .3) !important;
}

.exercise-icon-writing {
    background: rgba(6, 182, 212, .3) !important;
}

.exercise-icon-timer {
    background: rgba(239, 68, 68, .3) !important;
}

.exercise-instructions-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.instruction-icon {
    width: 32px;
    height: 32px;
    background: rgba(37, 99, 235, .1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ===================================================
   AUTH PAGES
   =================================================== */
/* ===================================================
   AUTH PAGES (MODERN LIGHT THEME)
   =================================================== */
.auth-page-wrapper {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    min-height: calc(100vh - 72px);
    padding: 5rem 1rem 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card-container {
    width: 100%;
    max-width: 920px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    margin: 0 auto;
}

.auth-banner-left {
    flex: 1;
    background: linear-gradient(135deg, #185adb 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.auth-banner-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-banner-brand svg {
    flex-shrink: 0;
}

.auth-banner-left h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
    color: #ffffff;
}

.auth-banner-left p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.auth-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: #ffffff;
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-features-list li i {
    color: #34d399;
    font-size: 1.1rem;
}

.auth-form-right {
    flex: 0 0 460px;
    background: #ffffff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-form-wrap {
    width: 100%;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.auth-form .form-control,
.auth-form .form-select {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.7rem 1rem !important;
    color: #0f172a !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.auth-form .form-control:focus {
    border-color: #185adb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(24, 90, 219, 0.12) !important;
}

.auth-form .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 1.75rem 0;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: #ffffff;
    padding: 0 1rem;
    position: relative;
}

@media (max-width: 860px) {
    .auth-card-container {
        flex-direction: column;
        max-width: 480px;
    }

    .auth-form-right {
        flex: 1;
        padding: 2.5rem 2rem;
    }

    .auth-banner-left {
        padding: 2.5rem 2rem;
    }
}

/* ===================================================
   PROFILE PAGE
   =================================================== */
.profile-page {
    background: var(--light-gray);
    min-height: 100vh;
}

.profile-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.profile-avatar-wrap {
    margin-bottom: .5rem;
}

.profile-avatar-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.profile-avatar-initials {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .5rem;
}

.profile-stat {
    text-align: center;
    padding: .5rem;
}

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

.profile-stat-label {
    font-size: .7rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ===================================================
   RESULT PANEL
   =================================================== */
.result-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.result-panel-inner {
    padding: 3rem;
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.result-score-display {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--light-gray);
    padding: .75rem 2rem;
    border-radius: 999px;
    display: inline-block;
    margin-top: .5rem;
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 991px) {
    .auth-right {
        flex: 1;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 3rem 1.5rem;
    }

    .hero-stats {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .dashboard-welcome {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .activity-nav {
        flex-direction: column;
    }

    .hero-stats {
        justify-content: center;
    }
}

/* --- Premium Mistake Highlighting (Integrated from Writing Module) --- */
.issue-mark {
    background: #ff7f50 !important;
    color: #ffffff !important;
    padding: 0 4px !important;
    border-radius: 4px !important;
    cursor: help !important;
    text-decoration: none !important;
    display: inline !important;
    transition: filter 0.2s;
}

.issue-mark:hover {
    filter: brightness(1.1);
}

/* Premium Tooltip Styling */
.lv-issue-tooltip {
    position: fixed;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 127, 80, 0.2);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    color: #1e293b;
    pointer-events: none;
    width: max-content;
    max-width: 320px;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 1;
}

.lv-issue-tooltip[hidden] {
    display: none !important;
    opacity: 0;
    transform: translateY(5px);
}

.lv-issue-tooltip__type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: #ff7f50;
    margin-bottom: 4px;
}

.lv-issue-tooltip__message {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.lv-issue-tooltip__try {
    font-size: 13px;
    color: #64748b;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.lv-issue-tooltip__try span {
    font-weight: 700;
    color: #0ea5e9;
}

/* ============================================================
   Portal Hero Image Cards (Authenticated Student / Employer)
   ============================================================ */
.portal-hero-card {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(24, 90, 219, 0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.portal-hero-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 24px 60px rgba(24, 90, 219, 0.28);
}

.portal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(15, 23, 42, 0.05) 0%,
            rgba(15, 23, 42, 0.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
}

.portal-hero-label {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    gap: 6px;
}

.portal-hero-label i {
    color: #185adb;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .portal-hero-card {
        height: 260px;
    }
}

/* ===================================================
   GLOBAL BACK BUTTON
   =================================================== */
#globalBackBtn {
    position: fixed;
    bottom: 28px;
    left: 24px;
    z-index: 4000;
    display: none;
    /* shown via JS on secondary pages */
    align-items: center;
    gap: 7px;
    background: #ffffff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 50px;
    padding: 9px 20px 9px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease,
        box-shadow 0.2s ease, transform 0.15s ease;
}

#globalBackBtn:hover {
    background: #185adb;
    color: #ffffff;
    border-color: #185adb;
    box-shadow: 0 6px 20px rgba(24, 90, 219, 0.25);
    transform: translateX(-3px);
}

#globalBackBtn i {
    font-size: 0.8rem;
}

@media (max-width: 576px) {
    #globalBackBtn {
        bottom: 20px;
        left: 14px;
        padding: 8px 14px 8px 12px;
        font-size: 0.8rem;
    }

}


/* ═══════════════════════════════════════════════════════════════
   BLACK & GOLD ELEGANCE — global theme override (appended)
   Navy #14213D · Gold #FCA311 · White #FFF · Gray #E5E5E5 · Black #000
   Retargets the CSS variables (resolved app-wide) + key components.
   Appended last so it wins the cascade; centralised for easy future edits.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --navy: #14213D;
    --gold: #FCA311;
    --black: #000000;
    --primary: #14213D;
    --primary-dark: #0b1526;
    --accent: #FCA311;
    --accent-dark: #e0900c;
    --accent-orange: #FCA311;
    --dark: #14213D;
    --dark-2: #1b2a4a;
    --light-gray: #E5E5E5;
    --border: #E5E5E5;
    --warning: #FCA311;
    --shadow-sm: 0 1px 2px rgba(20, 33, 61, .04), 0 1px 3px rgba(20, 33, 61, .06);
    --shadow: 0 2px 4px rgba(20, 33, 61, .04), 0 8px 20px rgba(20, 33, 61, .07);
    --shadow-lg: 0 20px 45px rgba(20, 33, 61, .11);
    --shadow-gold: 0 6px 18px rgba(252, 163, 17, .32);
    --bs-primary: #14213D;
    --bs-primary-rgb: 20, 33, 61;
    --bs-link-color: #14213D;
    --bs-link-color-rgb: 20, 33, 61;
    --bs-link-hover-color: #FCA311;
    --bs-link-hover-color-rgb: 252, 163, 17;
    --bs-border-color: #E5E5E5;
    --cb-primary: #14213D;
    --cb-primary-dark: #0b1526;
    --cb-border: #E5E5E5;
    --cb-text: #14213D;
    --cb-warning: #FCA311;
}

/* Links */
a {
    color: var(--navy);
}

a:hover {
    color: var(--accent);
}

/* Utilities & brand */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent {
    background: var(--accent) !important;
}

.text-primary {
    color: var(--navy) !important;
}

.bg-primary {
    background: linear-gradient(135deg, #14213D, #0b1526) !important;
}

.brand-text {
    color: var(--navy) !important;
}

.brand-accent {
    color: var(--accent) !important;
}

/* Navbar — active/hover items get a soft raised "pill" with a subtle shadow */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--navy) !important;
    background: #eef1f6 !important;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(20, 33, 61, .14), 0 1px 2px rgba(20, 33, 61, .08);
}

.nav-avatar {
    background: var(--navy) !important;
    color: #ffffff !important;
    font-weight: 800;
}

.nav-avatar span {
    color: #ffffff !important;
}

/* Buttons — primary/accent = gold+black; outline = navy; secondary = navy */
.btn {
    border-radius: 10px;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
    letter-spacing: .01em;
}

.btn-lg {
    border-radius: 12px;
}

.btn-sm {
    border-radius: 8px;
}

.btn-primary,
.btn-accent {
    --bs-btn-bg: #FCA311;
    --bs-btn-border-color: #FCA311;
    --bs-btn-color: #000;
    --bs-btn-hover-bg: #e0900c;
    --bs-btn-hover-border-color: #e0900c;
    --bs-btn-hover-color: #000;
    --bs-btn-active-bg: #e0900c;
    --bs-btn-active-border-color: #e0900c;
    --bs-btn-active-color: #000;
    --bs-btn-disabled-bg: #FCA311;
    --bs-btn-disabled-border-color: #FCA311;
    --bs-btn-disabled-color: #000;
    background: linear-gradient(135deg, #FCA311, #f0980a) !important;
    color: #000 !important;
    border: none;
    font-weight: 700;
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover,
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(252, 163, 17, .42);
    filter: brightness(1.03);
    color: #000 !important;
}

.btn-primary:active,
.btn-accent:active {
    transform: translateY(0);
}

.btn-outline-primary {
    --bs-btn-color: var(--navy);
    --bs-btn-border-color: var(--border);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-hover-color: #000;
    --bs-btn-active-bg: var(--accent);
    --bs-btn-active-border-color: var(--accent);
    --bs-btn-active-color: #000;
    font-weight: 600;
}

.btn-secondary {
    --bs-btn-bg: var(--navy);
    --bs-btn-border-color: var(--navy);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #0b1526;
    --bs-btn-hover-border-color: #0b1526;
    --bs-btn-hover-color: #fff;
}

.btn-link {
    color: var(--navy);
}

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

.btn:focus-visible,
a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 .2rem rgba(252, 163, 17, .35);
}

/* Cards */
.card {
    --bs-card-border-color: var(--border);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(252, 163, 17, .22);
}

.form-check-input:checked {
    background-color: var(--navy);
    border-color: var(--navy);
}

/* Badges */
.badge.bg-primary,
.badge.text-bg-primary,
.badge.bg-info {
    background: var(--navy) !important;
    color: #fff !important;
}

/* Typography — DON'T force a heading colour (would turn white headings on
   dark hero backgrounds invisible). Let headings inherit their context. */
h1,
h2,
h3 {
    letter-spacing: -.02em;
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: .4rem;
}

.dropdown-item {
    border-radius: 8px;
}

.dropdown-item:hover {
    background: rgba(20, 33, 61, .06);
    color: var(--navy);
}

.dropdown-item:active,
.dropdown-item.active {
    background: var(--navy);
    color: #fff;
}

/* Dashboard stat cards → navy with gold icons */
.stat-card-blue,
.stat-card-green,
.stat-card-orange,
.stat-card-purple {
    background: linear-gradient(135deg, #14213D, #0b1526) !important;
}

.stat-card-icon {
    color: var(--gold) !important;
    opacity: 1 !important;
}

/* Footer — navy already via --dark; add gold accent + readable links */
.site-footer {
    border-top: 3px solid var(--gold);
}

.footer-brand i {
    color: var(--gold);
}

.site-footer a {
    color: rgba(255, 255, 255, .78);
}

.site-footer a:hover {
    color: var(--gold);
}

/* Section badge → gold tint */
.section-badge {
    background: rgba(252, 163, 17, .12) !important;
    color: #b8760a !important;
    border: 1px solid rgba(252, 163, 17, .35) !important;
}

/* ═══════════════════════════════════════════════════════════════
   ACCESSIBILITY — colour-blind & low-vision support
   The palette (navy/gold/gray/black/white) is luminance-distinct, so
   hues stay separable without colour perception. These rules add
   non-colour cues (focus shape, underlines, weight) and fix low-contrast
   gold text. Status meaning must always pair colour with an icon/label.
   ═══════════════════════════════════════════════════════════════ */
/* 1) Strong, always-visible keyboard focus — a shape cue, not a colour cue */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="tab"]:focus-visible,
.dropdown-item:focus-visible,
.nav-link:focus-visible {
    outline: 3px solid #FCA311 !important;
    outline-offset: 2px !important;
}

/* 2) Gold used as TEXT on light surfaces → darker gold for AA contrast (~4.5:1) */
.text-accent {
    color: #a86a08 !important;
}

/* 3) In-content links carry a non-colour affordance (underline) */
.main-content p a,
.main-content li a,
.card-body p a,
.content-card p a {
    text-decoration: underline;
}

/* 4) Status text stays bold so it reads without relying on hue alone */
.text-success,
.text-danger,
.text-warning,
.text-info {
    font-weight: 600;
}

/* Durable brand gold — beats page-level #mainNav .brand-accent overrides */
#mainNav .navbar-brand .brand-accent {
    color: #FCA311 !important;
}

/* Same treatment for the footer logo, added alongside the navbar one above
   so both stay correct regardless of the more general .brand-accent rules
   elsewhere in this file. */
.footer-brand .brand-accent {
    color: #FCA311 !important;
}

/* The sign-in banner carries the same wordmark as the navbar and the footer:
   "Career" in the surrounding colour, "Buddy" in the brand gold. */
.auth-banner-brand .brand-copy>span:first-child {
    font-family: 'Zilla Slab', Georgia, serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .005em;
}

.auth-banner-brand .brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.08;
}

.auth-banner-brand .brand-tagline {
    display: flex;
    align-items: center;
    gap: .4em;
    font-size: .4em;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
    white-space: nowrap;
    margin-top: .15em;
}

.auth-banner-brand .brand-tagline::before,
.auth-banner-brand .brand-tagline::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: .55;
    min-width: .8em;
}

.auth-banner-brand b {
    color: #FCA311;
    font-weight: inherit;
    margin-left: .15em;
}

/* Durable hero scroll-indicator fix — flow BELOW content, not absolute overlap.
   Overrides page-level home.html rules; Y-only bounce (no left shift). */
.hero-section {
    flex-direction: column !important;
    justify-content: center !important;
}

.hero-section>.container {
    width: 100% !important;
}

.hero-scroll-indicator {
    position: static !important;
    left: auto !important;
    bottom: auto !important;
    right: auto !important;
    margin: 1.25rem auto 0 !important;
    animation-name: cbBounceY !important;
}

@keyframes cbBounceY {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* Home hero — limit gold to ONE primary CTA; make the accent button navy */
.hero-actions .btn-accent {
    background: #14213D !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(20, 33, 61, .25) !important;
}

.hero-actions .btn-accent:hover {
    background: #0b1526 !important;
    filter: none;
}

/* Durable navy active/hover nav — beats page-level #mainNav .nav-link overrides */
#mainNav .navbar-nav .nav-link:hover,
#mainNav .navbar-nav .nav-link.active {
    color: #14213D !important;
    background: #eef1f6 !important;
    box-shadow: 0 1px 3px rgba(20, 33, 61, .14), 0 1px 2px rgba(20, 33, 61, .08);
    border-radius: 8px;
}

/* ═══ Reduce gold dominance ═══
   btn-primary (used across all cards/lists) = NAVY structural button.
   Gold reserved for .btn-accent (few intentional CTAs) + Pro badge. */
.btn-primary {
    --bs-btn-bg: #14213D;
    --bs-btn-border-color: #14213D;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #0b1526;
    --bs-btn-hover-border-color: #0b1526;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #0b1526;
    --bs-btn-active-border-color: #0b1526;
    --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #14213D;
    --bs-btn-disabled-border-color: #14213D;
    --bs-btn-disabled-color: #fff;
    background: #14213D !important;
    background-image: none !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(20, 33, 61, .20) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: #0b1526 !important;
    background-image: none !important;
    color: #fff !important;
}