:root {
  --bg: #f7f9f6;
  --card: #ffffff;
  --ink: #1f2d2a;
  --muted: #66736f;
  --line: #dde7e1;
  --green: #2f6b5f;
  --green-2: #47887a;
  --light-green: #e6f1ed;
  --amber: #f2b84b;
  --amber-light: #fff4d9;
  --red: #c65b53;
  --red-light: #ffe9e6;
  --blue: #407c9a;
  --shadow: 0 14px 40px rgba(40, 70, 62, 0.08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #eef6f1 0, transparent 28rem), var(--bg);
  color: var(--ink);
  font-size: 14px;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto 48px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  background: rgba(247, 249, 246, 0.88);
  backdrop-filter: blur(14px);
}
.brand-block { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--green); color: #fff;
  font-weight: 800; font-size: 20px;
  box-shadow: 0 10px 25px rgba(47, 107, 95, .22);
}
h1 { font-size: 24px; line-height: 1.05; margin: 0; letter-spacing: -0.04em; }
.brand-block p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.nav-tabs { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-btn {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 12.5px;
  font-weight: 650;
}
.nav-btn:hover { background: #edf4f0; color: var(--green); }
.nav-btn.active { color: var(--green); background: var(--light-green); border-color: #cae0d8; }
.language-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}
.lang-btn.active {
  background: var(--green);
  color: #fff;
}

main { padding-top: 10px; }
.section { display: none; animation: fade .22s ease; }
.active-section { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.card, .compact-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(221, 231, 225, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 18px; }
.compact-card { padding: 20px; }
.dashboard-hero {
  display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 16px;
}
.eyebrow { margin: 0 0 6px; color: var(--green); font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
h2 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -0.04em; }
h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.muted { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.primary-action, .secondary-action, .text-btn, .icon-btn {
  border: 0; border-radius: 14px; font-weight: 750; transition: .18s ease;
}
.primary-action {
  background: var(--green); color: white; padding: 13px 18px;
  box-shadow: 0 12px 25px rgba(47, 107, 95, .22);
}
.primary-action:hover { background: #25574e; transform: translateY(-1px); }
.primary-action.small { padding: 11px 14px; font-size: 13px; }
.secondary-action { background: var(--light-green); color: var(--green); padding: 10px 14px; }
.secondary-action:hover { background: #d9ebe4; }
.text-btn { background: transparent; color: var(--green); padding: 8px 4px; }
.text-btn:hover { text-decoration: underline; }
.icon-btn { background: #f0f5f2; color: var(--muted); width: 34px; height: 34px; }
.full-width { width: 100%; }
.dashboard-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-cols { grid-template-columns: 1.25fr .75fr; }
.card-heading-row, .section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mini-badge, .urgency-badge, .type-badge, .date-badge, .status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap;
}
.mini-badge { padding: 6px 9px; background: var(--light-green); color: var(--green); }
.urgency-badge { padding: 6px 9px; background: var(--amber-light); color: #915f05; }
.urgency-badge.danger { background: var(--red-light); color: var(--red); }
.task-list { display: grid; gap: 8px; }
.task-row {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb;
}
.task-row input { margin-top: 2px; accent-color: var(--green); }
.task-row.done { opacity: .68; }
.task-row.done .task-text { text-decoration: line-through; }
.task-text strong { display: block; font-size: 13.5px; }
.task-text span { color: var(--muted); font-size: 12px; display: block; margin-top: 2px; }
.helper-text { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 10px 0 0; }
.deadline-content strong { display: block; font-size: 18px; margin-bottom: 4px; }
.deadline-content p { margin: 0; color: var(--muted); line-height: 1.45; }
.deadline-content .days-left { margin-top: 12px; font-size: 28px; font-weight: 850; color: var(--green); letter-spacing: -0.05em; }
.time-bar, .progress-bar {
  height: 10px; border-radius: 999px; background: #edf2ef; overflow: hidden; margin-top: 14px;
}
.time-bar span, .progress-bar span { display: block; height: 100%; width: 0%; background: var(--green); border-radius: inherit; transition: width .3s ease; }
.big-number { font-size: 28px; font-weight: 850; letter-spacing: -0.05em; margin-bottom: 4px; }
.quick-start-card { margin-bottom: 16px; }
.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.quick-card {
  text-align: left; border: 1px solid var(--line); background: #fbfdfb;
  border-radius: 16px; padding: 13px; min-height: 86px;
}
.quick-card:hover { border-color: #b5d5cb; background: #f1f8f4; transform: translateY(-1px); }
.quick-card strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 6px; }
.quick-card span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.deadline-list { display: grid; gap: 9px; }
.deadline-item {
  display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 12px;
  padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fbfcfb;
}
.date-badge { padding: 8px 6px; background: var(--light-green); color: var(--green); flex-direction: column; line-height: 1.1; }
.date-badge small { font-size: 10px; opacity: .9; }
.deadline-title strong { display: block; font-size: 13px; }
.deadline-title span { color: var(--muted); font-size: 12px; }
.status-badge { padding: 5px 8px; background: #f1f5f3; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.summary-tile { background: #fbfcfb; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.summary-tile strong { display: block; font-size: 22px; letter-spacing: -0.04em; }
.summary-tile span { color: var(--muted); font-size: 12px; }
.week-preview { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day-preview { background: #fbfcfb; border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 96px; }
.day-preview h4 { margin: 0 0 8px; font-size: 13px; }
.day-preview p { margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 10px 0 18px; }
.header-stat { min-width: 112px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; text-align: center; }
.header-stat span { display: block; font-weight: 850; font-size: 24px; color: var(--green); letter-spacing: -0.05em; }
.header-stat small { color: var(--muted); font-weight: 650; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filter-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; color: var(--muted); font-size: 13px; font-weight: 750; }
.filter-btn.active, .filter-btn:hover { color: var(--green); background: var(--light-green); border-color: #c7ddd5; }
.wa3-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.wa3-card { padding: 14px; border: 1px solid var(--line); background: white; border-radius: 18px; box-shadow: var(--shadow); }
.wa3-main { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: start; }
.wa3-card h3 { font-size: 15px; margin-bottom: 5px; }
.wa3-meta { color: var(--muted); font-size: 12px; line-height: 1.4; }
.type-badge { padding: 5px 8px; background: #eef5f8; color: var(--blue); margin-top: 8px; }
.done-toggle { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 750; color: var(--green); }
.done-toggle input { accent-color: var(--green); width: 17px; height: 17px; }
.notes-box { margin-top: 11px; }
.notes-box summary { color: var(--green); font-size: 12.5px; font-weight: 800; cursor: pointer; }
.notes-box textarea { width: 100%; min-height: 66px; margin-top: 8px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 9px; background: #fbfcfb; color: var(--ink); font-size: 13px; }
.planner-grid { display: grid; gap: 14px; }
.planner-summary-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  margin-bottom: 4px;
}
.planner-summary-strip > div {
  background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  padding: 12px 14px;
}
.planner-summary-strip strong { display: block; font-size: 20px; letter-spacing: -0.04em; color: var(--green); }
.planner-summary-strip span { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.planner-flow { display: grid; grid-template-columns: minmax(360px, .95fr) minmax(420px, 1.05fr); gap: 14px; align-items: start; }
.planner-priority-col { display: grid; gap: 14px; }
.planner-group {
  background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 14px;
}
.planner-group.today-group { border-color: #b8d8cc; box-shadow: 0 16px 35px rgba(67, 111, 98, .10); }
.planner-group.tomorrow-group { background: #fbfdfb; }
.planner-group.later-group { min-height: 280px; }
.planner-group-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 10px; }
.planner-group-head h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -0.02em; }
.planner-group-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.group-count { min-width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--light-green); color: var(--green); font-weight: 850; font-size: 12px; }
.planner-list { display: grid; gap: 8px; }
.planner-list-item {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: start; gap: 10px;
  padding: 11px; border: 1px solid var(--line); border-radius: 15px; background: #fbfcfb;
}
.planner-list-item:hover { border-color: #c5ddd4; background: #fff; }
.planner-list-item.compact { grid-template-columns: 22px 1fr auto; padding: 9px 10px; }
.planner-list-item input { margin-top: 3px; accent-color: var(--green); width: 16px; height: 16px; }
.planner-list-item.done { background: #f4f8f5; }
.planner-list-item.done .planner-item-title strong { text-decoration: line-through; opacity: .62; }
.planner-item-main { min-width: 0; }
.planner-item-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.planner-item-title strong { font-size: 13.5px; line-height: 1.3; color: var(--ink); }
.day-pill { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; background: #eef5f1; color: var(--green); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.planner-item-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; }
.type-dot { font-size: 11px; color: var(--muted); font-weight: 750; }
.type-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #9cb9ae; margin-right: 5px; vertical-align: 1px; }
.type-dot.revision::before { background: #6f94b8; }
.type-dot.project::before { background: #d0a24c; }
.type-dot.pack::before { background: #63a47d; }
.type-dot.homework::before { background: #9b82b8; }
.type-dot.reminder::before { background: #bf7a64; }
.proof-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; background: #fff7e8; color: #9a6418; font-size: 10.5px; font-weight: 800; }
.planner-item-actions { display: flex; gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.planner-item-actions button { border: 0; background: transparent; color: var(--green); border-radius: 999px; padding: 4px 6px; font-size: 11px; font-weight: 800; }
.planner-item-actions button:hover { background: var(--light-green); }
.empty-small { color: var(--muted); font-size: 12px; line-height: 1.45; background: #fbfcfb; border: 1px dashed #cbdad3; border-radius: 12px; padding: 10px; }
.revision-layout { display: grid; grid-template-columns: 290px 1fr; gap: 16px; }
.revision-controls label, .modal-card label { display: block; margin: 12px 0 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.revision-controls select, .modal-card select, .modal-card input {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; padding: 10px; color: var(--ink);
}
.practice-history-mini { margin-top: 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.question-card { min-height: 360px; }
.empty-state { border: 1px dashed #cbdad3; background: #fbfcfb; border-radius: 16px; padding: 22px; text-align: center; color: var(--muted); }
.empty-state h3 { color: var(--ink); margin-bottom: 8px; }
.question-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.question-text { font-size: 20px; line-height: 1.45; font-weight: 750; margin-bottom: 15px; }
.option-grid { display: grid; gap: 9px; }
.option-btn { text-align: left; border: 1px solid var(--line); background: #fbfcfb; padding: 12px; border-radius: 14px; font-weight: 650; }
.option-btn:hover { border-color: #bad8ce; background: #f1f8f4; }
.feedback { margin-top: 14px; padding: 12px; border-radius: 14px; font-weight: 700; }
.feedback.correct { background: var(--light-green); color: var(--green); }
.feedback.wrong { background: var(--red-light); color: var(--red); }
.mistake-list, .mastered-list { display: grid; gap: 10px; }
.mistake-card { border: 1px solid var(--line); background: #fbfcfb; border-radius: 14px; padding: 12px; }
.mistake-card strong { display: block; margin-bottom: 5px; }
.mistake-card p { margin: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.mistake-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.mistake-actions button { border: 0; border-radius: 999px; padding: 7px 10px; font-size: 12px; font-weight: 800; background: var(--light-green); color: var(--green); }
.mastered-card { margin-top: 14px; }
.progress-dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.progress-panel { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 16px; }
.progress-panel h3 { margin-bottom: 12px; }
.progress-panel .metric { display: flex; justify-content: space-between; border-bottom: 1px solid #edf2ef; padding: 8px 0; color: var(--muted); }
.progress-panel .metric strong { color: var(--ink); }
.modal { display: none; position: fixed; inset: 0; background: rgba(26, 42, 38, .34); z-index: 50; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-card { width: min(420px, 100%); background: white; border-radius: 20px; box-shadow: 0 30px 70px rgba(0,0,0,.2); padding: 18px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1f2d2a; color: white; border-radius: 999px; padding: 10px 14px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 60; font-weight: 750; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 980px) {
  .topbar { align-items: center; flex-direction: row; }
  .nav-tabs { justify-content: flex-end; flex: 1 1 auto; }
  .three-cols, .four-cols, .two-cols, .revision-layout, .progress-dashboard { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wa3-list { grid-template-columns: 1fr; }
  .planner-flow { grid-template-columns: 1fr; }
  .planner-summary-strip, .week-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-shell { width: min(100% - 22px, 1180px); }
  h1 { font-size: 21px; }
  h2 { font-size: 25px; }
  .dashboard-hero, .page-header { flex-direction: column; align-items: stretch; }
  .primary-action { width: 100%; }
  .quick-actions, .planner-summary-strip, .week-preview, .summary-grid { grid-template-columns: 1fr; }
  .planner-list-item, .planner-list-item.compact { grid-template-columns: 22px 1fr; }
  .planner-item-actions { grid-column: 2; justify-content: flex-start; }
  .deadline-item { grid-template-columns: 58px 1fr; }
  .deadline-item .status-badge { grid-column: 2; width: fit-content; }
  .wa3-main { grid-template-columns: 56px 1fr; }
  .wa3-main .done-toggle { grid-column: 2; }
  .nav-btn { font-size: 11.5px; padding: 6px 8px; }
}

/* Timetable additions */
.timetable-selector {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
  min-width: 160px;
}
.timetable-selector label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.timetable-selector select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
  font-weight: 700;
}
.today-classes,
.class-list {
  display: grid;
  gap: 8px;
}
.cycle-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e8f3ef;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}
.class-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfa;
}
.class-time {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}
.class-row strong {
  display: block;
  font-size: 14px;
}
.class-row span:not(.class-time) {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.pack-list {
  display: grid;
  gap: 8px;
}
.pack-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pack-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf0;
  font-size: 13px;
}
.timetable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.timetable-day {
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: 16px;
  padding: 12px;
}
.timetable-day.active {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 107, 95, 0.1);
}
.timetable-day h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.timetable-day p {
  margin: 6px 0;
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.35;
}
.timetable-day p strong {
  color: var(--muted);
  font-size: 11.5px;
}

@media (max-width: 760px) {
  .class-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }
  .pack-list.compact {
    grid-template-columns: 1fr;
  }
  .timetable-selector {
    width: 100%;
  }
}

/* v5 verification layer */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.last-opened-pill {
  font-size: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  white-space: nowrap;
}
.audit-nudge {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #f1d9a2;
  border-radius: 14px;
  background: #fff8e8;
  color: #6f5314;
  font-size: 13px;
  line-height: 1.45;
}
.completion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
}
.proof-line,
.time-line,
.proof-missing {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 8px;
  line-height: 1.2;
}
.proof-line {
  background: #eef8f2;
  color: #27604d;
  border: 1px solid #cfe8d9;
}
.time-line {
  background: #f4f7fb;
  color: #506074;
  border: 1px solid #dfe7f1;
}
.proof-missing {
  background: #fff5ea;
  color: #8a5417;
  border: 1px solid #f3d6b0;
  font-style: normal;
}
.planner-task-text em {
  display: block;
  width: fit-content;
  margin-top: 5px;
  font-size: 11.5px;
}
.audit-log-card {
  margin-top: 16px;
}
.audit-log-list {
  display: grid;
  gap: 10px;
}
.audit-row {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fbfcfa;
  border-radius: 14px;
}
.audit-row strong {
  font-size: 13.5px;
}
.audit-row span,
.audit-row em {
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
}
.audit-row em {
  color: #27604d;
}
@media (max-width: 760px) {
  .hero-actions {
    align-items: stretch;
    width: 100%;
  }
  .last-opened-pill {
    text-align: center;
  }
}

/* v7 Daily Homework + Schedule */
.nav-tabs { max-width: none; }
.homework-preview .homework-item.compact,
.activity-list.compact .activity-item.compact { margin-bottom: 8px; }
.homework-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.homework-board { display:flex; flex-direction:column; gap:14px; }
.homework-summary-strip { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; margin-bottom:4px; }
.homework-summary-strip > div { background:#fff; border:1px solid var(--line); border-radius:16px; padding:14px; box-shadow:0 8px 24px rgba(40,70,62,.05); }
.homework-summary-strip strong { display:block; color:var(--green); font-size:22px; line-height:1; }
.homework-summary-strip span { color:var(--muted); font-size:12px; }
.homework-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
.homework-group { background:rgba(255,255,255,.92); border:1px solid var(--line); border-radius:18px; padding:14px; box-shadow:0 10px 28px rgba(40,70,62,.055); }
.homework-group.overdue-group { border-color:#f2c7c2; background:#fff8f7; }
.homework-group.today-group { border-color:#c9dfd7; background:#fbfffd; }
.homework-group.tomorrow-group { border-color:#e8d39c; background:#fffdf5; }
.homework-list { display:flex; flex-direction:column; gap:8px; margin-top:10px; }
.homework-item { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:flex-start; border:1px solid #e7eee9; background:#fff; border-radius:14px; padding:11px 12px; }
.homework-item.compact { padding:10px; grid-template-columns:auto 1fr; }
.homework-item.done { opacity:.72; background:#f8fbf9; }
.homework-item input[type="checkbox"] { margin-top:3px; width:18px; height:18px; accent-color:var(--green); }
.homework-title { display:flex; align-items:center; gap:8px; flex-wrap:wrap; line-height:1.35; }
.homework-title strong { font-size:14px; }
.homework-meta { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-top:6px; font-size:12px; color:var(--muted); }
.subject-pill { display:inline-flex; align-items:center; border-radius:999px; padding:3px 7px; background:#edf5f1; color:var(--green); font-size:11px; font-weight:800; }
.status-badge.danger { background:var(--red-light); color:var(--red); border-color:#f1c7c2; }
.homework-preview .planner-item-actions { display:none; }
.activity-list { display:flex; flex-direction:column; gap:8px; }
.activity-item { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; border:1px solid #e7eee9; background:#fff; border-radius:14px; padding:11px 12px; }
.activity-item.compact { grid-template-columns:auto 1fr; }
.activity-item.compact button { display:none; }
.activity-item strong { display:block; font-size:14px; }
.activity-item span { color:var(--muted); font-size:12px; }
.activity-item .type-badge { color:var(--green); background:#edf5f1; border-color:#d4e6df; }
.activity-item button { border:0; background:transparent; color:var(--muted); font-size:12px; font-weight:700; }
.activity-item button:hover { color:var(--red); }
.schedule-preview-card .empty-small,
.homework-preview-card .empty-small { text-align:left; }
#planner .page-header .muted { max-width: 720px; }
@media (max-width: 780px) {
  .homework-summary-strip { grid-template-columns: repeat(2, 1fr); }
  .homework-grid { grid-template-columns: 1fr; }
  .homework-item { grid-template-columns:auto 1fr; }
  .homework-item .planner-item-actions { grid-column: 2; justify-content:flex-start; }
  .activity-item { grid-template-columns:auto 1fr; }
  .activity-item button { grid-column:2; justify-self:start; }
}

/* v8 Daily streak */
.streak-card { position: relative; overflow: hidden; }
.streak-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 92px; height: 92px; border-radius: 50%; background: rgba(242, 184, 75, .16); }
.streak-number { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; }
.streak-number .flame { font-size: 24px; line-height: 1; }
.streak-number strong { font-size: 40px; line-height: .9; letter-spacing: -0.06em; color: var(--ink); }
.streak-number span:last-child { color: var(--muted); font-weight: 700; }
.streak-dots { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
.streak-dot { width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #edf2ef; color: var(--muted); border: 1px solid var(--line); }
.streak-dot.done { background: var(--amber-light); color: #8a5b05; border-color: #f1d28e; }
.streak-dot.today { outline: 2px solid rgba(242, 184, 75, .45); }
.streak-card.checked-in #dailyCheckinBtn { background: #edf2ef; color: var(--muted); box-shadow: none; }
@media (max-width: 980px) { .four-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .four-cols { grid-template-columns: 1fr; } .streak-number strong { font-size: 34px; } }

/* v9: keep navigation on one line */
.topbar { overflow: hidden; }
.nav-tabs { min-width: 0; }
@media (max-width: 760px) {
  .brand-mark { width: 36px; height: 36px; border-radius: 12px; font-size: 17px; }
  .brand-block p { font-size: 11px; }
  h1 { font-size: 18px; }
}

@media (max-width: 760px) { .language-switch { margin-left: auto; } .lang-btn { padding: 5px 8px; font-size: 11px; } }
