:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #edf3fb;
  --border: #e4ebf4;
  --text: #17233a;
  --muted: #71809a;
  --primary: #2f75d6;
  --primary-dark: #245fb1;
  --primary-soft: #eaf3ff;
  --success: #16845b;
  --warning: #b7791f;
  --info: #04748a;
  --danger: #b42318;
  --sidebar: #dfe9f6;
  --sidebar-soft: #d4e1f1;
  --sidebar-line: #c5d4e7;
  --shadow-soft: 0 8px 20px rgba(35, 58, 91, 0.045);
}

.survey-page,
.page-shell {
  display: grid;
  gap: 22px;
}

.page-hero,
.content-card {
  background: #fff;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.page-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.page-hero h1,
.content-card h2 {
  color: #071b3a;
  font-weight: 900;
  margin: 0;
}

.page-hero p {
  color: #64748b;
  margin: 8px 0 0;
}

.eyebrow {
  color: #6b7b95;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}

.content-card {
  padding: 22px;
}

.card-heading,
.action-row,
.form-actions,
.question-head,
.section-title {
  align-items: center;
  display: flex;
  gap: 12px;
}

.card-heading,
.form-actions,
.question-head,
.section-title {
  justify-content: space-between;
}

.toolbar-form {
  display: flex;
  gap: 10px;
}

.toolbar-form input,
.toolbar-form select,
.survey-form input,
.survey-form select,
.survey-form textarea {
  border: 1px solid #d7e4f5;
  border-radius: 10px;
  color: #0f172a;
  min-height: 44px;
  padding: 10px 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-decoration: none;
}

.primary-button {
  background: #2f73dc;
  border: 1px solid #2f73dc;
  color: #fff;
}

.secondary-button,
.icon-button {
  background: #f8fbff;
  border: 1px solid #dbe7f6;
  color: #173b74;
}

.ghost-button {
  background: transparent;
  border: 0;
  color: #64748b;
}

.small {
  min-height: 36px;
}

.danger {
  color: #b91c1c;
}

.admin-alert {
  border-radius: 12px;
  font-weight: 800;
  padding: 14px 16px;
}

.admin-alert.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}

.admin-alert.danger {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  border-collapse: collapse;
  margin-top: 16px;
  min-width: 980px;
  width: 100%;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: #f3f7fc;
  color: #6b7b95;
  font-size: 13px;
  font-weight: 900;
}

.admin-table small {
  color: #64748b;
  display: block;
  margin-top: 4px;
}

.record-count {
  color: #64748b;
  font-weight: 800;
}

.status-pill {
  background: #eef6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.status-pill.draft {
  background: #f8fafc;
  color: #475569;
}

.status-pill.closed {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid label,
.question-card label {
  color: #334155;
  display: grid;
  font-weight: 800;
  gap: 8px;
}

.full-span {
  grid-column: 1 / -1;
}

.classroom-select select {
  min-height: 110px;
}

.survey-builder {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.question-card,
.aggregate-card,
.summary-grid > div {
  background: #f8fbff;
  border: 1px solid #dbe7f6;
  border-radius: 12px;
  padding: 16px;
}

.question-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.question-row,
.option-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr auto;
}

.checkbox-line {
  align-items: center;
  display: flex !important;
  min-height: 44px;
}

.option-list {
  display: grid;
  gap: 10px;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-grid strong {
  color: #071b3a;
  display: block;
  font-size: 26px;
  font-weight: 900;
}

.summary-grid span,
.aggregate-card small {
  color: #64748b;
  font-weight: 800;
}

.aggregate-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.aggregate-card h3 {
  color: #071b3a;
  margin: 0 0 4px;
}

.result-line {
  align-items: center;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
}

@media (max-width: 900px) {
  .page-hero,
  .card-heading,
  .toolbar-form {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
  min-height: 100%;
  position: relative;
}

body {
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.admin-body {
  background: var(--bg);
}

.admin-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #e6f0fb 0%, #d9e5f3 100%);
  border-right: 1px solid var(--sidebar-line);
  color: #334865;
  display: flex;
  flex-direction: column;
  height: 100vh;
  left: 0;
  overflow: hidden;
  position: sticky;
  top: 0;
}

.sidebar-brand {
  align-items: center;
  border-bottom: 1px solid var(--sidebar-line);
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 112px;
  padding: 12px 18px;
}

.sidebar-brand img {
  display: block;
  max-height: 96px;
  max-width: 282px;
  mix-blend-mode: multiply;
  object-fit: contain;
  opacity: 0.96;
  width: 100%;
}

.sidebar-brand span,
.brand-mark {
  align-items: center;
  background: linear-gradient(135deg, #dbeafe, #eef6ff);
  border: 1px solid #c8ddf7;
  border-radius: 8px;
  color: var(--primary-dark);
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.sidebar-brand strong {
  color: #1f3150;
  font-size: 16px;
}

.sidebar-nav {
  flex: 1;
  overflow: auto;
  padding: 14px 14px 18px;
  scrollbar-width: thin;
}

.nav-section {
  border: 1px solid transparent;
  border-radius: 12px;
  margin-bottom: 7px;
}

.nav-section.open {
  background: rgba(255, 255, 255, 0.42);
  border-color: var(--sidebar-line);
}

.nav-section-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: #405875;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 11px;
  text-transform: uppercase;
  width: 100%;
}

.nav-section-trigger:hover {
  background: rgba(255, 255, 255, 0.52);
  color: #253a5b;
}

.nav-chevron {
  color: #8090aa;
  font-size: 16px;
  line-height: 1;
  transition: transform 160ms ease;
}

.nav-section.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-section-items {
  display: none;
  padding: 3px 6px 9px;
}

.nav-section.open .nav-section-items {
  display: grid;
  gap: 3px;
}

.nav-link {
  align-items: center;
  border-radius: 10px;
  color: #324967;
  display: flex;
  font-size: 14px;
  gap: 10px;
  min-height: 38px;
  padding: 8px 9px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.86);
  box-shadow: none;
  color: #245fa8;
}

.nav-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  color: #536c8b;
  display: inline-flex;
  flex: 0 0 auto;
  height: 28px;
  justify-content: center;
  width: 32px;
}

.nav-icon::before {
  font-size: 15px;
  line-height: 1;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
  background: #e0efff;
  color: #2f75d6;
}

.nav-icon-panel::before { content: "⌂"; }
.nav-icon-schools::before { content: "⌂"; }
.nav-icon-students::before { content: "♙"; }
.nav-icon-guardians::before { content: "◉"; }
.nav-icon-classrooms::before { content: "▦"; }
.nav-icon-student-classrooms::before { content: "⇄"; }
.nav-icon-student-guardians::before { content: "◇"; }
.nav-icon-teachers::before { content: "✎"; }
.nav-icon-staff::before { content: "☷"; }
.nav-icon-staff-duties::before { content: "◇"; }
.nav-icon-attendance::before { content: "✓"; }
.nav-icon-daily-notes::before { content: "✍"; }
.nav-icon-bell-requests::before { content: "⌁"; }
.nav-icon-meal-menus::before { content: "☕"; }
.nav-icon-appointments::before { content: "◷"; }
.nav-icon-lesson-schedules::before { content: "▤"; }
.nav-icon-payments::before { content: "₺"; }
.nav-icon-payment-plans::before { content: "▥"; }
.nav-icon-income-expense::before { content: "↕"; }
.nav-icon-expenses::before { content: "−"; }
.nav-icon-cashbox::before { content: "₺"; }
.nav-icon-photos::before { content: "▧"; }
.nav-icon-documents::before { content: "□"; }
.nav-icon-document-types::before { content: "▤"; }
.nav-icon-contracts::before { content: "✧"; }
.nav-icon-surveys::before { content: "?"; }
.nav-icon-survey-questions::before { content: "¿"; }
.nav-icon-survey-results::before { content: "◌"; }
.nav-icon-bulk-messages::before { content: "✉"; }
.nav-icon-announcements::before { content: "!"; }
.nav-icon-growth::before { content: "↗"; }
.nav-icon-growth-reports::before { content: "⌁"; }
.nav-icon-medical::before { content: "+"; }
.nav-icon-reports::before { content: "▨"; }
.nav-icon-users::before { content: "◎"; }
.nav-icon-permissions::before { content: "⚿"; }
.nav-icon-menu-role-permissions::before { content: "☷"; }
.nav-icon-activity-logs::before { content: "◷"; }
.nav-icon-expense-types::before { content: "−"; }
.nav-icon-settings::before { content: "⚙"; }

.admin-main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.topbar-search {
  align-items: center;
  background: #f1f5fb;
  border: 1px solid #e3ebf6;
  border-radius: 14px;
  display: flex;
  flex: 1;
  gap: 10px;
  max-width: 700px;
  padding: 0 15px;
}

.topbar-search input {
  background: transparent;
  border: 0;
  min-height: 42px;
  outline: 0;
  width: 100%;
}

.quick-access {
  align-items: center;
  background: #f7fafd;
  border: 1px solid #dde8f5;
  border-radius: 14px;
  display: flex;
  flex: 1 1 420px;
  gap: 10px;
  max-width: 920px;
  min-width: 220px;
  padding: 0 14px;
  position: relative;
}

.quick-access:focus-within {
  background: #ffffff;
  border-color: #9fc4f4;
  box-shadow: 0 0 0 4px rgba(47, 117, 214, 0.1);
}

.quick-access-icon {
  color: #5d718d;
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

.quick-access input {
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 46px;
  outline: 0;
  width: 100%;
}

.quick-access input::placeholder {
  color: #7c8ca4;
}

.quick-access-results {
  background: #ffffff;
  border: 1px solid #dce7f4;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(35, 58, 91, 0.14);
  display: none;
  left: 0;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
}

.quick-access.open .quick-access-results {
  display: grid;
  gap: 4px;
}

.quick-access-result {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 48px;
  padding: 8px 10px;
  text-align: left;
  width: 100%;
}

.quick-access-result:hover,
.quick-access-result.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.quick-access-result .nav-icon {
  height: 30px;
  width: 34px;
}

.quick-access-result strong,
.quick-access-result span {
  display: block;
  line-height: 1.2;
}

.quick-access-result strong {
  font-size: 14px;
}

.quick-access-result span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.quick-access-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px;
}

.topbar-actions,
.page-actions,
.inline-tools,
.form-actions {
  align-items: center;
  display: flex;
  gap: 9px;
}

.topbar-actions {
  margin-left: auto;
}

.user-chip {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.user-chip > span {
  align-items: center;
  background: var(--primary-soft);
  border: 1px solid #d6e8ff;
  border-radius: 50%;
  color: #2f75d6;
  display: inline-flex;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.user-chip strong,
.user-chip small {
  display: block;
  line-height: 1.15;
}

.user-chip small {
  color: var(--muted);
  margin-top: 4px;
}

.user-chip div {
  min-width: 0;
}

.user-chip strong,
.user-school-name {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-school-name {
  color: #2f75d6 !important;
  font-size: 11px;
  font-weight: 800;
  margin-top: 3px !important;
}

.content-wrap {
  padding: 24px 30px 30px;
}

.page-heading {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: none;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.page-heading h1 {
  font-size: 23px;
  font-weight: 800;
  margin: 0 0 4px;
}

.page-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.eyebrow {
  color: #4f7fbd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 3px;
  text-transform: uppercase;
}

.btn-primary-solid,
.ghost-button,
.danger-button,
.icon-button,
.table-filter,
.row-actions button {
  align-items: center;
  border-radius: 9px;
  border: 1px solid transparent;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 35px;
  padding: 7px 13px;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn-primary-solid {
  background: #2f75d6;
  box-shadow: 0 6px 14px rgba(47, 117, 214, 0.16);
  color: #ffffff;
}

.btn-primary-solid:hover {
  background: #2868bf;
  box-shadow: 0 8px 18px rgba(47, 117, 214, 0.2);
  color: #ffffff;
}

.ghost-button,
.table-filter,
.row-actions button {
  background: #ffffff;
  border-color: var(--border);
  color: #33445f;
}

.ghost-button:hover,
.table-filter:hover,
.row-actions button:hover {
  background: #f7faff;
  border-color: #d5e2f2;
  color: #245fb1;
}

.danger-button {
  background: #d92d20;
  box-shadow: 0 8px 18px rgba(217, 45, 32, 0.16);
  color: #ffffff;
}

.danger-button:hover {
  background: #b42318;
  box-shadow: 0 10px 22px rgba(217, 45, 32, 0.2);
  color: #ffffff;
}

.icon-button {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
  min-width: 40px;
  padding: 9px;
}

.sidebar-toggle {
  display: none;
}

.kpi-grid,
.module-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
}

.kpi-card,
.module-stats article,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: none;
}

.kpi-card,
.module-stats article {
  padding: 18px;
}

.kpi-card span,
.module-stats small {
  color: var(--muted);
  display: block;
}

.kpi-card strong,
.module-stats strong {
  display: block;
  font-size: 28px;
  line-height: 1.15;
  margin: 8px 0 4px;
}

.kpi-card.success strong {
  color: var(--success);
}

.kpi-card.warning strong {
  color: var(--warning);
}

.kpi-card.info strong {
  color: var(--info);
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
}

.panel {
  min-width: 0;
  padding: 22px;
}

.panel.wide {
  grid-column: span 1;
}

.panel-header {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-header h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
}

.panel-header p {
  color: var(--muted);
  margin: 0;
}

.quick-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quick-action {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 92px;
  padding: 14px;
}

.module-stats span {
  align-items: center;
  background: var(--primary-soft);
  border-radius: 10px;
  color: #2f75d6;
  display: inline-flex;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  margin-bottom: 12px;
  width: 38px;
}

.quick-action strong,
.quick-action small {
  display: block;
}

.quick-action small {
  color: var(--muted);
  margin-top: 4px;
}

.timeline-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-list li {
  border-left: 3px solid #6ea1e6;
  padding-left: 12px;
}

.timeline-list span,
.timeline-list small {
  color: var(--muted);
  display: block;
}

.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}

.data-table {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 720px;
  width: 100%;
}

.data-table th {
  background: #f7faff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table th:first-child {
  border-top-left-radius: 12px;
}

.data-table th:last-child {
  border-top-right-radius: 12px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 14px 14px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.data-table td:first-child {
  white-space: nowrap;
}

.data-table .nowrap-cell,
.nowrap-cell {
  white-space: nowrap;
}

.text-link-button {
  background: #eef6ff;
  border: 1px solid #cfe2fb;
  border-radius: 999px;
  color: #1f63b6;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  min-width: 34px;
  padding: 7px 10px;
}

.text-link-button:hover {
  background: #dcecff;
  border-color: #a9cdf7;
}

.payment-plans-table {
  min-width: 0;
  table-layout: fixed;
}

.payment-plans-table th,
.payment-plans-table td {
  font-size: 13px;
  padding: 12px 10px;
  white-space: normal;
}

.payment-plans-table .nowrap-cell {
  white-space: normal;
}

.payment-plans-table th:nth-child(1),
.payment-plans-table td:nth-child(1) {
  width: 12%;
}

.payment-plans-table th:nth-child(2),
.payment-plans-table td:nth-child(2),
.payment-plans-table th:nth-child(4),
.payment-plans-table td:nth-child(4),
.payment-plans-table th:nth-child(7),
.payment-plans-table td:nth-child(7) {
  width: 7%;
}

.payment-plans-table th:nth-child(3),
.payment-plans-table td:nth-child(3),
.payment-plans-table th:nth-child(5),
.payment-plans-table td:nth-child(5) {
  width: 10%;
}

.payment-plans-table th:nth-child(6),
.payment-plans-table td:nth-child(6) {
  width: 11%;
}

.payment-plans-table th:nth-child(8),
.payment-plans-table td:nth-child(8),
.payment-plans-table th:nth-child(9),
.payment-plans-table td:nth-child(9) {
  width: 9%;
}

.payment-plans-table th:last-child,
.payment-plans-table td:last-child {
  width: 12%;
}

.payment-plans-table .sort-link {
  white-space: normal;
}

.payment-plans-table .row-actions {
  text-align: right;
  white-space: nowrap;
}

.payment-plans-table .row-actions button {
  height: 34px;
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.payment-plans-table .row-actions .inline-form {
  display: inline-flex;
  margin-left: 6px;
}

.payment-plans-table .row-actions button + button {
  margin-left: 6px;
}

.pagination-bar {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px 2px 0;
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.pagination-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.pagination-links a,
.pagination-links span {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 36px;
  justify-content: center;
  min-width: 36px;
  padding: 0 12px;
  text-decoration: none;
}

.pagination-links a:hover {
  background: #eef6ff;
  border-color: #b9d7ff;
  color: var(--primary);
}

.pagination-links .active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination-links .disabled,
.pagination-links .pagination-gap {
  color: var(--muted);
  opacity: 0.7;
}

.pagination-links .pagination-gap {
  border-color: transparent;
  min-width: 26px;
  padding: 0 4px;
}

.status-pill {
  background: #dcfce7;
  border-radius: 999px;
  color: #166534;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.status-pill.draft {
  background: #eef4ff;
  color: #245fb1;
}

.status-pill.published {
  background: #dcfce7;
  color: #166534;
}

.row-actions {
  white-space: nowrap;
}

.row-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  height: 34px;
  min-height: 33px;
  padding: 0;
  width: 36px;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.row-actions .inline-form {
  margin-left: 6px;
}

.file-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.file-actions button,
.file-actions a {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  color: #2f64ad;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  min-height: 30px;
  padding: 5px 9px;
}

.file-preview-modal .modal-body {
  min-height: 420px;
}

.file-preview-media {
  display: block;
  max-height: 70vh;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.file-preview-frame {
  border: 0;
  height: 70vh;
  width: 100%;
}

.student-guardian-modal .modal-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 3px 0 0;
}

.student-guardian-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.student-guardian-list,
.student-guardian-form-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.compact-panel-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 13px;
}

.compact-panel-header h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.compact-panel-header span {
  color: var(--muted);
  font-size: 13px;
}

.compact-form-grid {
  gap: 12px 14px;
}

.compact-table th,
.compact-table td {
  font-size: 13px;
  padding: 11px 12px;
}

.student-guardian-form-actions {
  border-top: 1px solid var(--border);
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 14px;
}

.link-guardian-button {
  color: #2f75d6;
}

.payment-plan-detail-modal .modal-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 3px 0 0;
}

.payment-plan-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.payment-plan-summary-grid div {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.payment-plan-summary-grid span {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.payment-plan-summary-grid strong {
  display: block;
  font-size: 15px;
  margin-top: 4px;
}

.role-permission-panel {
  padding: 18px 20px;
}

.role-permission-toolbar {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.role-selector-form label {
  display: grid;
  gap: 7px;
  min-width: 320px;
}

.role-selector-form span {
  color: #33445f;
  font-size: 13px;
  font-weight: 700;
}

.role-selector-form select {
  background: #ffffff;
  border: 1px solid #dfe8f3;
  border-radius: 10px;
  min-height: 42px;
  padding: 8px 12px;
}

.permission-matrix-table th,
.permission-matrix-table td {
  vertical-align: middle;
}

.permission-matrix-table td:nth-child(n+3),
.permission-matrix-table th:nth-child(n+3) {
  text-align: center;
  width: 128px;
}

.permission-matrix-table td strong,
.permission-matrix-table td small {
  display: block;
}

.permission-matrix-table td small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.matrix-check {
  display: inline-flex;
  justify-content: center;
  margin: 0;
}

.matrix-check input {
  position: absolute;
  opacity: 0;
}

.matrix-check span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d6e2f1;
  border-radius: 8px;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  width: 28px;
}

.matrix-check span::after {
  color: #ffffff;
  content: "✓";
  font-size: 15px;
  font-weight: 800;
  opacity: 0;
}

.matrix-check input:checked + span {
  background: #2f75d6;
  border-color: #2f75d6;
  box-shadow: 0 6px 14px rgba(47, 117, 214, 0.15);
}

.matrix-check input:checked + span::after {
  opacity: 1;
}

.role-permission-actions {
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
}

.compact-table input,
.compact-table select {
  background: #ffffff;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  min-height: 34px;
  padding: 6px 8px;
  width: 100%;
}

.compact-table select {
  min-width: 135px;
}

@media (max-width: 1180px) {
  .student-guardian-layout {
    grid-template-columns: 1fr;
  }

  .payment-plan-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.data-table tfoot td {
  background: #f8fbff;
  border-top: 1px solid #d7e3f1;
  color: #17233a;
  font-weight: 800;
}

.module-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.inline-tools input,
.admin-form input,
.admin-form textarea,
.admin-field input,
.admin-field select,
.admin-field textarea,
.auth-form input {
  background: #ffffff;
  border: 1px solid #dfe8f3;
  border-radius: 9px;
  font-weight: 400;
  outline: 0;
  padding: 9px 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
  width: 100%;
}

.admin-field input,
.admin-field select {
  height: 39px;
}

.admin-field textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-field input:focus,
.admin-field select:focus,
.admin-field textarea:focus {
  background: #ffffff;
  border-color: #8db7ee;
  box-shadow: 0 0 0 3px rgba(47, 117, 214, 0.09);
}

.admin-field.has-error input,
.admin-field.has-error select,
.admin-field.has-error textarea {
  background: #fffafa;
  border-color: #f2aaa7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.075);
}

.admin-field.has-error input:focus,
.admin-field.has-error select:focus,
.admin-field.has-error textarea:focus {
  border-color: #e98581;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.11);
}

.admin-field input[readonly] {
  background: #f4f7fb;
  color: #708198;
  cursor: not-allowed;
}

.search-select {
  position: relative;
}

.search-select-native {
  height: 1px !important;
  left: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 1px !important;
}

.admin-field .search-select-input {
  background: #ffffff;
  cursor: text;
  padding-right: 34px;
}

.search-select::after {
  color: #6b7a90;
  content: "⌄";
  font-size: 16px;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 8px;
}

.search-select-menu {
  background: #ffffff;
  border: 1px solid #dbe5f1;
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(35, 58, 91, 0.14);
  display: none;
  max-height: 230px;
  overflow-y: auto;
  padding: 6px;
  position: fixed;
  z-index: 1080;
}

.search-select-menu.open {
  display: grid;
  gap: 3px;
}

.search-select-option {
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #26364d;
  font-size: 14px;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.search-select-option:hover,
.search-select-option.selected {
  background: #edf5ff;
  color: #245fb1;
}

.search-select-option.muted {
  color: var(--muted);
  cursor: default;
}

.admin-field.has-error .search-select-input {
  background: #fffafa;
  border-color: #f2aaa7;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.075);
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label,
.admin-field,
.auth-form label {
  align-self: start;
  color: #344054;
  display: grid;
  font-weight: 600;
  gap: 7px;
}

.admin-modal {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(35, 58, 91, 0.18);
  max-height: calc(100vh - 28px);
  overflow: hidden;
}

.admin-modal form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 28px);
}

.admin-modal .modal-header,
.admin-modal .modal-footer {
  border-color: var(--border);
  padding: 14px 20px;
}

.admin-modal .modal-header {
  background: #f5f8fc;
  border-radius: 12px 12px 0 0;
}

.admin-modal .modal-body {
  background: #f4f7fb;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 20px;
}

.admin-modal .modal-footer {
  background: #ffffff;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 -8px 18px rgba(35, 58, 91, 0.045);
  flex: 0 0 auto;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.admin-modal .modal-title {
  font-size: 21px;
  font-weight: 800;
  margin: 0;
}

.meal-menu-filter {
  align-items: center;
  display: flex;
  gap: 8px;
}

.meal-menu-filter select {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  min-width: 128px;
  padding: 0 12px;
}

.meal-menu-filter input {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 42px;
  min-width: 140px;
  padding: 0 12px;
}

.end-of-day-panel .panel-header {
  align-items: center;
}

.end-of-day-filter {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.end-of-day-table {
  min-width: 860px;
}

.end-of-day-builder {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

.end-of-day-designer,
.end-of-day-preview {
  min-width: 0;
}

.end-of-day-section-list {
  display: grid;
  gap: 14px;
}

.end-of-day-section-card {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.section-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-heading h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px;
}

.section-heading p {
  color: var(--muted);
  margin: 0;
}

.field-list {
  display: grid;
  gap: 10px;
}

.field-row {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e3ebf6;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.field-row strong,
.field-row small {
  display: block;
}

.field-row strong {
  font-weight: 800;
}

.field-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 3px;
}

.compact-button {
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}

.end-of-day-inline-form,
.end-of-day-field-form,
.end-of-day-new-section-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.end-of-day-inline-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.end-of-day-field-form {
  align-items: center;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(150px, 0.8fr) auto auto auto;
}

.end-of-day-new-section-form {
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
}

.end-of-day-inline-form input,
.end-of-day-field-form input,
.end-of-day-field-form select,
.end-of-day-new-section-form input,
.end-of-day-new-section-form textarea {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  min-width: 0;
  padding: 0 12px;
}

.end-of-day-new-section-form textarea {
  min-height: 42px;
  padding-top: 9px;
  resize: vertical;
}

.legal-admin-preview {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #dfe7f3;
  border-radius: 14px;
  color: #475569;
  font: inherit;
  line-height: 1.6;
  padding: 12px;
  width: 100%;
}

.check-row {
  align-items: center;
  color: #43516a;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  white-space: nowrap;
}

.check-row input {
  min-height: auto;
  width: auto;
}

.phone-frame {
  background: #f7faff;
  border: 1px solid #dbe8f7;
  border-radius: 24px;
  display: grid;
  gap: 10px;
  padding: 18px;
}

.preview-card {
  background: #ffffff;
  border: 1px solid #e1eaf6;
  border-radius: 12px;
  display: grid;
  gap: 7px;
  padding: 12px;
}

.preview-card strong {
  color: var(--text);
  font-size: 14px;
}

.preview-card span {
  color: var(--muted);
  font-size: 12px;
}

.sort-link {
  color: inherit;
  display: inline-flex;
  gap: 4px;
  text-decoration: none;
}

.sort-link:hover {
  color: var(--primary);
}

.record-modal-compact {
  max-width: 760px;
}

.record-modal-menu {
  max-width: 640px;
}

.record-modal-classrooms {
  max-width: 500px;
}

.record-modal-cashbox {
  max-width: 540px;
}

.record-modal-student-classrooms {
  max-width: 540px;
}

.attendance-modal-dialog {
  max-width: 720px;
}

.record-modal-guardians {
  max-width: 760px;
}

.guardian-record-modal {
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.22);
}

.guardian-record-modal .modal-header {
  background: #ffffff;
  border-color: #e8eef7;
  border-radius: 14px 14px 0 0;
  min-height: 112px;
  padding: 24px 28px;
}

.guardian-record-modal .btn-close {
  margin-right: 0;
  margin-top: -42px;
}

.guardian-modal-heading {
  align-items: center;
  display: flex;
  gap: 18px;
}

.guardian-modal-heading p {
  color: #667085;
  font-size: 15px;
  margin: 4px 0 0;
}

.guardian-modal-icon {
  align-items: center;
  background: #eef4ff;
  border-radius: 50%;
  color: #2f6fe4;
  display: inline-flex;
  flex: 0 0 auto;
  height: 64px;
  justify-content: center;
  position: relative;
  width: 64px;
}

.guardian-modal-icon::before,
.guardian-modal-icon::after {
  border: 3px solid currentcolor;
  content: "";
  position: absolute;
}

.guardian-modal-icon::before {
  border-radius: 50%;
  height: 16px;
  top: 17px;
  width: 16px;
}

.guardian-modal-icon::after {
  border-radius: 12px 12px 5px 5px;
  border-top: 0;
  height: 16px;
  top: 36px;
  width: 30px;
}

.guardian-record-modal .modal-title {
  color: #172033;
  font-size: 26px;
}

.guardian-record-modal .modal-body {
  background: #ffffff;
  padding: 0 24px;
}

.guardian-record-modal .modal-form-grid {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  padding: 0 0 24px;
}

.guardian-form-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #e6edf7;
  border-radius: 12px;
  display: grid;
  gap: 18px 32px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px;
}

.guardian-section-title {
  align-items: center;
  display: flex;
  gap: 10px;
  grid-column: 1 / -1;
}

.guardian-section-title span {
  align-items: center;
  color: #2f6fe4;
  display: inline-flex;
  height: 24px;
  justify-content: center;
  position: relative;
  width: 24px;
}

.guardian-section-title span::before {
  border: 2px solid currentcolor;
  border-radius: 50%;
  content: "";
  height: 9px;
  position: absolute;
  top: 3px;
  width: 9px;
}

.guardian-section-title span::after {
  border: 2px solid currentcolor;
  border-radius: 10px 10px 4px 4px;
  border-top: 0;
  content: "";
  height: 8px;
  position: absolute;
  top: 14px;
  width: 17px;
}

.guardian-section-address .guardian-section-title span::before {
  border-radius: 50% 50% 50% 0;
  height: 14px;
  top: 3px;
  transform: rotate(-45deg);
  width: 14px;
}

.guardian-section-address .guardian-section-title span::after {
  background: currentcolor;
  border: 0;
  border-radius: 50%;
  height: 5px;
  left: 10px;
  top: 8px;
  width: 5px;
}

.guardian-section-title h3 {
  color: #2f6fe4;
  font-size: 17px;
  font-weight: 800;
  margin: 0;
}

.guardian-record-modal .admin-field {
  gap: 9px;
}

.guardian-record-modal .admin-field span {
  color: #26354d;
  font-size: 14px;
  font-weight: 800;
}

.guardian-record-modal .admin-field input,
.guardian-record-modal .admin-field select {
  border-color: #d7e1ee;
  border-radius: 8px;
  color: #172033;
  font-size: 16px;
  height: 50px;
  padding-left: 14px;
  padding-right: 14px;
}

.guardian-record-modal .admin-field textarea {
  border-color: #d7e1ee;
  border-radius: 8px;
  font-size: 16px;
  min-height: 110px;
  padding: 14px;
}

.guardian-record-modal .admin-field input::placeholder,
.guardian-record-modal .admin-field textarea::placeholder {
  color: #8793a7;
}

.guardian-record-modal .span-2 {
  grid-column: 1 / -1;
}

.guardian-record-modal [data-field-name="PhoneNumber"] {
  position: relative;
}

.guardian-record-modal [data-field-name="PhoneNumber"]::after {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  color: #344054;
  content: "TR  +90";
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  height: 50px;
  justify-content: center;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 30px;
  width: 122px;
}

.guardian-record-modal [data-field-name="PhoneNumber"] input {
  padding-left: 142px;
}

.field-character-count {
  color: #7a8699;
  font-size: 13px;
  font-weight: 500;
  justify-self: end;
  margin-top: -4px;
}

.guardian-record-modal .modal-footer {
  background: #ffffff;
  border-color: #e8eef7;
  border-radius: 0 0 14px 14px;
  gap: 12px;
  padding: 22px 28px 24px;
}

.guardian-record-modal .modal-footer .ghost-button,
.guardian-record-modal .modal-footer .btn-primary-solid {
  min-height: 52px;
  padding-left: 26px;
  padding-right: 26px;
}

.record-modal-menu .admin-modal .modal-header,
.record-modal-menu .admin-modal .modal-footer,
.record-modal-compact .admin-modal .modal-header,
.record-modal-compact .admin-modal .modal-footer,
.record-modal-cashbox .admin-modal .modal-header,
.record-modal-cashbox .admin-modal .modal-footer,
.record-modal-student-classrooms .admin-modal .modal-header,
.record-modal-student-classrooms .admin-modal .modal-footer {
  padding-left: 18px;
  padding-right: 18px;
}

.record-modal-menu .admin-modal .modal-body,
.record-modal-compact .admin-modal .modal-body,
.record-modal-cashbox .admin-modal .modal-body,
.record-modal-student-classrooms .admin-modal .modal-body {
  padding: 16px 18px;
}

.record-modal-menu .modal-form-grid {
  gap: 12px;
  padding: 18px;
}

.record-modal-classrooms .modal-form-grid {
  grid-template-columns: minmax(0, 1fr);
}

.record-modal-classrooms .span-2 {
  grid-column: span 1;
}

.record-modal-cashbox .modal-form-grid {
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
}

.record-modal-cashbox .span-2 {
  grid-column: span 1;
}

.record-modal-student-classrooms .modal-form-grid {
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  padding: 18px;
}

.record-modal-student-classrooms .span-2 {
  grid-column: span 1;
}

.attendance-modal .modal-header,
.attendance-modal .modal-footer {
  padding: 12px 18px;
}

.attendance-modal .modal-body {
  padding: 16px 18px;
}

.attendance-modal .modal-title {
  font-size: 24px;
}

.attendance-form-grid {
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto 12px;
  max-width: 520px;
  padding: 14px 16px;
}

.attendance-form-grid .admin-field {
  width: 100%;
}

.attendance-students-wrap {
  max-height: 300px;
  overflow: auto;
}

.attendance-students-wrap .data-table {
  min-width: 0;
}

.attendance-students-wrap .data-table th,
.attendance-students-wrap .data-table td {
  padding: 11px 14px;
}

.attendance-students-wrap .empty-state {
  padding: 38px 18px;
}

.delete-confirm-modal {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(35, 58, 91, 0.2);
  overflow: hidden;
}

.delete-confirm-modal .modal-body {
  align-items: center;
  background: #ffffff;
  display: grid;
  justify-items: center;
  padding: 28px 30px 18px;
  text-align: center;
}

.delete-confirm-icon {
  align-items: center;
  background: #fff1f0;
  border: 1px solid #ffd5d2;
  border-radius: 50%;
  color: #d92d20;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  height: 48px;
  justify-content: center;
  margin-bottom: 14px;
  width: 48px;
}

.delete-confirm-modal h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 800;
  margin: 0 0 8px;
}

.delete-confirm-modal p {
  color: #42526b;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.delete-confirm-modal p strong {
  color: var(--text);
}

.delete-confirm-modal .modal-body > span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 8px;
}

.delete-confirm-modal .modal-footer {
  background: #f8fafd;
  border-color: var(--border);
  gap: 10px;
  justify-content: center;
  padding: 16px 20px 20px;
}

.modal-form-grid {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  gap: 14px 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 20px;
}

.span-2 {
  grid-column: span 2;
}

.settings-panel {
  max-width: 960px;
}

.settings-form {
  display: grid;
  gap: 18px;
}

.settings-section-title {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.settings-section-title h3 {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

.settings-section-title p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.settings-actions {
  justify-content: flex-end;
}

.demo-filter-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 18px;
}

.demo-detail-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.detail-list {
  display: grid;
  gap: 10px 16px;
  grid-template-columns: 160px minmax(0, 1fr);
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pagination-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.pagination-row > div {
  align-items: center;
  display: flex;
  gap: 10px;
}

.ghost-button.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.admin-field span {
  color: #43516a;
  font-size: 13px;
  font-weight: 700;
}

.required-mark {
  color: #dc2626;
  margin-left: 4px;
}

.field-validation-message {
  color: #b42318;
  display: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: -1px;
}

.admin-field.has-error .field-validation-message {
  display: block;
}

.validation-summary {
  background: #fff7f7;
  border: 1px solid #f5c8c6;
  border-radius: 12px;
  color: #9f1f17;
  margin-bottom: 14px;
  padding: 12px 14px;
}

.validation-summary strong {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}

.validation-summary ul {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 18px;
}

.validation-summary li {
  font-size: 13px;
}

.form-section-title {
  align-items: center;
  display: flex;
  grid-column: 1 / -1;
  margin: 2px 0 -2px;
}

.form-section-title span {
  background: #f1f7ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #3c72b7;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
}

.import-help {
  background: #f6f9fd;
  border: 1px solid #dce8f5;
  border-radius: 12px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 13px 14px;
}

.import-help strong {
  color: var(--text);
  font-size: 14px;
}

.import-help span {
  color: #36506f;
  font-weight: 700;
}

.import-help small {
  color: var(--muted);
}

.empty-state {
  align-items: center;
  color: var(--muted);
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 38px 12px;
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.form-panel {
  position: sticky;
  top: 96px;
}

.app-alert {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  border-radius: 8px;
  color: #067647;
  font-weight: 700;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.app-alert.danger {
  background: #fef3f2;
  border-color: #fecdca;
  color: #b42318;
}

.app-alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.app-toast-container {
  display: grid;
  gap: 10px;
  position: fixed;
  right: 22px;
  top: 86px;
  width: min(360px, calc(100vw - 32px));
  z-index: 2000;
}

.app-toast {
  background: #ffffff;
  border: 1px solid #d7e3f2;
  border-left: 4px solid #3478d8;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(28, 43, 70, 0.13);
  color: var(--text);
  display: grid;
  gap: 3px;
  padding: 13px 14px;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-toast strong {
  font-size: 14px;
}

.app-toast span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.app-toast.success {
  border-left-color: #18a058;
}

.app-toast.danger {
  border-left-color: #dc2626;
}

.app-toast.info {
  border-left-color: #3478d8;
}

.app-toast.leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.bell-board-panel {
  margin-bottom: 22px;
}

.board-live-indicator {
  background: #eef7ff;
  border: 1px solid #d7eafe;
  border-radius: 999px;
  color: #2f679f;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
}

.bell-board {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.bell-column {
  background: #f8fbff;
  border: 1px solid #dce8f5;
  border-radius: 16px;
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.bell-column.is-over {
  border-color: #7db7f3;
  box-shadow: 0 14px 34px rgba(47, 103, 159, 0.16);
  transform: translateY(-1px);
}

.bell-column.accent {
  background: #fffaf3;
  border-color: #f3dfbf;
}

.bell-column.done {
  background: #f3fbf7;
  border-color: #cceedd;
}

.bell-column-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.bell-column-header strong {
  color: var(--text);
  font-size: 17px;
}

.bell-column-header span {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce8f5;
  border-radius: 999px;
  color: #315b88;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  min-width: 34px;
  padding: 0 10px;
}

.bell-card-list {
  display: grid;
  gap: 10px;
}

.bell-card {
  background: #ffffff;
  border: 1px solid #dbe7f4;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(31, 48, 76, 0.08);
  cursor: grab;
  display: grid;
  gap: 8px;
  padding: 13px;
}

.bell-card:active {
  cursor: grabbing;
}

.bell-card.is-dragging {
  opacity: 0.62;
}

.bell-card.delivered {
  border-color: #bfe6ce;
}

.bell-card div {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.bell-card strong {
  color: var(--text);
  font-size: 16px;
}

.bell-card span,
.bell-card small,
.bell-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.bell-card p {
  background: #f5f8fc;
  border-radius: 10px;
  margin: 0;
  padding: 8px 10px;
}

.bell-empty {
  border: 1px dashed #cbd9ea;
  border-radius: 12px;
  color: #7890ad;
  display: none;
  font-size: 13px;
  font-weight: 700;
  padding: 18px;
  text-align: center;
}

.bell-card-list:not(:has(.bell-card)) .bell-empty {
  display: block;
}

.list-panel.is-refreshing {
  opacity: 0.62;
  pointer-events: none;
}

.btn-primary-solid.is-busy,
.ghost-button.is-busy,
.row-actions button.is-busy {
  cursor: progress;
  opacity: 0.72;
}

.auth-body {
  background: #f8fafc;
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(320px, 560px);
  justify-content: center;
  min-height: 100vh;
  min-width: 0;
  padding: 48px;
}

.auth-shell.single {
  grid-template-columns: minmax(320px, 480px);
}

.auth-panel,
.auth-aside {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 42px;
}

.auth-panel {
  border-radius: 8px 0 0 8px;
}

.auth-aside {
  align-content: end;
  background:
    linear-gradient(145deg, rgba(47, 117, 214, 0.76), rgba(81, 144, 204, 0.42)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.42), transparent 30%),
    #8fc7ee;
  border-color: #cddff3;
  border-radius: 0 8px 8px 0;
  color: #ffffff;
  display: grid;
}

.auth-poster {
  overflow: hidden;
  position: relative;
}

.auth-poster::before {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.55) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  inset: 0;
  opacity: 0.32;
  position: absolute;
}

.auth-poster-content {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 18px;
  padding: 28px;
  position: relative;
}

.auth-poster-content span,
.auth-poster-content strong,
.auth-poster-content p {
  display: block;
}

.auth-poster-content span {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.auth-poster-content strong {
  font-size: 28px;
  line-height: 1.18;
}

.auth-poster-content p {
  color: rgba(255, 255, 255, 0.86);
  margin: 14px 0 0;
}

.auth-logo {
  display: block;
  margin: 0 0 22px;
  max-height: 96px;
  max-width: 286px;
  object-fit: contain;
  width: 100%;
}

.auth-panel h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 12px 0 8px;
}

.auth-panel p {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.auth-options {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.auth-options a,
.auth-back-link {
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.auth-back-link,
.auth-button-link {
  justify-self: start;
}

.auth-button-link {
  display: inline-flex;
  text-decoration: none;
}

.check-row {
  align-items: center;
  display: flex !important;
  gap: 8px !important;
}

.check-row input {
  width: auto;
}

.status-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 22px;
}

.status-card p {
  color: #cbd5e1;
  margin-bottom: 0;
}

.status-dot {
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  margin-right: 8px;
  width: 10px;
}

.auth-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 18px;
}

.auth-metrics div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
}

.auth-metrics strong,
.auth-metrics span {
  display: block;
}

.auth-metrics span {
  color: #cbd5e1;
}

.login-shell {
  align-items: stretch;
  grid-template-columns: minmax(360px, 0.42fr) minmax(520px, 0.58fr);
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px;
  width: 100%;
}

.login-panel,
.login-hero {
  border: 0;
  min-height: min(720px, calc(100vh - 80px));
}

.login-panel {
  border-radius: 30px 0 0 30px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 42px 48px;
  position: relative;
  z-index: 1;
}

.login-brand {
  margin-bottom: 28px;
}

.login-logo {
  margin: 0;
  max-height: 92px;
  max-width: 220px;
}

.login-brand p {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 0;
}

.login-heading {
  text-align: left;
}

.login-heading h1 {
  color: #0f172a;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.12;
  margin: 0;
}

.login-heading span {
  color: #64748b;
  display: block;
  font-size: 15px;
  margin-top: 8px;
}

.login-form {
  gap: 17px;
  margin-top: 28px;
}

.login-field {
  color: #1e293b;
  display: grid;
  gap: 8px;
}

.login-field label {
  color: #1e293b;
  font-size: 14px;
  font-weight: 800;
}

.login-input-wrap {
  align-items: center;
  background: #ffffff;
  border: 1px solid #dce5f0;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
  display: flex;
  min-height: 54px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.login-input-wrap.has-error {
  border-color: #ef4444;
}

.login-input-icon {
  align-items: center;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  flex: 0 0 46px;
  font-size: 12px;
  font-weight: 900;
  height: 54px;
  justify-content: center;
}

.login-input-wrap input {
  border: 0;
  box-shadow: none;
  color: #0f172a;
  flex: 1;
  font-size: 15px;
  min-width: 0;
  padding: 0 14px;
  width: auto;
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
}

.login-input-wrap input:focus {
  outline: 0;
}

.login-field-error {
  color: #dc2626;
  display: none;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.login-input-wrap.has-error + .login-field-error {
  display: block;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: #2563eb;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  height: 54px;
  justify-content: center;
  padding: 0 14px;
}

.password-toggle:hover,
.login-options a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.login-options {
  margin-top: 0;
}

.login-options .check-row {
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.login-options .check-row input {
  accent-color: #2563eb;
  height: 18px;
  width: 18px;
}

.login-options a {
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.login-submit {
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 14px;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.24);
  font-size: 15px;
  gap: 10px;
  min-height: 56px;
  width: 100%;
}

.login-submit:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.login-submit:active {
  background: #1e40af;
  border-color: #1e40af;
}

.login-submit:disabled {
  cursor: progress;
  opacity: 0.78;
}

.login-submit-spinner {
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: none;
  height: 18px;
  width: 18px;
  animation: login-spin 0.8s linear infinite;
}

.login-submit.is-loading .login-submit-spinner {
  display: inline-block;
}

.login-submit.is-loading .login-submit-arrow {
  display: none;
}

@keyframes login-spin {
  to {
    transform: rotate(360deg);
  }
}

.login-trust-row {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 12.5px;
  font-weight: 800;
  gap: 18px;
  margin-top: 26px;
}

.login-trust-row span {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.login-trust-row span::before {
  background: #14b8a6;
  border-radius: 50%;
  content: "";
  height: 8px;
  width: 8px;
}

.login-hero {
  align-content: center;
  background:
    radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.1), transparent 40%),
    linear-gradient(145deg, #eef6ff 0%, #ffffff 52%, #f2f7ff 100%);
  border-radius: 0 30px 30px 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.11);
  display: grid;
  gap: 30px;
  overflow: hidden;
  padding: 48px 52px;
  position: relative;
}

.login-hero::before {
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.14) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  inset: 0;
  opacity: 0.32;
  position: absolute;
}

.login-showcase-copy,
.product-preview {
  position: relative;
  z-index: 1;
}

.login-showcase-copy h2 {
  color: #0f172a;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.12;
  margin: 0;
  max-width: 560px;
}

.login-showcase-copy p {
  color: #475569;
  font-size: 16px;
  line-height: 1.55;
  margin: 14px 0 0;
  max-width: 520px;
}

.product-preview {
  min-height: 420px;
}

.dashboard-mockup {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 22px;
  box-shadow: 0 24px 55px rgba(30, 64, 175, 0.16);
  overflow: hidden;
  width: min(100%, 650px);
}

.mockup-browser-bar {
  align-items: center;
  background: #0f2747;
  color: #dbeafe;
  display: flex;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
}

.mockup-browser-bar span {
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.mockup-browser-bar span:nth-child(1) { background: #f59e0b; }
.mockup-browser-bar span:nth-child(2) { background: #14b8a6; }
.mockup-browser-bar span:nth-child(3) { background: #2563eb; }

.mockup-browser-bar strong {
  font-size: 13px;
  font-weight: 800;
  margin-left: 8px;
}

.mockup-dashboard-body {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  min-height: 350px;
}

.mockup-sidebar {
  background: #f1f5f9;
  border-right: 1px solid #e2e8f0;
  display: grid;
  gap: 14px;
  justify-items: center;
  align-content: start;
  padding: 22px 0;
}

.mockup-sidebar span {
  background: #cbd5e1;
  border-radius: 10px;
  height: 34px;
  width: 34px;
}

.mockup-sidebar span.active {
  background: #2563eb;
}

.mockup-content {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.mockup-topline {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.mockup-topline span {
  background: #0f172a;
  border-radius: 999px;
  height: 12px;
  width: 170px;
}

.mockup-topline small {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #2563eb;
  font-weight: 900;
  padding: 7px 12px;
}

.mockup-stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

.stat-card.student { border-left-color: #f59e0b; }
.stat-card.parent { border-left-color: #7c3aed; }
.stat-card.admin { border-left-color: #14b8a6; }

.stat-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.stat-card strong {
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.mockup-panel-row {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.mockup-chart,
.mockup-list,
.calendar-strip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.mockup-chart {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, 1fr);
  height: 132px;
  padding: 44px 16px 16px;
  position: relative;
}

.mockup-chart strong,
.mockup-list strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  left: 16px;
  position: absolute;
  top: 14px;
}

.mockup-chart span {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  border-radius: 8px 8px 3px 3px;
}

.mockup-list {
  display: grid;
  gap: 12px;
  min-height: 132px;
  padding: 46px 16px 16px;
  position: relative;
}

.mockup-list span {
  background: #e2e8f0;
  border-radius: 999px;
  height: 12px;
}

.mockup-list span:nth-child(3) {
  width: 82%;
}

.calendar-strip {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 58px;
  padding: 0 16px;
}

.calendar-strip span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  margin-right: auto;
}

.calendar-strip i {
  background: #dbeafe;
  border-radius: 50%;
  height: 22px;
  width: 22px;
}

.mobile-mockup {
  background: #0f172a;
  border: 8px solid #0b1220;
  border-radius: 30px;
  bottom: 2px;
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.22);
  color: #ffffff;
  padding: 18px 14px 16px;
  position: absolute;
  right: 8px;
  width: 188px;
}

.mobile-speaker {
  background: #334155;
  border-radius: 999px;
  height: 5px;
  margin: 0 auto 18px;
  width: 48px;
}

.mobile-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.mobile-header span,
.mobile-header strong {
  font-size: 12px;
  font-weight: 900;
}

.mobile-feed {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mobile-feed div {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  gap: 10px;
  min-height: 44px;
  padding: 8px;
}

.mobile-feed span {
  border-radius: 11px;
  height: 26px;
  width: 26px;
}

.mobile-feed strong {
  font-size: 12px;
}

.mobile-feed .teacher { background: #2563eb; }
.mobile-feed .student { background: #f59e0b; }
.mobile-feed .parent { background: #7c3aed; }
.mobile-feed .admin { background: #14b8a6; }

.login-alert {
  border-radius: 14px;
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .login-shell {
    grid-template-columns: minmax(340px, 0.46fr) minmax(420px, 0.54fr);
    padding: 24px;
  }

  .login-panel {
    padding: 40px;
  }

  .login-hero {
    padding: 40px;
  }

  .login-showcase-copy h2 {
    font-size: 30px;
  }

  .mobile-mockup {
    right: 0;
    width: 170px;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    bottom: 0;
    position: fixed;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    width: 288px;
    z-index: 30;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  .module-layout,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .form-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: minmax(0, 1fr);
    max-width: 680px;
  }

  .login-panel {
    border-radius: 30px;
    min-height: auto;
  }

  .login-hero {
    border-radius: 30px;
    min-height: auto;
  }

  .product-preview {
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .content-wrap,
  .topbar {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .topbar-search,
  .quick-access {
    flex-basis: 100%;
    order: 3;
  }

  .user-chip div,
  .topbar-actions .ghost-button {
    display: none;
  }

  .page-heading,
  .panel-header {
    flex-direction: column;
  }

  .pagination-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination-links {
    justify-content: flex-start;
  }

  .kpi-grid,
  .module-stats,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    padding: 18px;
  }

  .login-shell {
    max-width: none;
    padding: 20px;
  }

  .login-panel {
    border-radius: 24px;
    min-height: auto;
    max-width: calc(100vw - 40px);
    padding: 28px 24px;
    width: 100%;
  }

  .login-brand {
    margin-bottom: 24px;
  }

  .login-logo {
    max-width: 180px;
  }

  .login-heading h1 {
    font-size: 30px;
  }

  .login-heading span {
    font-size: 14px;
  }

  .login-options {
    align-items: center;
    gap: 12px;
  }

  .login-trust-row {
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
  }

  .login-hero {
    display: none;
  }

  .modal-form-grid {
    grid-template-columns: 1fr;
  }

  .guardian-record-modal .modal-header {
    min-height: auto;
    padding: 20px;
  }

  .guardian-record-modal .modal-body {
    padding: 0 16px;
  }

  .guardian-form-section {
    gap: 16px;
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .guardian-record-modal [data-field-name="PhoneNumber"]::after {
    width: 106px;
  }

  .guardian-record-modal [data-field-name="PhoneNumber"] input {
    padding-left: 124px;
  }

  .span-2 {
    grid-column: span 1;
  }

  .auth-panel,
  .auth-aside {
    border-radius: 8px;
    padding: 24px;
  }
}

/* Compact SaaS login composition */
.screen-reader-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.auth-body:has(.login-shell) {
  background: #f8fafc;
}

.login-shell {
  align-items: center;
  display: grid;
  gap: 80px;
  grid-template-columns: minmax(0, 1fr) 400px;
  margin: 0 auto;
  max-width: 1120px;
  min-height: 100vh;
  padding: 56px 24px;
  width: min(100%, 1120px);
}

.login-hero {
  align-content: center;
  align-items: center;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.06), transparent 60%),
    transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  justify-content: start;
  min-height: 560px;
  overflow: visible;
  padding: 0;
  position: relative;
}

.login-hero::before,
.login-hero::after {
  content: none;
}

.login-brand {
  margin-bottom: 28px;
}

.login-logo {
  display: block;
  margin: 0;
  max-height: none;
  max-width: none;
  object-fit: contain;
  width: 309px;
}

.login-brand-copy {
  max-width: 420px;
}

.login-brand-copy h2 {
  color: #0f172a;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
  margin: 0;
}

.login-brand-copy p {
  color: #64748b;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  margin: 14px 0 0;
}

.login-brand-copy span {
  color: #94a3b8;
  padding: 0 6px;
}

.login-accent-dots {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.login-accent-dots span {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.login-accent-dots .teacher { background: #2563eb; }
.login-accent-dots .student { background: #f59e0b; }
.login-accent-dots .parent { background: #7c3aed; }
.login-accent-dots .admin { background: #14b8a6; }

.login-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
  display: block;
  justify-self: end;
  max-width: 400px;
  min-height: 0;
  padding: 32px;
  width: 100%;
}

.login-heading {
  margin-bottom: 24px;
  text-align: left;
}

.login-heading h1 {
  color: #0f172a;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  margin: 0;
}

.login-heading span {
  color: #64748b;
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 8px;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 0;
}

.login-field {
  display: grid;
  gap: 6px;
}

.login-field label {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.login-input-wrap {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  box-shadow: none;
  display: flex;
  height: 46px;
  min-height: 46px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.login-input-wrap:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.login-input-wrap.has-error {
  border-color: #ef4444;
  box-shadow: none;
}

.login-input-icon {
  align-items: center;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  flex: 0 0 18px;
  font-size: 16px;
  font-weight: 600;
  height: 18px;
  justify-content: center;
  line-height: 1;
  margin-left: 14px;
}

.login-input-icon svg {
  fill: currentColor;
  height: 16px;
  width: 16px;
}

.login-input-wrap input {
  border: 0;
  box-shadow: none;
  color: #0f172a;
  flex: 1;
  font-size: 14.5px;
  font-weight: 400;
  min-width: 0;
  padding: 0 13px 0 10px;
  width: auto;
}

.login-input-wrap input::placeholder {
  color: #94a3b8;
}

.login-input-wrap input:focus {
  outline: 0;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  margin-right: 5px;
  padding: 0;
}

.password-toggle svg {
  fill: currentColor;
  height: 18px;
  width: 18px;
}

.password-toggle:hover {
  background: #f1f5f9;
  color: #2563eb;
}

.login-field-error {
  color: #dc2626;
  display: none;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  margin-top: -1px;
}

.login-input-wrap.has-error + .login-field-error {
  display: block;
}

.login-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
  padding: 10px 12px;
}

.login-options {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 0;
}

.login-options .check-row {
  align-items: center;
  color: #475569;
  display: inline-flex;
  font-size: 13px;
  font-weight: 400;
  gap: 8px;
  line-height: 1.35;
  margin: 0;
}

.login-options .check-row input {
  accent-color: #2563eb;
  height: 16px;
  width: 16px;
}

.login-options a {
  background: transparent;
  border-radius: 8px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  padding: 0;
  text-decoration: none;
}

.login-options a:hover {
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline;
}

.login-submit {
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 10px;
  box-shadow: none;
  font-size: 14.5px;
  font-weight: 600;
  gap: 8px;
  height: 46px;
  min-height: 46px;
  margin-top: 4px;
  width: 100%;
}

.login-submit:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: none;
}

.login-submit:active {
  background: #1e40af;
  border-color: #1e40af;
}

.login-submit:disabled {
  cursor: progress;
  opacity: 0.78;
}

.login-submit-arrow {
  font-size: 14px;
  line-height: 1;
}

.login-submit-spinner {
  height: 16px;
  width: 16px;
}

.login-trust-row {
  color: #94a3b8;
  display: flex;
  font-size: 12px;
  font-weight: 400;
  gap: 0;
  line-height: 1.35;
  margin-top: 16px;
}

.login-trust-row span {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.login-trust-row span::before {
  background: transparent;
  color: #94a3b8;
  content: "🔒";
  font-size: 12px;
  height: auto;
  width: auto;
}

@media (max-width: 1100px) {
  .login-shell {
    gap: 56px;
    grid-template-columns: minmax(0, 1fr) 390px;
    max-width: 1000px;
  }
}

@media (max-width: 900px) {
  .login-shell {
    display: flex;
    justify-content: center;
    max-width: none;
    min-height: 100vh;
    padding: 32px 20px;
    width: 100%;
  }

  .login-hero {
    display: none;
  }

  .login-panel {
    justify-self: auto;
    max-width: 390px;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .auth-body:has(.login-shell) {
    background: #ffffff;
  }

  .login-shell {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 20px;
  }

  .login-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-width: 390px;
    padding: 0;
  }

  .login-heading {
    margin-bottom: 24px;
  }

  .login-heading h1 {
    font-size: 26px;
  }

  .login-input-wrap,
  .login-submit {
    height: 46px;
    min-height: 46px;
  }
}
