/* =============================================================
   Elektromagnetizm — Design System
============================================================= */
:root {
  --bg:           #0a0e1a;
  --bg-soft:      #0f1424;
  --bg-card:      rgba(20, 27, 50, 0.6);
  --bg-elev:      rgba(28, 36, 64, 0.85);
  --border:       rgba(120, 145, 220, 0.14);
  --border-strong:rgba(120, 145, 220, 0.28);
  --text:         #e6ecff;
  --text-soft:    #9aa5c7;
  --text-mute:    #6b7592;
  --primary:      #4f8cff;
  --primary-2:    #7a5cff;
  --accent:       #22e3ff;
  --accent-2:     #ff5cf2;
  --success:      #2ecc71;
  --warning:      #ffb547;
  --danger:       #ff5c7a;
  --grad-1: linear-gradient(135deg, #4f8cff 0%, #7a5cff 55%, #ff5cf2 100%);
  --grad-2: linear-gradient(135deg, #22e3ff 0%, #4f8cff 100%);
  --grad-glow: radial-gradient(ellipse at top, rgba(79,140,255,0.25), transparent 60%);
  --shadow-glow: 0 10px 60px -10px rgba(79, 140, 255, 0.45);
  --shadow-card: 0 6px 30px -10px rgba(0,0,0,0.6);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --t-fast: 180ms cubic-bezier(.4,0,.2,1);
  --t: 280ms cubic-bezier(.4,0,.2,1);
}
[data-theme="light"] {
  --bg:           #f4f6fc;
  --bg-soft:      #ffffff;
  --bg-card:      rgba(255,255,255,0.85);
  --bg-elev:      #ffffff;
  --border:       rgba(60, 80, 140, 0.10);
  --border-strong:rgba(60, 80, 140, 0.22);
  --text:         #0d1530;
  --text-soft:    #5a6685;
  --text-mute:    #8a92a8;
  --shadow-glow: 0 10px 60px -10px rgba(79, 140, 255, 0.30);
  --shadow-card: 0 8px 26px -14px rgba(20, 30, 70, 0.20);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  transition: background var(--t), color var(--t);
}
::selection { background: rgba(79,140,255,0.35); color: #fff; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== ANIMATED BACKGROUND ===== */
.bg-field {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(79,140,255,0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(122,92,255,0.16), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(34,227,255,0.10), transparent 60%);
}
[data-theme="light"] .bg-field {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(79,140,255,0.10), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(122,92,255,0.08), transparent 60%),
    radial-gradient(800px 600px at 50% 100%, rgba(34,227,255,0.06), transparent 60%);
}
#fieldCanvas {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.85;
}
[data-theme="light"] #fieldCanvas { opacity: 0.45; }

/* ===== LAYOUT ===== */
.app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}
@media (max-width: 1024px) { .app { grid-template-columns: 1fr; } }

/* ===== SIDEBAR ===== */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-soft) 0%, transparent 100%);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
@media (max-width: 1024px) {
  .sidebar { position: fixed; left: 0; top: 0; width: 280px; z-index: 100;
    transform: translateX(-100%); transition: transform var(--t); background: var(--bg-soft); }
  .sidebar.open { transform: translateX(0); }
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border);
}
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--grad-1);
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
  position: relative; overflow: hidden;
}
.brand-logo svg { width: 24px; height: 24px; color: #fff; }
.brand-logo::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), transparent 60%);
}
.brand-name { font-weight: 800; font-size: 17px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--text-mute); letter-spacing: 0.12em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-title {
  font-size: 11px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.16em;
  padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  color: var(--text-soft); font-weight: 500; font-size: 14.5px;
  transition: all var(--t-fast);
  cursor: pointer; user-select: none;
  position: relative;
}
.nav-item:hover { background: var(--bg-card); color: var(--text); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(79,140,255,0.18), rgba(122,92,255,0.08));
  color: var(--text);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -18px; top: 18%; bottom: 18%;
  width: 3px; border-radius: 0 4px 4px 0; background: var(--grad-1);
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto;
  font-size: 11px; padding: 2px 8px; border-radius: 99px;
  background: rgba(34,227,255,0.18); color: var(--accent);
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--grad-2);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.me-name { font-size: 14px; font-weight: 600; }
.me-role { font-size: 12px; color: var(--text-mute); }

/* ===== MAIN / TOPBAR ===== */
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 32px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
  backdrop-filter: blur(12px);
}
.mob-toggle { display: none; }
@media (max-width: 1024px) {
  .mob-toggle { display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); }
}
.search {
  flex: 1; max-width: 520px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  transition: all var(--t-fast);
}
.search:focus-within { border-color: var(--border-strong); box-shadow: 0 0 0 4px rgba(79,140,255,0.10); }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent; color: var(--text);
  font-size: 14px; font-family: inherit;
}
.search kbd {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  padding: 2px 6px; border-radius: 5px; background: var(--bg-elev);
  color: var(--text-mute); border: 1px solid var(--border);
}
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-soft);
  transition: all var(--t-fast);
  position: relative;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 9px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 2px var(--bg);
}
.lang-pill {
  height: 40px; padding: 0 14px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-soft); font-weight: 600; font-size: 13px;
  display: flex; align-items: center; gap: 6px;
}

.content { padding: 8px 32px 60px; }
@media (max-width: 768px) { .content, .topbar { padding-left: 18px; padding-right: 18px; } }

/* ===== HERO ===== */
.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  margin-bottom: 28px;
}
.hero::before { content: ''; position: absolute; inset: 0; background: var(--grad-glow); opacity: 0.8; }
.hero-svg {
  position: absolute; right: -60px; top: -40px; width: 520px; height: 520px;
  opacity: 0.55; pointer-events: none;
}
@media (max-width: 900px) { .hero-svg { display: none; } .hero { padding: 36px 24px; } }
.hero-inner { position: relative; z-index: 1; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(79,140,255,0.12); border: 1px solid rgba(79,140,255,0.25);
  color: var(--primary); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--primary); position: relative;
}
.eyebrow .pulse::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  background: var(--primary); opacity: 0.5;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { 0%{transform:scale(1);opacity:.5} 100%{transform:scale(2.4);opacity:0} }

.hero h1 {
  font-size: clamp(32px, 4.8vw, 54px); line-height: 1.05; margin: 0 0 16px;
  font-weight: 800; letter-spacing: -0.025em;
}
.grad-text {
  background: var(--grad-1); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { font-size: 16.5px; color: var(--text-soft); margin: 0 0 28px; max-width: 540px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 14.5px;
  transition: all var(--t-fast);
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--grad-1); color: #fff;
  box-shadow: 0 10px 30px -8px rgba(79,140,255,0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(79,140,255,0.7); }
.btn-ghost { background: var(--bg-elev); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-small { padding: 9px 14px; font-size: 13px; }

/* ===== STATS ===== */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--border);
  position: relative; z-index: 1;
}
@media (max-width: 720px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } }
.stat .num {
  font-size: 28px; font-weight: 800; letter-spacing: -0.02em;
  background: var(--grad-2); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat .label { font-size: 12.5px; color: var(--text-mute); text-transform: uppercase; letter-spacing: 0.06em; }

/* ===== SECTIONS ===== */
.section { margin-top: 44px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.section-sub { font-size: 13.5px; color: var(--text-mute); margin: 4px 0 0; }
.section-link { color: var(--primary); font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.section-link:hover { gap: 8px; }

/* ===== MODULE CARDS ===== */
.grid-modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-modules { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-modules { grid-template-columns: 1fr; } }

.module {
  position: relative;
  padding: 24px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  transition: all var(--t);
  overflow: hidden;
  display: block;
}
.module::before {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(800px circle at var(--mx,50%) var(--my,0%), rgba(79,140,255,0.15), transparent 40%);
  transition: opacity var(--t);
  pointer-events: none;
}
.module:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }
.module:hover::before { opacity: 1; }
.module-icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center;
  margin-bottom: 18px; position: relative; color: #fff;
}
.module-icon svg { width: 24px; height: 24px; }
.m1 .module-icon { background: linear-gradient(135deg,#4f8cff,#22e3ff); }
.m2 .module-icon { background: linear-gradient(135deg,#7a5cff,#ff5cf2); }
.m3 .module-icon { background: linear-gradient(135deg,#22e3ff,#2ecc71); }
.m4 .module-icon { background: linear-gradient(135deg,#ffb547,#ff5c7a); }
.m5 .module-icon { background: linear-gradient(135deg,#4f8cff,#ff5cf2); }
.m6 .module-icon { background: linear-gradient(135deg,#2ecc71,#22e3ff); }
.module h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.module p { margin: 0 0 16px; font-size: 13.5px; color: var(--text-soft); line-height: 1.55; }
.module-meta { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-mute); font-weight: 500; }
.pill svg { width: 13px; height: 13px; }
.module-arrow {
  margin-left: auto; width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--bg-elev); color: var(--text-soft);
  transition: all var(--t-fast);
}
.module:hover .module-arrow { background: var(--primary); color: #fff; transform: translateX(3px); }

/* ===== PANELS ===== */
.grid-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
@media (max-width: 1100px) { .grid-two { grid-template-columns: 1fr; } }
.grid-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .grid-cols-2 { grid-template-columns: 1fr; } }

.panel {
  border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  overflow: hidden;
}
.panel-pad { padding: 22px; }
.panel-head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.panel-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.tag {
  font-size: 11px; padding: 4px 9px; border-radius: 6px;
  background: rgba(79,140,255,0.15); color: var(--primary); font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ===== FORMS ===== */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 13px; color: var(--text-mute); font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: 14.5px; outline: 0;
  transition: all var(--t-fast);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,140,255,0.15);
}
.form-row textarea { resize: vertical; min-height: 88px; }
.form-row .help { font-size: 12px; color: var(--text-mute); }
.form-row .err { font-size: 12.5px; color: var(--danger); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }

/* ===== TABLES ===== */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.tbl th { color: var(--text-mute); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.tbl tr:hover td { background: var(--bg-card); }

/* ===== QUIZ ===== */
.quiz-q { font-size: 15px; font-weight: 600; margin: 0 0 16px; line-height: 1.5; }
.quiz-formula {
  display: inline-block; padding: 4px 10px; margin: 0 2px;
  background: var(--bg-elev); border-radius: 7px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  color: var(--accent); border: 1px solid var(--border);
}
.choices { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: all var(--t-fast); cursor: pointer;
  font-size: 14px;
}
.choice:hover { border-color: var(--border-strong); transform: translateX(2px); }
.choice.selected { border-color: var(--primary); background: linear-gradient(90deg, rgba(79,140,255,0.12), transparent); }
.choice.correct { border-color: rgba(46, 204, 113, 0.5); background: linear-gradient(90deg, rgba(46,204,113,0.12), transparent); }
.choice.wrong { border-color: rgba(255, 92, 122, 0.4); background: linear-gradient(90deg, rgba(255,92,122,0.08), transparent); }
.choice input { display: none; }
.choice .mark {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border-strong);
  display: grid; place-items: center; flex-shrink: 0;
  transition: all var(--t-fast); color: #fff;
}
.choice.selected .mark { border-color: var(--primary); background: var(--primary); }
.choice.correct .mark { border-color: var(--success); background: var(--success); }
.choice.wrong .mark { border-color: var(--danger); background: var(--danger); }
.choice .mark svg { width: 12px; height: 12px; opacity: 0; }
.choice.selected .mark svg, .choice.correct .mark svg, .choice.wrong .mark svg { opacity: 1; }
.quiz-foot {
  display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-mute);
}
.timer {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  padding: 4px 10px; border-radius: 7px;
  background: rgba(255, 181, 71, 0.15); color: var(--warning); font-weight: 700;
}

/* ===== STAT CARDS ===== */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid-stats { grid-template-columns: 1fr; } }
.stat-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  position: relative; overflow: hidden;
}
.stat-card .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; }
.stat-card .ic svg { width: 18px; height: 18px; color: #fff; }
.stat-card .val { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .lbl { font-size: 13px; color: var(--text-mute); margin-top: 2px; }
.stat-card .trend { margin-top: 12px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.stat-card .trend.up { color: var(--success); }
.stat-card .trend.down { color: var(--danger); }

/* ===== CHART ROWS ===== */
.chart-card { padding: 24px; }
.chart-card h4 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.chart-card .desc { color: var(--text-mute); font-size: 13px; margin-bottom: 22px; }
.chart-row { display: grid; grid-template-columns: 140px 1fr 60px; gap: 14px; align-items: center; padding: 8px 0; }
.chart-row + .chart-row { border-top: 1px dashed var(--border); }
.chart-row .topic { font-size: 13.5px; font-weight: 500; }
.bar { height: 8px; background: var(--bg-elev); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--grad-2); border-radius: 99px; box-shadow: 0 0 10px rgba(34,227,255,0.4); }
.bar > i.alt { background: var(--grad-1); box-shadow: 0 0 10px rgba(122,92,255,0.4); }
.pct { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--text); }

/* ===== CHIPS ===== */
.chip {
  font-size: 11.5px; padding: 4px 10px; border-radius: 99px;
  background: var(--bg-elev); color: var(--text-soft); font-weight: 600;
  border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 4px;
}
.chip.easy { color: var(--success); border-color: rgba(46,204,113,0.3); background: rgba(46,204,113,0.08); }
.chip.med { color: var(--warning); border-color: rgba(255,181,71,0.3); background: rgba(255,181,71,0.08); }
.chip.hard { color: var(--danger); border-color: rgba(255,92,122,0.3); background: rgba(255,92,122,0.08); }
.chip.success { color: var(--success); border-color: rgba(46,204,113,0.3); background: rgba(46,204,113,0.08); }
.chip.danger { color: var(--danger); border-color: rgba(255,92,122,0.3); background: rgba(255,92,122,0.08); }
.chip.primary { color: var(--primary); border-color: rgba(79,140,255,0.3); background: rgba(79,140,255,0.10); }

/* ===== TEAM ===== */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .team-grid { grid-template-columns: 1fr; } }
.team-card {
  padding: 24px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  text-align: center; backdrop-filter: blur(16px);
  transition: all var(--t);
}
.team-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.team-photo {
  width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--grad-1);
  display: grid; place-items: center; color: #fff; font-size: 30px; font-weight: 700;
  position: relative;
  box-shadow: 0 8px 30px -10px rgba(79,140,255,0.55);
  overflow: hidden;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--border-strong); }
.team-card h4 { margin: 0; font-size: 16px; font-weight: 700; }
.team-card .role {
  font-size: 12px; color: var(--accent); font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; margin: 4px 0 12px;
}
.team-card p { font-size: 13px; color: var(--text-soft); margin: 0 0 16px; line-height: 1.55; }
.socials { display: flex; gap: 8px; justify-content: center; }
.socials a {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--bg-elev); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--text-soft);
  transition: all var(--t-fast);
}
.socials a:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.socials svg { width: 15px; height: 15px; }

/* ===== LECTURE / READING ===== */
.read-area { font-size: 15.5px; line-height: 1.75; color: var(--text); }
.read-area h2 { font-size: 22px; margin: 28px 0 12px; }
.read-area h3 { font-size: 18px; margin: 22px 0 10px; }
.read-area p { margin: 0 0 14px; color: var(--text-soft); }
.read-area code { font-family: 'JetBrains Mono', monospace; background: var(--bg-elev); padding: 2px 6px; border-radius: 5px; font-size: 0.92em; color: var(--accent); }
.read-area blockquote { margin: 16px 0; padding: 12px 18px; border-left: 3px solid var(--primary); background: var(--bg-card); border-radius: 8px; color: var(--text-soft); }

.glossary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 18px 22px; border-top: 1px solid var(--border);
}
@media (max-width: 600px) { .glossary { grid-template-columns: 1fr; } }
.glossary-item {
  padding: 12px 14px; background: var(--bg-elev); border-radius: 12px;
  border: 1px solid var(--border);
}
.glossary-item .term { font-weight: 700; color: var(--primary); font-size: 14px; }
.glossary-item .def { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

/* ===== MESSAGES ===== */
.messages { position: fixed; top: 80px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  padding: 14px 18px; border-radius: 12px;
  background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 10px; font-size: 14px;
  animation: slideIn .35s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast.success { border-color: rgba(46,204,113,0.45); }
.toast.error, .toast.danger { border-color: rgba(255,92,122,0.45); }
.toast.info { border-color: rgba(79,140,255,0.45); }
.toast.warning { border-color: rgba(255,181,71,0.45); }

/* ===== FOOTER ===== */
footer {
  margin: 60px 0 0; padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-mute); font-size: 13px;
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center;
}

/* ===== AUTH PAGES ===== */
.auth-wrap {
  position: relative; z-index: 1;
  min-height: 100vh; display: grid; place-items: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%; max-width: 440px;
  padding: 40px 32px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-card);
}
.auth-card .logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--grad-1); display: grid; place-items: center; color: #fff;
  margin-bottom: 22px; box-shadow: var(--shadow-glow);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; }
.auth-card .sub { color: var(--text-mute); font-size: 14px; margin-bottom: 24px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-mute); }
.auth-foot a { color: var(--primary); font-weight: 600; }

/* ===== EMPTY / 404 ===== */
.empty {
  text-align: center; padding: 60px 20px;
  color: var(--text-mute);
}
.empty .ic { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty h3 { color: var(--text); margin: 0 0 6px; }

/* ===== ANIM ===== */
.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }

/* ===== UTIL ===== */
.flex { display: flex; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-mute { color: var(--text-mute); }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.w-full { width: 100%; }
