:root {
  --orange: #b94709;
  --orange-2: #e86422;
  --orange-soft: #fff1e8;
  --ink: #17232f;
  --ink-2: #344452;
  --muted: #72808b;
  --line: #e4e8eb;
  --surface: #ffffff;
  --canvas: #f5f7f8;
  --green: #1f8c62;
  --green-soft: #eaf7f1;
  --blue: #2e6e9e;
  --blue-soft: #eaf3fa;
  --purple: #7462a8;
  --red: #b13c3c;
  --shadow: 0 12px 34px rgba(26, 43, 56, .07);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); }
body { margin: 0; min-height: 100vh; font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
input, select, textarea { width: 100%; color: var(--ink); background: #fff; border: 1px solid #d7dde1; border-radius: 10px; padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--orange-2); box-shadow: 0 0 0 3px rgba(232, 100, 34, .12); }
textarea { resize: vertical; }
label { display: grid; gap: 6px; color: var(--ink-2); font-weight: 650; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 3vw, 42px); line-height: 1.12; letter-spacing: -.035em; }
h2 { margin-bottom: 4px; font-size: 20px; line-height: 1.25; letter-spacing: -.015em; }
h3 { margin-bottom: 4px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.align-right { text-align: right; }
.full-row { grid-column: 1 / -1; }

.topbar { position: sticky; z-index: 20; top: 0; height: 72px; padding: 0 34px; background: rgba(255,255,255,.95); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(190px, .8fr) minmax(360px, 2fr) minmax(220px, .8fr); align-items: center; gap: 24px; }
.brand, .auth-brand { display: flex; align-items: center; gap: 11px; }
.brand > span:last-child, .auth-brand > div { display: grid; line-height: 1.08; }
.brand strong, .auth-brand strong { font-size: 20px; letter-spacing: -.03em; }
.brand small, .auth-brand span { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, var(--orange-2), var(--orange)); color: #fff; display: inline-grid; place-items: center; font-weight: 850; box-shadow: 0 8px 18px rgba(185,71,9,.22); }
.brand-mark.large { width: 50px; height: 50px; font-size: 22px; border-radius: 15px; }
.main-nav { display: flex; justify-content: center; gap: 4px; overflow-x: auto; }
.main-nav a { color: #53616c; padding: 9px 12px; border-radius: 9px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--orange); background: var(--orange-soft); }
.user-menu { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; flex: 0 0 auto; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: white; font-weight: 800; }
.avatar.soft { color: var(--orange); background: var(--orange-soft); }
.avatar.xl { width: 58px; height: 58px; font-size: 22px; background: linear-gradient(145deg, var(--ink-2), var(--ink)); box-shadow: 0 9px 22px rgba(23,35,47,.18); }
.user-copy { display: grid; line-height: 1.2; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 11px; }
.link-button { border: 0; background: transparent; padding: 5px; color: var(--muted); font-weight: 700; }
.link-button:hover { color: var(--orange); }
.link-button.danger, .danger { color: var(--red); }

.page { max-width: 1480px; margin: 0 auto; padding: 32px 40px 70px; }
.site-footer { padding: 24px 40px 36px; color: #98a2aa; text-align: center; font-size: 12px; }
.page-heading { margin-bottom: 26px; }
.page-heading > p:last-child, .student-hero p, .student-welcome p { color: var(--muted); margin-bottom: 0; }
.heading-actions, .student-hero, .student-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin-bottom: 7px; color: var(--orange) !important; text-transform: uppercase; font-weight: 800; letter-spacing: .12em; font-size: 11px; }
.back-link { display: inline-block; margin-bottom: 7px; color: var(--muted); font-weight: 700; font-size: 13px; }
.back-link:hover, .text-link:hover { color: var(--orange); }

.button { appearance: none; width: auto; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-weight: 750; font-size: 13px; line-height: 1.2; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--orange-2), var(--orange)); box-shadow: 0 8px 18px rgba(185,71,9,.18); }
.button.secondary { color: var(--ink-2); border-color: var(--line); background: #fff; }
.button.light { color: var(--orange); background: #fff; }
.button.small { padding: 7px 10px; font-size: 12px; }
.button.wide { width: 100%; }
.button.icon-only { width: 40px; padding-left: 0; padding-right: 0; }
.button-group, .week-nav, .form-actions { display: flex; gap: 9px; align-items: center; }

.flash { position: relative; display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding: 13px 16px; border-radius: 11px; font-weight: 650; }
.flash button { border: 0; background: none; font-size: 20px; line-height: 1; }
.flash-success { color: #156a49; background: var(--green-soft); border: 1px solid #cbeadc; }
.flash-error { color: #8d3030; background: #fff0f0; border: 1px solid #f1cccc; }
.flash-info { color: #285d84; background: var(--blue-soft); border: 1px solid #cde1ef; }

.panel { background: var(--surface); border: 1px solid rgba(218,224,228,.9); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel-heading p { margin-bottom: 0; color: var(--muted); }
.text-link { color: var(--orange); font-weight: 750; font-size: 13px; }
.metric-grid { display: grid; gap: 16px; margin-bottom: 22px; }
.metric-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric-grid.compact .metric-card { min-height: 132px; }
.metric-card { min-width: 0; position: relative; min-height: 154px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; box-shadow: 0 8px 24px rgba(32,47,60,.045); }
.metric-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -55px; bottom: -58px; border-radius: 50%; background: var(--orange-soft); }
.metric-card.accent-green::after { background: var(--green-soft); }
.metric-card.accent-blue::after { background: var(--blue-soft); }
.metric-card.accent-purple::after { background: #f0edfa; }
.metric-label { color: var(--muted); font-weight: 700; font-size: 12px; }
.metric-card > strong { margin-top: auto; font-size: 30px; letter-spacing: -.04em; }
.metric-card > small { color: var(--muted); }
.metric-icon { position: absolute; right: 16px; top: 15px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--orange); background: var(--orange-soft); font-weight: 850; }
.accent-green .metric-icon { color: var(--green); background: var(--green-soft); }
.accent-blue .metric-icon { color: var(--blue); background: var(--blue-soft); }
.accent-purple .metric-icon { color: var(--purple); background: #f0edfa; }
.goal-card .goal-text { font-size: 18px; margin-top: 16px; line-height: 1.25; }
.meter, .mini-progress { width: 100%; height: 6px; margin-top: 13px; border-radius: 9px; background: #eef1f2; overflow: hidden; }
.meter i, .mini-progress i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--orange-2), var(--orange)); }
.meter.green i { background: var(--green); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 20px; margin-bottom: 22px; }
.span-2 { min-width: 0; }
.student-list { display: grid; }
.student-row { display: grid; grid-template-columns: 42px minmax(150px, 1.1fr) minmax(150px, 1fr) 85px 20px; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid #edf0f2; }
.student-row:first-child { border-top: 0; }
.student-row:hover { background: #fbfcfc; }
.student-name, .identity span, .studies-mini span { display: grid; }
.student-name small, .identity small, .timeline small, .exam-list-item small, .field-note { color: var(--muted); font-size: 11px; }
.progress-cell { display: grid; gap: 5px; color: var(--muted); font-size: 11px; }
.progress-cell b { color: var(--ink); }
.progress-cell i { height: 5px; background: #edf0f2; border-radius: 6px; overflow: hidden; }
.progress-cell em { display: block; height: 100%; background: var(--green); }
.net-cell { display: grid; text-align: right; }
.net-cell strong { font-size: 18px; }
.net-cell small { color: var(--muted); font-size: 10px; }
.chevron { color: #a6afb6; font-size: 24px; }
.timeline { display: grid; gap: 18px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 16px 1fr; gap: 10px; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 16px; width: 1px; height: calc(100% + 12px); background: var(--line); }
.timeline-dot { z-index: 1; width: 11px; height: 11px; margin-top: 5px; border: 3px solid #fff; outline: 2px solid var(--orange-2); border-radius: 50%; background: var(--orange-2); }
.timeline p { margin: 1px 0; color: var(--ink-2); }
.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state.small { padding: 22px 10px; }
.empty-state.standalone { min-height: 65vh; display: grid; place-content: center; justify-items: center; }
.error-code { color: var(--orange); font-size: 70px; font-weight: 900; }

.table-wrap { overflow-x: auto; }
.data-table, .habit-table { width: 100%; border-collapse: collapse; }
.data-table th, .habit-table th { padding: 10px 12px; color: var(--muted); background: #f7f9fa; border-bottom: 1px solid var(--line); text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.data-table td, .habit-table td { padding: 12px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table.dense td { padding: 9px 10px; }
.data-table td small { display: block; color: var(--muted); }
.identity { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.pill { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; color: var(--ink-2); background: #eef1f3; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pill.orange { color: var(--orange); background: var(--orange-soft); }
.pill.blue { color: var(--blue); background: var(--blue-soft); }
.pill.green { color: var(--green); background: var(--green-soft); }
.pill.muted { color: var(--muted); background: #eef1f3; }

.form-layout { display: grid; gap: 18px; }
.form-section { display: grid; grid-template-columns: 46px minmax(180px, .45fr) minmax(0, 1.55fr); gap: 20px; align-items: start; }
.section-number { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--orange); font-weight: 850; }
.section-copy p { color: var(--muted); font-size: 13px; }
.form-grid { display: grid; gap: 15px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.baseline-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.inline-fields { display: grid; grid-template-columns: 1fr 100px; gap: 8px; }
.form-submit { display: flex; justify-content: flex-end; }
.form-actions { justify-content: flex-end; }
.stack-form { display: grid; gap: 15px; }
.compact-form { gap: 10px; }

.student-hero { margin-bottom: 18px; }
.student-hero.slim { align-items: center; }
.student-hero-main { display: flex; align-items: center; gap: 15px; }
.student-hero h1 { margin-bottom: 4px; }
.subnav { display: flex; gap: 4px; margin: 0 0 22px; padding: 5px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow-x: auto; }
.subnav a { padding: 9px 13px; border-radius: 8px; color: var(--muted); font-weight: 750; font-size: 12px; white-space: nowrap; }
.subnav a.active { color: #fff; background: var(--ink); }
.profile-grid { align-items: start; }
.account-panel hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.account-email { display: grid; margin-bottom: 18px; padding: 14px; border-radius: 11px; background: #f7f9fa; }
.account-email span { color: var(--muted); font-size: 11px; }
.simple-list { display: grid; }
.simple-list > div { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 10px 0; border-bottom: 1px solid #edf0f2; }
.exam-strip { height: 210px; display: flex; align-items: flex-end; gap: 16px; padding: 20px 5px 0; }
.exam-point { height: 100%; min-width: 50px; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.exam-point i { width: min(36px, 70%); min-height: 8px; border-radius: 7px 7px 2px 2px; background: linear-gradient(180deg, var(--orange-2), var(--orange)); }
.exam-point small { color: var(--muted); font-size: 10px; }

.note-panel, .collapsible-panel, .quick-add, .habits-panel { margin-bottom: 20px; }
.inline-note-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.week-board { display: grid; grid-template-columns: repeat(7, minmax(175px, 1fr)); gap: 12px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.day-card { min-height: 330px; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; box-shadow: 0 8px 24px rgba(32,47,60,.04); }
.day-card.today { border-color: #efad84; box-shadow: 0 0 0 3px var(--orange-soft); }
.day-card > header { padding: 15px; border-bottom: 1px solid var(--line); background: #f9fafb; display: grid; }
.day-card.today > header { background: var(--orange-soft); }
.day-card header > span { color: var(--orange); text-transform: uppercase; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.day-card header > strong { font-size: 16px; }
.day-card header > small { color: var(--muted); }
.day-tasks { display: grid; gap: 9px; padding: 10px; }
.day-empty { color: #9da6ad; text-align: center; font-size: 12px; margin-top: 40px; }
.task-item { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 9px; align-items: start; padding: 10px; border: 1px solid #ebeff1; border-radius: 11px; background: #fff; }
.task-item > div { display: grid; }
.task-item strong { font-size: 13px; line-height: 1.3; }
.task-item small { color: var(--muted); font-size: 10px; }
.task-item.done strong { color: var(--muted); text-decoration: line-through; }
.task-subject { color: var(--orange); text-transform: uppercase; font-weight: 800; font-size: 9px; letter-spacing: .05em; }
.check-button, .habit-check { width: 23px; height: 23px; padding: 0; border: 1.5px solid #cbd3d8; border-radius: 7px; background: #fff; color: #fff; font-weight: 900; }
.task-item.done .check-button, .habit-check.done { border-color: var(--green); background: var(--green); }
.delete-button { border: 0; background: transparent; color: #a0a9af; font-size: 20px; line-height: 1; padding: 0 3px; }
.delete-button:hover { color: var(--red); }
.task-form { grid-template-columns: 150px 180px minmax(200px,1fr) minmax(200px,1fr) auto; align-items: end; }
.align-end { align-self: end; min-height: 41px; }
.habit-table th:not(:first-child), .habit-table td:not(:first-child) { text-align: center; }
.habit-table th small { display: block; color: #a2abb1; }
.habit-check { margin: auto; }
.inline-add { display: grid; grid-template-columns: minmax(200px, 420px) auto; gap: 9px; margin-top: 16px; }

.formula-note { color: var(--orange); border-radius: 8px; background: var(--orange-soft); padding: 7px 10px; font-size: 11px; font-weight: 700; }
.study-form { grid-template-columns: repeat(5, minmax(110px,1fr)); align-items: end; }
.study-form .grow { grid-column: span 2; }
.exam-form { display: grid; gap: 16px; }
.result-entry { max-height: 440px; border: 1px solid var(--line); border-radius: 12px; }
.result-entry th { position: sticky; top: 0; z-index: 2; }
.result-entry input { min-width: 80px; padding: 7px 9px; }
.exam-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.7fr); gap: 20px; }
.exam-list { display: grid; gap: 8px; }
.exam-list-item { display: grid; grid-template-columns: 45px 1fr 55px; align-items: center; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 11px; }
.exam-list-item:hover, .exam-list-item.active { border-color: #f0c3a9; background: var(--orange-soft); }
.exam-date { width: 40px; height: 44px; border-radius: 9px; background: #f0f3f5; display: grid; place-content: center; text-align: center; line-height: 1; }
.exam-date small { margin-top: 3px; text-transform: uppercase; }
.exam-net { display: grid; text-align: right; }
.score-badge { width: 92px; height: 92px; border-radius: 50%; display: grid; place-content: center; text-align: center; color: var(--orange); background: conic-gradient(var(--orange-soft), #fff); border: 7px solid var(--orange-soft); }
.score-badge strong { font-size: 24px; }
.score-badge span { font-size: 9px; text-transform: uppercase; }
.result-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.result-card { display: grid; padding: 15px; border-radius: 12px; background: #f7f9fa; }
.result-card > span { color: var(--muted); font-size: 11px; }
.result-card > strong { font-size: 24px; }
.result-card > small { color: var(--muted); }
.result-card small b { color: var(--green); }
.note-box { margin-top: 16px; padding: 14px; border-left: 3px solid var(--orange); background: var(--orange-soft); }
.note-box p { margin: 4px 0 0; }
.danger-zone { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }

.topic-total { display: grid; min-width: 120px; padding: 12px 18px; border-radius: 14px; background: var(--green-soft); text-align: center; }
.topic-total strong { color: var(--green); font-size: 24px; }
.topic-total span { color: var(--muted); font-size: 10px; }
.topic-groups { display: grid; gap: 18px; }
.topic-panel .mini-progress { width: 140px; }
.topic-panel .mini-progress i { background: var(--green); }
.topic-list { display: grid; }
.topic-row { display: grid; grid-template-columns: 12px minmax(180px, 1fr) minmax(170px, .7fr) 150px auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid #edf0f2; }
.topic-row.readonly { grid-template-columns: 12px minmax(180px, 1fr) minmax(170px, .7fr) 120px; }
.topic-row input, .topic-row select { padding: 8px 9px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #c6cdd2; }
.status-dot.in_progress { background: #e7a82e; }
.status-dot.completed { background: var(--green); }
.status-label { justify-self: end; padding: 4px 8px; border-radius: 99px; background: #eef1f2; color: var(--muted); font-size: 10px; font-weight: 800; }
.status-label.in_progress { color: #8c630c; background: #fff6df; }
.status-label.completed { color: var(--green); background: var(--green-soft); }

.month-picker { display: flex; align-items: center; gap: 9px; }
.month-picker input { width: auto; }
.report-grid { align-items: stretch; }
.change-list { display: grid; gap: 13px; }
.change-row { display: grid; grid-template-columns: 140px minmax(120px,1fr) 55px 70px; gap: 10px; align-items: center; }
.change-track { height: 7px; border-radius: 9px; background: #edf0f2; overflow: hidden; }
.change-track i { display: block; height: 100%; }
.change-track i.positive { background: var(--green); }
.change-track i.negative { background: #d45f5f; }
.positive-text { color: var(--green); }
.negative-text { color: var(--red); }
.change-row small { color: var(--muted); text-align: right; }
.trend-chart { height: 230px; display: flex; align-items: flex-end; gap: 10px; padding-top: 30px; }
.trend-chart > div { height: 100%; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.trend-chart i { width: 68%; min-height: 4px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--orange-2), var(--orange)); }
.trend-chart strong { font-size: 11px; }
.trend-chart small { color: var(--muted); font-size: 9px; }
.report-notes-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.report-prose { white-space: pre-line; color: var(--ink-2); }

.student-welcome { margin-bottom: 22px; }
.date-chip { padding: 11px 15px; border-radius: 99px; color: var(--muted); background: #fff; border: 1px solid var(--line); font-weight: 700; }
.student-focus { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, .8fr); gap: 18px; margin-bottom: 18px; }
.focus-card { position: relative; overflow: hidden; min-height: 240px; padding: 30px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #c65315, #8f3307); box-shadow: 0 16px 36px rgba(185,71,9,.22); }
.focus-card::after { content: ""; position: absolute; right: -70px; top: -100px; width: 260px; height: 260px; border: 55px solid rgba(255,255,255,.1); border-radius: 50%; }
.focus-card .eyebrow { color: #ffe0cf !important; }
.focus-card h2 { max-width: 700px; font-size: 28px; }
.focus-card p { max-width: 700px; color: #ffe7da; }
.focus-card .button { position: absolute; bottom: 25px; left: 30px; }
.completion-ring-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.completion-ring-card > div:last-child { display: grid; text-align: center; }
.completion-ring-card span { color: var(--muted); font-size: 11px; }
.css-ring { --progress: 0; width: 140px; height: 140px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--progress) * 1%), #e8eeeb 0); display: grid; place-items: center; }
.css-ring::before { content: ""; width: 106px; height: 106px; border-radius: 50%; background: #fff; grid-area: 1/1; }
.css-ring > span { z-index: 1; grid-area: 1/1; display: grid; text-align: center; }
.css-ring strong { color: var(--ink); font-size: 26px; }
.student-tasks { display: grid; gap: 10px; }

.auth-shell { background: #fff; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, .85fr) minmax(520px, 1.15fr); }
.auth-card { width: min(420px, calc(100% - 48px)); margin: auto; }
.auth-heading { margin: 58px 0 28px; }
.auth-heading h1 { font-size: 36px; }
.auth-heading > p:last-child { color: var(--muted); }
.auth-help { margin-top: 20px; color: var(--muted); text-align: center; font-size: 12px; }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 70px; color: #fff; background: linear-gradient(145deg, #17232f, #293b48); }
.visual-copy { position: relative; z-index: 2; max-width: 520px; }
.visual-copy h2 { font-size: 38px; line-height: 1.15; }
.visual-copy p { color: #b9c5cc; }
.visual-orbit { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.orbit-one { width: 700px; height: 700px; top: -220px; right: -210px; }
.orbit-two { width: 480px; height: 480px; top: -70px; right: -60px; }
.visual-card { position: absolute; top: 22%; right: 15%; z-index: 2; width: 240px; height: 280px; padding: 25px; border: 1px solid rgba(255,255,255,.18); border-radius: 24px; background: rgba(255,255,255,.1); box-shadow: 0 30px 60px rgba(0,0,0,.25); backdrop-filter: blur(15px); transform: rotate(3deg); display: flex; flex-direction: column; }
.visual-card .mini-label { color: #cdd7dc; text-transform: uppercase; font-size: 10px; letter-spacing: .12em; }
.visual-card > strong { margin-top: auto; font-size: 64px; letter-spacing: -.07em; }
.visual-card > span { color: #d8e0e4; }
.mini-bars { height: 50px; display: flex; align-items: flex-end; gap: 6px; margin-top: 18px; }
.mini-bars i { flex: 1; border-radius: 4px 4px 1px 1px; background: #f07a3f; }
.mini-bars i:nth-child(1) { height: 35%; }.mini-bars i:nth-child(2) { height: 52%; }.mini-bars i:nth-child(3) { height: 68%; }.mini-bars i:nth-child(4) { height: 45%; }.mini-bars i:nth-child(5) { height: 77%; }.mini-bars i:nth-child(6) { height: 87%; }.mini-bars i:nth-child(7) { height: 100%; }

.print-body { background: #eef1f2; }
.print-report { max-width: 980px; margin: 30px auto 100px; padding: 48px; background: #fff; box-shadow: var(--shadow); }
.print-header { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 25px; border-bottom: 3px solid var(--orange); }
.print-header > div:last-child { text-align: right; }
.print-header h1 { font-size: 28px; margin: 0; }
.print-header p { margin: 0; color: var(--orange); font-weight: 800; text-transform: capitalize; }
.print-student { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.print-student div { display: grid; }
.print-student span { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.print-metrics { margin-top: 22px; }
.print-metrics .metric-card { min-height: 105px; }
.print-metrics .metric-card > strong { font-size: 24px; }
.print-section { margin-top: 26px; }
.print-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 26px; }
.print-notes article { min-height: 140px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.print-notes .full { grid-column: 1 / -1; min-height: 100px; }
.print-notes p { white-space: pre-line; }
.print-footer { display: flex; justify-content: space-between; margin-top: 35px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.print-actions { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 9px; padding: 8px; border-radius: 13px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.15); }

@media (max-width: 1100px) {
  .topbar { grid-template-columns: auto 1fr auto; padding: 0 20px; }
  .user-copy { display: none; }
  .page { padding-left: 22px; padding-right: 22px; }
  .metric-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section { grid-template-columns: 40px 1fr; }
  .form-section .full-row { grid-column: 1 / -1; }
  .task-form, .study-form { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .exam-meta { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
  .auth-visual { padding: 40px; }
}

@media (max-width: 780px) {
  .topbar { height: auto; min-height: 70px; grid-template-columns: 1fr auto; padding: 10px 15px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-bottom: 2px; }
  .user-menu .avatar, .user-menu .link-button { display: none; }
  .page { padding: 24px 14px 60px; }
  .heading-actions, .student-hero, .student-welcome { align-items: flex-start; flex-direction: column; }
  .student-hero-main { align-items: flex-start; }
  .student-hero .avatar { width: 46px; height: 46px; }
  .dashboard-grid, .exam-layout, .student-focus, .report-notes-grid { grid-template-columns: 1fr; }
  .metric-grid.three, .metric-grid.four { grid-template-columns: 1fr 1fr; }
  .student-row { grid-template-columns: 38px 1fr 20px; }
  .student-row .progress-cell, .student-row .net-cell { display: none; }
  .form-grid.two, .baseline-grid, .form-grid.five { grid-template-columns: 1fr; }
  .form-section { grid-template-columns: 35px 1fr; padding: 17px; }
  .section-copy { grid-column: 2; }
  .task-form, .study-form { grid-template-columns: 1fr 1fr; }
  .task-form .grow, .study-form .grow { grid-column: span 2; }
  .topic-row, .topic-row.readonly { grid-template-columns: 12px 1fr; }
  .topic-row input, .topic-row select, .topic-row button, .topic-row > span:last-child { grid-column: 2; }
  .result-cards { grid-template-columns: 1fr 1fr; }
  .change-row { grid-template-columns: 110px 1fr 45px; }
  .change-row small { grid-column: 2 / -1; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-card { padding: 40px 0; }
  .auth-visual { display: none; }
  .print-report { margin: 0; padding: 22px; }
  .print-student { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 500px) {
  h1 { font-size: 28px; }
  .metric-grid.three, .metric-grid.four { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .button-group, .month-picker { width: 100%; flex-wrap: wrap; }
  .button-group .button { flex: 1; }
  .task-form, .study-form { grid-template-columns: 1fr; }
  .task-form .grow, .study-form .grow { grid-column: auto; }
  .inline-note-form { grid-template-columns: 1fr; }
  .result-cards { grid-template-columns: 1fr; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body, .print-body { background: #fff !important; }
  .topbar, .site-footer, .subnav, .flash, .print-actions, .month-picker, .report-editor, .button { display: none !important; }
  .page, .print-report { max-width: none; margin: 0; padding: 0; box-shadow: none; }
  .panel, .metric-card { box-shadow: none; break-inside: avoid; }
  .student-hero { margin-bottom: 12px; }
  .print-report { display: block; }
  .print-notes article { break-inside: avoid; }
}
