:root {
  --accent: #7447f7;
  --gold: #d8ff00;
  --navy: #23244f;
  --fanus-green: #31ef4d;
  --fanus-pink: #f73ca7;
  --fanus-cyan: #46cce7;
  --ink: #20213f;
  --muted: #73748f;
  --line: #e1def1;
  --paper: #f7f5ff;
  --panel: #ffffff;
  --danger: #b3261e;
  --modal-scale: 1;
}

.student-study-topbar {
  align-items: flex-start;
  gap: 16px;
}

.student-week-controls {
  margin-left: auto;
}

.student-week-controls button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.student-progress-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.student-progress-card,
.student-subject-progress,
.student-week-program,
.student-resource-summary {
  border: 1px solid #ded8fb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(35, 28, 83, .06);
}

.student-progress-card {
  padding: 14px 16px;
  border-left: 5px solid #54d5eb;
}

.student-progress-card span {
  display: block;
  color: #767493;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.student-progress-card strong {
  display: block;
  margin-top: 5px;
  color: #202044;
  font-size: 1.55rem;
  line-height: 1;
}

.student-progress-card small {
  display: block;
  margin-top: 7px;
  color: #767493;
  font-weight: 800;
}

.student-progress-card.green {
  border-left-color: #2eed55;
}

.student-progress-card.purple {
  border-left-color: #7b2df2;
}

.student-progress-card.pink {
  border-left-color: #f7359f;
}

.student-subject-progress,
.student-week-program,
.student-resource-summary {
  padding: clamp(10px, 1vw, 16px);
}

.student-subject-progress {
  margin-bottom: 16px;
}

.student-subject-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-subject-list article,
.student-resource-card {
  border: 1px solid #ece8ff;
  border-radius: 10px;
  background: #fbfaff;
  padding: 12px;
}

.student-subject-list strong {
  display: block;
  color: #222246;
  font-size: .98rem;
}

.student-subject-list span,
.student-resource-card small {
  display: block;
  margin-top: 4px;
  color: #767493;
  font-size: .82rem;
  font-weight: 800;
}

.student-progress-bar {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeeafc;
}

.student-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #54d5eb, #8d39f5);
}

.student-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.student-week-head h3 {
  margin: 0;
  color: #202044;
  font-size: 1.25rem;
}

.student-week-head p {
  margin: 4px 0 0;
  color: #767493;
  font-weight: 800;
}

.student-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.student-day-card {
  container-type: inline-size;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e7e2fb;
  border-radius: 10px;
  background: #fdfcff;
}

.student-day-card > header {
  padding: 8px 9px;
  border-bottom: 1px solid #e1dcf3;
  background: #f4f1fb;
}

.student-day-card > header strong {
  display: block;
  color: #202044;
  font-size: .9rem;
}

.student-day-card > header span {
  color: #767493;
  font-size: .78rem;
  font-weight: 800;
}

.student-study-task {
  margin: 7px;
  padding: 7px;
  border: 1px solid #dcd7f5;
  border-radius: 8px;
  background: #fff;
}

.student-task-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
}

.student-task-top b {
  max-width: 100%;
  color: #202044;
  font-size: clamp(.78rem, .78vw, 1rem);
  line-height: 1.08;
  overflow: visible;
  overflow-wrap: normal;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
}

.student-task-top time {
  color: #3b4a45;
  font-size: clamp(.68rem, .72vw, .82rem);
  font-weight: 900;
  line-height: 1.05;
  white-space: normal;
}

.student-study-task small {
  display: block;
  margin-top: 5px;
  color: #5e6b66;
  font-size: clamp(.66rem, .7vw, .75rem);
  font-weight: 900;
  line-height: 1.12;
  overflow-wrap: break-word;
}

.student-study-task p {
  margin: 6px 0 8px;
  color: #202044;
  font-size: clamp(.68rem, .72vw, .76rem);
  font-weight: 850;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.student-status-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-bottom: 6px;
}

.student-status-buttons button {
  min-width: 0;
  min-height: 31px;
  border: 1px solid #d9d0ff;
  border-radius: 7px;
  background: #f7f4ff;
  color: #6542d8;
  font-size: clamp(.58rem, .62vw, .68rem);
  font-weight: 900;
  line-height: 1.05;
  overflow: visible;
  overflow-wrap: normal;
  padding: 3px 4px;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
}

.student-status-buttons button:nth-child(3) {
  grid-column: auto;
}

.student-status-buttons button.active {
  border-color: #7c4df4;
  background: linear-gradient(90deg, #54d5eb, #8d39f5);
  color: #fff;
  box-shadow: 0 8px 18px rgba(116, 71, 247, .18);
}

.student-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.student-result-grid label {
  color: #767493;
  font-size: clamp(.58rem, .62vw, .68rem);
  font-weight: 900;
  line-height: 1.05;
  overflow-wrap: normal;
  white-space: normal;
  word-break: normal;
}

.student-result-grid input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ded8fb;
  border-radius: 7px;
  color: #202044;
  font-size: clamp(.68rem, .72vw, .76rem);
  font-weight: 900;
  min-height: 31px;
  padding: 3px 5px;
}

.student-empty-day {
  margin: 14px 10px;
  color: #87849b;
  font-size: .82rem;
  font-weight: 800;
}

.student-resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-resource-card {
  background: #fff;
}

.assigned-resource-card {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  min-height: 138px;
  overflow: hidden;
}

.assigned-resource-cover {
  display: grid;
  min-height: 114px;
  place-items: center;
  border: 1px solid #ece8ff;
  border-radius: 8px;
  background: #f4fbf8;
}

.assigned-resource-cover img {
  width: 100%;
  height: 114px;
  object-fit: contain;
}

.assigned-resource-cover span {
  color: var(--accent);
  font-size: 30px;
}

.assigned-resource-body {
  min-width: 0;
  padding-right: 58px;
}

.resource-percent {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 46px;
  padding: 7px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #54d5eb, #7447f7);
  font-size: .82rem;
  text-align: center;
}

.resource-assign-panel form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  min-width: min(520px, 100%);
}

.resource-assign-panel {
  flex-wrap: wrap;
}

.resource-assign-panel > div {
  min-width: min(320px, 100%);
}

.resource-assign-panel form select,
.resource-assign-panel form button {
  min-width: 0;
}

.student-resource-card span {
  color: #767493;
  font-size: .75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-resource-card strong {
  display: block;
  margin-top: 5px;
  color: #202044;
  font-size: 1.05rem;
}

@media (max-width: 1200px) {
  .student-week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .resource-assign-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-assign-panel form {
    width: 100%;
  }
}

@container workspace (max-width: 1120px) {
  .student-week-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@container workspace (min-width: 1121px) {
  .student-week-program {
    padding: 10px;
  }

  .student-week-head {
    margin-bottom: 10px;
  }

  .student-week-head h3 {
    font-size: clamp(1rem, 1.45vw, 1.25rem);
  }

  .student-week-head p {
    font-size: clamp(.78rem, 1vw, 1rem);
  }

  .student-day-card > header strong {
    font-size: clamp(.78rem, .82vw, .9rem);
  }

  .student-day-card > header span {
    font-size: clamp(.68rem, .72vw, .78rem);
  }
}

@container (max-width: 145px) {
  .student-status-buttons {
    grid-template-columns: 1fr;
  }

  .student-status-buttons button:nth-child(3) {
    grid-column: auto;
  }

  .student-status-buttons button {
    min-height: 28px;
  }
}

@media (max-width: 720px) {
  .student-week-grid,
  .student-progress-grid,
  .student-subject-list,
  .student-resource-grid {
    grid-template-columns: 1fr;
  }

  .student-week-controls {
    width: 100%;
  }
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body { max-width: 100%; margin: 0; overflow-x: hidden; color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f4f3ff; }
img, video, canvas, svg { max-width: 100%; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
button, input, select, textarea { font: inherit; }
button { min-height: 40px; border: 0; border-radius: 9px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 700; padding: 0 14px; }
button:hover { filter: brightness(.96); }
button:disabled { cursor: not-allowed; opacity: .45; filter: none; }
input, select, textarea { width: 100%; min-height: 40px; border: 1px solid #d7d2ee; border-radius: 9px; color: var(--ink); background: #fff; padding: 9px 10px; }
textarea { resize: vertical; }
label { display: grid; gap: 6px; color: #37463d; font-size: 13px; font-weight: 700; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.ghost { color: var(--accent); background: #f3efff; border: 1px solid #dcd4fb; }
.danger { color: var(--danger); background: #fff0ee; border-color: #f3c6c1; }
.compact-button { min-height: 34px; }

.login-screen { position: relative; height: 100vh; min-height: 0; display: grid; grid-template-columns: minmax(380px, 1.05fr) minmax(360px, .95fr); place-items: stretch; overflow: hidden; padding: 0; background: #f7f5ff; }
.login-landing-nav { position: absolute; z-index: 4; top: 26px; left: clamp(28px, 5vw, 76px); display: flex; gap: 8px; align-items: center; max-width: calc(100vw - 56px); padding: 8px; overflow-x: auto; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.14); box-shadow: 0 18px 44px rgba(27, 22, 79, .12); backdrop-filter: blur(16px); }
.login-landing-nav button { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 8px 14px; border: 0; border-radius: 999px; color: #fff; background: transparent; font-size: 13px; font-weight: 900; text-decoration: none; cursor: pointer; }
.login-landing-nav button:hover { background: rgba(255,255,255,.16); }
.login-hero { position: relative; display: grid; align-content: space-between; gap: clamp(18px, 3vh, 32px); min-height: 100vh; overflow: hidden; padding: clamp(34px, 5vw, 70px); color: #fff; background: linear-gradient(150deg, #5525e9 0%, #823cf8 42%, #f237a9 100%); }
.login-hero::before, .login-hero::after { content: ""; position: absolute; pointer-events: none; opacity: .22; }
.login-hero::before { width: 58%; height: 34%; right: -12%; top: 0; background: #50d7e9; transform: skew(-18deg) rotate(8deg); }
.login-hero::after { width: 42%; height: 30%; left: -18%; bottom: -5%; background: #5ae6f0; transform: skew(-18deg) rotate(8deg); }
.login-hero-brand-logo { position: absolute; z-index: 2; top: -22px; right: clamp(54px, 8vw, 118px); width: clamp(130px, 12vw, 190px); height: auto; object-fit: contain; mix-blend-mode: screen; filter: drop-shadow(0 16px 34px rgba(27, 22, 79, .12)); }
.login-hero-copy { position: relative; z-index: 1; display: grid; gap: clamp(14px, 2vh, 20px); max-width: 590px; margin-top: clamp(100px, 16vh, 150px); }
.login-hero-copy span, .login-eyebrow { color: #ff4fb0; font-size: 13px; font-weight: 900; letter-spacing: 3px; }
.login-hero-copy span { color: var(--gold); }
.login-hero-copy h1 { max-width: 620px; color: #fff; font-size: clamp(42px, 4.6vw, 64px); line-height: 1.06; }
.login-hero-copy p { max-width: 560px; color: rgba(255,255,255,.88); font-size: clamp(18px, 1.55vw, 23px); line-height: 1.35; }
.login-color-strip { position: relative; z-index: 1; display: flex; width: min(560px, 100%); height: 18px; overflow: hidden; border-radius: 999px; }
.login-color-strip i { flex: 1; }
.login-color-strip i:nth-child(1) { background: #49cde8; }
.login-color-strip i:nth-child(2) { background: #31ef4d; }
.login-color-strip i:nth-child(3) { background: #fff24a; }
.login-color-strip i:nth-child(4) { background: #ff9dd0; }
.login-color-strip i:nth-child(5) { background: #ff7815; }
.login-color-strip i:nth-child(6) { background: #b6ff00; }
.login-color-strip i:nth-child(7) { background: #3a91ef; }
.login-color-strip i:nth-child(8) { background: #762cf4; }
.login-hero-credit { position: relative; z-index: 1; margin-top: -18px; color: rgba(255,255,255,.76); font-size: clamp(12px, .95vw, 15px); font-weight: 400; letter-spacing: .12px; }
.login-box { align-self: center; justify-self: center; width: min(78%, 540px); display: grid; gap: 16px; padding: 28px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-box h1 { color: var(--navy); font-size: clamp(38px, 4vw, 58px); line-height: 1.05; }
.login-box h2 { display: none; }
.login-subtitle { color: var(--muted); font-size: 20px; line-height: 1.4; }
.login-help, .form-error, .success-message { min-height: 18px; color: var(--muted); font-size: 12px; }
.form-error { color: var(--danger); }
.success-message { color: var(--accent); font-weight: 800; }
.login-brand { display: none; }
.login-box button[type="submit"] { min-height: 58px; border-radius: 13px; background: linear-gradient(90deg, #7047f7, #974df6); font-size: 20px; }
.login-box input { min-height: 58px; border-color: #d7d2ee; background: #fff; font-size: 16px; }
.login-box input:focus { outline: 3px solid rgba(116, 71, 247, .18); border-color: var(--accent); }
.login-brand .brand-mark { width: min(100%, 280px); height: 100px; flex: none; border-radius: 0; color: var(--accent); background: transparent; font-size: 38px; }
.login-brand .brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; }

.app-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #fbfbff; border-right: 1px solid var(--line); padding: 20px; }
.sidebar::before { content: ""; display: block; height: 8px; margin: -20px -20px 18px; background: linear-gradient(90deg, #49cde8 0 12.5%, #31ef4d 12.5% 25%, #fff24a 25% 37.5%, #ff9dd0 37.5% 50%, #ff7815 50% 62.5%, #b6ff00 62.5% 75%, #3a91ef 75% 87.5%, #762cf4 87.5% 100%); }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.brand-mark { display: grid; flex: 0 0 58px; width: 58px; height: 58px; place-items: center; overflow: hidden; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--fanus-green), #b6ff00); box-shadow: 0 14px 34px rgba(49, 239, 77, .18); font-weight: 900; }
.brand-mark img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: screen; background: transparent; }
.brand h1 { font-size: 15px; font-weight: 800; line-height: 1.15; }
.brand p, .topbar p, .section-head p, .question-meta, .empty { color: var(--muted); font-size: 13px; }
.side-nav { display: grid; gap: 5px; }
.nav-button { position: relative; width: 100%; text-align: left; color: #484966; background: transparent; font-weight: 650; }
.side-nav > .nav-button:not(.nav-subbutton), .nav-group-toggle, .plain-nav-group > .nav-button { overflow: hidden; color: var(--navy); background: linear-gradient(90deg, rgba(116, 71, 247, .08), rgba(247, 60, 167, .06)); }
.side-nav > .nav-button:not(.nav-subbutton)::before, .nav-group-toggle::before, .plain-nav-group > .nav-button::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 4px; border-radius: 999px; background: var(--fanus-cyan); opacity: .75; }
.nav-button[data-view="dashboardView"]::before { background: var(--fanus-cyan) !important; }
#recordsNavToggle::before { background: #ff9dd0 !important; }
.nav-button[data-view="questionsView"]::before { background: #ff7815 !important; }
.nav-button[data-view="questionFanusView"]::before { background: var(--fanus-green) !important; }
#lessonsNavToggle::before { background: #fff24a !important; }
#coachingNavToggle::before { background: #b6ff00 !important; }
.nav-button[data-view="institutionView"]::before { background: #3a91ef !important; }
.nav-button.active { color: var(--accent); background: #f0ecff; }
.side-nav > .nav-button:not(.nav-subbutton).active,
.side-nav .nav-group-toggle.active,
.side-nav .nav-group.open > .nav-group-toggle,
.plain-nav-group > .nav-button.active {
    color: #fff;
    background: linear-gradient(90deg, #7047f7, #974df6);
}
.side-nav > .nav-button:not(.nav-subbutton).active::before,
.side-nav .nav-group-toggle.active::before,
.side-nav .nav-group.open > .nav-group-toggle::before,
.plain-nav-group > .nav-button.active::before {
    background: #fff !important;
    opacity: .9;
}
.nav-group { display: grid; }
.nav-group-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nav-chevron { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .18s ease; }
.nav-group.open .nav-chevron { transform: rotate(225deg); }
.nav-submenu { display: none; gap: 4px; padding: 4px 0 4px 12px; }
.nav-group.open .nav-submenu { display: grid; }
.nav-subbutton { min-height: 36px; padding-left: 16px; border-left: 2px solid var(--line); border-radius: 0 7px 7px 0; font-size: 13px; }
.account-box { display: grid; gap: 4px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.account-box span { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.account-box .cloud-sync-status { margin: 2px 0 8px; padding: 7px 9px; border-radius: 8px; background: #eef9f1; color: #2f5b3b; font-weight: 800; line-height: 1.25; }
.account-box .cloud-sync-status[data-tone="pending"] { background: #fff6d7; color: #7b5b10; }
.account-box .cloud-sync-status[data-tone="error"] { background: #fff0ee; color: #b52b20; }
.workspace { container-name: workspace; container-type: inline-size; min-width: 0; max-width: 100%; padding: 24px; }
.app-view { width: 100%; min-width: 0; max-width: 100%; }
#dashboardView { position: relative; }
#dashboardView::before {
  content: "";
  display: block;
  width: min(430px, 100%);
  height: 10px;
  margin: 0 0 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #49cde8 0 12.5%, #31ef4d 12.5% 25%, #fff24a 25% 37.5%, #ff9dd0 37.5% 50%, #ff7815 50% 62.5%, #b6ff00 62.5% 75%, #3a91ef 75% 87.5%, #762cf4 87.5% 100%);
}
.app-view > *, .panel > *, .question-form > *, .bank-section > * { min-width: 0; max-width: 100%; }
.app-view p, .app-view span, .app-view small, .app-view strong, .app-view button, .app-view label { overflow-wrap: anywhere; }
.app-view .student-status-buttons button,
.app-view .student-result-grid label,
.app-view .student-result-grid input {
  overflow-wrap: normal;
  word-break: normal;
}
.app-view .student-status-buttons button,
.app-view .student-result-grid label {
  white-space: normal;
}
.topbar, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.topbar h2 { font-size: 27px; margin-bottom: 4px; }
.dashboard-topbar { align-items: flex-start; }
.exam-countdown-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 8px;
  width: min(480px, 100%);
}
.exam-countdown-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  min-height: 74px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--navy);
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 14px 34px rgba(35, 36, 79, .06);
}
.exam-countdown-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--pill-color, var(--accent));
}
.exam-countdown-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.exam-countdown-card strong {
  color: var(--ink);
  font-size: clamp(18px, 1.8vw, 25px);
  line-height: 1;
}
.exam-countdown-card small { color: var(--muted); font-size: 11px; font-weight: 700; }
.exam-countdown-card.lgs { --pill-color: #31ef4d; }
.exam-countdown-card.yks { --pill-color: #ff9dd0; }
.exam-countdown-card.today { --pill-color: #49cde8; }
.exam-countdown-card.question-total { --pill-color: var(--accent); }
.dashboard-topbar:has(.question-total:not(.hidden)) .exam-countdown-strip { grid-template-columns: repeat(3, minmax(118px, 1fr)); }
.topbar-actions, .basket-header-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions.buyer-question-actions { display: none; }
.buyer-folder-back {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-right: 10px;
  padding: 0 12px;
  border: 1px solid #ddd6f5;
  border-radius: 8px;
  color: var(--accent);
  background: #f7f2ff;
  font-size: 14px;
  font-weight: 900;
}
.basket-button { position: relative; display: flex; align-items: center; gap: 8px; }
.basket-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.basket-button strong { display: grid; min-width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #fff; background: #849189; font-size: 12px; }
.basket-button.has-items {
  color: #fff;
  border-color: #9b7bff;
  background: linear-gradient(135deg, #8a4df6, #38bfd6);
}
.basket-button.has-items strong { color: #7044e8; background: #fff; }
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #cfe3d6;
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}
.fanus-frame {
  width: 100%;
  min-height: calc(100vh - 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f5ff;
}

.panel, .question-form, .basket-panel, .bank-section { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.panel, .question-form, .basket-panel, .bank-section { padding: 16px; }
.integrated-basket { margin-bottom: 16px; border-color: #b9d2c0; box-shadow: 0 8px 24px rgba(38, 78, 51, .08); }
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.question-form { display: grid; gap: 12px; margin-bottom: 16px; }
.inline-check { display: flex; align-items: center; gap: 8px; width: fit-content; }
.inline-check input { width: 18px; min-height: 18px; }
.teacher-image-uploader { min-height: 200px; }
.teacher-question-preview { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(230px, 320px); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f4f7f5; }
.teacher-question-preview > img { display: block; width: 100%; height: min(48vh, 440px); object-fit: contain; background: #fff; }
.teacher-preview-details { display: grid; align-content: start; gap: 14px; padding: 16px; border-left: 1px solid var(--line); }
.teacher-preview-details > div:first-child { display: grid; gap: 4px; }
.teacher-preview-details span { color: var(--muted); font-size: 13px; }
.preview-answer { padding: 12px; border-left: 3px solid var(--gold); background: #fff9e8; font-size: 13px; font-weight: 800; }
.student-upload { max-width: 720px; }
.upload-steps { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.upload-steps span { padding: 8px 4px 11px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.upload-steps span.active { color: var(--accent); border-bottom: 3px solid var(--accent); }
.photo-uploader { min-height: 220px; display: grid; }
.photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.camera-button, .photo-actions .file-picker { min-height: 210px; place-items: center; border: 1px dashed #91ae9a; border-radius: 7px; color: var(--accent); background: #f4faf6; cursor: pointer; font-size: 15px; text-align: center; }
.camera-button { display: grid; }
.camera-button input { display: none; }
.photo-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #f3f6f4; }
.photo-preview img { display: block; width: 100%; height: min(48vh, 430px); object-fit: contain; background: #fff; }
.photo-preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; }
.photo-preview-footer div { display: grid; gap: 2px; }
.photo-preview-footer span { color: var(--muted); font-size: 12px; }
.upload-summary { display: grid; gap: 3px; padding: 12px; border-left: 3px solid var(--gold); background: #fff9e8; }
.upload-summary span { color: var(--muted); font-size: 13px; }
.management-grid { display: grid; grid-template-columns: minmax(290px, 380px) minmax(420px, 1fr); gap: 16px; align-items: start; }
.two-col, .three-col, .color-row, .print-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.three-col, .print-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integrated-basket .print-options {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 8px;
  align-items: end;
}
.integrated-basket .print-options label {
  gap: 5px;
  color: #2f3b35;
  font-size: 12px;
  font-weight: 850;
}
.integrated-basket .print-options input,
.integrated-basket .print-options select {
  min-height: 42px;
  border-radius: 8px;
  font-size: 13px;
}
.integrated-basket .print-options .layout-note {
  grid-column: 1 / -1;
  padding: 8px 10px;
  border-radius: 8px;
  color: #16755d;
  background: #e8fff7;
  font-size: 12px;
  font-weight: 800;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { display: grid; gap: 5px; min-height: 105px; align-content: center; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stat strong { color: var(--accent); font-size: 30px; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 700; }
.dashboard-stat { min-height: 250px; grid-template-rows: auto auto 1fr auto auto; justify-items: center; text-align: center; border-top: 4px solid var(--fanus-cyan); box-shadow: 0 16px 36px rgba(35, 36, 79, .04); }
.dashboard-stat:nth-child(2) { border-top-color: #fff24a; }
.dashboard-stat:nth-child(3) { border-top-color: #3a91ef; }
.dashboard-stat:nth-child(4) { border-top-color: #762cf4; }
.dashboard-stat > span:not(.stat-icon) { max-width: 180px; color: #39423d; font-size: 17px; }
.dashboard-stat strong { align-self: center; color: #202622; font-size: 38px; }
.dashboard-stat small { min-height: 18px; color: var(--muted); font-size: 12px; }
.stat-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; color: #fff !important; font-size: 22px !important; font-weight: 900; box-shadow: 0 12px 26px rgba(35, 36, 79, .12); }
.stat-icon svg { width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat-icon.turquoise { background: #49cde8; }
.stat-icon.yellow { color: #4c3a00 !important; background: #fff24a; }
.stat-icon.blue { background: #3a91ef; }
.stat-icon.green { background: #762cf4; }
.stat-detail { width: 100%; min-height: 34px; color: var(--muted); background: transparent; border-top: 1px solid var(--line); border-radius: 0; padding-top: 10px; }
.dashboard-workbench { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; margin-bottom: 16px; }
.dashboard-todo-card, .dashboard-lesson-card, .dashboard-finance-card { display: grid; align-content: start; gap: 12px; min-width: 0; min-height: 270px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 16px 36px rgba(35, 36, 79, .04); }
.dashboard-todo-card { grid-column: span 2; }
.buyer-dashboard-workbench { grid-template-columns: minmax(0, 1fr); }
.buyer-dashboard-workbench .dashboard-todo-card { grid-column: 1 / -1; min-height: 360px; padding: 22px; }
.buyer-dashboard-workbench .dashboard-calendar-day { min-height: 32px; font-size: 13px; }
.buyer-dashboard-workbench .dashboard-calendar-empty { min-height: 32px; }
.buyer-dashboard-workbench .dashboard-calendar-head strong { font-size: 18px; }
.buyer-dashboard-workbench .dashboard-todo-form input,
.buyer-dashboard-workbench .dashboard-todo-form button { min-height: 50px; }
.dashboard-todo-card { border-top: 4px solid var(--fanus-pink); }
.dashboard-lesson-card { border-top: 4px solid var(--fanus-green); }
.dashboard-finance-card { border-top: 4px solid var(--accent); }
.dashboard-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dashboard-card-head div { display: grid; gap: 3px; }
.dashboard-card-head span { color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.dashboard-card-head h3 { color: var(--navy); font-size: 22px; line-height: 1.1; }
.dashboard-calendar { display: grid; gap: 7px; padding: 9px; border: 1px solid #eadcf7; border-radius: 8px; background: #fbfaff; }
.dashboard-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dashboard-calendar-head strong { color: var(--navy); font-size: 14px; line-height: 1; }
.dashboard-calendar-head button { display: grid; width: 28px; min-height: 28px; place-items: center; padding: 0; border-radius: 50%; color: var(--accent); background: #f3efff; font-size: 18px; line-height: 1; }
.dashboard-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.dashboard-calendar-weekday { color: var(--muted); font-size: 10px; font-weight: 900; text-align: center; }
.dashboard-calendar-empty { min-height: 24px; }
.dashboard-calendar-day { position: relative; display: grid; min-width: 0; min-height: 24px; place-items: center; padding: 0 0 2px; border-radius: 7px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 900; }
.dashboard-calendar-day.today { box-shadow: inset 0 0 0 1px var(--fanus-pink); }
.dashboard-calendar-day.active { color: #fff; background: linear-gradient(135deg, var(--accent), #974df6); }
.dashboard-calendar-day.has-task::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--fanus-pink); transform: translateX(-50%); }
.dashboard-calendar-day.active.has-task::after { background: #fff; }
.dashboard-selected-day { color: var(--muted); font-size: 12px; font-weight: 900; }
.dashboard-todo-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dashboard-todo-form input { min-height: 42px; border-color: #dcd4fb; background: #fbfaff; font-weight: 750; }
.dashboard-todo-form button { min-height: 42px; background: linear-gradient(90deg, var(--accent), #974df6); }
.dashboard-todo-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding-right: 2px; }
.dashboard-todo-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 46px; padding: 9px 10px; border: 1px solid #eadcf7; border-radius: 8px; background: linear-gradient(90deg, rgba(247, 60, 167, .08), rgba(116, 71, 247, .05)); color: var(--ink); font-size: 13px; }
.dashboard-todo-item input { width: 18px; min-height: 18px; accent-color: var(--accent); }
.dashboard-todo-item span { min-width: 0; font-weight: 800; overflow-wrap: anywhere; }
.dashboard-todo-item.done span { color: var(--muted); text-decoration: line-through; }
.dashboard-todo-item button { display: grid; width: 28px; min-height: 28px; place-items: center; padding: 0; border-radius: 50%; color: #a13661; background: #fff; }
.dashboard-empty-note { min-height: 150px; display: grid; place-items: center; border: 1px dashed #d8cfef; border-radius: 8px; color: var(--muted); background: #fbfaff; font-weight: 800; }
.dashboard-lesson-summary { display: grid; gap: 9px; }
.dashboard-lesson-summary div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #ece8f8; }
.dashboard-lesson-summary span { color: #39423d; font-weight: 850; }
.dashboard-lesson-summary strong { color: var(--accent); font-size: 24px; line-height: 1; }
.dashboard-detail-link { justify-self: start; display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0; color: var(--muted); background: transparent; font-size: 13px; }
.dashboard-detail-link span { color: var(--ink); font-size: 18px; line-height: 1; }
.dashboard-teacher-breakdown { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid var(--line); }
.dashboard-teacher-breakdown div { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; font-weight: 800; }
.dashboard-teacher-breakdown strong { color: var(--navy); white-space: nowrap; }
.dashboard-donut-wrap { position: relative; display: grid; width: min(190px, 100%); aspect-ratio: 1; place-self: center; place-items: center; }
.dashboard-donut { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--accent) 0 360deg); box-shadow: inset 0 0 0 9px #fff, 0 14px 30px rgba(35, 36, 79, .08); }
.dashboard-donut::after { content: ""; position: absolute; inset: 27%; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.dashboard-finance-total { position: relative; z-index: 1; display: grid; gap: 2px; text-align: center; }
.dashboard-finance-total span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.dashboard-finance-total strong { color: var(--navy); font-size: 20px; }
.dashboard-finance-legend { display: grid; gap: 8px; }
.dashboard-finance-legend div { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.dashboard-finance-legend i { width: 12px; height: 12px; border-radius: 50%; }
.dashboard-finance-legend i.income { background: #31ef4d; }
.dashboard-finance-legend i.expense { background: #f73ca7; }
.dashboard-finance-legend i.receivable { background: var(--accent); }
.dashboard-finance-legend strong { color: var(--navy); white-space: nowrap; }
.buyer-folder-panel { display: grid; gap: 12px; margin-bottom: 12px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.buyer-library-head { align-items: flex-start; }
.buyer-library-head h3 { font-size: 24px; }
.buyer-library-head p { font-size: 13px; }
.buyer-library-add { display: grid; width: 38px; min-height: 38px; place-items: center; padding: 0; border: 1px solid #ddd6f5; border-radius: 10px; color: var(--accent); background: #fff; font-size: 24px; line-height: 1; }
.buyer-folder-form { grid-template-columns: minmax(0, 1fr) auto; }
.buyer-folder-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px 18px; max-width: min(920px, 100%); }
.buyer-library-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 48px; color: var(--ink); background: transparent; cursor: pointer; }
.buyer-library-row:hover strong, .buyer-library-row:focus-visible strong { color: var(--accent); }
.buyer-library-row:focus-visible { outline: 3px solid rgba(247, 60, 167, .35); outline-offset: 4px; border-radius: 8px; }
.buyer-library-number { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--navy); font-size: 15px; font-weight: 900; box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .68); }
.buyer-library-number.cyan { background: #49cde8; }
.buyer-library-number.green { background: #31ef4d; }
.buyer-library-number.yellow { background: #fff24a; }
.buyer-library-number.pink { background: #f77bc7; }
.buyer-library-number.orange { background: #ff7a18; }
.buyer-library-number.lime { background: #b9ff00; }
.buyer-library-number.blue { color: #fff; background: #3a91ef; }
.buyer-library-number.purple { color: #fff; background: #762cf4; }
.buyer-library-row strong { color: var(--navy); font-size: 16px; line-height: 1.1; }
.buyer-library-row small { color: var(--muted); font-size: 11px; font-weight: 800; }
.buyer-library-row button { display: grid; width: 26px; min-height: 26px; place-items: center; padding: 0; color: var(--accent); background: #f3edff; font-size: 18px; }
.buyer-folder-list small { color: var(--muted); font-weight: 800; }
.buyer-folder-modal { width: min(560px, calc(100vw - 28px)); }
.modal-eyebrow { margin: 0 0 8px; color: var(--fanus-pink); font-size: 12px; font-weight: 900; letter-spacing: .18em; }
.buyer-folder-modal-form { display: grid; gap: 16px; }
.buyer-folder-modal-form label { display: grid; gap: 8px; color: var(--navy); font-weight: 900; }
.buyer-folder-modal-form input, .buyer-folder-modal-form select { min-height: 52px; border: 1px solid #cfded7; border-radius: 10px; background: #fff; font-weight: 850; }
.buyer-answer-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 14px;
  padding: 22px;
  border: 2px dashed #9fbfc5;
  border-radius: 8px;
  background: #dceff2;
}
.buyer-answer-head h3 { color: #0d4453; font-size: 28px; }
.buyer-answer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 34px 42px;
  align-items: start;
}
.buyer-answer-card {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
}
.buyer-answer-card h4 {
  margin: 0;
  color: #0d4453;
  font-size: 24px;
  font-weight: 950;
}
.buyer-answer-card img {
  width: min(320px, 100%);
  max-height: 190px;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 9px 18px rgba(31, 41, 55, .18);
}
.buyer-answer-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.buyer-answer-options button {
  display: grid;
  width: 40px;
  min-height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #0d4453;
  background: #b9daf4;
  font-size: 18px;
  font-weight: 900;
}
.buyer-answer-options button.active {
  color: #fff;
  background: linear-gradient(135deg, #2a388d, var(--accent));
}
.buyer-card-answer {
  display: grid;
  gap: 7px;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid #ddd6f5;
  border-radius: 8px;
  background: #fff;
}
.buyer-card-answer strong {
  color: var(--navy);
  font-size: 12px;
}
.buyer-answer-options.compact {
  justify-content: flex-start;
  gap: 5px;
}
.buyer-answer-options.compact button {
  width: 30px;
  min-height: 28px;
  border-radius: 6px;
  font-size: 13px;
}
.birthday-section { margin-bottom: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.birthday-list { display: flex; flex-wrap: wrap; gap: 10px; }
.birthday-person { display: flex; align-items: center; gap: 10px; min-width: min(240px, 100%); padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.birthday-person div:last-child { display: grid; gap: 3px; }
.birthday-person span { color: var(--muted); font-size: 12px; }
.teacher-avatar { background: #d79f00; }
.branch-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.branch-fieldset legend { color: #37463d; font-size: 13px; font-weight: 800; padding: 0 5px; }
.branch-fieldset label { display: flex; align-items: center; gap: 7px; font-weight: 600; }
.branch-fieldset input { width: 17px; min-height: 17px; }
.form-actions { display: flex; gap: 8px; }
.form-actions button { flex: 1; }
.week-controls { display: flex; gap: 8px; }
.schedule-visibility-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 42px; margin: -4px 0 10px; }
.schedule-visibility-bar button { display: inline-flex; align-items: center; gap: 9px; min-height: 38px; padding: 8px 12px; color: #34483c; background: #f4f8f5; border-color: #c7d7cc; }
.schedule-visibility-bar button::before { content: "⌄"; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-size: 18px; font-weight: 900; line-height: 1; transition: transform .2s ease; }
.schedule-visibility-bar button.active::before { transform: rotate(180deg); }
.schedule-visibility-bar button:hover { background: #eaf3ed; }
.schedule-visibility-bar strong { padding: 3px 7px; border-radius: 999px; color: #85451e; background: #ffe3cf; font-size: 11px; white-space: nowrap; }
.lesson-teacher-filter { display: grid; gap: 6px; min-width: 260px; max-width: 360px; color: var(--muted); font-weight: 800; }
.lesson-teacher-filter select { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-weight: 800; padding: 0 12px; }
.schedule-shell { width: 100%; height: calc(100vh - 245px); min-width: 0; min-height: 480px; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.schedule-table { display: grid; grid-template-columns: clamp(58px, 6vw, 82px) repeat(var(--schedule-days), minmax(0, 1fr)); width: 100%; min-width: 0; }
.schedule-corner, .schedule-day-head, .schedule-time, .schedule-cell { border-right: 1px solid #bdc9c1; border-bottom: 1px solid #bdc9c1; }
.schedule-corner, .schedule-day-head { position: sticky; top: 0; z-index: 4; min-height: 72px; background: #f3f7f4; box-shadow: 0 1px 0 #bdc9c1; }
.schedule-corner { left: 0; z-index: 6; display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.schedule-day-head { display: grid; min-width: 0; place-items: center; align-content: center; gap: 4px; padding: 8px 4px; text-align: center; }
.schedule-day-head strong { font-size: clamp(11px, .9vw, 14px); white-space: nowrap; }
.schedule-day-head span { color: var(--muted); font-size: 12px; }
.schedule-time { position: sticky; left: 0; z-index: 3; display: grid; min-height: 64px; place-items: center; background: #f8fbf9; box-shadow: 1px 0 0 #bdc9c1; font-weight: 800; }
.schedule-cell { min-width: 0; min-height: 64px; overflow: hidden; border-radius: 0; color: var(--ink); background: #fff; padding: 6px; text-align: left; }
.schedule-cell:hover { background: #edf7f0; }
.schedule-cell.booked { display: grid; align-content: center; cursor: grab; user-select: none; border-top: 3px solid color-mix(in srgb, currentColor 36%, transparent); box-shadow: inset 0 0 0 1px rgba(255,255,255,.48); }
.schedule-cell.booked:active { cursor: grabbing; }
.schedule-cell.booked.dragging { opacity: .45; outline: 2px dashed #53675a; outline-offset: -3px; }
.schedule-cell.drop-target { position: relative; background: #e0f4e6; box-shadow: inset 0 0 0 3px var(--accent); }
.schedule-cell.drop-target::after { content: "Buraya taşı"; position: absolute; inset: 0; display: grid; place-items: center; color: #275a38; font-size: 11px; font-weight: 900; }
.schedule-cell.drop-target-invalid { position: relative; filter: saturate(.65); box-shadow: inset 0 0 0 3px #c84a43; }
.schedule-cell.drop-target-invalid::after { content: "Seans dolu"; position: absolute; inset: 0; display: grid; place-items: center; color: #8e2924; background: rgba(255, 235, 233, .88); font-size: 11px; font-weight: 900; }
.schedule-cell.booked strong { overflow-wrap: anywhere; font-size: clamp(10px, .85vw, 13px); line-height: 1.25; }
.schedule-cell.booked small { display: block; margin-top: 4px; color: inherit; font-size: 11px; line-height: 1.2; opacity: .82; }
.schedule-cell.booked.grade-5 { color: #155c68; background: #c9f2f7; }
.schedule-cell.booked.grade-6 { color: #176a32; background: #cff8d7; }
.schedule-cell.booked.grade-7 { color: #766600; background: #fbf3b5; }
.schedule-cell.booked.grade-8 { color: #8a2862; background: #f8c9e5; }
.schedule-cell.booked.grade-9 { color: #8a410e; background: #ffd5ad; }
.schedule-cell.booked.grade-10 { color: #527a00; background: #e4ffb8; }
.schedule-cell.booked.grade-11 { color: #235b94; background: #cfe6ff; }
.schedule-cell.booked.grade-12 { color: #5a32a8; background: #ded1ff; }
.schedule-cell.booked.grade-other { color: #47535b; background: #edf1f7; }
.schedule-table.compact .schedule-time, .schedule-table.compact .schedule-cell { min-height: 38px; }
.schedule-table.compact .schedule-cell { padding: 3px 6px; }
.schedule-table.compact .schedule-cell.booked strong { font-size: 11px; }
.study-program-topbar { margin-bottom: 12px; }
.study-program-navigation { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.study-toolbar { display: grid; grid-template-columns: minmax(220px, 320px) minmax(190px, 1fr) auto; align-items: end; gap: 12px; margin-bottom: 12px; }
.study-toolbar-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.study-program-message { margin: -3px 0 10px; text-align: right; }
.smart-coaching-panel { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 14px; margin: 0 0 14px; }
.smart-coaching-controls { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.smart-compact-field { min-width: 0; }
.smart-auto-weeks { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 9px 10px; border: 1px solid #ded8ff; border-radius: 8px; background: #fbf9ff; color: var(--ink); font-size: 13px; font-weight: 850; }
.smart-auto-weeks input { width: 18px; height: 18px; }
.smart-daily-rules { display: grid; gap: 8px; align-self: stretch; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbf9ff; }
.smart-daily-rules label { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink); font-size: 13px; font-weight: 800; }
.smart-daily-rules input { width: 18px; height: 18px; }
.smart-workdays { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(54px, 1fr)); gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbf9ff; }
.smart-workdays strong { grid-column: 1 / -1; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.smart-workdays label { position: relative; display: block; min-width: 0; margin: 0; cursor: pointer; }
.smart-workdays input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.smart-workdays span { display: grid; place-items: center; min-height: 36px; border: 1px solid #ded8ff; border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 900; transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
.smart-workdays input:checked + span { border-color: transparent; background: linear-gradient(135deg, #7a45ff, #43c6e8); color: #fff; box-shadow: 0 8px 18px rgba(91, 69, 255, .18); }
.smart-workdays input:focus-visible + span { outline: 3px solid rgba(67, 198, 232, .32); outline-offset: 2px; }
.smart-workdays label:hover span { transform: translateY(-1px); border-color: #bfb2ff; }
.smart-folder-picker { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.smart-folder-picker strong { color: var(--ink); font-size: 14px; }
.smart-folder-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 8px; }
.smart-folder-options label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border: 1px solid #ded8ff; border-radius: 8px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 800; }
.smart-folder-options input { width: 16px; height: 16px; }
.smart-folder-options span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.15; }
.smart-folder-options small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.smart-instruction { grid-column: 1 / -1; }
.smart-instruction textarea { min-height: 82px; resize: vertical; }
.smart-coach-insight {
  grid-column: 1 / -1;
  margin-top: -2px;
  padding: 10px 12px;
  border: 1px solid #d9f2dc;
  border-radius: 8px;
  color: #315d3b;
  background: #f2fbf4;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}
.smart-coaching-summary { display: grid; gap: 2px; margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--navy); background: #f4faf6; }
.smart-coaching-summary strong { color: var(--ink); }
.smart-coaching-summary span, .smart-coaching-summary small { color: var(--muted); }
.smart-plan-list { display: grid; gap: 12px; }
.smart-week-group { display: grid; gap: 8px; }
.smart-week-group h4 { margin: 0; color: var(--ink); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.smart-week-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.smart-week-more { color: var(--muted); font-weight: 800; align-self: center; }
.smart-plan-card { display: grid; grid-template-columns: 34px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fbfdfb; }
.smart-plan-card > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 800; }
.smart-plan-card div { display: grid; gap: 5px; }
.smart-plan-card strong { color: var(--ink); }
.smart-plan-card small, .smart-plan-card p { color: var(--muted); }
.smart-plan-card p { grid-column: 2; margin: 0; font-weight: 700; }
.smart-coaching-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.study-week-label { display: grid; gap: 4px; min-height: 40px; align-content: center; padding: 0 12px; border-left: 3px solid var(--accent); }
.study-week-label span { color: var(--muted); font-size: 11px; font-weight: 800; }
.study-week-label strong { font-size: 15px; }
.study-resource-panel { display: grid; grid-template-columns: minmax(340px, 520px) 1fr; gap: 14px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.study-resource-panel form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 8px; }
.study-resource-list { display: flex; flex-wrap: wrap; align-content: start; gap: 7px; }
.study-resource-list > span { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 6px 5px 9px; border: 1px solid var(--line); border-radius: 6px; background: #f6f8f7; font-size: 11px; }
.study-resource-list span b { padding: 3px 5px; border-radius: 4px; background: rgba(255, 255, 255, .75); }
.study-resource-list button { width: 24px; min-height: 24px; padding: 0; color: var(--danger); background: #fff; }
.study-resource-list small { align-self: center; color: var(--muted); }
.study-board-shell { width: 100%; min-width: 0; overflow: hidden; border: 1px solid #b9c7be; border-radius: 8px; background: #fff; }
.study-board { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; min-width: 0; align-items: start; }
.study-day-column { min-width: 0; border-right: 1px solid #aebbb3; }
.study-day-column:last-child { border-right: 0; }
.study-day-header { position: sticky; top: 0; z-index: 3; display: grid; min-height: 68px; place-items: center; align-content: center; gap: 4px; padding: 8px; border-bottom: 2px solid #91a198; background: #f1f5f2; text-align: center; }
.study-day-header strong { font-size: 14px; }
.study-day-header span { color: var(--muted); font-size: 12px; }
.study-day-tasks { display: grid; }
.study-task-slot { position: relative; min-width: 0; }
.study-task-cell { position: relative; display: grid; width: 100%; min-width: 0; min-height: 88px; align-content: start; gap: 5px; overflow: hidden; padding: 8px; border-radius: 0; border-bottom: 1px solid #bdc8c1; color: var(--ink); background: #fff; text-align: left; font-weight: 500; }
.study-task-cell:hover { filter: none; background: #f4f8f5; }
.study-task-cell[draggable="true"] { cursor: grab; }
.study-task-cell.dragging { cursor: grabbing; opacity: .45; }
.study-task-cell.study-drop-target { outline: 3px solid var(--accent); outline-offset: -3px; background: #edf8f0; }
.study-task-cell:not(.filled) { place-items: center; align-content: center; color: #728078; }
.study-add-icon { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #b8c8be; border-radius: 50%; color: var(--accent); background: #f2f8f4; font-size: 20px; line-height: 1; }
.study-task-cell em { font-size: 10px; font-style: normal; font-weight: 700; }
.study-task-head { display: flex; align-items: start; justify-content: space-between; gap: 5px; min-width: 0; }
.study-task-head b { flex: 1 1 auto; min-width: 0; max-width: calc(100% - 62px); padding: 3px 6px; overflow: hidden; border-radius: 4px; font-size: 9px; overflow-wrap: normal; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; word-break: normal; }
.study-task-head time { flex: 0 0 auto; color: #3f4c45; font-size: 8px; font-weight: 800; line-height: 1.35; white-space: nowrap; }
.study-task-cell > small { color: #4d5d54; font-size: 8.5px; font-weight: 800; line-height: 1.12; }
.study-task-cell > strong { overflow-wrap: anywhere; font-size: 9.5px; line-height: 1.24; }
.study-task-cell > i { position: absolute; right: 7px; bottom: 5px; color: rgba(42, 60, 49, .55); font-size: 9px; font-style: normal; font-weight: 800; opacity: 0; }
.study-task-cell:hover > i { opacity: 1; }
.study-cell-tools { position: absolute; z-index: 3; left: 5px; bottom: 5px; display: flex; gap: 3px; }
.study-cell-tools:empty { display: none; }
.study-cell-tools button { display: grid; width: 24px; min-height: 24px; place-items: center; padding: 0; border: 1px solid #b9cabe; border-radius: 5px; color: var(--accent); background: rgba(255, 255, 255, .94); font-size: 15px; line-height: 1; }
.study-task-slot:has(.study-cell-tools:not(:empty)) .study-task-cell { padding-bottom: 34px; }
.study-remove-row { position: absolute; z-index: 2; right: 5px; bottom: 5px; display: grid; width: 22px; min-height: 22px; place-items: center; padding: 0; border: 1px solid #e4b2ae; border-radius: 50%; color: #a33a34; background: #fff4f3; font-size: 15px; line-height: 1; opacity: .72; }
.study-remove-row:hover { opacity: 1; }
.study-task-slot:has(.study-remove-row) .study-task-cell > i { right: 32px; }
.study-add-row { width: 100%; min-height: 36px; border: 0; border-radius: 0; border-top: 1px solid #c9d4cd; font-size: 11px; }
.study-task-head .subject-math, .study-resource-list .subject-math, .study-print-task .subject-math { background: #fff3aa; }
.study-task-head .subject-turkish, .study-resource-list .subject-turkish, .study-print-task .subject-turkish { background: #bde9e8; }
.study-task-head .subject-science, .study-resource-list .subject-science, .study-print-task .subject-science { background: #c9edb7; }
.study-task-head .subject-history, .study-resource-list .subject-history, .study-print-task .subject-history { background: #ffd29c; }
.study-task-head .subject-english, .study-resource-list .subject-english, .study-print-task .subject-english { background: #e2c7ef; }
.study-task-head .subject-religion, .study-resource-list .subject-religion, .study-print-task .subject-religion { background: #f6d5bc; }
.study-task-head .subject-free-time, .study-resource-list .subject-free-time, .study-print-task .subject-free-time { background: #d9e5ec; }
.study-task-head .subject-other, .study-resource-list .subject-other, .study-print-task .subject-other { background: #edf1ef; }
.study-task-modal { width: min(720px, 100%); }
.study-task-form { display: grid; gap: 12px; }
.study-task-curriculum { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbf9ff; }
.study-task-curriculum-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.study-task-curriculum-head strong { color: var(--ink); font-size: 13px; }
.study-task-curriculum-head span { color: var(--muted); font-size: 11px; font-weight: 800; }
.study-task-curriculum-list { display: grid; max-height: 220px; overflow: auto; gap: 6px; padding-right: 4px; }
.study-task-curriculum-list label { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 36px; margin: 0; padding: 7px 8px; border: 1px solid #ded8ff; border-radius: 7px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 800; cursor: pointer; }
.study-task-curriculum-list label.is-planned { border-color: #bdf0d0; background: #f6fff9; }
.study-task-curriculum-list input { width: 16px; height: 16px; }
.study-task-curriculum-list span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.study-task-curriculum-list em { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; font-style: normal; }
.study-task-curriculum-list small { color: var(--muted); font-size: 10px; white-space: nowrap; }
.study-task-curriculum-list small.curriculum-used-mark { padding: 2px 6px; border: 1px solid #a7eec0; border-radius: 999px; color: #168245; background: #dcfce7; font-size: 10px; font-weight: 900; }
.study-task-curriculum-empty { margin: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.study-empty { grid-column: 1 / -1; min-height: 260px; display: grid; place-items: center; }
.student-folder-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.student-folder-tabs button { min-width: 180px; }
.student-folder-tabs button.active { color: #fff; background: var(--accent); }
.student-folder-content { display: grid; gap: 12px; }
.student-folder-summary, .saved-program-card { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.student-folder-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; }
.student-folder-summary > div, .saved-program-card header > div { display: grid; gap: 4px; }
.student-folder-summary span, .saved-program-card header span { color: var(--muted); font-size: 12px; font-weight: 800; }
.student-folder-summary strong { font-size: 24px; }
.student-folder-summary small, .saved-program-card header small { color: var(--muted); }
.saved-program-list { display: grid; gap: 10px; }
.saved-program-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; }
.saved-program-card details { border-top: 1px solid var(--line); padding: 10px 14px 14px; }
.saved-program-card summary { cursor: pointer; color: var(--accent); font-weight: 800; }
.saved-program-card ul { display: grid; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.saved-program-card li { display: grid; grid-template-columns: 145px 130px 1fr; align-items: center; gap: 8px; padding: 7px; border-bottom: 1px solid #e7ece9; font-size: 12px; }
.saved-program-card li b { padding: 4px 6px; border-radius: 4px; font-size: 10px; text-transform: uppercase; }
.empty-module { min-height: 240px; display: grid; place-items: center; border: 1px dashed #b7c7bd; border-radius: 8px; color: var(--muted); background: #fff; }
.homework-list { display: grid; gap: 12px; }
.homework-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.homework-card header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.homework-card header > div { display: grid; gap: 4px; }
.homework-card span { color: var(--muted); font-size: 12px; font-weight: 800; }
.homework-card small { color: var(--muted); }
.homework-card p { margin: 0; white-space: pre-wrap; font-weight: 700; }
.homework-card label { min-width: 180px; }
.homework-card select { width: 100%; }
.homework-status-select { font-weight: 900; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.homework-status-select.homework-status-unchecked { color: var(--ink); background: #fff; border-color: var(--line); }
.homework-status-select.homework-status-done { color: #1f7a45; background: #e9f9ef; border-color: #62d78d; }
.homework-status-select.homework-status-not-done { color: #aa2e3a; background: #fff0f2; border-color: #f0a4ac; }
.homework-status-select.homework-status-partial { color: #8a5600; background: #fff3dc; border-color: #efba5f; }
.institution-form { max-width: 780px; }
.institution-fixed-info {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.accounting-student-finder {
  display: grid;
  grid-template-columns: 92px minmax(260px, 420px) auto;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: min(860px, 100%);
  margin: 4px auto 22px;
  padding: 18px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 46px rgba(35, 36, 79, .12);
}
.accounting-avatar {
  display: grid;
  width: 88px;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: radial-gradient(circle at 35% 28%, #974df6, var(--accent));
  box-shadow: 0 18px 34px rgba(116, 71, 247, .22);
  font-size: 32px;
  font-weight: 950;
}
.accounting-fields { display: grid; gap: 12px; }
.accounting-fields label { color: var(--muted); font-size: 14px; text-decoration: underline; }
.accounting-fields input { min-height: 44px; background: #f2f4f8; font-size: 16px; font-weight: 900; }
#accountingFindStudent { min-height: 48px; padding-inline: 20px; background: linear-gradient(90deg, #3a91ef, var(--accent)); font-size: 16px; }
.accounting-search-panel { display: grid; gap: 12px; width: min(940px, 100%); margin: -12px auto 22px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.accounting-student-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.accounting-student-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 62px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); text-align: left; }
.accounting-student-row > span:nth-child(2) { display: grid; gap: 2px; }
.accounting-student-row small { color: var(--muted); }
.accounting-student-row b { color: var(--accent); }
.accounting-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
.accounting-tabs button {
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}
.accounting-tabs button.active { color: var(--accent); background: #fff; border-color: var(--line); }
.accounting-panel {
  min-height: 320px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.accounting-info-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 0 28px; }
.accounting-info-grid div {
  display: grid;
  gap: 8px;
  min-height: 82px;
  align-content: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e8e8ee;
}
.accounting-info-grid div:nth-child(4n+1),
.accounting-info-grid div:nth-child(4n+2) { background: #f4f4f6; }
.accounting-info-grid span { color: #ff9d99; font-size: 18px; font-weight: 950; text-transform: uppercase; }
.accounting-info-grid strong { color: var(--navy); font-size: 18px; }
.accounting-history { display: grid; gap: 8px; }
.accounting-history div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-weight: 800; }
.accounting-history span { color: var(--muted); }
.accounting-history strong { color: var(--accent); }
.accounting-collection-form { display: grid; gap: 14px; max-width: 680px; }
.accounting-balance-card { display: grid; gap: 4px; padding: 18px; border-left: 5px solid var(--accent); border-radius: 8px; background: linear-gradient(90deg, rgba(116, 71, 247, .11), rgba(247, 60, 167, .06)); }
.accounting-balance-card span { color: var(--muted); font-weight: 900; }
.accounting-balance-card strong { color: var(--navy); font-size: 34px; }
.accounting-empty { min-height: 220px; display: grid; place-items: center; border: 1px dashed #d8cfef; border-radius: 8px; color: var(--muted); background: #fbfaff; font-weight: 900; }
.accounting-ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.accounting-ledger-card {
  display: grid;
  gap: 6px;
  min-height: 108px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}
.accounting-ledger-card span { color: var(--muted); font-size: 14px; font-weight: 900; text-transform: uppercase; }
.accounting-ledger-card strong { color: var(--navy); font-size: clamp(24px, 2.2vw, 34px); }
.accounting-ledger-card.income { border-left-color: #25c46b; }
.accounting-ledger-card.expense { border-left-color: #f05261; }
.accounting-ledger-card.net { border-left-color: #48c7dd; }
.accounting-ledger-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.accounting-ledger-form { position: sticky; top: 16px; }
.currency-input { position: relative; }
.currency-input input { padding-right: 44px; }
.currency-input span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 950;
}
.accounting-ledger-list-panel {
  display: grid;
  gap: 12px;
  min-height: 420px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.accounting-ledger-list { display: grid; gap: 10px; }
.accounting-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: var(--paper);
}
.accounting-ledger-row.income { border-left-color: #25c46b; }
.accounting-ledger-row.expense { border-left-color: #f05261; }
.accounting-ledger-row div { display: grid; gap: 4px; min-width: 0; }
.accounting-ledger-row span,
.accounting-ledger-row small { color: var(--muted); font-weight: 900; }
.accounting-ledger-row strong { color: var(--ink); overflow-wrap: anywhere; }
.accounting-ledger-row b { color: var(--navy); font-size: 18px; white-space: nowrap; }
.accounting-ledger-row.expense b { color: #b72f3d; }
.accounting-ledger-row.income b { color: #197d49; }
.accounting-ledger-row button {
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  color: #b72f3d;
  background: #fff0f0;
  border-color: #ffc4c4;
  font-size: 22px;
}
.accounting-ledger-lock {
  display: grid;
  min-width: 40px;
  min-height: 32px;
  place-items: center;
  border-radius: 8px;
  color: #197d49;
  background: #e9f9ef;
  font-size: 12px;
  font-weight: 950;
}
.accounting-report-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.accounting-report-controls {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(160px, 220px) minmax(120px, 160px) auto;
  gap: 12px;
  align-items: end;
}
.accounting-report-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}
.accounting-report-controls button { min-height: 46px; }
.accounting-report-body { display: grid; gap: 14px; }
.accounting-report-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.accounting-report-cards article {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.accounting-report-cards span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}
.accounting-report-cards strong { color: var(--navy); font-size: 22px; }
.accounting-report-columns {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr);
  gap: 14px;
}
.accounting-report-columns section {
  display: grid;
  align-content: start;
  gap: 8px;
}
.accounting-report-columns h3 {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 18px;
}
.accounting-report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
}
.accounting-report-row.income { border-left-color: #25c46b; }
.accounting-report-row.expense { border-left-color: #f05261; }
.accounting-report-row span {
  color: var(--muted);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.accounting-report-row strong {
  color: var(--navy);
  white-space: nowrap;
}
.accounting-report-row.income strong { color: #197d49; }
.accounting-report-row.expense strong { color: #b72f3d; }
.accounting-print-report {
  padding: 18mm;
  color: #202141;
  font-family: Arial, sans-serif;
}
.accounting-print-report h1 { margin: 0 0 6px; font-size: 28px; }
.accounting-print-report h2 { margin: 20px 0 10px; font-size: 22px; }
.accounting-print-report .muted { color: #777997; font-weight: 700; }
.accounting-print-report .cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.accounting-print-report .card {
  padding: 14px;
  border: 1px solid #dcd7ff;
  border-radius: 8px;
}
.accounting-print-report .card span {
  display: block;
  color: #777997;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.accounting-print-report .card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}
.accounting-print-report table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 24px;
  font-size: 12px;
}
.accounting-print-report th,
.accounting-print-report td {
  padding: 8px;
  border: 1px solid #dcd7ff;
  text-align: left;
  vertical-align: top;
}
.accounting-print-report th { background: #f3efff; }
.curriculum-print-report {
  padding: 12mm;
  color: #20213f;
  font-family: Arial, sans-serif;
}
.curriculum-print-report h1 { margin: 0 0 4px; font-size: 24px; }
.curriculum-print-report p { margin: 0 0 18px; color: #73748f; font-weight: 700; }
.curriculum-print-report table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.curriculum-print-report th,
.curriculum-print-report td {
  padding: 8px;
  border: 1px solid #dcd7f5;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
  line-height: 1.35;
}
.curriculum-print-report th {
  color: #20213f;
  background: #f4f1fb;
}
.curriculum-print-report th:first-child,
.curriculum-print-report td:first-child {
  width: 48px;
  text-align: center;
}
.curriculum-print-report th:nth-child(4),
.curriculum-print-report td:nth-child(4) {
  width: 90px;
  text-align: center;
}
.section-head.compact { margin-bottom: 0; }
.section-head.compact h3 { margin-bottom: 2px; }
.custom-slots { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.custom-slots > div:first-child { display: grid; grid-template-columns: minmax(170px, 260px) auto; align-items: end; gap: 8px; }
.custom-slot-list { display: flex; flex-wrap: wrap; gap: 7px; }
.custom-slot-list > span { display: flex; align-items: center; gap: 6px; padding: 5px 7px 5px 10px; border-radius: 999px; color: #30543a; background: #e5f1e8; font-size: 12px; font-weight: 800; }
.custom-slot-list button { min-width: 24px; min-height: 24px; padding: 0; border-radius: 50%; color: #8f302a; background: #fff; }
.custom-slot-list small { color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: clamp(10px, 2vw, 24px); overflow: hidden; background: rgba(24, 36, 29, .48); }
.modal-backdrop > * { zoom: var(--modal-scale); }
.lesson-modal { width: min(1480px, calc((100vw - 48px) / var(--modal-scale))); max-height: calc((100vh - 48px) / var(--modal-scale)); overflow: auto; border-radius: 8px; background: #fff; padding: clamp(14px, 1.8vw, 20px); box-shadow: 0 24px 70px rgba(15, 28, 20, .25); }
.lesson-modal-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(300px, 380px); gap: 16px; align-items: start; }
.lesson-modal-grid:has(.lesson-choice-inactive) { grid-template-columns: minmax(360px, .8fr) minmax(420px, 1fr); }
.lesson-modal-grid.has-selected-student .lesson-form { grid-column: auto; }
.student-search-panel, .lesson-form { display: grid; min-width: 0; gap: clamp(8px, 1.2vw, 12px); padding: clamp(10px, 1.4vw, 14px); border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.student-search-panel.student-selected { display: grid; }
.lesson-choice-panel.lesson-choice-collapsed > h3,
.lesson-choice-panel.lesson-choice-collapsed > label,
.lesson-choice-panel.lesson-choice-collapsed > .lesson-student-results,
.lesson-choice-panel.lesson-choice-inactive { display: none; }
.lesson-choice-panel h3, .lesson-form h3 { margin: 0; color: var(--ink); font-size: clamp(18px, 2.1vw, 22px); }
.lesson-student-row.selected {
  border-color: var(--accent);
  outline: 3px solid rgba(116, 71, 247, .34);
  background: linear-gradient(90deg, rgba(116, 71, 247, .16), rgba(151, 77, 246, .08));
  box-shadow: 0 10px 24px rgba(116, 71, 247, .16);
}
.lesson-empty-selection { grid-template-columns: 1fr; color: var(--muted); border-style: dashed; background: #fff; }
.lesson-empty-selection p { margin: 0; }
.lesson-fee-note { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
.lesson-student-results { display: grid; gap: 7px; max-height: 430px; overflow: auto; }
.lesson-student-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; min-height: 62px; color: var(--ink); background: #fff; border: 1px solid var(--line); text-align: left; }
.lesson-student-row > span:nth-child(2) { display: grid; gap: 2px; }
.lesson-student-row small { color: var(--muted); }
.lesson-student-row b { color: var(--accent); }
.selected-student { display: grid; grid-template-columns: clamp(38px, 4.8vw, 46px) minmax(0, 1fr) auto; align-items: center; gap: clamp(7px, 1vw, 10px); min-width: 0; padding: clamp(9px, 1.2vw, 12px); border-left: 4px solid var(--accent); background: #edf7f0; }
.selected-student:not(.lesson-empty-selection) {
  border: 2px solid rgba(116, 71, 247, .32);
  border-left: 7px solid var(--accent);
  background: linear-gradient(90deg, rgba(116, 71, 247, .16), rgba(151, 77, 246, .08));
  box-shadow: 0 14px 30px rgba(116, 71, 247, .14);
}
.selected-student:not(.lesson-empty-selection) .avatar {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #974df6);
}
.selected-student > div:nth-child(2) { display: grid; gap: 3px; }
.selected-student strong,
.selected-student span { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: none; }
.selected-student strong { line-height: 1.14; }
.selected-student span { color: var(--muted); font-size: 12px; }
.selected-student button { min-width: 0; padding-inline: clamp(8px, 1vw, 14px); }
.currency-input { display: grid; grid-template-columns: 1fr 42px; }
.currency-input input { border-radius: 7px 0 0 7px; }
.currency-input span { display: grid; place-items: center; border: 1px solid #ccd8d0; border-left: 0; border-radius: 0 7px 7px 0; background: #f2f5f3; font-weight: 900; }

.student-group-modal { width: min(1180px, 100%); }
.student-group-builder {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.student-group-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.student-group-panel.selected { background: #fff; }
.student-group-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.student-group-candidate-list,
.student-group-selected-list,
.student-group-saved-list {
  display: grid;
  gap: 8px;
}
.student-group-candidate-list {
  max-height: 460px;
  overflow: auto;
}
.group-student-row,
.selected-group-student,
.student-group-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  text-align: left;
}
.group-student-row b { color: var(--accent); }
.group-student-row span:nth-child(2),
.selected-group-student span:nth-child(2),
.student-group-card > div:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.group-student-row small,
.selected-group-student small,
.student-group-card span,
.student-group-card small {
  color: var(--muted);
}
.student-group-existing {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.student-group-card-badge {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #7447f7, #ec3ca8);
  font-weight: 900;
}

.student-list, .basket-list, .question-bank, .category-tree, .compact-form { display: grid; gap: 10px; }
.student-list-actions { display: flex; align-items: flex-end; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.student-search-field { min-width: min(320px, 100%); gap: 4px; }
.student-search-field span { color: var(--muted); font-size: 12px; font-weight: 900; }
.student-search-field input { min-height: 44px; border-color: #dcd4fb; background: #fff; font-weight: 750; }
.student-search-field input:focus { outline: 3px solid rgba(116, 71, 247, .16); border-color: var(--accent); }
.student-row { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.avatar { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: #fff; background: var(--accent); font-weight: 900; }
.student-info { display: grid; gap: 3px; min-width: 0; }
.student-info span, .student-info small { color: var(--muted); }
.student-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.admin-users-grid { grid-template-columns: minmax(360px, 520px) minmax(420px, 1fr); }
.permission-panel { display: grid; gap: 10px; }
.permission-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.permission-list { display: grid; gap: 10px; }
.permission-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid #e5def7; border-radius: 8px; background: #fbfaff; }
.permission-group legend { padding: 0 6px; color: var(--navy); font-size: 13px; font-weight: 900; }
.permission-group label { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 8px; border: 1px solid #eee8fb; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 800; }
.permission-group input { width: 16px; min-height: 16px; accent-color: var(--accent); }
.user-access-list { display: grid; gap: 10px; }
.user-access-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.user-access-card.locked { background: linear-gradient(90deg, rgba(116, 71, 247, .06), rgba(247, 60, 167, .04)); }
.user-type-badge { display: inline-flex; align-items: center; min-height: 22px; margin-left: 6px; padding: 0 8px; border-radius: 999px; color: #fff; background: var(--accent); font-size: 11px; font-style: normal; font-weight: 900; vertical-align: middle; }
.locked-badge { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border-radius: 999px; color: var(--accent); background: #f3efff; font-size: 12px; font-weight: 900; white-space: nowrap; }
.question-bank { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.question-card, .basket-item { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.question-card { position: relative; }
.question-card img { display: block; width: 100%; height: 156px; object-fit: contain; background: #fff; border-bottom: 1px solid var(--line); }
.buyer-question-tools {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.buyer-question-tools button {
  display: grid;
  width: 30px;
  min-height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid #decfff;
  border-radius: 8px;
  color: #6847d8;
  background: #f3edff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}
.buyer-question-tools button.active {
  color: #fff;
  border-color: #8f6cff;
  background: linear-gradient(135deg, #8a4df6, #38bfd6);
}
.buyer-question-tools svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.image-editor-modal { width: min(1580px, calc((100vw - 24px) / var(--modal-scale))); }
.image-editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 16px; align-items: start; }
.image-editor-preview { display: grid; min-height: 420px; place-items: center; overflow: visible; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(135deg, #fbfaff, #fff); }
.image-editor-stage { position: relative; display: inline-grid; max-width: 100%; cursor: crosshair; touch-action: none; }
.image-editor-preview canvas { display: block; max-width: 100%; max-height: 68vh; border-radius: 6px; background: #fff; box-shadow: 0 12px 38px rgba(26, 32, 44, .16); }
.image-crop-selection {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  border: 2px dashed #fff;
  outline: 2px solid rgba(84, 213, 235, .9);
  background: rgba(84, 213, 235, .14);
  box-shadow: 0 0 0 9999px rgba(31, 35, 64, .34);
}
.image-crop-confirm {
  position: absolute;
  z-index: 3;
  min-height: 42px;
  padding: 0 22px;
  border-radius: 9px;
  background: linear-gradient(90deg, #54d5eb, #8d39f5);
  box-shadow: 0 12px 28px rgba(35, 36, 79, .22);
}
.image-editor-controls { display: grid; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfaff; }
.image-editor-controls label { display: grid; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 900; }
.image-editor-controls input[type="range"] { width: 100%; min-height: 26px; accent-color: var(--accent); }
.image-editor-hint { color: var(--muted); font-size: 12px; font-weight: 800; line-height: 1.35; }
.openai-clean-status { padding: 9px 10px; border-radius: 8px; background: #f2f8f3; color: #31553a; }
.openai-clean-review { position: fixed; inset: 8px; z-index: 9999; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .99); box-shadow: 0 24px 80px rgba(15, 28, 20, .28); overflow: hidden; }
.openai-clean-review figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; margin: 0; min-width: 0; min-height: 0; }
.openai-clean-review img { width: 100%; height: 100%; max-width: 100%; max-height: 100%; min-height: 0; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.openai-clean-review figcaption { color: var(--muted); font-size: 18px; font-weight: 900; text-align: center; }
.openai-clean-actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 280px) minmax(220px, 360px); justify-content: center; gap: 12px; }
.openai-clean-actions button { min-width: 0; white-space: normal; }
.image-editor-controls .form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.image-editor-controls .form-actions button:last-child { grid-column: 1 / -1; }
.question-body, .basket-item { padding: 9px; }
.question-card:has(.buyer-question-tools) .question-body { padding-top: 8px; }
.question-body p { min-height: 28px; font-size: 12px; line-height: 1.38; }
.answer-comparison { display: grid; gap: 3px; margin: 8px 0; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; }
.missing-answer { margin: 8px 0; padding: 9px; border: 1px solid #e6b2ad; border-radius: 6px; color: var(--danger); background: #fff5f4; }
.missing-answer span { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.missing-answer input { min-height: 36px; }
.missing-answer button { min-height: 36px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tag { border-radius: 999px; color: #31553a; background: #e8f2ea; font-size: 11px; font-weight: 800; padding: 4px 8px; }
.tag.gold { color: #624600; background: #fff2c9; }
.status-pending { color: #8b3e18; background: #ffe8d8; }
.status-new { color: #8b3e18; background: #ffe8d8; }
.status-working { color: #8b3e18; background: #ffe8d8; }
.status-solved { color: #28613a; background: #dff2e4; }
.status-repeat { color: #24558b; background: #e1efff; }
.status-exam_review { color: #64227e; background: #f2e1ff; }
.question-card .actions { display: grid; grid-template-columns: minmax(96px, max-content) minmax(150px, 1fr) minmax(64px, auto); gap: 8px; margin-top: 8px; }
.question-card .actions select { min-width: 0; }
.question-card .actions button, .question-card .actions select { min-height: 34px; border-radius: 7px; font-size: 12px; }
.question-card .actions button { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; }
.question-card .actions .status-select { border-width: 1px; font-weight: 800; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.status-select-pending,
.status-select-new,
.status-select-working { color: #8b3e18; background: #ffe8d8; border-color: #f0b995; }
.status-select-solved { color: #28613a; background: #dff2e4; border-color: #9fcbae; }
.status-select-repeat { color: #24558b; background: #e1efff; border-color: #a9cdf4; }
.status-select-exam_review { color: #64227e; background: #f2e1ff; border-color: #d5a9f4; }
.status-select option { color: var(--ink); background: #fff; }
.in-basket-button { color: var(--accent); background: #e7f1ea; border: 1px solid #bdd5c4; }
.filters { display: grid; grid-template-columns: 160px 150px 150px minmax(170px, 1fr); gap: 8px; }
.filters.buyer-folder-detail { grid-template-columns: 150px minmax(170px, 1fr); }
.basket-item { position: relative; display: grid; grid-template-columns: 22px 82px minmax(0, 1fr) auto; align-items: center; gap: 9px; cursor: grab; transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
.basket-item:active { cursor: grabbing; }
.basket-item.dragging { opacity: .45; }
.basket-item.drag-over { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 24%, transparent); }
.basket-drag-handle { color: #829087; font-size: 20px; letter-spacing: -5px; }
.basket-thumbnail { width: 82px; height: 58px; object-fit: contain; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.basket-content { display: grid; gap: 6px; min-width: 0; }
.basket-title { display: flex; justify-content: space-between; gap: 10px; font-weight: 800; }
.landscape-toggle { justify-self: start; display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 10px; color: #53625a; background: #fff; border: 1px solid var(--line); font-size: 11px; }
.landscape-toggle span { font-size: 19px; line-height: 1; }
.landscape-toggle.active { color: #573f00; background: #ffe58b; border-color: #e2b719; }
.basket-landscape-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #6d5600;
  background: #fff2a8;
  border: 1px solid #e4c535;
  font-size: 11px;
  font-weight: 900;
}
.basket-actions { display: flex; gap: 6px; }
.basket-actions button { flex: 1; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 13px; }
.basket-actions .basket-remove-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 0;
  border-radius: 12px;
}
.basket-remove-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.basket-item:has(.basket-landscape-pill) .basket-content { gap: 5px; }
.buyer-print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 8px 0 10px;
}
.buyer-print-actions button { min-width: 88px; min-height: 40px; padding: 0 12px; border-radius: 8px; font-size: 14px; }
.print-check {
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f3f6f4;
}

.file-picker { display: grid; min-height: 44px; place-items: center; border: 1px dashed #afc2b5; border-radius: 7px; color: var(--accent); background: #f5faf7; cursor: pointer; padding: 12px; }
.file-picker.large { min-height: 110px; }
.file-picker input { display: none; }
.category-group { border-left: 3px solid var(--accent); padding-left: 10px; }
.category-group strong { display: block; margin-bottom: 5px; font-size: 14px; }
.category-group span { display: inline-block; margin: 0 5px 5px 0; padding: 4px 8px; border-radius: 999px; background: #edf4ef; font-size: 12px; }
.curriculum-panel { max-width: 1120px; }
.curriculum-form {
  grid-template-columns: minmax(220px, 360px) auto;
  align-items: center;
  justify-content: end;
  gap: 8px;
  width: min(560px, 100%);
  margin-left: auto;
}
.curriculum-form input { min-height: 36px; font-size: 13px; }
.curriculum-form button { min-height: 36px; padding-inline: 14px; border-radius: 8px; font-size: 13px; white-space: nowrap; }
.curriculum-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.curriculum-group-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}
.curriculum-group-tabs button.active {
  color: #fff;
  border-color: var(--navy);
  background: var(--navy);
}
.curriculum-group-tabs small {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  color: inherit;
  background: rgba(111, 76, 255, .12);
  font-size: 11px;
}
.curriculum-group-tabs button.active small { background: rgba(255,255,255,.18); }
.curriculum-folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.curriculum-folder-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  color: var(--ink);
}
.curriculum-folder-card.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: #fbf8ff; }
.curriculum-folder-main {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "number badge" "number title" "number meta";
  gap: 1px 10px;
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.curriculum-folder-card em {
  grid-area: badge;
  align-self: end;
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  color: #24546b;
  background: #e9f8fb;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}
.curriculum-folder-number {
  grid-area: number;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #49cce4, #8d4bf4);
  color: #fff;
  font-weight: 900;
  font-size: 15px;
}
.curriculum-folder-card strong { grid-area: title; font-size: 16px; line-height: 1.1; text-transform: none; }
.curriculum-folder-card small { grid-area: meta; color: var(--muted); font-weight: 800; font-size: 12px; }
.curriculum-folder-delete {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #ffd0cc;
  border-radius: 8px;
  background: #fff3f1;
  color: #b42318;
  font-size: 18px;
  font-weight: 900;
  padding: 0;
}
.curriculum-select-hint {
  margin-top: 12px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fbfbff;
  font-weight: 800;
}
.curriculum-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(56vh, 620px);
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  overflow: hidden;
}
.curriculum-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.curriculum-detail-head span { color: var(--pink); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; font-size: 11px; }
.curriculum-detail-head h4 { margin: 2px 0 0; font-size: 20px; }
.curriculum-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.curriculum-save-button { background: linear-gradient(90deg, #54d5eb, #8d39f5); }
.curriculum-save-message { min-height: 18px; margin: -4px 0 8px; font-weight: 900; }
.curriculum-table-wrap { overflow: auto; min-height: 0; border: 1px solid var(--line); border-radius: 8px; }
.curriculum-table { width: 100%; border-collapse: collapse; min-width: 940px; table-layout: fixed; }
.curriculum-table th, .curriculum-table td { padding: 4px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.curriculum-table th:first-child, .curriculum-table td:first-child { width: 54px; text-align: center; }
.curriculum-table th:nth-child(2), .curriculum-table td:nth-child(2) { width: 18%; }
.curriculum-table th:nth-child(4), .curriculum-table td:nth-child(4) { width: 105px; }
.curriculum-table th:last-child, .curriculum-table td:last-child { width: 44px; border-right: 0; text-align: center; }
.curriculum-table th { color: var(--ink); background: #f6f3ff; font-size: 11px; font-weight: 850; }
.curriculum-table thead th { position: sticky; top: 0; z-index: 1; }
.curriculum-table td { color: var(--muted); font-size: 11px; font-weight: 650; }
.curriculum-table tr:last-child td { border-bottom: 0; }
.curriculum-table td:first-child { color: var(--ink); }
.curriculum-cell-input {
  width: 100%;
  min-height: 24px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 10.5px;
  font-weight: 620;
  line-height: 1.18;
  padding: 3px 5px;
  resize: vertical;
}
.curriculum-cell-input:hover, .curriculum-cell-input:focus { border-color: var(--line); background: #fff; outline: none; }
.curriculum-cell-input.small, .curriculum-cell-input.duration { text-align: center; }
.curriculum-empty { display: grid; gap: 6px; border: 1px dashed var(--line); border-radius: 12px; padding: 18px; color: var(--muted); background: #fff; }
.curriculum-empty strong { color: var(--ink); }
.curriculum-empty.slim { margin-top: 8px; }
.module-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.module-tabs button { min-width: 180px; }
.module-tabs button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.brand-settings-grid { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr); gap: 16px; align-items: stretch; }
.brand-logo-picker { min-height: 150px; }
.brand-logo-preview { display: grid; min-height: 150px; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.brand-logo-preview img { width: min(100%, 340px); max-height: 130px; object-fit: contain; }
.brand-settings-grid .color-row { grid-column: 1 / -1; }

.resource-library-form { margin-bottom: 16px; }
.resource-entry-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 8px; }
.resource-entry-tabs button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.resource-cover-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(180px, 300px); gap: 12px; }
.resource-cover-picker { min-height: 180px; }
.resource-cover-preview { position: relative; display: grid; min-height: 180px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #f7f9f8; }
.resource-cover-preview.hidden { display: none; }
.resource-cover-preview img { width: 100%; height: 180px; object-fit: contain; }
.resource-cover-preview button { position: absolute; right: 8px; bottom: 8px; }
.resource-topic-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 4px; }
.resource-topic-heading h3 { margin-bottom: 2px; }
.resource-topic-heading p { color: var(--muted); font-size: 12px; }
.automatic-resource-panel { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f7faf8; }
.automatic-resource-panel.hidden { display: none; }
.automatic-content-picker { min-height: 120px; gap: 5px; }
.automatic-content-picker small { color: var(--muted); }
.automatic-image-previews { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.automatic-image-previews:empty { display: none; }
.automatic-image-previews > figure { position: relative; display: grid; flex: 0 0 170px; grid-template-rows: 170px 32px; width: 170px; height: 202px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.automatic-image-previews img { display: block; width: 170px; height: 170px; padding: 6px; object-fit: contain; background: #f7f9f8; }
.automatic-image-previews figcaption { display: flex; align-items: center; padding: 5px 9px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; font-weight: 800; }
.automatic-image-previews button { position: absolute !important; top: 6px; right: 6px; width: 30px !important; min-height: 30px !important; padding: 0 !important; border-radius: 50%; font-size: 18px; }
.automatic-image-previews > .content-file-preview { grid-template-rows: 1fr 32px; place-items: center; padding: 16px; background: #f7fbf8; }
.content-file-preview strong { max-width: 130px; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; text-align: center; }
.resource-layout-field { max-width: 520px; }
.resource-layout-field small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; line-height: 1.45; }
.automatic-resource-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.automatic-resource-actions button { flex: 1 1 220px; }
.form-note { min-height: 18px; color: var(--muted); font-size: 12px; }
.resource-topic-table { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.resource-topic-header, .resource-topic-row { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.5fr) minmax(90px, .45fr) minmax(90px, .45fr) 44px; align-items: center; gap: 8px; padding: 8px; }
.resource-topic-header { color: #46534c; background: #f0f4f2; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.resource-topic-row + .resource-topic-row { border-top: 1px solid var(--line); }
.resource-topic-row input { min-width: 0; }
.resource-topic-row button { min-height: 40px; padding: 0; font-size: 20px; }
.resource-library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.resource-card { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); min-height: 150px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.resource-card-cover { display: grid; min-height: 150px; place-items: center; border-right: 1px solid var(--line); background: #f1f5f3; }
.resource-card-cover img { width: 100%; height: 150px; object-fit: contain; }
.resource-card-cover span { color: var(--accent); font-size: 36px; }
.resource-card-body { min-width: 0; padding: 12px 120px 12px 12px; }
.resource-card-body > b { display: inline-block; padding: 4px 7px; border-radius: 4px; font-size: 10px; text-transform: uppercase; }
.resource-card-body h3 { margin: 8px 0 4px; overflow-wrap: anywhere; font-size: 16px; }
.resource-card-body p { color: var(--muted); font-size: 11px; }
.resource-card details { margin-top: 9px; }
.resource-card summary { color: var(--accent); cursor: pointer; font-size: 11px; font-weight: 800; }
.resource-card ul { display: grid; gap: 5px; margin: 8px 0 0; padding: 0; list-style: none; }
.resource-card li { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.resource-card li small { color: var(--muted); white-space: nowrap; }
.resource-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; }
.resource-card-actions button { min-height: 34px; padding: 6px 9px; }
.print-sheet { display: none; }
body.preview-open { overflow: hidden; }
.print-sheet.screen-preview {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 3000;
  width: auto;
  margin: 0;
  overflow: auto;
  padding: 24px 18px 42px;
  color: #111;
  background: rgba(218, 221, 220, .92);
  border-radius: 0;
  box-shadow: none;
}
.paper-preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  width: min(1120px, calc(100vw - 48px));
  min-height: 72px;
  margin: 0 auto 22px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 46px rgba(31, 41, 55, .18);
}
.paper-preview-toolbar > strong {
  color: #1f2340;
  font-size: 18px;
  text-align: center;
}
.paper-preview-toolbar > div {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.paper-preview-toolbar button {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
}
.paper-preview-toolbar button:first-child { justify-self: start; }
.paper-preview-toolbar .ghost { color: #7547f6; background: #fff; }
.paper-preview-toolbar button:not(.ghost) { background: linear-gradient(135deg, #7447f6, #9c46ef); }
.print-sheet:not(.screen-preview) .paper-preview-toolbar { display: none; }
.print-sheet.screen-preview .question-page {
  width: min(920px, calc(100vw - 48px));
  margin: 0 auto 24px;
}
.print-sheet.screen-preview .print-page {
  position: relative;
  width: 100%;
  aspect-ratio: 210 / 297;
  min-height: auto;
  overflow: hidden;
  margin: 0 auto 24px;
  padding: 76px 56px 66px;
  background: #fff;
  border: 4px solid #20252a;
  box-shadow: 0 14px 42px rgba(31, 41, 55, .22);
}
.print-sheet.screen-preview .print-page:last-child { margin-bottom: 0; }
.print-sheet.screen-preview .print-corner,
.print-sheet.screen-preview .print-dots { display: none; }
.print-sheet.screen-preview .buyer-print-page { padding-top: 92px; }
.print-sheet.screen-preview .buyer-print-page::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 66px;
  background-image: radial-gradient(#38bfd6 1.4px, transparent 1.6px);
  background-size: 16px 16px;
  background-color: #d9f7fb;
  opacity: .72;
}
.print-sheet.screen-preview .buyer-print-strip {
  position: relative;
  z-index: 2;
  display: grid;
  width: min(760px, 92%);
  min-height: 48px;
  place-items: center;
  margin: 0 auto 24px;
  border-radius: 999px;
  color: #fff;
  background: #38bfd6;
  font-size: 16px;
  font-weight: 900;
}
.print-sheet.screen-preview .buyer-print-page .print-header {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 74px;
  place-items: center;
  margin-bottom: 34px;
  border: 2px solid #38bfd6;
  border-radius: 18px;
}
.print-sheet.screen-preview .buyer-print-page .print-student-name,
.print-sheet.screen-preview .buyer-print-page .print-logo,
.print-sheet.screen-preview .buyer-print-page .print-logo-fallback { display: none; }
.print-sheet.screen-preview .buyer-print-page .print-header h1 {
  grid-column: 1;
  margin: 0;
  color: #1f2937;
  font-family: Inter, Arial, sans-serif;
  font-size: 19px;
  letter-spacing: 0;
  text-align: center;
}
.print-sheet.screen-preview .buyer-print-meta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  margin: -16px 0 22px;
  color: #60707a;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}
.print-sheet.screen-preview .print-questions {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 30px;
  align-items: start;
}
.print-sheet.screen-preview .buyer-print-page.extra-question-space .print-questions { gap: 46px; }
.print-sheet.screen-preview .print-row {
  display: grid;
  break-inside: avoid;
  align-items: start;
}
.print-sheet.screen-preview .print-row.paired-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px;
}
.print-sheet.screen-preview .print-row.paired-row .print-card + .print-card {
  border-left: 2px dashed #38bfd6;
  padding-left: 28px;
}
.print-sheet.screen-preview .print-card {
  break-inside: avoid;
  padding: 0;
}
.print-sheet.screen-preview .print-card h4 {
  margin: 0 0 10px;
  color: #ff5a1f;
  font-size: 13px;
}
.print-sheet.screen-preview .print-card img {
  display: block;
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  object-position: top center;
}
.print-sheet.screen-preview .print-card.landscape-question img {
  width: auto;
  max-width: 100%;
  max-height: 390px;
  margin: 0 auto;
}
.print-sheet.screen-preview .print-footer {
  position: absolute;
  z-index: 3;
  right: 56px;
  bottom: 18px;
  left: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 24px;
  border-top: 1px solid #b9ebf2;
  color: #59636e;
  font-size: 10px;
}
.print-sheet.screen-preview .page-number {
  display: inline-grid;
  min-width: 42px;
  height: 22px;
  place-items: center;
  padding: 0 10px;
  transform: translateY(-1px);
  border-radius: 999px;
  color: #fff;
  background: #38bfd6;
  font-size: 11px;
  font-weight: 900;
}
.print-sheet.screen-preview .answer-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}
.print-sheet.screen-preview .answer-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid #c8d8df;
  border-radius: 12px;
  background: #fff;
}
.print-sheet.screen-preview .answer-item span,
.print-sheet.screen-preview .answer-item strong {
  display: grid;
  place-items: center;
}
.print-sheet.screen-preview .answer-item span {
  color: #fff;
  background: #38bfd6;
  font-size: 13px;
  font-weight: 900;
}
.print-sheet.screen-preview .answer-item strong {
  color: #1f2340;
  font-size: 15px;
}
.print-sheet.screen-preview .answer-note {
  position: relative;
  z-index: 2;
  margin-top: 32px;
  padding: 16px;
  border-left: 4px solid #38bfd6;
  color: #52636b;
  background: #f4f8fa;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1050px) {
  :root { --modal-scale: .92; }
  .login-screen { height: 100vh; min-height: 0; overflow: hidden; grid-template-columns: minmax(0, 1.02fr) minmax(300px, .98fr); }
  .login-landing-nav { top: clamp(12px, 2.2vw, 18px); left: clamp(18px, 3.2vw, 32px); right: auto; width: min(58vw, 520px); max-width: calc(100vw - 360px); }
  .login-landing-nav button { font-size: clamp(11px, 1.35vw, 13px); }
  .login-hero { min-height: 100vh; gap: clamp(10px, 2vh, 20px); padding: clamp(24px, 4vw, 42px); }
  .login-hero-brand-logo { top: clamp(-12px, -1vw, -4px); right: clamp(24px, 5vw, 52px); width: clamp(94px, 13vw, 140px); }
  .login-hero-copy { gap: clamp(9px, 1.8vh, 14px); max-width: min(100%, 520px); margin-top: clamp(78px, 14vh, 118px); }
  .login-hero-copy span, .login-eyebrow { font-size: clamp(10px, 1.4vw, 13px); letter-spacing: clamp(1.6px, .32vw, 3px); }
  .login-hero-copy h1 { font-size: clamp(28px, 4vw, 40px); }
  .login-hero-copy p { font-size: clamp(14px, 1.7vw, 17px); }
  .login-color-strip { width: min(560px, 100%); height: clamp(12px, 1.7vw, 18px); }
  .login-hero-credit { font-size: clamp(11px, 1.35vw, 14px); }
  .login-box { width: min(86%, 440px); gap: clamp(9px, 1.8vh, 13px); padding: clamp(18px, 3vw, 26px); }
  .login-box h1 { font-size: clamp(28px, 3.6vw, 38px); }
  .login-subtitle { font-size: clamp(14px, 1.7vw, 17px); }
  .login-box button[type="submit"], .login-box input { min-height: clamp(42px, 5vw, 52px); }
  .login-box button[type="submit"] { font-size: clamp(15px, 1.8vw, 18px); }
  .filters { grid-template-columns: 1fr 1fr; }
  .schedule-day-head span { font-size: 10px; }
  .schedule-time, .schedule-cell { min-height: 56px; }
  .schedule-shell { height: calc(100vh - 285px); min-height: 430px; }
  .study-toolbar { grid-template-columns: minmax(210px, 1fr) minmax(190px, 1fr); }
  .study-toolbar-actions { grid-column: 1 / -1; justify-self: start; }
  .smart-coaching-controls { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .smart-workdays { grid-template-columns: repeat(4, minmax(54px, 1fr)); }
  .study-resource-panel { grid-template-columns: 1fr; }
  .study-day-header { min-height: 58px; padding: 5px 3px; }
  .study-day-header strong { font-size: 11px; }
  .study-day-header span { font-size: 9px; }
  .study-task-cell { min-height: 82px; gap: 4px; padding: 6px 4px; }
  .study-task-slot:has(.study-cell-tools:not(:empty)) .study-task-cell { padding-bottom: 31px; }
  .study-task-head { display: grid; gap: 3px; }
  .study-task-head b, .study-task-head time, .study-task-cell > small { font-size: 8px; }
  .study-task-cell > strong, .study-task-cell em { font-size: 9px; }
  .study-add-row { padding: 0 3px; font-size: 9px; }
}

@media (max-width: 920px), (max-height: 760px) {
  :root { --modal-scale: .84; }
  .lesson-modal-grid { gap: 12px; }
  .lesson-form .two-col { gap: 8px; }
  .lesson-form textarea { min-height: 78px; }
}

@media (max-width: 780px), (max-height: 660px) {
  :root { --modal-scale: .76; }
  .lesson-modal-grid { grid-template-columns: minmax(220px, .9fr) minmax(280px, 1fr); }
  .lesson-modal-grid:has(.lesson-choice-inactive) { grid-template-columns: minmax(350px, .85fr) minmax(410px, 1fr); }
  .lesson-choice-panel.lesson-choice-inactive { display: none; }
}

@container workspace (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-todo-card { grid-column: 1 / -1; }
  .dashboard-finance-card { grid-column: auto; }
  .accounting-student-finder { grid-template-columns: 78px minmax(220px, 1fr) auto; gap: 16px; padding: 18px; }
  .accounting-avatar { width: 74px; font-size: 28px; }
  .accounting-tabs button { padding: 0 18px; font-size: 16px; }
  .accounting-ledger-grid { grid-template-columns: 1fr; }
  .accounting-ledger-form { position: static; }
  .accounting-report-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accounting-report-controls button { grid-column: 1 / -1; }
  .accounting-report-columns { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-row { grid-template-columns: 44px minmax(0, 1fr); }
  .student-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .study-toolbar { grid-template-columns: minmax(210px, 1fr) minmax(180px, 1fr); }
  .study-toolbar-actions { grid-column: 1 / -1; justify-self: stretch; justify-content: flex-start; }
}

@container workspace (max-width: 780px) {
  .dashboard-workbench { grid-template-columns: 1fr; }
  .dashboard-todo-card { grid-column: auto; }
  .dashboard-finance-card { grid-column: auto; }
  .accounting-student-finder { grid-template-columns: 80px minmax(0, 1fr); }
  #accountingFindStudent { grid-column: 1 / -1; }
  .accounting-tabs { justify-content: flex-start; overflow-x: auto; }
  .accounting-info-grid { grid-template-columns: 1fr; }
  .accounting-ledger-summary { grid-template-columns: 1fr; }
  .accounting-report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .management-grid, .lesson-modal-grid, .study-resource-panel, .student-group-builder { grid-template-columns: 1fr; }
  .teacher-question-preview { grid-template-columns: 1fr; }
  .teacher-preview-details { border-top: 1px solid var(--line); border-left: 0; }
  .topbar, .section-head { align-items: stretch; flex-direction: column; }
  .exam-countdown-strip { width: 100%; }
  .topbar-actions, .basket-header-actions, .study-program-navigation { align-items: stretch; flex-direction: column; }
  .week-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .study-toolbar, .study-resource-panel form { grid-template-columns: 1fr; }
  .study-toolbar-actions { width: 100%; }
  .study-toolbar-actions button { flex: 1 1 180px; }
  .smart-coaching-controls { grid-template-columns: 1fr; }
  .smart-coaching-actions button { width: 100%; }
  .saved-program-card li { grid-template-columns: 1fr; }
  .basket-item { grid-template-columns: 20px 80px minmax(0, 1fr); }
  .basket-actions { grid-column: 1 / -1; }
  .curriculum-form, .curriculum-folder-grid, .brand-settings-grid, .resource-cover-grid { grid-template-columns: 1fr; }
  .curriculum-detail-head { align-items: stretch; flex-direction: column; }
  .curriculum-detail-actions { justify-content: stretch; }
  .curriculum-detail-actions button { width: 100%; }
  .brand-settings-grid .color-row { grid-column: auto; }
  .resource-topic-heading { align-items: stretch; flex-direction: column; }
  .resource-topic-header { display: none; }
  .resource-topic-row { grid-template-columns: 1fr 1fr 44px; }
  .resource-topic-row [data-resource-topic-unit],
  .resource-topic-row [data-resource-topic-name] { grid-column: 1 / -1; }
}

@container workspace (max-width: 520px) {
  .stats-grid, .two-col, .three-col, .print-options, .filters, .photo-actions, .branch-fieldset, .permission-group { grid-template-columns: 1fr; }
  .dashboard-todo-card, .dashboard-lesson-card, .dashboard-finance-card { min-height: 0; padding: 14px; }
  .dashboard-todo-form { grid-template-columns: 1fr; }
  .dashboard-donut-wrap { width: min(160px, 100%); }
  .accounting-student-finder { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .accounting-fields { width: 100%; }
  .accounting-tabs { display: grid; grid-template-columns: 1fr; }
  .accounting-tabs button { border: 1px solid var(--line); border-radius: 8px; }
  .accounting-panel { padding: 14px; }
  .accounting-ledger-row { grid-template-columns: 1fr; align-items: stretch; }
  .accounting-ledger-row b,
  .accounting-ledger-row button,
  .accounting-ledger-lock { justify-self: start; }
  .accounting-report-controls,
  .accounting-report-cards { grid-template-columns: 1fr; }
  .accounting-report-row { align-items: flex-start; flex-direction: column; }
  .exam-countdown-strip { grid-template-columns: 1fr; }
  .week-controls { grid-template-columns: 1fr; }
  .student-folder-tabs { display: grid; grid-template-columns: 1fr; }
  .student-folder-tabs button { min-width: 0; }
  .student-folder-summary, .saved-program-card header, .photo-preview-footer { align-items: stretch; flex-direction: column; }
  .homework-card header { display: grid; }
  .homework-card label { min-width: 0; }
  .form-actions, .student-actions { align-items: stretch; flex-direction: column; }
  .form-actions button, .student-actions button { width: 100%; }
  .student-group-fields { grid-template-columns: 1fr; }
  .group-student-row,
  .selected-group-student,
  .student-group-card {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .group-student-row b,
  .selected-group-student button {
    grid-column: 2;
    justify-self: start;
  }
  .question-bank { grid-template-columns: minmax(0, 1fr); }
  .question-card .actions { grid-template-columns: 1fr; }
  .basket-item { grid-template-columns: 1fr; }
  .basket-thumbnail { width: 100%; height: 130px; }
  .module-tabs { display: grid; grid-template-columns: 1fr; }
  .module-tabs button { min-width: 0; }
  .student-resource-grid {
    grid-template-columns: 1fr;
  }
  .resource-assign-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .resource-assign-panel form {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .resource-assign-panel form button {
    width: 100%;
  }
  .assigned-resource-card {
    grid-template-columns: 74px minmax(0, 1fr);
  }
  .assigned-resource-body {
    padding-right: 52px;
  }
  .resource-entry-tabs { grid-template-columns: 1fr; }
  .resource-library-list { grid-template-columns: 1fr; }
  .resource-card { grid-template-columns: 74px minmax(0, 1fr); }
  .resource-card-cover, .resource-card-cover img { min-height: 130px; height: 130px; }
}
@media (max-width: 760px) {
  :root { --modal-scale: .72; }
  .login-landing-nav { top: 12px; left: 14px; right: 14px; padding: 6px; }
  .login-landing-nav button { min-height: 32px; padding: 7px 10px; font-size: clamp(10px, 2.2vw, 12px); }
  .login-hero { padding: clamp(20px, 4vw, 30px); }
  .login-hero-brand-logo { top: 4px; right: clamp(18px, 4vw, 28px); width: clamp(76px, 14vw, 100px); }
  .login-hero-copy { margin-top: clamp(70px, 13vh, 96px); }
  .login-hero-copy h1 { font-size: clamp(24px, 4.7vw, 30px); }
  .login-hero-copy p { font-size: clamp(13px, 2.2vw, 15px); }
  .login-box h1 { font-size: clamp(25px, 4.8vw, 31px); }
  .login-subtitle { font-size: clamp(13px, 2.3vw, 15px); }
  .login-hero-credit { margin-top: -6px; font-size: clamp(11px, 2vw, 13px); }
  .login-color-strip { height: clamp(11px, 2vw, 14px); }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .workspace { padding: 14px; }
  .side-nav { grid-template-columns: 1fr 1fr; }
  .account-box { margin-top: 18px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar, .section-head { align-items: stretch; flex-direction: column; }
  .student-folder-summary,
  .resource-assign-panel {
    align-items: stretch;
    flex-direction: column;
  }
  .student-folder-tabs {
    grid-template-columns: 1fr;
  }
  .student-folder-tabs button {
    min-width: 0;
    width: 100%;
  }
  .resource-assign-panel form {
    grid-template-columns: 1fr;
    min-width: 0;
    width: 100%;
  }
  .assigned-resource-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .assigned-resource-cover,
  .assigned-resource-cover img {
    min-height: 92px;
    height: 92px;
  }
  .assigned-resource-body {
    padding-right: 0;
  }
  .resource-percent {
    position: static;
    display: inline-block;
    margin-top: 8px;
  }
  .exam-countdown-strip { width: 100%; grid-template-columns: 1fr; }
  .topbar-actions, .basket-header-actions { align-items: stretch; flex-direction: column; }
  .two-col, .three-col, .print-options, .filters { grid-template-columns: 1fr; }
  .teacher-question-preview { grid-template-columns: 1fr; }
  .teacher-preview-details { border-top: 1px solid var(--line); border-left: 0; }
  .photo-actions { grid-template-columns: 1fr; }
  .camera-button, .photo-actions .file-picker { min-height: 110px; }
  .photo-preview-footer { align-items: stretch; flex-direction: column; }
  .branch-fieldset { grid-template-columns: 1fr; }
  .week-controls { flex-direction: column; }
  .lesson-modal-grid { grid-template-columns: minmax(350px, .85fr) minmax(410px, 1fr); }
  .lesson-form .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-backdrop { overflow: hidden; place-items: center; }
  .custom-slots > div:first-child { grid-template-columns: 1fr; }
  .study-toolbar, .study-resource-panel form { grid-template-columns: 1fr; }
  .study-toolbar-actions { width: 100%; }
  .study-toolbar-actions button { flex: 1; }
  .student-folder-summary, .saved-program-card header { align-items: stretch; flex-direction: column; }
  .homework-card header { display: grid; }
  .homework-card label { min-width: 0; }
  .student-folder-tabs { display: grid; grid-template-columns: 1fr; }
  .student-folder-tabs button { min-width: 0; }
  .saved-program-card li { grid-template-columns: 1fr; }
  .schedule-shell { height: 68vh; min-height: 400px; }
  .student-row { grid-template-columns: 44px 1fr; }
  .user-access-card { grid-template-columns: 44px 1fr; }
  .user-access-card .student-actions { grid-column: 1 / -1; }
  .student-actions { grid-column: 1 / -1; }
  .basket-item { grid-template-columns: 20px 80px minmax(0, 1fr); }
  .basket-thumbnail { width: 80px; height: 64px; }
  .basket-actions { grid-column: 1 / -1; }
}

@media print {
  :root { --print-navy: #004667; --print-orange: #ff5a1f; }
  html, body { width: 210mm; min-height: 297mm; background: #fff; }
  body { margin: 0; }
  .print-sheet,
  .print-sheet *,
  .print-sheet *::before,
  .print-sheet *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .app-shell, .login-screen { display: none !important; }
  .print-sheet, .print-sheet.screen-preview {
    position: static;
    display: block;
    width: 210mm;
    margin: 0;
    overflow: visible;
    padding: 0;
    color: #111;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
  }
  .paper-preview-toolbar { display: none !important; }
  html:has(body.printing-study-program), body.printing-study-program { width: 297mm; min-height: 210mm; height: 210mm; overflow: hidden; }
  body.printing-study-program .print-sheet { width: 297mm; height: 210mm; overflow: hidden; }
  @page { size: A4; margin: 0; }
  .print-page { position: relative; width: 210mm; height: 297mm; overflow: hidden; padding: 15mm 16mm 23mm; break-after: page; page-break-after: always; background: #fff; }
  .print-page:last-child { break-after: auto; page-break-after: auto; }
  .print-header { position: relative; z-index: 2; display: grid; grid-template-columns: 48mm 1fr 58mm; align-items: center; min-height: 30mm; margin-bottom: 5mm; }
  .print-student-name { color: var(--print-navy); font-size: 15px; line-height: 1.2; }
  .print-header h1 { grid-column: 2; margin: 0; color: var(--print-orange); font-family: Impact, "Arial Black", sans-serif; font-size: 27px; letter-spacing: 0; text-align: center; }
  .print-logo { grid-column: 3; justify-self: end; width: 52mm; height: 28mm; object-fit: contain; object-position: center right; transform: scale(1.35); transform-origin: center right; }
  .print-logo-fallback { grid-column: 3; justify-self: end; display: grid; width: 22mm; height: 16mm; place-items: center; color: #fff; background: var(--print-navy); font-size: 17px; }
  .print-questions { display: grid; gap: 5mm; align-items: start; }
  .buyer-print-page { padding-top: 16mm; }
  .buyer-print-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 17mm;
    background-image: radial-gradient(#38bfd6 1px, transparent 1.2px);
    background-size: 5mm 5mm;
    background-color: #d9f7fb;
    box-shadow: inset 0 0 0 9999px #d9f7fb;
    opacity: .8;
  }
  .buyer-print-strip {
    position: relative;
    z-index: 3;
    display: grid;
    width: 176mm;
    min-height: 11mm;
    place-items: center;
    margin: 0 auto 5mm;
    border-radius: 999px;
    color: #fff;
    background: #38bfd6;
    box-shadow: inset 0 0 0 9999px #38bfd6;
    font-size: 13px;
    font-weight: 900;
  }
  .buyer-print-page .print-header {
    grid-template-columns: 1fr;
    min-height: 16mm;
    margin-bottom: 7mm;
    border: 2px solid #38bfd6;
    border-radius: 5mm;
  }
  .buyer-print-page .print-student-name, .buyer-print-page .print-logo, .buyer-print-page .print-logo-fallback { display: none; }
  .buyer-print-page .print-header h1 {
    grid-column: 1;
    color: #1f2937;
    font-family: Inter, Arial, sans-serif;
    font-size: 17px;
    letter-spacing: 0;
  }
  .buyer-print-meta {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 5mm;
    margin: -4mm 0 7mm;
    color: #60707a;
    font-size: 10px;
    font-weight: 800;
  }
  .buyer-print-page.extra-question-space .print-questions { gap: 9mm; }
  .buyer-print-page .print-corner, .buyer-print-page .print-dots { display: none; }
  .print-row { display: grid; break-inside: avoid; align-items: start; }
  .print-row.paired-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .print-row.paired-row .print-card + .print-card { border-left: 1px dashed #91b7c7; padding-left: 8mm; }
  .print-row.paired-row .print-card:first-child { padding-right: 8mm; }
  .print-row.single-row, .print-row.full-row { grid-template-columns: 1fr; }
  .print-card { break-inside: avoid; padding: 0; }
  .print-card h4 { margin: 0 0 2mm; color: var(--print-orange); font-size: 12px; }
  .print-card img { display: block; width: 100%; max-height: 88mm; object-fit: contain; object-position: top center; }
  .print-card.landscape-question img { width: auto; max-width: 100%; max-height: 82mm; margin: 0 auto; }
  .print-card.compact img { max-height: 72mm; }
  .print-card.large, .print-card.large img { grid-column: 1 / -1; max-height: 145mm; }
  .answer-sheet { break-before: page; padding-top: 18mm; }
  .answer-header { display: flex; align-items: center; justify-content: space-between; min-height: 28mm; padding-bottom: 6mm; border-bottom: 2px solid var(--print-orange); }
  .answer-header span { color: var(--print-navy); font-size: 11px; font-weight: 900; }
  .answer-header h2 { margin: 2mm 0 0; color: var(--print-orange); font-family: Impact, "Arial Black", sans-serif; font-size: 28px; letter-spacing: 0; }
  .answer-header .print-logo { display: block; width: 42mm; height: 23mm; object-fit: contain; object-position: center right; transform: scale(1.25); transform-origin: center right; }
  .answer-header .print-logo-fallback { display: grid; }
  .answer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5mm; margin-top: 14mm; }
  .answer-item { display: grid; grid-template-columns: 11mm 1fr; overflow: hidden; min-height: 12mm; border: 1px solid #c8d8df; border-radius: 3mm; background: #fff; }
  .answer-item span, .answer-item strong { display: grid; place-items: center; }
  .answer-item span { color: #fff; background: var(--print-navy); font-size: 12px; }
  .answer-item strong { color: var(--print-navy); font-size: 16px; }
  .answer-note { margin-top: 18mm; padding: 5mm; border-left: 3px solid var(--print-orange); color: #52636b; background: #f4f8fa; font-size: 12px; font-weight: 700; }
  .print-corner { position: absolute; z-index: 1; pointer-events: none; }
  .print-corner i, .print-corner b { position: absolute; display: block; transform: skewX(-38deg); }
  .print-corner-top { top: 0; right: -10mm; width: 73mm; height: 25mm; }
  .print-corner-top i { top: 0; right: 0; width: 54mm; height: 15mm; background: var(--print-navy); }
  .print-corner-top b { top: 0; right: 49mm; width: 18mm; height: 11mm; background: var(--print-orange); }
  .print-corner-bottom { bottom: 0; left: -13mm; width: 88mm; height: 29mm; }
  .print-corner-bottom i { bottom: -4mm; left: 0; width: 67mm; height: 19mm; background: var(--print-navy); }
  .print-corner-bottom b { bottom: -4mm; left: 59mm; width: 24mm; height: 15mm; background: var(--print-orange); }
  .print-dots { position: absolute; z-index: 1; width: 20mm; height: 20mm; opacity: .35; background-image: radial-gradient(#7b8f98 1px, transparent 1.2px); background-size: 3mm 3mm; }
  .print-dots-top { top: 4mm; left: 4mm; }
  .print-dots-bottom { right: 3mm; bottom: 14mm; }
  .print-footer {
    position: absolute;
    z-index: 3;
    right: 16mm;
    bottom: 7mm;
    left: 16mm;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 8mm;
    border-top: 1px solid #b9ebf2;
    color: #59636e;
    font-size: 9px;
  }
  .page-number {
    display: inline-grid;
    min-width: 15mm;
    height: 6mm;
    place-items: center;
    padding: 0 3mm;
    transform: translateY(-1mm);
    border-radius: 999px;
    color: #fff;
    background: #38bfd6;
    font-size: 10px;
    font-weight: 900;
  }
  @page study-program { size: A4 landscape; margin: 0; }
  .study-print-page, .study-print-page * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .study-print-page { page: study-program; width: 297mm; min-height: 210mm; overflow: visible; padding: 10mm 10mm 9mm; background: #fff; }
  .study-print-header { display: grid; grid-template-columns: 62mm 1fr 58mm; align-items: center; min-height: 18mm; border-bottom: 1.5px solid #27596c; }
  .study-print-header > div { display: grid; gap: 1mm; }
  .study-print-header > div strong { color: #27596c; font-size: 14px; }
  .study-print-header > div span { color: #68756d; font-size: 9px; }
  .study-print-header h1 { color: #c8673e; font-size: 18px; text-align: center; }
  .study-print-header img { justify-self: end; width: 48mm; height: 16mm; object-fit: contain; object-position: right center; }
  .study-print-week { margin: 3mm 0; color: #44544b; font-size: 10px; font-weight: 900; text-align: center; }
  .study-print-grid { display: grid; grid-template-columns: repeat(7, 1fr); align-items: start; border-top: 1px solid #84958b; border-left: 1px solid #84958b; }
  .study-print-day { display: flex; min-width: 0; height: auto; align-self: start; flex-direction: column; border-right: 1px solid #84958b; }
  .study-print-day > header { display: grid; min-height: 13mm; place-items: center; align-content: center; gap: 1mm; border-bottom: 1px solid #84958b; background: #f1f4f2; }
  .study-print-day > header strong { font-size: 9px; }
  .study-print-day > header span { color: #66736c; font-size: 7px; }
  .study-print-task { flex: 0 0 auto; min-height: var(--study-print-row-min, 30mm); height: auto; overflow: visible; padding: 2mm; border-bottom: 1px solid #aeb9b2; break-inside: avoid; }
  .study-print-task > div { display: flex; align-items: start; justify-content: space-between; gap: 1mm; }
  .study-print-task b { padding: 1mm 1.5mm; border-radius: 1mm; font-size: 6.5px; text-transform: uppercase; }
  .study-print-task .subject-math { background: #fff3aa !important; }
  .study-print-task .subject-turkish { background: #bde9e8 !important; }
  .study-print-task .subject-science { background: #c9edb7 !important; }
  .study-print-task .subject-history { background: #ffd29c !important; }
  .study-print-task .subject-english { background: #e2c7ef !important; }
  .study-print-task .subject-religion { background: #f6d5bc !important; }
  .study-print-task .subject-free-time { background: #d9e5ec !important; }
  .study-print-task .subject-other { background: #edf1ef !important; }
  .study-print-task time { font-size: 6.5px; font-weight: 800; white-space: nowrap; }
  .study-print-task small { display: block; margin-top: 1mm; color: #4d5d54; font-size: 6px; font-weight: 800; }
  .study-print-task p { margin-top: 1.5mm; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 7px; line-height: 1.25; }
}

@media (max-width: 760px) {
  .openai-clean-review { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; }
}
