:root {
  --ink: #16223b;
  --muted: #64718a;
  --primary: #5b4bea;
  --primary-dark: #4436ca;
  --mint: #31c7a1;
  --cream: #f7f8fc;
  --line: #e8eaf1;
  --white: #fff;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--cream);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, a { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 22px; background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 24px/1 "Manrope"; margin: 0 12px 46px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: var(--primary); color: white; font-size: 20px; }
nav { display: grid; gap: 8px; }
.nav-item { display: flex; gap: 15px; align-items: center; padding: 13px 16px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 600; }
.nav-item span { width: 20px; font-size: 21px; text-align: center; }
.nav-item:hover, .nav-item.active { background: #f0efff; color: var(--primary); }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 22px 8px 0; display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #3f2b21; background: #f3c8a8; font-weight: 700; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer small { margin-top: 3px; color: var(--muted); }
main { min-width: 0; }
.topbar { height: 82px; padding: 0 5vw; background: var(--white); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.menu { display: none; border: 0; background: none; }
.exam-pill { padding: 9px 15px; border: 1px solid var(--line); border-radius: 100px; font-size: 14px; color: var(--muted); }
.exam-pill span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); margin-right: 8px; }
.stats { display: flex; gap: 18px; }
.content { width: min(1120px, calc(100% - 64px)); margin: 0 auto; padding: 52px 0 70px; }
.eyebrow, .kicker, .daily-label { color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.welcome h1 { font: 800 clamp(30px, 4vw, 44px)/1.12 "Manrope"; margin: 8px 0 10px; }
.welcome h1 span { color: var(--primary); }
.welcome > p:last-child { color: var(--muted); font-size: 17px; margin: 0 0 30px; }
.hero-card { min-height: 342px; padding: 42px 5%; border-radius: 26px; color: white; background: radial-gradient(circle at 85% 18%, rgba(123,107,255,.8), transparent 33%), linear-gradient(135deg, #3f32bd, #5b4bea 55%, #5946dc); display: flex; align-items: center; justify-content: space-between; overflow: hidden; box-shadow: 0 22px 50px rgba(67, 52, 181, .18); }
.hero-copy { width: min(580px, 68%); }
.daily-label { color: #c8c2ff; }
.hero-card h2 { font: 800 34px/1.1 "Manrope"; margin: 10px 0; }
.hero-card p { color: #dedaff; margin: 0 0 22px; }
.hero-card p strong { color: white; }
.task-list { display: grid; gap: 10px; margin-bottom: 26px; }
.task { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.task-check { width: 20px; height: 20px; border-radius: 7px; border: 1px solid rgba(255,255,255,.4); color: transparent; }
.primary-button { border: 0; border-radius: 13px; padding: 15px 20px; color: var(--primary-dark); background: white; font-weight: 800; box-shadow: 0 8px 20px rgba(32, 25, 102, .18); }
.primary-button span { margin-left: 20px; }
.primary-button:disabled { opacity: .8; }
.progress-orbit { position: relative; width: 190px; height: 190px; flex: 0 0 190px; }
.progress-orbit svg { transform: rotate(-90deg); }
.progress-orbit circle { fill: none; stroke-width: 10; }
.orbit-bg { stroke: rgba(255,255,255,.14); }
.orbit-value { stroke: #8df0d6; stroke-linecap: round; stroke-dasharray: 415; stroke-dashoffset: 415; transition: stroke-dashoffset .8s ease; }
.progress-orbit > div { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.progress-orbit strong { font: 800 35px/1 "Manrope"; }
.progress-orbit span { color: #d9d5ff; font-size: 12px; margin-top: 6px; }
.dashboard-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 22px; margin-top: 22px; }
.card { padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.card h2 { font: 800 20px/1.2 "Manrope"; margin: 5px 0 0; }
.trend { color: #159b7a; background: #e5fbf4; padding: 6px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.probability-row { display: flex; align-items: center; gap: 18px; margin-top: 24px; }
.probability-row > strong { font: 800 46px/1 "Manrope"; }
.meter { height: 9px; flex: 1; border-radius: 10px; background: #eceef4; overflow: hidden; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #8276f6); border-radius: inherit; transition: width .8s ease; }
.card > p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.topic-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 20px; }
.topic-columns small { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.topic-columns > div > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { padding: 6px 9px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.tag.good { color: #157d63; background: #e7faf5; }
.tag.warning { color: #aa6a12; background: #fff5df; }
.activity-card button { border: 0; color: var(--muted); background: none; }
.bars { height: 122px; display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; padding: 8px 5px 0; margin-top: 20px; border-bottom: 1px solid var(--line); }
.bars i { width: 18px; min-height: 8px; border-radius: 7px 7px 2px 2px; background: #c8c3fa; }
.bars i.today { background: var(--primary); }
.days { display: flex; justify-content: space-around; padding: 8px 3px; color: var(--muted); font-size: 11px; }
.activity-card > p { border-top: 1px solid var(--line); padding-top: 15px; margin: 10px 0 0; }
.error { padding: 12px; background: #fff0f0; color: #a72828; border-radius: 10px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .menu { display: block; margin-right: auto; }
  .content { width: min(100% - 36px, 700px); padding-top: 34px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .topbar { height: 68px; padding: 0 18px; gap: 12px; }
  .exam-pill { display: none; }
  .content { width: calc(100% - 28px); }
  .welcome > p:last-child { font-size: 15px; }
  .hero-card { padding: 30px 24px; }
  .hero-copy { width: 100%; }
  .progress-orbit { display: none; }
  .topic-columns { grid-template-columns: 1fr; }
}
