/* ============================================================
   ITL PORTAL — Institute of Tax and Law
   Premium Udemy-level UI  |  Radzen Blazor Client
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Sora:wght@400;500;600;700;800&display=swap');

/* ── ROOT VARIABLES ──────────────────────────────────────── */
:root {
    --itl-green: #1a7a4a;
    --itl-green-light: #22a063;
    --itl-green-vivid: #2dc26e;
    --itl-green-soft: #e8f7ef;
    --itl-green-mid: #c3e9d4;
    --white: #ffffff;
    --gray-50: #f8faf9;
    --gray-100: #f1f4f2;
    --gray-200: #e4e9e6;
    --gray-300: #cbd4cf;
    --gray-400: #9aaca3;
    --gray-500: #6b7d74;
    --gray-600: #495a52;
    --gray-700: #2f3d37;
    --gray-800: #1c2821;
    --gray-900: #111916;
    --amber: #f59e0b;
    --amber-soft: #fef3c7;
    --red: #ef4444;
    --red-soft: #fee2e2;
    --blue: #3b82f6;
    --blue-soft: #eff6ff;
    --font-display: 'Sora', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --shadow-xs: 0 1px 2px rgba(26,122,74,.06);
    --shadow-sm: 0 2px 8px rgba(26,122,74,.08);
    --shadow-md: 0 4px 20px rgba(26,122,74,.10);
    --shadow-lg: 0 8px 40px rgba(26,122,74,.12);
    --shadow-xl: 0 16px 60px rgba(26,122,74,.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    --transition: all .22s cubic-bezier(.4,0,.2,1);
    --transition-slow: all .4s cubic-bezier(.4,0,.2,1);
    --sidebar-w: 260px;
    --topbar-h: 68px;
    --container: 1240px;
    /* Aliases used by some admin pages — kept in sync with the palette above */
    --itl-muted: var(--gray-400);
    --itl-border: var(--gray-200);
    --itl-bg: var(--gray-50);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    scrollbar-color: var(--itl-green) var(--gray-100);
    scrollbar-width: thin;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: var(--font-body);
    border: none;
    background: none;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.25;
    color: var(--gray-900);
}

/* ── LANDING LAYOUT ──────────────────────────────────────── */
.landing-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}

    .topbar.scrolled {
        box-shadow: var(--shadow-sm);
    }

.topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.topbar-logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg,var(--itl-green) 0%,var(--itl-green-vivid) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 800;
    font-family: var(--font-display);
    box-shadow: 0 2px 8px rgba(26,122,74,.3);
    letter-spacing: -.5px;
}

.brand-mark {
    flex-shrink: 0;
    object-fit: contain;
    display: block;
}

.brand-mark-shadow {
    filter: drop-shadow(0 2px 6px rgba(26,122,74,.25));
}

.topbar-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

    .topbar-logo-text span:first-child {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 15px;
        color: var(--gray-900);
    }

    .topbar-logo-text span:last-child {
        font-size: 10px;
        font-weight: 500;
        color: var(--gray-500);
        letter-spacing: .04em;
        text-transform: uppercase;
    }

.topbar-search {
    flex: 1;
    max-width: 460px;
    position: relative;
}

    .topbar-search input {
        width: 100%;
        height: 40px;
        padding: 0 16px 0 40px;
        border: 1.5px solid var(--gray-200);
        border-radius: var(--radius-full);
        font-size: 14px;
        font-family: var(--font-body);
        color: var(--gray-800);
        background: var(--gray-50);
        transition: var(--transition);
        outline: none;
    }

        .topbar-search input:focus {
            border-color: var(--itl-green);
            background: var(--white);
            box-shadow: 0 0 0 3px rgba(26,122,74,.1);
        }

        .topbar-search input::placeholder {
            color: var(--gray-400);
        }

.topbar-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 15px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .topbar-nav a {
        padding: 8px 14px;
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 500;
        color: var(--gray-600);
        transition: var(--transition);
    }

        .topbar-nav a:hover {
            color: var(--itl-green);
            background: var(--itl-green-soft);
        }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--itl-green);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(26,122,74,.25);
}

    .btn-primary:hover {
        background: var(--itl-green-light);
        box-shadow: 0 4px 16px rgba(26,122,74,.35);
        transform: translateY(-1px);
    }

.btn-outline {
    background: transparent;
    color: var(--itl-green);
    border: 1.5px solid var(--itl-green);
}

    .btn-outline:hover {
        background: var(--itl-green-soft);
    }

.btn-white {
    background: var(--white);
    color: var(--gray-800);
    box-shadow: var(--shadow-sm);
}

    .btn-white:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn-xl {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-md);
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none !important;
}

.w-full {
    width: 100%;
}

.me-2 {
    margin-right: 8px;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg,var(--gray-900) 0%,var(--gray-800) 40%,#1a3d2b 100%);
    position: relative;
    overflow: hidden;
    padding: 90px 0 100px;
}

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 60% 80% at 70% 50%,rgba(26,122,74,.25) 0%,transparent 70%),radial-gradient(ellipse 40% 60% at 20% 80%,rgba(45,194,110,.1) 0%,transparent 60%);
    }

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(0deg,transparent,transparent 60px,rgba(255,255,255,.02) 60px,rgba(255,255,255,.02) 61px),repeating-linear-gradient(90deg,transparent,transparent 60px,rgba(255,255,255,.02) 60px,rgba(255,255,255,.02) 61px);
}

.hero-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: rgba(45,194,110,.15);
    border: 1px solid rgba(45,194,110,.3);
    border-radius: var(--radius-full);
    color: var(--itl-green-vivid);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 20px;
}

    .hero-badge::before {
        content: '';
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--itl-green-vivid);
        animation: pulse-dot 2s ease infinite;
        flex-shrink: 0;
    }

@keyframes pulse-dot {
    0%,100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .6;
        transform: scale(1.4);
    }
}

.hero h1 {
    font-size: clamp(34px,4vw,52px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
}

    .hero h1 span {
        background: linear-gradient(135deg,var(--itl-green-vivid),#7ee8a2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.hero p {
    font-size: 17px;
    color: rgba(255,255,255,.65);
    margin-bottom: 36px;
    max-width: 490px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,.1);
    flex-wrap: wrap;
}

.hero-stat-number {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.hero-stat-label {
    font-size: 11px;
    color: rgba(255,255,255,.45);
    font-weight: 500;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card-stack {
    position: relative;
    width: 360px;
}

.hero-card {
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    padding: 28px;
    color: white;
}

.hero-card-featured {
    position: relative;
    z-index: 2;
}

.hero-card-back {
    position: absolute;
    top: -16px;
    left: 16px;
    right: -16px;
    bottom: 16px;
    background: rgba(26,122,74,.3);
    border: 1px solid rgba(45,194,110,.2);
    border-radius: var(--radius-xl);
    z-index: 1;
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
    padding: 80px 0;
}

.section-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section-header {
    margin-bottom: 48px;
}

    .section-header.centered {
        text-align: center;
    }

        .section-header.centered .section-subtitle {
            margin: 0 auto;
        }

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--itl-green);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(26px,3vw,38px);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--gray-500);
    max-width: 560px;
    line-height: 1.7;
}

/* ── COURSE CARDS ────────────────────────────────────────── */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(290px,1fr));
    gap: 24px;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

    .course-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-4px);
        border-color: transparent;
    }

.course-card-thumb {
    aspect-ratio: 16/9;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg,var(--gray-800),var(--gray-700));
}

    .course-card-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: var(--transition-slow);
    }

.course-card:hover .course-card-thumb img {
    transform: scale(1.06);
}

.course-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,var(--itl-green) 0%,var(--itl-green-vivid) 100%);
    font-size: 48px;
    color: rgba(255,255,255,.4);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.course-badge-new {
    background: var(--amber);
    color: var(--white);
}

.course-badge-popular {
    background: var(--itl-green);
    color: var(--white);
}

.course-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.course-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

.course-card-footer {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.course-price {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-900);
}

.course-price-free {
    color: var(--itl-green);
}

.progress-bar {
    height: 6px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,var(--itl-green),var(--itl-green-vivid));
    border-radius: var(--radius-full);
    transition: width .6s ease;
}

.progress-label {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 5px;
}

.course-progress {
    margin-top: 10px;
}

/* ── FEATURES ────────────────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
    gap: 24px;
}

.feature-card {
    padding: 32px 28px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

    .feature-card:hover {
        border-color: var(--itl-green-mid);
        box-shadow: var(--shadow-md);
        transform: translateY(-3px);
    }

.feature-icon {
    width: 52px;
    height: 52px;
    background: var(--itl-green-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--itl-green);
    font-size: 22px;
    margin-bottom: 20px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 14px;
    color: var(--gray-500);
    line-height: 1.65;
}

/* ── TESTIMONIALS ────────────────────────────────────────── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
    gap: 24px;
}

.testimonial-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    transition: var(--transition);
}

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

    .testimonial-card::before {
        content: '"';
        position: absolute;
        top: 16px;
        right: 22px;
        font-size: 80px;
        line-height: 1;
        font-family: Georgia,serif;
        color: var(--itl-green-soft);
        pointer-events: none;
    }

.testimonial-text {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.75;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-900);
}

.testimonial-role {
    font-size: 12px;
    color: var(--gray-400);
}

.stars {
    color: var(--amber);
    font-size: 14px;
    margin-bottom: 6px;
}

/* ── CTA ─────────────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg,var(--itl-green) 0%,#0f5c35 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

    .cta-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 60% 80% at 80% 50%,rgba(45,194,110,.2),transparent);
    }

.cta-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    text-align: center;
}

    .cta-inner h2 {
        font-size: clamp(28px,3.5vw,44px);
        font-weight: 800;
        color: var(--white);
        margin-bottom: 14px;
    }

    .cta-inner p {
        font-size: 17px;
        color: rgba(255,255,255,.7);
        margin-bottom: 36px;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,.55);
    padding: 60px 0 32px;
}

.footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 14px;
    max-width: 280px;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.footer-col ul {
    list-style: none;
}

    .footer-col ul li {
        margin-bottom: 10px;
    }

        .footer-col ul li a {
            font-size: 14px;
            color: rgba(255,255,255,.45);
            transition: var(--transition);
        }

            .footer-col ul li a:hover {
                color: var(--itl-green-vivid);
                padding-left: 4px;
            }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── SIDEBAR (auth pages) ────────────────────────────────── */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: #f7faf8;
}

.sidebar {
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid #e2ebe5;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition: transform .3s ease;
    overflow: hidden;
}

.sidebar-logo {
    padding: 18px 20px 16px;
    border-bottom: 1px solid #edf2ef;
    flex-shrink: 0;
}

.sidebar .topbar-logo-text span:first-child { color: #172d21; }
.sidebar .topbar-logo-text span:last-child { color: #8a9890; }

.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #82b598 transparent;
}

.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #82b598; border-radius: 99px; }

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #9aa8a0;
    padding: 14px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 13px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: #52645a;
    transition: var(--transition);
    margin-bottom: 2px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

    .sidebar-link i {
        font-size: 15px;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        background: #edf6f0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #31734f;
        transition: var(--transition);
        flex-shrink: 0;
    }

    .sidebar-link:hover {
        background: #f1f7f3;
        color: #17643e;
    }

        .sidebar-link:hover i {
            color: #17643e;
            background: #dff1e6;
        }

    .sidebar-link.active {
        background: #173c29;
        color: #fff;
        font-weight: 600;
    }

        .sidebar-link.active i {
            color: #fff;
            background: rgba(255,255,255,.12);
        }

.sidebar-user {
    padding: 14px 18px;
    border-top: 1px solid #edf2ef;
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--itl-green),var(--itl-green-vivid));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

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

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #263a2f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--gray-400);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 49;
    backdrop-filter: blur(2px);
}

    .sidebar-overlay.visible {
        display: block;
    }

/* ── APP TOPBAR ──────────────────────────────────────────── */
.app-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 14px;
    z-index: 40;
    box-shadow: var(--shadow-xs);
}

.app-topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-main {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 32px;
    min-height: calc(100vh - var(--topbar-h));
    flex: 1;
    background: #f7faf8;
}

.app-layout .card,.app-layout .stat-card,.app-layout .course-card { border-color:#e2ebe5; box-shadow:0 5px 18px rgba(23,60,41,.045); border-radius:10px; }
.app-layout .page-title { font-family:var(--font-display); letter-spacing:-.025em; }

/* ── STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
    gap: 20px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

    .stat-card::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg,var(--itl-green),var(--itl-green-vivid));
    }

    .stat-card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

    .stat-card-icon.green {
        background: var(--itl-green-soft);
        color: var(--itl-green);
    }

    .stat-card-icon.amber {
        background: var(--amber-soft);
        color: var(--amber);
    }

    .stat-card-icon.blue {
        background: var(--blue-soft);
        color: var(--blue);
    }

    .stat-card-icon.red {
        background: var(--red-soft);
        color: var(--red);
    }

.stat-value {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

    .stat-change.up {
        background: var(--itl-green-soft);
        color: var(--itl-green);
    }

    .stat-change.down {
        background: var(--red-soft);
        color: var(--red);
    }

/* ── DATA TABLE ──────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th {
        text-align: left;
        padding: 12px 16px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--gray-400);
        border-bottom: 1px solid var(--gray-200);
        white-space: nowrap;
        background: var(--gray-50);
    }

    .data-table td {
        padding: 14px 16px;
        font-size: 14px;
        color: var(--gray-700);
        border-bottom: 1px solid var(--gray-100);
        vertical-align: middle;
    }

    .data-table tr:last-child td {
        border-bottom: none;
    }

    .data-table tbody tr:hover {
        background: var(--gray-50);
    }

/* ── CHIPS / BADGES ──────────────────────────────────────── */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.chip-green {
    background: var(--itl-green-soft);
    color: var(--itl-green);
}

.chip-amber {
    background: var(--amber-soft);
    color: #92400e;
}

.chip-red {
    background: var(--red-soft);
    color: #b91c1c;
}

.chip-gray {
    background: var(--gray-100);
    color: var(--gray-600);
}

.chip-blue {
    background: var(--blue-soft);
    color: #1e40af;
}

/* ── CARD ────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}

.card-body {
    padding: 24px;
}

/* ── FORMS ───────────────────────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

    .form-label span {
        color: var(--red);
    }

.form-input {
    width: 100%;
    height: 42px;
    padding: 0 13px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
    display: block;
}

    .form-input:focus {
        border-color: var(--itl-green);
        box-shadow: 0 0 0 3px rgba(26,122,74,.1);
    }

    .form-input::placeholder {
        color: var(--gray-400);
    }

textarea.form-input {
    height: auto;
    padding: 12px 13px;
    resize: vertical;
    min-height: 100px;
}

/* ── AUTH LAYOUT ─────────────────────────────────────────── */
.auth-layout {
    min-height: 100vh;
    display: flex;
}

.auth-left {
    flex: 1;
    background: linear-gradient(135deg,var(--gray-900) 0%,#1a3d2b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

    .auth-left::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 70% 60% at 40% 60%,rgba(26,122,74,.3),transparent);
    }

.auth-right {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--white);
}

.auth-box {
    width: 100%;
    max-width: 400px;
}

    .auth-box h2 {
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 6px;
    }

    .auth-box p {
        font-size: 14px;
        color: var(--gray-500);
        margin-bottom: 28px;
    }

/* ── ALERTS ──────────────────────────────────────────────── */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: var(--itl-green-soft);
    border: 1px solid var(--itl-green-mid);
    color: var(--itl-green);
}

.alert-error {
    background: var(--red-soft);
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.alert-warning {
    background: var(--amber-soft);
    border: 1px solid #fcd34d;
    color: #92400e;
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 24px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ── PAGE HEADER / SHELL (used by admin sub-pages) ──────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

.page-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -.01em;
}

.page-subtitle {
    font-size: 14px;
    color: var(--gray-400);
    margin-top: 4px;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── ITL-CARD (alias of .card, kept for pages built with this naming) ── */
.itl-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

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

.itl-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: var(--gray-50);
}

.itl-card-title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
}

/* ── SECONDARY BUTTON ────────────────────────────────────── */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    background: var(--gray-100);
    color: var(--gray-700);
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

    .btn-secondary:hover {
        background: var(--gray-200);
    }

    .btn-secondary:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* ── BADGE (status pill, alias of .chip family) ─────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.badge-approved {
    background: var(--itl-green-soft);
    color: var(--itl-green);
}

.badge-pending {
    background: var(--amber-soft);
    color: #92400e;
}

.badge-rejected {
    background: var(--red-soft);
    color: #b91c1c;
}

.badge-draft {
    background: var(--gray-100);
    color: var(--gray-500);
}

.badge-info {
    background: var(--blue-soft);
    color: #1e40af;
}

/* ── META CHIP (small inline stat, e.g. duration) ───────────── */
.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-500);
    white-space: nowrap;
}

/* ── BREADCRUMB ──────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

    .breadcrumb a {
        color: var(--gray-400);
        transition: var(--transition);
    }

        .breadcrumb a:hover {
            color: var(--itl-green);
        }

    .breadcrumb span {
        color: var(--gray-700);
        font-weight: 500;
    }

/* ── SKELETON LOADER ─────────────────────────────────────── */
@keyframes shimmer {
    0% {
        background-position: -700px 0;
    }

    100% {
        background-position: 700px 0;
    }
}

.skeleton {
    background: linear-gradient(90deg,var(--gray-100) 25%,var(--gray-200) 50%,var(--gray-100) 75%);
    background-size: 700px 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    border: 1px solid var(--gray-200);
}

/* ── CURRICULUM ──────────────────────────────────────────── */
.curriculum-module {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
}

.curriculum-module-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: var(--gray-50);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
    transition: var(--transition);
}

    .curriculum-module-header:hover {
        background: var(--gray-100);
    }

.curriculum-lesson {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 13px;
    color: var(--gray-600);
    cursor: pointer;
    border-top: 1px solid var(--gray-100);
    transition: var(--transition);
}

    .curriculum-lesson:hover {
        background: var(--itl-green-soft);
        color: var(--itl-green);
    }

    .curriculum-lesson.active {
        background: var(--itl-green-soft);
        color: var(--itl-green);
        font-weight: 600;
    }

/* ── VIDEO PLAYER ────────────────────────────────────────── */
.video-player-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--gray-900);
    aspect-ratio: 16/9;
    position: relative;
}

    .video-player-wrap video {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* ── HAMBURGER ───────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .hamburger span {
        display: block;
        width: 22px;
        height: 2px;
        background: var(--gray-700);
        border-radius: 2px;
        transition: var(--transition);
    }

/* ── PAGE ANIMATION ──────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

.page-enter {
    animation: fadeUp .35s ease forwards;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media(max-width:1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .app-topbar {
        left: 0;
    }

    .app-main {
        margin-left: 0;
    }

    .hamburger {
        display: flex;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media(max-width:768px) {
    :root {
        --topbar-h: 60px;
    }

    .hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero-visual {
        display: none;
    }

    .hero {
        padding: 56px 0 64px;
    }

    .topbar-search, .topbar-nav {
        display: none;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .auth-layout {
        flex-direction: column;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        width: 100%;
        padding: 28px 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .app-main {
        padding: 18px 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section {
        padding: 48px 0;
    }

    [style*="grid-template-columns:2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

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

    .hero-actions {
        flex-direction: column;
    }

    .btn-xl {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 18px;
    }
}


/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f3;
}

::-webkit-scrollbar-thumb {
    background: #2d8a4e;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #24733f;
    }
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f5f7f6;
}

::-webkit-scrollbar-thumb {
    background: var(--itl-green) !important;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #247a43;
    }
.course-player-overlay{position:fixed;inset:0;z-index:9000;display:flex;align-items:center;justify-content:center;padding:24px}
.course-player-backdrop{position:absolute;inset:0;background:#07110ce8;backdrop-filter:blur(6px)}
.course-player-dialog{position:relative;width:min(960px,100%);overflow:hidden;background:#101715;border-radius:16px;box-shadow:0 24px 90px #0008}
.course-player-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;color:white}
.course-player-header small{color:#65d297;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.course-player-header h2{font-size:17px;font-weight:700;margin:3px 0 0;color:white}
.course-player-close{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;color:white;background:#ffffff1a}
.course-preview-video{display:block;width:100%;aspect-ratio:16/9;max-height:70vh;object-fit:contain;background:#000}
.course-player-message{min-height:220px;display:flex;align-items:center;justify-content:center;gap:10px;color:#ddd;font-size:14px}
@media(max-width:640px){.course-player-overlay{padding:12px}.course-player-header{padding:14px}.course-player-header h2{font-size:14px}}
.confirmation-shell{position:fixed;inset:0;z-index:11000;display:flex;align-items:center;justify-content:center;padding:20px;background:#07170eb3;backdrop-filter:blur(4px)}
.confirmation-card{width:min(430px,100%);padding:28px;background:white;border-radius:18px;box-shadow:0 24px 80px #0004}
.confirmation-card h2{font-size:19px;font-weight:800;color:var(--gray-900);margin:0 0 10px}
.confirmation-card p{font-size:14px;line-height:1.6;color:var(--gray-600);margin:0}
.confirmation-actions{display:flex;gap:10px;margin-top:24px}.confirmation-actions button{flex:1;justify-content:center}
.confirmation-danger{background:var(--red);color:white}
