:root {
  --navy: #0b1836;
  --blue: #2266d2;
  --gold: #c99a2e;
  --green: #178f60;
  --violet: #7c6ad7;
  --ink: #152033;
  --muted: #69758b;
  --line: #e5e9f2;
  --bg: #f5f7fb;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 230px;
  background: linear-gradient(180deg, #08142f, #10234a);
  color: #fff;
  padding: 18px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand {
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
  font-size: 17px;
  color: #fff;
}
.brand span { color: #e4bd5a; font-size: 10px; }
.logo-wrap {
  display: grid;
  place-items: center;
  padding: 8px 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.logo-wrap img {
  width: min(188px, 100%);
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.sidebar nav { display: grid; gap: 4px; }
.sidebar a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #dfe7f8;
  font-weight: 400;
  font-size: 12px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 33px;
}
.nav-link.active {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.nav-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  fill: currentColor;
  opacity: .9;
}
.sidebar a:hover { background: rgba(255,255,255,.08); }
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}
.logout {
  width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.13), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.12);
}
.logout:hover { background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.09)); }
.sidebar-version {
  color: #fff;
  text-align: center;
  font-size: 10px;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
}
.sidebar-version b,
.sidebar-version span {
  display: block;
  font-weight: 800;
}
.main {
  width: 100%;
  margin-left: 230px;
  padding: 18px;
}
.auth-main { margin-left: 0; min-height: 100vh; display: grid; place-items: center; padding: 14px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.topbar h1, h1 { margin: 0; font-size: 18px; letter-spacing: 0; font-weight: 800; }
h2 { font-size: 15px; margin: 0 0 8px; font-weight: 800; }
h3 { font-size: 13px; margin: 0 0 7px; font-weight: 800; }
p { margin: 0 0 8px; }
.eyebrow { margin: 0 0 3px; color: var(--gold); text-transform: uppercase; font-size: 10px; font-weight: 800; }
.user-pill, .status {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 9px;
  font-weight: 400;
  font-size: 11px;
}
.grid { display: grid; gap: 10px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(12, 28, 64, .05);
}
.kpi b { display: block; font-size: 22px; color: var(--navy); font-weight: 800; }
.kpi span { color: var(--muted); font-weight: 400; }
.btn, button {
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: var(--blue);
  color: #fff;
  font-weight: 400;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn.secondary { background: var(--navy); }
.btn.gold { background: var(--gold); }
.btn.green { background: var(--green); }
.btn.violet { background: var(--violet); }
.btn.ghost { background: #eef3ff; color: var(--blue); }
.btn.danger { background: #bd2435; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 78px; resize: vertical; }
label { display: grid; gap: 4px; font-weight: 400; color: #26344d; }
form.grid { align-items: end; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
th, td { padding: 8px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 12px; font-weight: 400; }
th { background: #f0f4fb; color: #394963; font-size: 10px; text-transform: uppercase; font-weight: 800; }
.alert { padding: 9px 11px; border-radius: 6px; margin-bottom: 10px; font-weight: 400; }
.alert.success { background: #e8f7ef; color: #116845; }
.alert.error { background: #fdecef; color: #9c1d2c; }
.progress { height: 8px; background: #e7ecf5; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--blue)); }
.muted { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.auth-card { width: min(780px, 100%); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; padding: 0; }
.auth-hero { background: linear-gradient(145deg, #091633, #183a78); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; min-height: 430px; }
.auth-hero h1 { font-size: 25px; line-height: 1.08; margin: 0 0 8px; letter-spacing: 0; font-weight: 800; }
.auth-logo-wrap {
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
}
.auth-logo-wrap img {
  width: min(315px, 92%);
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.auth-panel { padding: 22px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; font-weight: 400; font-size: 12px; }
.lesson-content video, .lesson-content img { width: 100%; max-height: 420px; border-radius: 8px; background: #000; object-fit: contain; }
.certificate {
  border: 2px solid var(--gold);
  text-align: center;
  padding: 22px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}
.status.ok { color: var(--green); }
.status.bad { color: #bd2435; }
.question { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.version-sticker {
  margin-top: 16px;
  padding: 7px 9px;
  border: 1px solid #c8d0df;
  border-radius: 4px;
  color: #667085;
  background: #eef2f7;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}
.version-sticker b { color: #334155; font-weight: 800; }

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; border-radius: 0; }
  .main { margin-left: 0; padding: 12px; }
  .grid-2, .grid-3, .grid-4, .auth-card { grid-template-columns: 1fr; }
  .auth-hero { min-height: 260px; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
