:root {
  --blue: #0E5DA8;
  --blue-dark: #083f75;
  --blue-soft: #eef7ff;
  --gold: #C9A24A;
  --gold-soft: #fff7df;
  --ink: #172033;
  --muted: #64748b;
  --line: #e5eaf1;
  --bg: #f7fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 35, 62, .08);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1 { margin: 0; font-size: 34px; letter-spacing: 0; }
h2 { margin: 0 0 14px; font-size: 21px; letter-spacing: 0; }
p { line-height: 1.55; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: linear-gradient(145deg, #fff 0%, #f4f9ff 62%, #fffaf0 100%); }
.login-card { width: min(560px, 100%); background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 38px; }
.login-logo { width: 230px; max-width: 100%; margin-bottom: 28px; }
.split-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.security-note { margin-top: 18px; color: var(--muted); font-size: 14px; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 268px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: rgba(255,255,255,.96); border-right: 1px solid var(--line); padding: 26px 20px; display: flex; flex-direction: column; gap: 24px; }
.brand img { width: 190px; max-width: 100%; display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar nav a { color: #405066; font-weight: 750; padding: 12px 13px; border-radius: 8px; }
.sidebar nav a:hover, .sidebar nav a.active { background: var(--blue-soft); color: var(--blue); }
.side-note { margin-top: auto; border: 1px solid var(--line); border-radius: 8px; padding: 16px; color: var(--muted); background: #fff; }
.side-note b { color: var(--ink); }

.main { padding: 34px 42px 56px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.topbar p { margin: 8px 0 0; color: var(--muted); }
.user { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); border: 1px solid var(--line); font-weight: 900; }
.bell { border: 1px solid #ffd4d4; color: #b42318; background: #fff4f4; border-radius: 999px; padding: 9px 12px; font-weight: 800; }

.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); padding: 22px; }
.card.wide { margin-bottom: 20px; }
.card-action { margin-top: 18px; }
.muted { color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 8px; background: var(--blue); color: white; padding: 11px 16px; font-weight: 850; cursor: pointer; }
.btn.secondary { background: white; color: var(--blue); border: 1px solid var(--line); }
.progress { height: 8px; border-radius: 999px; overflow: hidden; background: #e9eef5; margin: 14px 0; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--gold)); }
.notice { margin-top: 18px; background: linear-gradient(90deg, var(--blue-soft), #fff); border: 1px solid #d8e8fb; border-radius: 8px; padding: 16px; display: flex; justify-content: space-between; gap: 12px; align-items: center; }

.lesson-layout { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.player { background: #08182b; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.player-screen { min-height: 360px; display: grid; place-items: center; text-align: center; color: white; padding: 30px; background: radial-gradient(circle at 70% 20%, rgba(201,162,74,.32), transparent 26%), linear-gradient(135deg, #07172a, #0E5DA8); }
.player-screen span { width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--blue); display: grid; place-items: center; margin: 0 auto 20px; font-weight: 900; }
.player-screen p { color: rgba(255,255,255,.76); }
.player-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px; color: white; }
.player-controls button { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.09); color: white; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.timeline { flex: 1; min-width: 160px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; }
.timeline span { display: block; width: 35%; height: 100%; background: var(--gold); }
.list { border-top: 1px solid var(--line); padding: 14px 0; }
.list:first-of-type { border-top: 0; }
.list p { margin: 4px 0 0; color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 13px; vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tag { display: inline-flex; border-radius: 999px; padding: 6px 10px; background: var(--blue-soft); color: var(--blue); font-weight: 850; }
.tag.danger, .pulse { background: #fff1f1; color: #b42318; }
.pulse { display: inline-flex; border: 1px solid #ffd1d1; border-radius: 999px; padding: 8px 11px; font-weight: 900; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(180,35,24,.14); } }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; }
  .sidebar nav { flex-direction: row; overflow: auto; padding-bottom: 4px; }
  .main { padding: 24px; }
  .grid.two, .grid.three, .lesson-layout { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
  .user { white-space: normal; }
}
