:root {
  --wine: #6f1834;
  --wine-dark: #481020;
  --wine-soft: #f4e8ec;
  --ink: #23202a;
  --muted: #746f79;
  --paper: #fffdfb;
  --canvas: #f4f1ed;
  --line: #e4ded8;
  --gold: #c59643;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 18px 20px; color: white; background: linear-gradient(180deg, var(--wine-dark), #261019); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 28px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; font-family: Georgia, serif; font-size: 16px; letter-spacing: .08em; }
.brand strong, .brand small, .user-chip strong, .user-chip small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 19px; }
.brand small { color: #d9bcca; letter-spacing: .16em; text-transform: uppercase; }
nav { display: grid; gap: 6px; }
nav a { padding: 11px 13px; border-radius: 9px; color: #ddcdd3; font-size: 14px; }
nav a:hover, nav a.active { color: white; background: rgba(255,255,255,.11); }
.sidebar-footer { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid rgba(255,255,255,.13); }
.sidebar-footer span, .sidebar-footer small { display: block; }
.sidebar-footer span { font-size: 13px; }
.sidebar-footer small { margin-top: 3px; color: #bba7ae; }

main { min-width: 0; }
.topbar { height: 94px; display: flex; align-items: center; gap: 18px; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,253,251,.82); backdrop-filter: blur(10px); }
.topbar h1 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 28px; font-weight: 500; }
.eyebrow { margin: 0; color: var(--wine); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.light { color: #e7cbd5; }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-chip small { color: var(--muted); margin-top: 2px; }
.avatar { width: 39px; height: 39px; display: grid; place-items: center; color: white; background: var(--wine); border-radius: 50%; font-size: 12px; font-weight: 800; }
.menu-button { display: none; border: 0; background: transparent; font-size: 24px; }

.view { display: none; padding: 32px 38px 46px; }
.view.active { display: block; }
.welcome-card { display: flex; justify-content: space-between; align-items: center; min-height: 185px; padding: 34px 38px; border-radius: 20px; color: white; background: radial-gradient(circle at 85% 20%, rgba(216,167,181,.35), transparent 28%), linear-gradient(135deg, var(--wine), var(--wine-dark)); box-shadow: 0 18px 50px rgba(73,16,33,.16); }
.welcome-card h2 { max-width: 650px; margin: 8px 0 10px; font-family: Georgia, serif; font-size: clamp(27px, 3vw, 42px); font-weight: 500; line-height: 1.08; }
.welcome-card p:last-child { margin: 0; color: #ead9df; }
.welcome-date { min-width: 90px; text-align: center; border-left: 1px solid rgba(255,255,255,.2); padding-left: 30px; }
.welcome-date span { display: block; font-family: Georgia, serif; font-size: 50px; }
.welcome-date small { letter-spacing: .14em; text-transform: uppercase; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin: 20px 0; }
.stat, .panel, .module-card { border: 1px solid var(--line); background: var(--paper); border-radius: 15px; }
.stat { padding: 20px; }
.stat span, .stat small, .stat strong { display: block; }
.stat span { color: var(--muted); font-size: 12px; }
.stat strong { margin: 8px 0 7px; font-family: Georgia, serif; color: var(--wine); font-size: 31px; }
.stat small { color: var(--muted); font-size: 11px; }
.content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; }
.panel { padding: 25px; }
.panel-heading h3 { margin: 4px 0 20px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.discipline-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.discipline { min-height: 84px; display: flex; flex-direction: column; justify-content: space-between; padding: 13px; border-radius: 12px; color: var(--wine-dark); background: var(--wine-soft); }
.discipline b { font-family: Georgia, serif; font-size: 16px; }
.discipline small { color: #866878; }
.task-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.task-list li { display: flex; gap: 12px; align-items: flex-start; }
.task-list li > span { flex: 0 0 30px; height: 30px; display: grid; place-items: center; color: var(--wine); background: var(--wine-soft); border-radius: 50%; font-size: 12px; font-weight: 800; }
.task-list strong, .task-list small { display: block; }
.task-list strong { font-size: 13px; }
.task-list small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }

.module-view { max-width: 1050px; }
.module-card { padding: 30px; }
.module-card h2 { margin: 7px 0 12px; font-family: Georgia, serif; font-size: 31px; font-weight: 500; }
.module-card > p { max-width: 720px; color: var(--muted); line-height: 1.6; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 25px; }
.feature-list div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; }
.coming { display: inline-block; margin-top: 24px; padding: 8px 12px; color: var(--wine); background: var(--wine-soft); border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .discipline-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; left: -270px; width: 250px; transition: left .2s ease; }
  .sidebar.open { left: 0; box-shadow: 20px 0 40px rgba(0,0,0,.25); }
  .topbar { height: 82px; padding: 0 17px; }
  .topbar .eyebrow, .user-chip span:last-child { display: none; }
  .topbar h1 { font-size: 22px; }
  .menu-button { display: block; }
  .view { padding: 18px 15px 35px; }
  .welcome-card { align-items: flex-start; padding: 27px 24px; }
  .welcome-date { display: none; }
  .stats-grid, .content-grid, .feature-list { grid-template-columns: 1fr; }
  .discipline-grid { grid-template-columns: repeat(2, 1fr); }
}
