/* Global Innovation Leaders Foundation — Academy design system
   Dark technology chrome (navy) + electric blue/violet highlights + light reading surfaces. */
:root {
  --navy-950: #050816; --navy-900: #0a1030; --navy-800: #111a45; --navy-700: #1b2660; --navy-600: #2a3a85;
  --blue: #3b82f6; --blue-2: #60a5fa; --violet: #8b5cf6; --violet-2: #a78bfa; --cyan: #22d3ee; --pink: #ec4899;
  --amber: #f59e0b; --green: #10b981; --red: #ef4444; --teal: #14b8a6; --orange: #f97316;
  --grad: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,.16), rgba(139,92,246,.16));
  --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --line: #e2e8f0; --surface: #ffffff; --surface-2: #f6f8fc; --surface-3: #eef2fb;
  --on-dark: #e6ecff; --on-dark-2: #a9b5de; --line-dark: rgba(255,255,255,.1);
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 6px 24px rgba(15,23,42,.07);
  --shadow-lg: 0 20px 50px rgba(15,23,42,.16);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.6 var(--font); color: var(--ink); background: var(--surface-2); }
img, svg { max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--violet-2); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(5,8,22,.86); backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line-dark); }
.site-header .bar { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(139,92,246,.45); }
.brand .logo svg { width: 22px; height: 22px; }
.brand small { display: block; font-weight: 500; font-size: .7rem; color: var(--on-dark-2); letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a { white-space: nowrap; color: var(--on-dark-2); padding: 8px 11px; border-radius: 9px; font-size: .9rem; font-weight: 500; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.nav .btn { margin-left: 6px; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--grad); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-dark); color: #fff; border-radius: 10px; width: 42px; height: 40px; cursor: pointer; }
@media (max-width: 1240px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; top: 66px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--navy-950); padding: 12px 20px 20px; border-bottom: 1px solid var(--line-dark); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav .btn { margin: 6px 0 0; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; border: 1px solid transparent; border-radius: 11px; padding: 10px 18px; font: 600 .93rem/1.2 var(--font); cursor: pointer; transition: transform .12s ease, box-shadow .2s, background .2s; white-space: nowrap; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(99,102,241,.35); }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(139,92,246,.5); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.18); }
.btn-ghost:hover { background: rgba(255,255,255,.14); }
.btn-light { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--surface-3); }
.btn-soft { background: var(--surface-3); color: var(--navy-700); }
.btn-soft:hover { background: #e3e9fb; }
.btn-danger { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #d1fae5; color: #047857; border-color: #a7f3d0; }
.btn-sm { padding: 6px 12px; font-size: .84rem; border-radius: 9px; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: var(--on-dark); background: radial-gradient(1200px 600px at 80% -10%, rgba(139,92,246,.35), transparent 60%), radial-gradient(900px 500px at 0% 20%, rgba(59,130,246,.35), transparent 60%), var(--navy-950); padding: 84px 0 96px; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%); pointer-events: none; }
.hero .container { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #c7d2fe; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(16,185,129,.25); }
.hero h1 { font-size: clamp(2.2rem, 4.8vw, 3.7rem); font-weight: 800; color: #fff; margin: 18px 0 18px; letter-spacing: -.03em; }
.hero .lead { font-size: 1.15rem; color: var(--on-dark-2); max-width: 600px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; max-width: 620px; }
.hero-stats div { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 14px; }
.hero-stats b { display: block; font-size: 1.5rem; color: #fff; }
.hero-stats span { font-size: .78rem; color: var(--on-dark-2); }
.free-banner { display: inline-block; margin-top: 6px; font-weight: 800; letter-spacing: .03em; font-size: clamp(.95rem, 1.6vw, 1.1rem); padding: 10px 16px; border-radius: 12px; background: linear-gradient(90deg, rgba(16,185,129,.18), rgba(34,211,238,.18)); border: 1px solid rgba(34,211,238,.35); color: #a5f3fc; }
.orbit { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; margin-left: auto; }
.orbit svg { width: 100%; height: 100%; }
@media (max-width: 900px) { .hero .container { grid-template-columns: 1fr; } .orbit { max-width: 320px; margin: 0 auto; } .hero-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.alt { background: var(--surface); }
.section.dark { background: var(--navy-950); color: var(--on-dark); }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 46px; }
.section-head .kicker { color: var(--violet); font-weight: 800; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-top: 10px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section.dark .section-head p { color: var(--on-dark-2); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 16px; color: #fff; }
.feature h3 { font-size: 1.12rem; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.c-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); } .c-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.c-pink { background: linear-gradient(135deg, #ec4899, #be185d); } .c-cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.c-amber { background: linear-gradient(135deg, #fbbf24, #d97706); } .c-green { background: linear-gradient(135deg, #34d399, #059669); }
.c-orange { background: linear-gradient(135deg, #fb923c, #ea580c); } .c-teal { background: linear-gradient(135deg, #2dd4bf, #0f766e); }
.c-red { background: linear-gradient(135deg, #f87171, #dc2626); } .c-indigo { background: linear-gradient(135deg, #818cf8, #4338ca); }

.track { border-radius: var(--radius-lg); padding: 24px; color: #fff; position: relative; overflow: hidden; min-height: 230px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.track::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,.12); }
.track .num { font-size: .75rem; font-weight: 800; letter-spacing: .12em; opacity: .85; }
.track h3 { margin: 8px 0 12px; font-size: 1.15rem; }
.track ul { margin: 0; padding: 0; list-style: none; font-size: .88rem; opacity: .95; }
.track li { padding: 2px 0; } .track li::before { content: '▹ '; opacity: .7; }

.steps-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; counter-reset: s; }
.steps-flow .s { background: rgba(255,255,255,.04); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 20px; position: relative; }
.steps-flow .s::before { counter-increment: s; content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 12px; }
.steps-flow h4 { color: #fff; margin-bottom: 6px; } .steps-flow p { color: var(--on-dark-2); font-size: .9rem; margin: 0; }
@media (max-width: 980px) { .steps-flow { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-flow { grid-template-columns: 1fr; } }

.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; position: relative; }
.levels .lv { text-align: center; padding: 0 8px; position: relative; }
.levels .lv .badge-lv { width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-weight: 800; font-size: 1.35rem; color: #fff; position: relative; z-index: 1; box-shadow: 0 10px 26px rgba(0,0,0,.25); }
.levels::before { content: ''; position: absolute; top: 35px; left: 10%; right: 10%; height: 4px; background: var(--grad); border-radius: 4px; opacity: .6; }
.levels h4 { font-size: .98rem; } .levels p { font-size: .84rem; color: var(--muted); }
.section.dark .levels p { color: var(--on-dark-2); }
@media (max-width: 760px) { .levels { grid-template-columns: 1fr; gap: 18px; } .levels::before { display: none; } .levels .lv { display: grid; grid-template-columns: 70px 1fr; gap: 14px; text-align: left; align-items: center; } .levels .lv .badge-lv { margin: 0; } }

.quote { font-size: clamp(1.25rem, 2.6vw, 1.85rem); font-weight: 700; text-align: center; max-width: 900px; margin: 0 auto; color: #fff; letter-spacing: -.01em; }
.audience { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface-3); color: var(--navy-700); font-size: .82rem; font-weight: 600; border: 1px solid #dfe6f7; }
.chip.lg { padding: 10px 16px; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--on-dark-2); padding: 56px 0 28px; font-size: .9rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; }
.site-footer a { color: var(--on-dark-2); display: block; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid var(--line-dark); margin-top: 36px; padding-top: 20px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h3 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3 { margin: 0; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; }
.stat .bar-acc { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .big { font-size: 2.2rem; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.b-pending { background: #fef3c7; color: #92400e; } .b-approved { background: #d1fae5; color: #065f46; }
.b-rejected { background: #fee2e2; color: #991b1b; } .b-suspended { background: #e5e7eb; color: #374151; }
.b-blue { background: #dbeafe; color: #1e40af; } .b-violet { background: #ede9fe; color: #5b21b6; } .b-gray { background: #f1f5f9; color: #475569; }
.b-green { background: #dcfce7; color: #166534; } .b-red { background: #fee2e2; color: #991b1b; } .b-amber { background: #fef3c7; color: #92400e; }
.b-cyan { background: #cffafe; color: #155e75; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 6px; color: var(--ink-2); }
.field .req { color: var(--pink); }
.input, select.input, textarea.input { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; font: inherit; color: var(--ink); transition: border .15s, box-shadow .15s; }
textarea.input { min-height: 96px; resize: vertical; }
.input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139,92,246,.15); }
.input.invalid { border-color: var(--red); box-shadow: 0 0 0 4px rgba(239,68,68,.12); }
.hint { font-size: .8rem; color: var(--muted); margin-top: 5px; }
.err-text { font-size: .8rem; color: var(--red); margin-top: 5px; }
.input-group { display: flex; gap: 8px; } .input-group > :first-child { flex: 0 0 104px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .9rem; background: #fff; transition: .15s; user-select: none; }
.check:hover { border-color: #c7d2fe; }
.check input { accent-color: var(--violet); width: 17px; height: 17px; }
.check:has(input:checked) { border-color: var(--violet); background: #f5f3ff; }
.check.plain { border: 0; padding: 4px 0; background: none; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg label { padding: 8px 14px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.seg input { display: none; }
.seg label:has(input:checked) { background: #fff; color: var(--violet); box-shadow: var(--shadow); }
.pw-meter { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 8px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-rules { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.pw-rules span.ok { color: var(--green); }
.pw-rules span.ok::before { content: '✓ '; }
.pw-rules span:not(.ok)::before { content: '• '; }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; }
.tag-input input { border: 0; outline: 0; flex: 1; min-width: 140px; font: inherit; padding: 4px; }
.tag { display: inline-flex; align-items: center; gap: 4px; background: #ede9fe; color: #5b21b6; padding: 3px 4px 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.tag button { border: 0; background: none; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; padding: 0 4px; }

.alert { padding: 12px 14px; border-radius: 12px; font-size: .92rem; border: 1px solid; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: calc(100vh - 66px); display: grid; grid-template-columns: .9fr 1.1fr; }
.auth-side { background: radial-gradient(700px 400px at 20% 10%, rgba(139,92,246,.4), transparent 60%), radial-gradient(600px 400px at 90% 90%, rgba(59,130,246,.35), transparent 60%), var(--navy-950); color: var(--on-dark); padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; font-size: 2rem; }
.auth-side ul { list-style: none; padding: 0; margin: 22px 0 0; }
.auth-side li { display: flex; gap: 12px; padding: 10px 0; color: var(--on-dark-2); }
.auth-side li b { color: #fff; display: block; }
.auth-side li .i { flex: 0 0 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.auth-main { padding: 48px clamp(20px, 5vw, 64px); display: flex; justify-content: center; align-items: flex-start; }
.auth-card { width: 100%; max-width: 760px; }
.auth-card.narrow { max-width: 440px; margin-top: 4vh; }
@media (max-width: 960px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { padding: 36px 24px; } .auth-side ul { display: none; } }
.stepper { display: flex; gap: 8px; margin: 0 0 24px; flex-wrap: wrap; }
.stepper .st { flex: 1; min-width: 110px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-size: .82rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.stepper .st span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); margin-right: 6px; font-size: .75rem; }
.stepper .st.active { border-color: var(--violet); color: var(--violet); }
.stepper .st.active span, .stepper .st.done span { background: var(--grad); color: #fff; }
.stepper .st.done { color: var(--ink-2); }
.form-step { display: none; } .form-step.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.code-input { letter-spacing: .5em; font-size: 1.4rem; text-align: center; font-family: var(--mono); }

/* ---------- App shell (portal + admin) ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 66px); background: linear-gradient(90deg, var(--navy-900) 260px, transparent 260px); }
.side { background: var(--navy-900); color: var(--on-dark-2); padding: 20px 14px; position: sticky; top: 66px; height: calc(100vh - 66px); overflow-y: auto; }
.side .who { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 14px; border-radius: 12px; background: rgba(255,255,255,.05); }
.avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 40px; }
.side .who b { color: #fff; display: block; font-size: .92rem; line-height: 1.2; }
.side .group-label { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6f7cb3; margin: 16px 10px 6px; }
.side a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--on-dark-2); font-weight: 500; font-size: .92rem; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.side a.active { background: linear-gradient(90deg, rgba(59,130,246,.25), rgba(139,92,246,.2)); color: #fff; box-shadow: inset 3px 0 0 var(--violet-2); }
.side a .count { margin-left: auto; background: var(--pink); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 8px; font-weight: 700; }
.main { padding: 28px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title h1 { font-size: 1.65rem; margin: 0; }
.page-title p { margin: 4px 0 0; color: var(--muted); }
.side-toggle { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; z-index: 60; left: 0; top: 66px; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .side-toggle { display: inline-flex; }
}

/* ---------- Dashboard widgets ---------- */
.welcome { background: radial-gradient(600px 300px at 90% 0%, rgba(236,72,153,.35), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(59,130,246,.45), transparent 60%), var(--navy-900); color: #fff; border-radius: var(--radius-lg); padding: 28px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; overflow: hidden; }
.welcome h1 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 6px; }
.welcome p { color: var(--on-dark-2); margin: 0; }
@media (max-width: 700px) { .welcome { grid-template-columns: 1fr; } }
.ring { --p: 0; --c: var(--violet); width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); display: grid; place-items: center; }
.ring > div { width: 84px; height: 84px; border-radius: 50%; background: var(--navy-900); display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 1.3rem; line-height: 1.1; }
.ring small { display: block; font-size: .62rem; font-weight: 600; color: var(--on-dark-2); text-transform: uppercase; letter-spacing: .06em; }
.ring.light > div { background: #fff; color: var(--ink); }
.progress { height: 9px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); border-radius: 9px; transition: width .6s ease; }
.progress.thin { height: 6px; }
.journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; position: relative; }
.journey .j { background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 14px; padding: 14px; position: relative; }
.journey .j.current { border-color: var(--violet); background: #f5f3ff; box-shadow: 0 0 0 4px rgba(139,92,246,.12); }
.journey .j.completed { border-color: #a7f3d0; background: #ecfdf5; }
.journey .j .n { font-size: .7rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.journey .j h4 { font-size: .95rem; margin: 4px 0 8px; }
.journey .j .you { position: absolute; top: -10px; right: 10px; background: var(--grad); color: #fff; font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
@media (max-width: 900px) { .journey { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .journey { grid-template-columns: 1fr; } }
.course-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.course-card .top { padding: 18px; color: #fff; position: relative; min-height: 104px; }
.course-card .top .ic { font-size: 1.8rem; }
.course-card .top h3 { color: #fff; font-size: 1.05rem; margin: 8px 0 0; }
.course-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.course-card .body p { color: var(--muted); font-size: .9rem; margin: 0; }
.course-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.course-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; }
.course-card.locked .top { filter: grayscale(.6) brightness(.85); }
.course-card.soon .top { filter: saturate(.7); }
.lock-overlay { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.35); border-radius: 999px; padding: 4px 10px; font-size: .74rem; font-weight: 700; }
.skill-row { display: grid; grid-template-columns: 180px 1fr 48px; gap: 12px; align-items: center; padding: 6px 0; font-size: .9rem; }
@media (max-width: 520px) { .skill-row { grid-template-columns: 1fr 48px; } .skill-row .progress { grid-column: 1 / -1; order: 3; } }
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: linear-gradient(var(--blue), var(--violet), var(--pink)); }
.timeline .t { position: relative; padding: 4px 0 14px; }
.timeline .t::before { content: ''; position: absolute; left: -23px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--violet); }
.timeline .t b { display: block; font-size: .92rem; } .timeline .t span { font-size: .8rem; color: var(--muted); }
.ach { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ach .a { text-align: center; padding: 14px 8px; border-radius: 14px; border: 1.5px dashed var(--line); color: var(--muted); font-size: .78rem; }
.ach .a .e { font-size: 1.7rem; filter: grayscale(1); opacity: .5; }
.ach .a.on { border-style: solid; border-color: #ddd6fe; background: #faf5ff; color: var(--ink-2); }
.ach .a.on .e { filter: none; opacity: 1; }
.ach .a b { display: block; color: var(--ink); font-size: .84rem; }
.session { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.session:last-child { border-bottom: 0; }
.date-tile { width: 64px; border-radius: 12px; overflow: hidden; text-align: center; border: 1px solid var(--line); }
.date-tile .m { background: var(--grad); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 0; text-transform: uppercase; }
.date-tile .d { font-size: 1.4rem; font-weight: 800; padding: 4px 0 0; } .date-tile .w { font-size: .7rem; color: var(--muted); padding-bottom: 4px; }
@media (max-width: 560px) { .session { grid-template-columns: 56px 1fr; } .session > :last-child { grid-column: 1 / -1; } }
.module-list { list-style: none; margin: 0; padding: 0; }
.module-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; background: #fff; }
.module-list .st-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--surface-3); color: var(--navy-700); }
.module-list li.done .st-ic { background: #d1fae5; color: #047857; }
.module-list li.current .st-ic { background: var(--grad); color: #fff; }
.module-list li.lockd { opacity: .7; }
@media (max-width: 560px) { .module-list li { grid-template-columns: 40px 1fr; } .module-list li > :last-child { grid-column: 1 / -1; } }

/* ---------- Viewer ---------- */
.viewer { display: grid; grid-template-columns: 300px 1fr; height: calc(100vh - 66px); }
.viewer .outline { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 18px; }
.viewer .outline a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-size: .9rem; align-items: center; }
.viewer .outline a:hover { background: var(--surface-3); text-decoration: none; }
.viewer .outline a.active { background: #f5f3ff; color: var(--violet); font-weight: 700; }
.viewer .outline .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 22px; display: grid; place-items: center; font-size: .7rem; }
.viewer .outline a.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.viewer .stage { display: flex; flex-direction: column; min-width: 0; }
.viewer .toolbar { display: flex; gap: 10px; align-items: center; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.viewer iframe { flex: 1; width: 100%; border: 0; background: #fff; }
@media (max-width: 900px) { .viewer { grid-template-columns: 1fr; height: auto; } .viewer .outline { max-height: 220px; } .viewer iframe { height: 78vh; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: #fafbff; }
table.t td.actions { white-space: nowrap; text-align: right; }
table.t .who b { display: block; } table.t .who span { font-size: .8rem; color: var(--muted); }
.filters { display: grid; grid-template-columns: 2fr repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 1100px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 600px) { .filters { grid-template-columns: 1fr; } }
.bulkbar { display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; }

/* ---------- Charts ---------- */
.hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; font-size: .86rem; padding: 4px 0; }
.hbar .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar .trk { height: 12px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.hbar .trk i { display: block; height: 100%; border-radius: 6px; }
.hbar .n { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.legend { display: grid; gap: 6px; font-size: .86rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.spark i { flex: 1; background: var(--grad); border-radius: 4px 4px 0 0; min-height: 3px; opacity: .85; }

/* ---------- Access matrix ---------- */
.matrix { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.matrix .course-row { border-bottom: 1px solid var(--line); }
.matrix .course-row:last-child { border-bottom: 0; }
.matrix .crow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; background: var(--surface-2); font-weight: 700; }
.matrix .mrow { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 9px 16px 9px 40px; border-top: 1px solid var(--line); font-size: .9rem; }
.tri { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.tri button { border: 0; background: #fff; padding: 6px 11px; font: 600 .78rem var(--font); cursor: pointer; color: var(--muted); border-right: 1px solid var(--line); }
.tri button:last-child { border-right: 0; }
.tri button.on.allow { background: #d1fae5; color: #065f46; } .tri button.on.deny { background: #fee2e2; color: #991b1b; } .tri button.on.none { background: var(--surface-3); color: var(--ink-2); }
.tri button.dirty { box-shadow: inset 0 -3px 0 var(--amber); }

/* ---------- Modal / toast ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5,8,22,.55); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { background: #fff; border-radius: 18px; width: min(720px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(1000px, 100%); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal .mh h3 { margin: 0; }
.modal .mb { padding: 22px; }
.modal .mf { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); background: var(--surface-2); position: sticky; bottom: 0; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; }
.toast { background: var(--navy-900); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .92rem; max-width: 380px; animation: fade .2s; border-left: 4px solid var(--violet-2); }
.toast.error { border-left-color: var(--red); } .toast.success { border-left-color: var(--green); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--violet); animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: 600 .9rem var(--font); color: var(--muted); cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--violet); border-bottom-color: var(--violet); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: .92rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; } }
.dropzone { border: 2px dashed #c7d2fe; border-radius: 16px; padding: 30px; text-align: center; background: #f8faff; cursor: pointer; transition: .2s; }
.dropzone.over { border-color: var(--violet); background: #f5f3ff; }
.drag-handle { cursor: grab; color: var(--muted); padding: 0 6px; }
.dragging { opacity: .5; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .side, .site-footer { display: none !important; } .app { display: block; } }
