/* ===================================================
   KALONUS PROFESSOR COLLEGE — v2.0
   Public style: Potterverse (teal, light, Cinzel, rounded)
   Admin layout: AdminLTE structure with teal palette
   =================================================== */
:root {
    --brand: #2AB7C1;
    --brand-light: #e6f8f9;
    --brand-dark: #1f8a92;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-border: #e2e8f0;
    --text: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    --accent-indigo: #6366f1;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Cinzel', Georgia, serif;
    --font-gothic: 'IM Fell English SC', 'Cinzel', serif;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
    --shadow-md: 0 4px 12px rgba(15,23,42,.06);
    --shadow-lg: 0 10px 30px -10px rgba(42,183,193,.35);
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --container: 1200px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); font-size: 15px; line-height: 1.6; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
.kal-body { background: #fff; color: var(--text); overflow-x: hidden; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--font-serif); }
.gothic { font-family: var(--font-gothic); }
.center { text-align: center; }
.muted { color: var(--text-muted); font-size: 12px; }

/* --- Typography --- */
.section-title { font-family: var(--font-serif); font-size: clamp(28px, 3.5vw, 44px); font-weight: 700; line-height: 1.15; color: var(--text); letter-spacing: -.01em; }
.section-desc { font-size: 15px; color: var(--text-muted); max-width: 640px; margin-top: 12px; line-height: 1.7; }
.section-desc.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head { margin-bottom: 48px; }
.section-head.center { text-align: center; }
.section { padding: 96px 0; }
.bg-white { background: #fff; }
.bg-muted { background: var(--surface-muted); }
.mt-8 { margin-top: 32px; }
.pill-badge { display: inline-block; padding: 6px 14px; background: var(--brand-light); color: var(--brand-dark); border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: .05em; margin-bottom: 16px; }
.pill-white { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

/* --- Buttons --- */
.btn-brand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; padding: 12px 26px; border-radius: 100px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 20px -8px rgba(42,183,193,.6); transition: all .2s; }
.btn-brand:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: transparent; color: var(--brand); border: 1.5px solid var(--brand); padding: 11px 26px; border-radius: 100px; font-size: 14px; font-weight: 600; transition: all .2s; }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 12px; }
.w-full { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--brand); transition: color .2s; }
.link-arrow:hover { color: var(--brand-dark); }
.link-arrow-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-light); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s; }
.link-arrow:hover .link-arrow-icon { transform: translateX(4px); }
.link-sm { font-size: 12px; font-weight: 600; color: var(--brand); }

/* --- Floating Navbar --- */
.floating-nav { position: fixed; top: 20px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; padding: 0 20px; }
.nav-pill { display: flex; align-items: center; gap: 24px; background: rgba(255,255,255,.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--surface-border); border-radius: 100px; padding: 10px 12px 10px 18px; box-shadow: 0 8px 30px -8px rgba(15,23,42,.1); max-width: 1080px; width: 100%; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; box-shadow: var(--shadow-lg); }
.brand-text { font-family: var(--font-gothic); font-size: 17px; letter-spacing: .12em; color: var(--text); }
.nav-links { display: flex; gap: 6px; margin: 0 auto; }
.nav-link { padding: 8px 16px; border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--text-muted); transition: all .2s; }
.nav-link:hover, .nav-link.active { color: var(--brand); background: var(--brand-light); }
.nav-login { font-size: 13px; font-weight: 600; color: var(--text); padding: 8px 16px; }
.nav-login:hover { color: var(--brand); }
.nav-cta { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 100px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(42,183,193,.6); transition: all .2s; }
.nav-cta:hover { background: var(--brand-dark); transform: translateY(-1px); }
.nav-cta i { font-size: 10px; }
.nav-user { font-size: 12px; color: var(--text-muted); font-weight: 500; padding: 0 8px; }

/* --- Hero --- */
.hero-section { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 100px 24px 60px; overflow: hidden; background: var(--surface-muted); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,.5) 40%, rgba(255,255,255,1) 100%); }
.hero-content { position: relative; z-index: 10; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-title { font-family: var(--font-gothic); font-size: clamp(44px, 7vw, 96px); color: var(--brand); letter-spacing: .04em; line-height: 1.05; text-shadow: 0 2px 20px rgba(255,255,255,.6); margin-bottom: 20px; }
.hero-sub { font-size: 16px; color: var(--text-muted); max-width: 560px; margin: 0 auto 32px; line-height: 1.7; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Split sections --- */
.split-section { padding: 96px 0; }
.split-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; max-width: 1100px; margin: 0 auto; }
.split-inner.reverse .split-text { order: 1; }
.split-inner.reverse .split-image { order: 2; }
.split-image img { width: 100%; height: 400px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 20px 40px -20px rgba(15,23,42,.15); }
.split-text .section-title { margin-bottom: 16px; }
.split-text .section-desc { margin-bottom: 28px; max-width: 100%; }

/* --- Category grid --- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; }
.category-card { padding: 28px 20px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--surface-border); text-align: center; transition: all .3s; }
.category-card:hover { box-shadow: 0 20px 40px -20px rgba(42,183,193,.35); border-color: rgba(42,183,193,.4); transform: translateY(-4px); }
.cat-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-light); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 16px; transition: all .3s; }
.category-card:hover .cat-icon { background: var(--brand); color: #fff; transform: scale(1.1); }
.cat-name { font-size: 15px; font-weight: 600; color: var(--text); }
.cat-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* --- Course grid & card --- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.course-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--surface-border); transition: all .3s; display: flex; flex-direction: column; }
.course-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -20px rgba(42,183,193,.3); border-color: rgba(42,183,193,.3); }
.course-card-img { aspect-ratio: 16/10; background-size: cover; background-position: center; position: relative; }
.course-badge { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; padding: 4px 12px; border-radius: 100px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.course-card-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-cat { font-size: 11px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
.course-title { font-family: var(--font-serif); font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--text); }
.course-mentor { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.course-meta-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-muted); margin-top: auto; padding-top: 12px; border-top: 1px solid var(--surface-border); }
.course-price { font-weight: 700; color: var(--brand); font-size: 14px; }
.progress-bar { height: 6px; background: var(--surface-muted); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 10px; transition: width .5s; }

/* --- Gallery --- */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.gallery-item { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 320px; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.05); }

/* --- Testimonials --- */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: #fff; border: 1px solid var(--surface-border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; justify-content: space-between; transition: all .3s; }
.testimonial-card:hover { box-shadow: 0 20px 40px -20px rgba(42,183,193,.3); transform: translateY(-2px); }
.t-quote { font-family: var(--font-serif); font-size: 17px; line-height: 1.5; color: var(--text); margin-bottom: 20px; }
.t-footer { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--surface-border); }
.t-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.t-name { font-size: 14px; font-weight: 700; color: var(--text); }
.t-role { font-size: 12px; color: var(--text-muted); }

/* --- FAQ --- */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-group { margin-top: 32px; }
.faq-group-label { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .15em; margin-bottom: 12px; }
.faq-row { background: #fff; border: 1px solid var(--surface-border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; transition: box-shadow .2s; }
.faq-row:hover { box-shadow: var(--shadow-sm); }
.faq-trigger { width: 100%; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 500; text-align: left; color: var(--text); }
.faq-trigger i { color: var(--brand); transition: transform .3s; font-size: 12px; }
.faq-row.open .faq-trigger i { transform: rotate(180deg); }
.faq-content { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-row.open .faq-content { max-height: 400px; }
.faq-content p { padding: 0 24px 20px; color: var(--text-muted); line-height: 1.7; font-size: 14px; }

/* --- Footer --- */
.site-footer { background: var(--surface-muted); border-top: 1px solid var(--surface-border); padding: 72px 0 32px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid var(--surface-border); }
.footer-brand .nav-brand { margin-bottom: 16px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; max-width: 280px; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); }
.footer-contact i { color: var(--brand); margin-right: 6px; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); padding: 5px 0; transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; gap: 12px; }

/* --- Page hero (list pages) --- */
.page-hero { padding: 120px 0 48px; background: var(--surface-muted); }
.page-hero.compact { padding: 110px 0 40px; }
.page-title { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 48px); font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.page-sub { font-size: 15px; color: var(--text-muted); margin-top: 8px; }
.search-form { display: flex; gap: 8px; margin-top: 24px; background: #fff; border: 1px solid var(--surface-border); border-radius: 100px; padding: 8px 8px 8px 20px; max-width: 600px; box-shadow: var(--shadow-sm); }
.search-form i { color: var(--text-dim); align-self: center; font-size: 14px; }
.search-form input { flex: 1; background: transparent; border: none; outline: none; font-size: 14px; color: var(--text); padding: 8px 0; }
.pill-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 100px; background: #fff; border: 1px solid var(--surface-border); color: var(--text-muted); font-size: 13px; font-weight: 500; transition: all .2s; }
.pill:hover { border-color: var(--brand); color: var(--brand); }
.pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --- Course detail --- */
.course-detail-hero { position: relative; min-height: 480px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 140px 0 64px; }
.course-detail-hero .hero-overlay { background: linear-gradient(180deg, rgba(15,23,42,.3) 0%, rgba(15,23,42,.75) 100%); }
.course-detail-inner { position: relative; z-index: 2; color: #fff; max-width: 900px; }
.course-detail-title { font-family: var(--font-serif); font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.1; margin: 16px 0; }
.course-detail-sub { font-size: 16px; color: rgba(255,255,255,.85); margin-bottom: 20px; }
.course-detail-meta { display: flex; gap: 24px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.8); margin-bottom: 24px; }
.course-detail-meta i { color: var(--brand); margin-right: 6px; }
.lesson-list { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.lesson-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: #fff; border-radius: var(--radius); border: 1px solid var(--surface-border); transition: all .2s; }
.lesson-row:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.lesson-num { font-family: var(--font-serif); font-size: 14px; font-weight: 700; color: var(--brand); width: 28px; }
.lesson-body { flex: 1; }
.lesson-title { font-size: 14px; font-weight: 600; color: var(--text); }
.lesson-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.lesson-icon { color: var(--brand); font-size: 14px; }
.lesson-icon.locked { color: var(--text-dim); }

/* --- Auth --- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--surface-muted); }
.auth-card { background: #fff; padding: 44px; border-radius: var(--radius-xl); width: 100%; max-width: 440px; border: 1px solid var(--surface-border); box-shadow: 0 30px 60px -30px rgba(42,183,193,.35); position: relative; }
.auth-back { position: absolute; top: 18px; left: 18px; color: var(--text-muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.auth-back:hover { color: var(--brand); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; margin-top: 8px; font-family: var(--font-gothic); font-size: 18px; letter-spacing: .12em; }
.auth-title { font-family: var(--font-serif); font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 8px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 16px; background: #fff; border: 1px solid var(--surface-border); border-radius: 12px; color: var(--text); font-size: 14px; outline: none; transition: all .2s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,183,193,.1); }
.field input:disabled { background: var(--surface-muted); color: var(--text-muted); }
.auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.auth-foot a { color: var(--brand); font-weight: 600; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }
.alert-info { background: var(--brand-light); border: 1px solid rgba(42,183,193,.4); color: var(--brand-dark); }
.alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #16a34a; }

/* --- Checkout --- */
.checkout-course { background: var(--surface-muted); padding: 20px; border-radius: var(--radius); margin-bottom: 20px; }
.checkout-course h3 { font-size: 18px; }
.checkout-price { font-family: var(--font-serif); font-size: 28px; font-weight: 700; color: var(--brand); margin-top: 8px; }

/* --- Panels --- */
.panel { background: #fff; border: 1px solid var(--surface-border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--surface-border); }
.panel-header h3 { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.panel-header h3 i { color: var(--brand); }
.panel-body { padding: 24px; }
.panel-footer { padding: 16px 24px; border-top: 1px solid var(--surface-border); background: var(--surface-muted); }

/* --- Stat cards (used in both student & admin) --- */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-row:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, 1fr); }
.stat-card { position: relative; border-radius: var(--radius-lg); padding: 22px 24px 0; color: #fff; overflow: hidden; display: flex; flex-direction: column; min-height: 130px; }
.stat-brand { background: linear-gradient(135deg, #2AB7C1 0%, #1f8a92 100%); }
.stat-indigo { background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%); }
.stat-amber { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); }
.stat-rose { background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%); }
.stat-icon { font-size: 32px; opacity: .35; position: absolute; top: 20px; right: 20px; }
.stat-info .value { font-size: 30px; font-weight: 700; line-height: 1; }
.stat-info .label { font-size: 12px; opacity: .85; margin-top: 6px; font-weight: 500; }
.stat-footer { margin: 12px -24px 0; padding: 8px 24px; background: rgba(0,0,0,.12); color: #fff; font-size: 11px; display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.stat-footer:hover { background: rgba(0,0,0,.22); color: #fff; }

/* --- Tables --- */
.simple-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.simple-table th { text-align: left; padding: 12px; border-bottom: 1px solid var(--surface-border); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.simple-table td { padding: 14px 12px; border-bottom: 1px solid var(--surface-border); }
.simple-table tr:last-child td { border-bottom: none; }
.simple-table code { background: var(--surface-muted); padding: 2px 8px; border-radius: 6px; font-size: 11px; color: var(--text); }
.empty-cell { text-align: center; color: var(--text-muted); padding: 32px !important; }
.empty-state { padding: 48px 24px; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 32px; color: var(--brand-light); margin-bottom: 12px; display: block; }
.empty-state a { color: var(--brand); font-weight: 600; }

/* --- Badges --- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.badge-ok { background: #f0fdf4; color: #16a34a; }
.badge-warn { background: #fffbeb; color: #d97706; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-info { background: var(--brand-light); color: var(--brand-dark); }
.badge-role { background: var(--brand-light); color: var(--brand-dark); padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; }

/* --- Live list --- */
.live-list { display: flex; flex-direction: column; gap: 10px; }
.live-row { display: flex; align-items: center; gap: 20px; padding: 14px 18px; background: var(--surface-muted); border-radius: var(--radius); }
.live-time { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 62px; padding: 8px; background: #fff; border-radius: 10px; border: 1px solid var(--surface-border); color: var(--brand); }
.live-time span { font-size: 10px; font-weight: 600; text-transform: uppercase; }
.live-time b { font-size: 15px; }
.live-info { flex: 1; display: flex; flex-direction: column; }
.live-info b { font-size: 14px; color: var(--text); }
.live-info span { font-size: 12px; color: var(--text-muted); }

/* ============================================
   ADMIN (AdminLTE structure + Potterverse palette)
   ============================================ */
.admin-body { background: var(--surface-muted); color: var(--text); min-height: 100vh; font-family: var(--font-sans); }

.admin-topbar { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: linear-gradient(135deg, #2AB7C1 0%, #1f8a92 100%); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; z-index: 100; box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-toggle { color: #fff; font-size: 16px; padding: 8px; display: none; }
.topbar-brand { font-family: var(--font-gothic); font-size: 20px; letter-spacing: .1em; color: #fff; display: flex; align-items: baseline; gap: 4px; }
.topbar-brand span { color: #fff; }
.topbar-brand small { font-family: var(--font-sans); font-size: 10px; letter-spacing: .2em; opacity: .8; margin-left: 6px; }
.topbar-right { display: flex; align-items: center; gap: 4px; }
.topbar-icon { position: relative; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; color: #fff; border-radius: 8px; transition: background .2s; }
.topbar-icon:hover { background: rgba(255,255,255,.15); }
.topbar-icon .badge { position: absolute; top: 2px; right: 2px; background: #fff; color: var(--brand-dark); font-size: 9px; padding: 2px 5px; border-radius: 100px; }
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 14px; border-left: 1px solid rgba(255,255,255,.2); margin-left: 8px; color: #fff; font-size: 13px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.topbar-user a { color: rgba(255,255,255,.85); margin-left: 8px; }
.topbar-user a:hover { color: #fff; }

.admin-shell { display: flex; padding-top: 60px; min-height: 100vh; }
.admin-sidebar { position: fixed; top: 60px; bottom: 0; left: 0; width: 250px; background: #fff; border-right: 1px solid var(--surface-border); overflow-y: auto; z-index: 50; }
.sidebar-user { padding: 20px; border-bottom: 1px solid var(--surface-border); display: flex; align-items: center; gap: 12px; }
.avatar-lg { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #2AB7C1 0%, #1f8a92 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-status { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; }
.sidebar-search { padding: 14px 16px; position: relative; border-bottom: 1px solid var(--surface-border); }
.sidebar-search i { position: absolute; left: 28px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 12px; }
.sidebar-search input { width: 100%; background: var(--surface-muted); border: 1px solid var(--surface-border); border-radius: 8px; padding: 8px 12px 8px 34px; font-size: 12px; color: var(--text); outline: none; }
.sidebar-search input:focus { border-color: var(--brand); }
.sidebar-nav { padding: 12px 8px 24px; }
.nav-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .12em; padding: 16px 14px 8px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; color: var(--text-muted); font-size: 13px; font-weight: 500; transition: all .15s; margin-bottom: 2px; }
.side-link:hover { background: var(--surface-muted); color: var(--text); }
.side-link.active { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.side-link i { width: 18px; text-align: center; font-size: 13px; }
.nav-logout { color: #dc2626; margin-top: 16px; }
.nav-logout:hover { background: #fef2f2; color: #dc2626; }

.admin-content { flex: 1; margin-left: 250px; padding: 24px 28px 48px; min-width: 0; }
.page-header { margin-bottom: 24px; }
.page-header-title { font-family: var(--font-serif); font-size: 24px; font-weight: 700; color: var(--text); }
.page-header-title small { font-family: var(--font-sans); font-size: 12px; color: var(--text-muted); font-weight: 500; margin-left: 8px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.breadcrumb a { color: var(--brand); }
.breadcrumb a:hover { text-decoration: underline; }

.admin-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; }
.admin-grid-single { display: grid; grid-template-columns: 1fr; gap: 20px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--surface-border); font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.admin-table td { padding: 12px 8px; border-bottom: 1px solid var(--surface-border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table code { background: var(--surface-muted); padding: 2px 6px; border-radius: 5px; font-size: 11px; color: var(--text); }
.action-cell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.btn-xs { display: inline-block; padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 6px; background: var(--surface-muted); color: var(--text-muted); border: 1px solid var(--surface-border); transition: all .15s; }
.btn-xs:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-light); }
.btn-danger { color: #dc2626 !important; }
.btn-danger:hover { color: #fff !important; background: #dc2626 !important; border-color: #dc2626 !important; }

.fgroup { margin-bottom: 14px; }
.fgroup label { display: block; font-size: 11px; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.fgroup input, .fgroup select, .fgroup textarea { width: 100%; padding: 9px 12px; background: #fff; border: 1px solid var(--surface-border); border-radius: 8px; color: var(--text); font-size: 13px; outline: none; transition: all .2s; }
.fgroup input:focus, .fgroup select:focus, .fgroup textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(42,183,193,.1); }
.fgroup-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-admin-primary { background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 16px -6px rgba(42,183,193,.5); transition: all .15s; }
.btn-admin-primary:hover { background: var(--brand-dark); }
.btn-admin-ghost { background: transparent; color: var(--text-muted); padding: 10px 20px; border: 1px solid var(--surface-border); border-radius: 8px; font-size: 13px; font-weight: 500; margin-left: 6px; }

/* --- Activity feed --- */
.activity-feed { display: flex; flex-direction: column; gap: 12px; }
.activity-item { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--surface-border); }
.activity-item:last-child { border-bottom: none; }
.activity-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-light); color: var(--brand-dark); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.activity-content { flex: 1; }
.activity-head { font-size: 13px; color: var(--text); }
.activity-head code { background: var(--brand-light); color: var(--brand-dark); padding: 1px 6px; border-radius: 5px; font-size: 11px; }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* --- To do list --- */
.todo-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--surface-border); font-size: 13px; cursor: pointer; }
.todo-item:last-child { border-bottom: none; }
.todo-item input[type=checkbox] { accent-color: var(--brand); }
.todo-text { flex: 1; color: var(--text); }
.todo-badge { background: var(--brand-light); color: var(--brand-dark); padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 600; }

/* --- Mini stats & donuts --- */
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 16px 24px; }
.mini-stat { text-align: center; }
.donut { --p: 0; width: 60px; height: 60px; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), #e2e8f0 0); display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-size: 12px; font-weight: 700; color: var(--text); position: relative; }
.donut::before { content: ''; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.donut > * { position: relative; z-index: 1; }
.donut-amber { background: conic-gradient(var(--accent-amber) calc(var(--p) * 1%), #e2e8f0 0); }
.donut-indigo { background: conic-gradient(var(--accent-indigo) calc(var(--p) * 1%), #e2e8f0 0); }
.mini-label { font-size: 11px; color: var(--text-muted); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .split-inner { grid-template-columns: 1fr; gap: 40px; }
    .split-inner.reverse .split-text, .split-inner.reverse .split-image { order: unset; }
    .split-image img { height: 300px; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .stat-row:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, 1fr); }
    .admin-grid, .dash-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .admin-sidebar { width: 68px; }
    .sidebar-user { justify-content: center; padding: 16px 8px; }
    .user-info, .sidebar-search, .nav-label, .side-link span { display: none; }
    .side-link { justify-content: center; padding: 12px; }
    .side-link i { font-size: 16px; }
    .admin-content { margin-left: 68px; padding: 16px; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-user { display: none; }
    .hero-section { min-height: 80vh; padding: 100px 20px 48px; }
    .section { padding: 64px 0; }
    .gallery-grid { grid-template-columns: 1fr; }
    .stat-row, .stat-row:has(> :nth-child(3):last-child) { grid-template-columns: 1fr 1fr; }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
    .topbar-toggle { display: block; }
    .admin-sidebar { transform: translateX(-100%); transition: transform .25s; width: 250px; }
    .admin-body.sidebar-open .admin-sidebar { transform: translateX(0); }
    .admin-body.sidebar-open .user-info, .admin-body.sidebar-open .sidebar-search, .admin-body.sidebar-open .nav-label, .admin-body.sidebar-open .side-link span { display: block; }
    .admin-body.sidebar-open .side-link { justify-content: flex-start; padding: 10px 14px; }
    .admin-content { margin-left: 0; }
    .topbar-user span { display: none; }
    .fgroup-row { grid-template-columns: 1fr; }
    .course-detail-hero { padding: 100px 0 40px; min-height: 320px; }
}
