:root {
  --bg: #f3f6f7;
  --surface: #ffffff;
  --surface-soft: #f8fbfb;
  --surface-mint: #e3faf6;
  --line: #d9e4ea;
  --line-strong: #c8d6dd;
  --text: #08213d;
  --muted: #66758b;
  --muted-2: #94a3b8;
  --primary: #0d7f86;
  --primary-dark: #075b62;
  --primary-soft: #c8f6ef;
  --lime: #cdf41f;
  --lime-soft: #f1ffd2;
  --blue: #4077d6;
  --amber: #d6961e;
  --red: #d95f5f;
  --violet: #7b61d1;
  --shadow: 0 16px 48px rgba(6, 31, 49, 0.08);
  --radius: 8px;
  --sidebar: 72px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex: 0 0 auto;
}

.page-shell {
  min-height: 100vh;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.92fr) minmax(420px, 1.08fr);
  background: var(--surface);
}

.login-brand {
  min-height: 100vh;
  padding: 48px;
  background: #06292d;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.login-brand > * {
  position: relative;
  z-index: 1;
}

.brand-logo-box {
  width: min(360px, 78vw);
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
}

.brand-logo-box img {
  width: 100%;
  height: auto;
}

.brand-copy {
  max-width: 520px;
  margin-top: 72px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.brand-copy h1 {
  margin: 0;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.65;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 48px;
}

.login-stat {
  min-height: 96px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.login-stat strong {
  display: block;
  color: #ffffff;
  font-size: 1.55rem;
}

.login-stat span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.82rem;
  line-height: 1.35;
}

.login-form-area {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-card {
  width: min(100%, 520px);
}

.login-card h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.login-card > p {
  margin: 12px 0 28px;
  color: var(--muted);
  line-height: 1.6;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.role-option {
  min-height: 106px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.role-option:hover,
.role-option.is-active {
  border-color: var(--primary);
  background: var(--surface-mint);
  box-shadow: 0 8px 24px rgba(13, 127, 134, 0.1);
}

.role-option strong {
  display: block;
  font-size: 0.92rem;
}

.role-option span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.field-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  outline: none;
  padding: 0 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 127, 134, 0.12);
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 8px 0;
}

.forgot-password {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  z-index: 5;
}

.side-logo {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #06292d;
  display: grid;
  place-items: center;
  padding: 7px;
}

.side-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.side-nav {
  width: 100%;
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.side-spacer {
  flex: 1;
}

.nav-button,
.icon-button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #52627a;
  display: grid;
  place-items: center;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-button:hover,
.icon-button:hover {
  background: var(--surface-mint);
  color: var(--primary-dark);
}

.nav-button.is-active {
  background: #bdf4ee;
  color: var(--primary-dark);
}

.nav-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  background: #bdf4ee;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 76px;
  background: rgba(243, 246, 247, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-title {
  min-width: 0;
}

.page-title h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.page-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions .select {
  width: auto;
  min-width: 150px;
}

.main {
  padding: 28px;
}

.section {
  margin-bottom: 24px;
}

.grid {
  display: grid;
  gap: 18px;
}

.dashboard-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.metric-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(8, 33, 61, 0.02);
}

.card,
.panel {
  padding: 20px;
}

.metric-card {
  min-height: 132px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-header,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.card-header h2,
.section-header h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.card-header p,
.section-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 16px;
}

.metric-value strong {
  font-size: 1.85rem;
  line-height: 1;
}

.metric-value span {
  color: var(--muted-2);
  font-size: 0.84rem;
  font-weight: 700;
}

.metric-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-pill,
.chip,
.segment-button {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.status-pill {
  min-height: 26px;
  padding: 0 10px;
  background: var(--surface-mint);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.status-pill.blue {
  background: #eaf1ff;
  color: #315fac;
}

.status-pill.amber {
  background: #fff5dd;
  color: #92610e;
}

.status-pill.red {
  background: #fff0ef;
  color: #a14242;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.chip.is-active {
  border-color: var(--primary);
  background: var(--surface-mint);
  color: var(--primary-dark);
}

.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover {
  background: var(--primary-dark);
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--surface-mint);
}

.button.ghost {
  background: transparent;
  color: var(--primary-dark);
}

.button.ghost:hover {
  background: var(--surface-mint);
}

.search-field {
  position: relative;
}

.search-field .icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.search-field .input {
  padding-left: 42px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.timeline-time {
  color: var(--primary-dark);
  font-weight: 900;
}

.timeline-title {
  min-width: 0;
}

.timeline-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.funnel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 220px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  gap: 1px;
}

.funnel-item {
  min-height: 88px;
  background: #eef3f5;
  border-left: 1px solid #dce6eb;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  position: relative;
}

.funnel-item strong {
  position: absolute;
  top: -28px;
  color: var(--text);
  font-size: 1.45rem;
}

.funnel-item:nth-child(1) {
  height: 190px;
}

.funnel-item:nth-child(2) {
  height: 150px;
}

.funnel-item:nth-child(3) {
  height: 116px;
}

.progress-list {
  display: grid;
  gap: 16px;
}

.progress-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 12px;
  align-items: center;
}

.progress-name {
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-track {
  height: 9px;
  border-radius: 999px;
  background: #e9eff3;
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: var(--value, 0%);
  border-radius: inherit;
  background: var(--primary);
}

.progress-row:nth-child(2n) .progress-fill {
  background: var(--blue);
}

.progress-row:nth-child(3n) .progress-fill {
  background: var(--amber);
}

.progress-value {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.unit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.unit-card {
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.unit-card strong {
  display: block;
  font-size: 0.95rem;
}

.unit-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.unit-meta {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agenda-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 284px;
  gap: 18px;
  align-items: start;
}

.calendar-panel {
  overflow: hidden;
}

.calendar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.calendar-grid {
  min-width: 980px;
  display: grid;
  grid-template-columns: 68px repeat(7, minmax(130px, 1fr));
  grid-auto-rows: 58px;
  background: var(--line);
  gap: 1px;
}

.calendar-cell,
.calendar-head,
.calendar-time {
  background: #ffffff;
  position: relative;
}

.calendar-head {
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  min-height: 58px;
}

.calendar-head small {
  display: block;
  color: var(--muted-2);
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-head strong {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  margin-top: 2px;
  border-radius: var(--radius);
  font-size: 0.88rem;
}

.calendar-head.is-today strong {
  background: var(--primary);
  color: #ffffff;
}

.calendar-time {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.calendar-cell {
  min-height: 58px;
}

.appointment {
  margin: 7px;
  padding: 8px;
  min-height: 44px;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface-mint);
  color: var(--primary-dark);
  display: grid;
  gap: 4px;
  overflow: hidden;
}

.appointment strong {
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment span {
  color: #41656a;
  font-size: 0.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.appointment.blue {
  border-color: var(--blue);
  background: #eaf1ff;
  color: #264f94;
}

.appointment.amber {
  border-color: var(--amber);
  background: #fff6e2;
  color: #7c5514;
}

.appointment.red {
  border-color: var(--red);
  background: #fff0ef;
  color: #943838;
}

.agenda-side {
  display: grid;
  gap: 14px;
}

.mini-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
}

.mini-calendar span {
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}

.mini-calendar .day-name {
  color: var(--muted-2);
  font-weight: 900;
}

.mini-calendar .selected {
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
}

.status-list {
  display: grid;
  gap: 10px;
}

.status-line {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.dot.blue {
  background: var(--blue);
}

.dot.amber {
  background: var(--amber);
}

.dot.red {
  background: var(--red);
}

.dot.violet {
  background: var(--violet);
}

.finance-layout {
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.finance-summary {
  display: grid;
  gap: 16px;
}

.finance-block {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.finance-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.finance-block h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
}

.money-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.money-row strong {
  color: var(--text);
  font-size: 1rem;
}

.chart-wrap {
  height: 260px;
  display: grid;
  align-items: end;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  padding: 18px 0 0;
  border-bottom: 1px solid var(--line);
}

.chart-bar {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-items: end;
  grid-template-rows: 1fr auto;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.bar-columns {
  height: 190px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
}

.bar {
  width: 18px;
  height: var(--h, 40%);
  border-radius: 5px 5px 0 0;
  background: var(--primary);
}

.bar.out {
  background: #9aa9b7;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.data-table th {
  padding: 12px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.person-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: #e2f8f5;
  color: var(--primary-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  padding: 0;
  overflow: hidden;
}

.person-cell strong {
  display: block;
}

.person-cell span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.profile-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.profile-placeholder {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #bdf4ee;
  color: var(--primary-dark);
  font-size: 1.45rem;
  font-weight: 900;
}

.tab-row {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.tab-button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 16px;
  font-weight: 800;
}

.tab-button.is-active {
  border-color: var(--primary);
  color: var(--text);
}

.teacher-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teacher-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.teacher-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.teacher-top strong {
  display: block;
}

.teacher-top span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.permission-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.permission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex: 0 0 auto;
}

.switch::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 150ms ease;
}

.switch.on {
  background: var(--primary);
}

.switch.on::after {
  transform: translateX(16px);
}

.assessment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-row {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.question-row strong {
  display: block;
  margin-bottom: 8px;
}

.question-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.attendance-grid {
  display: grid;
  gap: 10px;
}

.attendance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.attendance-row strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-row span {
  color: var(--muted);
  font-size: 0.76rem;
}

.clinic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(13, 127, 134, 0.22);
  border-radius: var(--radius);
  background: #effdf9;
}

.admin-banner h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-banner p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.empty-state {
  min-height: 240px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: var(--muted);
}

.empty-state strong {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 1.05rem;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f0f4f6;
  color: #677991;
  margin: 0 auto;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  min-width: 220px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: #06292d;
  color: #ffffff;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1180px) {
  .metric-grid,
  .teacher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .finance-layout,
  .agenda-layout,
  .assessment-layout,
  .split-layout {
    grid-template-columns: 1fr;
  }

  .agenda-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: auto;
    padding: 34px 24px;
  }

  .brand-copy {
    margin-top: 34px;
  }

  .brand-copy h1 {
    font-size: 2.15rem;
  }

  .login-stats {
    grid-template-columns: 1fr;
  }

  .login-form-area {
    min-height: auto;
    padding: 32px 22px 44px;
  }

  .role-grid,
  .unit-grid,
  .clinic-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 74px;
  }

  .sidebar {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    height: 74px;
    border-top: 1px solid var(--line);
    border-right: 0;
    flex-direction: row;
    justify-content: space-between;
    padding: 8px 12px;
  }

  .side-logo,
  .side-spacer,
  .sidebar .avatar,
  .sidebar .icon-button {
    display: none;
  }

  .side-nav {
    margin: 0;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    overflow-x: auto;
  }

  .nav-button {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
  }

  .topbar {
    position: static;
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .top-actions .select,
  .top-actions .button,
  .top-actions .icon-button {
    flex: 1 1 auto;
  }

  .main {
    padding: 18px;
  }

  .metric-grid,
  .teacher-grid,
  .agenda-side {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .timeline-row {
    grid-template-columns: 1fr;
  }

  .progress-row {
    grid-template-columns: 1fr auto;
  }

  .progress-track {
    grid-column: 1 / -1;
    order: 3;
  }

  .attendance-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .password-row {
    grid-template-columns: 1fr;
  }

  .login-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar,
  .toolbar-left,
  .toolbar-right {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .input,
  .select {
    width: 100%;
  }
}
