﻿/*!
 * MaedeSchool UI styles.
 * Source file: Styles/site.scss
 * Runtime output: wwwroot/css/site.css
 */
@font-face {
  font-family: "YekanBakh";
  src: url("/fonts/Yekan-Bakh-FaNum-04-Regular.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "YekanBakh";
  src: url("/fonts/Yekan-Bakh-FaNum-06-Bold.woff2") format("woff2");
  font-weight: 700;
}
:root {
  --ink: #172033;
  --muted: #697386;
  --primary: #6b8f71;
  --primary-rgb: 107, 143, 113;
  --primary-soft: #e3eee4;
  --primary-soft-rgb: 227, 238, 228;
  --accent: #f97316;
  --green: #16a34a;
  --blue: #0ea5e9;
  --warning: #f59e0b;
  --danger: #dc2626;
  --surface: rgba(255, 255, 255, .84);
  --line: rgba(23, 32, 51, .1);
  --shadow: 0 24px 80px rgba(15, 23, 42, .12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  color: var(--ink);
  font-family: "YekanBakh", Tahoma, sans-serif;
  overflow-x: hidden;
  background: radial-gradient(circle at 10% 10%, rgba(var(--primary-rgb), 0.18), transparent 28rem), radial-gradient(circle at 90% 0%, rgba(166, 190, 165, 0.28), transparent 30rem), linear-gradient(135deg, #f1f6ef 0%, #fcfbf6 48%, #edf4eb 100%);
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
p,
span,
strong,
small,
label,
th,
td,
a,
button {
  overflow-wrap: anywhere;
}

.school-shell {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
}

.school-shell::before {
  content: "";
  position: fixed;
  z-index: 900;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(5px);
  transition: opacity 0.22s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  padding: 24px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  color: white;
  background: linear-gradient(160deg, #4f6f54, #6b8f71 55%, #89a387);
  box-shadow: 0 20px 70px rgba(79, 111, 84, 0.35);
  z-index: 20;
}

.sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  color: #123;
  background: linear-gradient(135deg, #fff, #fed7aa);
  font-weight: 700;
  font-size: 1.4rem;
}

.brand-logo {
  display: block;
  max-width: 100%;
  height: auto;
  flex: 0 1 auto;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.brand-logo-sidebar {
  width: clamp(68px, 6.2vw, 92px);
}

.brand-logo-header {
  width: clamp(72px, 6.8vw, 102px);
}

.public-brand-copy strong {
  font-size: clamp(1.28rem, 2.5vw, 1.95rem);
  line-height: 1.35;
}

.brand small,
.eyebrow {
  display: block;
  color: black;
  font-size: 0.82rem;
}

.public-brand-copy small {
  font-size: clamp(0.88rem, 1.35vw, 1.05rem);
  line-height: 1.65;
}

.nav-menu {
  display: grid;
  gap: 8px;
}

.nav-menu a {
  padding: 13px 14px;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.84);
  transition: 0.18s ease;
}

.nav-menu a:hover {
  color: white;
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(-4px);
}

.main-frame {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  position: relative;
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 24px;
  padding: 18px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.topbar:has(.account-menu[open]),
.public-topbar:has(.account-menu[open]) {
  z-index: 1800;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.35rem, 2vw, 2.2rem);
}

.topbar .eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
}

.topbar > div:first-of-type {
  min-width: 0;
  flex: 1 1 240px;
}

.topbar-copy {
  min-width: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  flex-direction: column-reverse !important;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-inline-start: auto;
}

.account-menu {
  position: relative;
  z-index: 120;
  max-width: 100%;
  color: var(--ink);
}

.account-menu[open] {
  z-index: 500;
}

.account-menu summary {
  list-style: none;
}

.account-menu summary::-webkit-details-marker {
  display: none;
}

.account-trigger {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 7px 10px 7px 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  font-weight: 800;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.account-trigger::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-inline-start: 2px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  opacity: 0.55;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.account-menu[open] .account-trigger {
  border-color: rgba(var(--primary-rgb), 0.34);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.14);
}

.account-menu[open] .account-trigger::after {
  opacity: 0.9;
  transform: translateY(2px) rotate(225deg);
}

.account-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.account-name {
  min-width: 0;
  color: #111827;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.account-avatar,
.signin-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 18px rgba(71, 104, 78, 0.24);
  font-weight: 900;
  padding-top: 0.25vw;
}

.account-menu-list {
  position: absolute;
  z-index: 520;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
  animation: account-menu-enter 0.16s ease both;
}

.account-menu-list a,
.account-menu-list button {
  justify-content: flex-start;
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 14px;
  color: #111827;
  background: transparent;
  text-decoration: none;
  font-weight: 800;
}

.account-menu-list a:hover,
.account-menu-list button:hover {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
}

.account-menu-list form {
  margin: 0;
}

.signin-link {
  gap: 10px;
}

@keyframes account-menu-enter {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.profile-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(231, 240, 230, 0.82));
  box-shadow: var(--shadow);
}

.profile-overview h1,
.profile-overview p {
  margin: 0;
}

.profile-overview h1 {
  margin-top: 6px;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
}

.profile-overview p {
  margin-top: 8px;
  color: var(--muted);
}

.profile-overview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.content {
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 190px);
}

.grid {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 18px;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
}

.card,
.stat-card,
.form-card,
.table-card {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card,
.form-card,
.table-card {
  padding: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset-inline-start: -42px;
  inset-block-start: -44px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.14);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.92rem;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 2.2rem;
}

.portal-cards .stat-card {
  min-height: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1vw;
  margin-bottom: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.2rem;
}

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

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

.field.full {
  grid-column: 1/-1;
}

label {
  color: #344054;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  outline: none;
}

select {
  appearance: none;
  direction: rtl;
  text-align: right;
  padding-inline-start: 42px;
  background-color: rgba(255, 255, 255, 0.82);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none' stroke='%23172033' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 16px center;
  background-size: 16px 16px;
}

option {
  direction: rtl;
  text-align: right;
}

select::-ms-expand {
  display: none;
}

html[dir=ltr] select {
  direction: ltr;
  text-align: left;
  padding-inline-start: 13px;
  padding-inline-end: 42px;
  background-position: right 16px center;
}

html[dir=ltr] option {
  direction: ltr;
  text-align: left;
}

textarea {
  resize: vertical;
}

select[multiple] {
  padding-inline: 13px;
  background-image: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.11);
}

.text-danger,
.validation-summary-errors {
  color: var(--danger);
  font-size: 0.86rem;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 17px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), #89a387);
}

.secondary {
  color: #36513a;
  background: #e7f0e6;
}

.ghost {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.09);
}

.danger {
  color: white;
  background: var(--danger);
}

.icon-button {
  display: none;
  position: relative;
  overflow: hidden;
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 14px;
  color: var(--primary);
  background: var(--primary-soft);
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.sidebar-toggle {
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  place-items: center;
}

.sidebar-toggle-glyph {
  display: grid;
  gap: 4px;
  width: 20px;
}

.sidebar-toggle-line {
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  transform-origin: center;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.5);
}

.sidebar-toggle.is-open .sidebar-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.alert-pill,
.badge,
.user-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.alert-pill {
  color: #92400e;
  background: #fef3c7;
}

.user-chip {
  color: var(--primary);
  background: var(--primary-soft);
}

.badge.pending {
  color: #92400e;
  background: #fef3c7;
}

.badge.approved {
  color: #166534;
  background: #dcfce7;
}

.badge.rejected {
  color: #991b1b;
  background: #fee2e2;
}

.badge.awaitingcall {
  color: #7c2d12;
  background: #ffedd5;
}

.badge.active {
  color: #166534;
  background: #dcfce7;
}

.badge.graduated {
  color: #36513a;
  background: #e7f0e6;
}

.graduated-row {
  background: rgba(var(--primary-rgb), 0.06);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 20px;
}

table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: right;
  table-layout: fixed;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

tr.pending-row {
  background: rgba(245, 158, 11, 0.08);
}

tr.overdue-row {
  background: rgba(220, 38, 38, 0.06);
}

.search-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 14px;
}

.search-row > * {
  min-width: 0;
  flex: 1 1 180px;
}

.search-row > .button,
.search-row > button {
  flex: 0 0 auto;
}

.student-filter-form {
  display: grid;
  flex: 1 1 760px;
  grid-template-columns: repeat(4, minmax(128px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin: 0;
}

.student-filter-form .field {
  min-width: 0;
  gap: 5px;
}

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

.student-filter-form input {
  width: 100%;
}

.student-filter-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}

.student-filter-actions .button,
.student-filter-actions button {
  white-space: nowrap;
}

.inline-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-form select {
  min-width: 0;
  flex: 1 1 170px;
}

.appointment-fixed-type {
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.appointment-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  width: max-content;
}

.appointment-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.appointment-schedule-form {
  align-items: center;
}

.appointment-requested-range {
  flex: 1 1 100%;
  padding: 8px 10px;
  border: 1px dashed rgba(var(--primary-rgb), 0.35);
  border-radius: 12px;
  color: #36513a;
  background: rgba(var(--primary-soft-rgb), 0.72);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.7;
}

.appointment-schedule-form .compact-datetime {
  flex: 1 1 180px;
}

.appointment-schedule-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.appointment-modal-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: min(100%, 680px);
  margin: 12px auto 0;
  padding: 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(var(--primary-soft-rgb), 0.62), rgba(255, 255, 255, 0.9)), #fff;
}

.appointment-modal-form .field {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 28px rgba(63, 89, 67, 0.08);
}

.appointment-modal-form label {
  color: var(--primary);
  font-size: 0.92rem;
}

.appointment-modal-form .persian-datetime-field {
  grid-template-columns: 1fr;
  gap: 10px;
}

.appointment-modal-form .persian-calendar {
  position: static;
  z-index: auto;
  grid-column: 1/-1;
  width: 100%;
  min-width: 0;
  margin-top: 2px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.appointment-modal-form .persian-calendar[hidden] {
  display: none;
}

.appointment-modal-form .persian-time-input {
  min-height: 46px;
}

.appointment-modal-form .persian-date-toggle {
  width: 100%;
}

.appointment-modal-form .form-actions-field {
  display: flex;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.appointment-modal-form .form-actions-field button {
  min-width: 170px;
}

.appointment-dialog-footer {
  justify-content: space-between;
}

.details-description {
  margin: 0;
  color: #445065;
  line-height: 1.9;
}

.class-assignment-form {
  flex-wrap: nowrap;
}

.class-assignment-form select {
  flex: 1 1 auto;
  direction: initial;
}

.class-assignment-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.student-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
}

.student-actions form {
  margin: 0;
}

.student-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.student-graduated-date {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
}

.student-graduation-dialog {
  width: min(620px, 100% - 32px);
}

.student-graduation-form {
  padding: 22px;
}

.student-graduation-form .details-dialog-footer {
  gap: 10px;
  margin: 0;
  padding: 16px 0 0;
  background: transparent;
}

.student-export-form {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 430px);
}

.student-export-form select {
  flex: 0 1 180px;
  min-width: 150px;
}

.student-export-form button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.catalog-create-form {
  margin-bottom: 14px;
}

.catalog-create-form input {
  flex: 1 1 220px;
}

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

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

.catalog-row .inline-form {
  flex-wrap: nowrap;
}

.catalog-row .inline-form input {
  min-width: 0;
  flex: 1 1 auto;
}

.academic-fields-card .academic-field-form {
  min-width: 0;
}

.academic-fields-card .academic-field-form input {
  flex: 0 1 190px;
  max-width: min(100%, 220px);
}

.academic-fields-card .catalog-create-form {
  justify-content: flex-start;
}

.academic-fields-card .catalog-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.academic-fields-card .catalog-row .academic-field-form button,
.academic-fields-card .catalog-row > form:last-child button {
  min-width: 74px;
  justify-content: center;
}

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

.schedule-edit-table {
  min-width: 1050px;
}

.schedule-edit-table input,
.schedule-edit-table select {
  width: 100%;
  min-width: 0;
}

.schedule-edit-table th,
.schedule-edit-table td {
  padding: 8px;
}

.schedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-actions button {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 0.84rem;
}

.form-actions,
.form-actions-field {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.sms-broadcast-form select[multiple] {
  min-height: 220px;
}

.sms-recipient-panel[hidden] {
  display: none;
}

.compact-form {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.import-note-list {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0 18px 0 0;
  color: #445065;
  line-height: 1.9;
}

.import-upload-form {
  align-items: end;
}

.import-upload-form input[type=file] {
  padding: 8px;
}

.import-upload-form input[type=file]::file-selector-button {
  margin-inline-end: 10px;
  padding: 8px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.import-errors {
  display: grid;
  gap: 10px;
}

.import-errors h3 {
  margin: 0;
  font-size: 1rem;
}

.import-error-list {
  margin: 0;
  padding: 0 18px 0 0;
  color: var(--danger);
  line-height: 1.9;
}

.success-banner {
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid #bbf7d0;
  border-radius: 18px;
  color: #166534;
  background: #dcfce7;
  font-weight: 700;
}

.error-banner {
  margin: 0 0 18px;
  padding: 13px 16px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  color: #991b1b;
  background: #fee2e2;
  font-weight: 700;
}

.details-button {
  flex: 0 0 auto;
}

.pre-registration-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  width: max-content;
}

.pre-registration-actions .inline-form {
  flex-wrap: nowrap;
  gap: 5px;
  width: auto;
}

.pre-registration-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.fee-summary-cards .stat-card small {
  color: var(--muted);
  font-weight: 700;
}

.fee-summary-cards .fee-amount {
  font-size: clamp(1.3rem, 2.5vw, 2rem);
}

.fee-filter-form {
  display: grid;
  flex: 1 1 980px;
  grid-template-columns: repeat(6, minmax(112px, 1fr));
  align-items: end;
  gap: 10px;
  margin: 0;
}

.fee-filter-form .field {
  min-width: 0;
  gap: 5px;
}

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

.fee-filter-form input,
.fee-filter-form select {
  width: 100%;
}

.fee-filter-form .persian-date-field {
  width: 100%;
}

.fee-filter-actions {
  display: flex;
  grid-column: 1/-1;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.fee-filter-actions .button,
.fee-filter-actions button {
  white-space: nowrap;
}

.fee-bulk-form {
  display: grid;
  gap: 16px;
}

.fee-entry-toolbar,
.fee-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.fee-entry-wrap {
  overflow-x: auto;
}

.fee-entry-wrap.has-open-calendar {
  overflow: visible;
}

.fee-entry-table {
  min-width: 1080px;
}

.fee-entry-table th {
  cursor: default;
}

.fee-entry-table th:first-child,
.fee-entry-table td:first-child {
  width: 72px;
}

.fee-entry-table th:nth-child(2),
.fee-entry-table td:nth-child(2) {
  width: 24%;
}

.fee-entry-table th:nth-child(3),
.fee-entry-table td:nth-child(3) {
  width: 150px;
}

.fee-entry-table th:nth-child(4),
.fee-entry-table td:nth-child(4) {
  width: 220px;
}

.fee-entry-table th:nth-child(5),
.fee-entry-table td:nth-child(5) {
  width: 170px;
}

.fee-entry-table th:nth-child(6),
.fee-entry-table td:nth-child(6) {
  width: 180px;
}

.fee-entry-table th:last-child,
.fee-entry-table td:last-child {
  width: 104px;
}

.fee-entry-table tr[data-fee-row] {
  vertical-align: middle;
}

.fee-entry-table tr[data-fee-row] td {
  vertical-align: middle;
  padding-block: 12px;
}

.fee-entry-table select,
.fee-entry-table input {
  width: 100%;
}

.fee-entry-table tr[data-fee-row] select,
.fee-entry-table tr[data-fee-row] input,
.fee-entry-table tr[data-fee-row] .persian-date-field,
.fee-entry-table tr[data-fee-row] .fee-paid-toggle,
.fee-entry-table tr[data-fee-row] .fee-remove-row {
  margin-block: auto;
}

.fee-entry-table tr[data-fee-row] .text-danger {
  display: block;
  margin-top: 6px;
}

.fee-row-number {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 12px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.1);
  font-weight: 800;
}

.fee-paid-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 2vh !important;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.fee-paid-toggle input {
  width: auto;
}

.fee-payment-badge {
  color: #2f5f39;
  background: rgba(47, 95, 57, 0.1);
}

.fee-remove-row {
  min-height: 38px;
  padding: 7px 12px;
}

.fee-remove-row:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.checkbox-field {
  align-content: end;
}

.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
}

.checkbox-field input[type=checkbox] {
  width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
}

.fee-actions {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  width: max-content;
}

.fee-actions .inline-form {
  flex-wrap: nowrap;
  gap: 5px;
  width: auto;
}

.fee-actions button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 0.86rem;
  white-space: nowrap;
}

.details-dialog {
  width: min(880px, 100% - 32px);
  max-height: min(88vh, 920px);
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  scrollbar-width: none;
}

.details-dialog::-webkit-scrollbar {
  display: none;
}

.details-dialog::backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
}

.details-dialog-shell {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(88vh, 920px);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: #f8fafc;
}

.details-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #89a387);
}

.details-dialog-header h2 {
  margin: 4px 0 12px;
  font-size: 1.45rem;
}

.details-dialog-eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.details-dialog-close {
  min-width: 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  color: white;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.5rem;
}

.details-dialog-body {
  display: grid;
  flex: 1 1 auto;
  gap: 16px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 22px;
}

.details-dialog-body::-webkit-scrollbar {
  display: none;
}

.details-group {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.details-group h3 {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 1rem;
}

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

.details-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 15px;
  background: #f8fafc;
}

.details-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.details-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.ltr-value {
  direction: ltr;
  text-align: right;
}

.details-dialog-footer {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: white;
}

.muted-text {
  color: var(--muted);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.library-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

.library-card h3 {
  margin: 12px 0 8px;
}

.library-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.9;
}

.library-card small {
  color: var(--muted);
}

.library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.activity-list,
.notice-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.activity-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
}

.birthday-modal-trigger {
  flex-shrink: 0;
  padding-inline: 14px;
}

.birthday-modal-trigger span {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  min-height: 28px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.78);
}

.birthday-dialog {
  width: min(720px, 100% - 32px);
}

.birthday-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.birthday-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

.birthday-avatar {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #89a387);
  font-weight: 800;
}

.birthday-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.birthday-content strong,
.birthday-content span,
.birthday-content small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.birthday-content span,
.birthday-content small,
.birthday-phone {
  color: var(--muted);
}

.birthday-call,
.birthday-phone {
  white-space: nowrap;
}

.birthday-call {
  direction: ltr;
}

.birthday-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.14);
  font-weight: 700;
}

.birthday-empty {
  padding: 24px;
  border: 1px dashed rgba(var(--primary-rgb), 0.3);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.portal-student-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
}

.portal-comment {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

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

.progress-filter-form {
  align-items: end;
}

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

.progress-insight-item,
.assessment-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.progress-insight-item strong,
.assessment-card strong {
  font-size: 1.08rem;
}

.progress-insight-wide {
  grid-column: 1/-1;
}

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

.progress-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.progress-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.chart-swatch.selected,
.timeline-bar.selected,
.subject-bar.selected {
  background: linear-gradient(180deg, #a9c4a8, var(--primary));
}

.chart-swatch.compare,
.timeline-bar.compare,
.subject-bar.compare {
  background: linear-gradient(180deg, #fb923c, #f97316);
}

.progress-timeline-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 272px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.timeline-slot {
  display: grid;
  gap: 10px;
  align-items: end;
  min-width: 0;
}

.timeline-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  min-height: 188px;
}

.timeline-bar-shell {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 188px;
}

.timeline-bar {
  display: block;
  width: 100%;
  min-height: 6px;
  border-radius: 14px 14px 6px 6px;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.1);
}

.timeline-bar-value {
  position: absolute;
  inset-inline: 0;
  inset-block-end: calc(100% + 6px);
  text-align: center;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.timeline-label {
  display: block;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.subject-bars {
  display: grid;
  gap: 12px;
}

.subject-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.subject-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.subject-head small {
  color: var(--muted);
}

.subject-bar-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.subject-bar-track {
  overflow: hidden;
  min-height: 12px;
  border-radius: 999px;
  background: rgba(var(--primary-rgb), 0.08);
}

.subject-bar {
  display: block;
  height: 12px;
  border-radius: 999px;
}

.subject-bar-number {
  min-width: 42px;
  direction: ltr;
  text-align: left;
  font-weight: 700;
}

.assessment-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
  padding-bottom: 8px;
}

.calendar-day {
  min-height: 440px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.78);
}

.calendar-day h3 {
  margin: 0 0 12px;
  font-size: 1rem;
}

.event-card {
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 16px;
  color: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.event-card small {
  display: block;
  opacity: 0.86;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.public-shell {
  position: relative;
  isolation: isolate;
  width: min(1180px, 100% - 32px);
  max-width: 100%;
  margin: 0 auto;
  padding: 24px 0 36px;
}

.public-shell::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 5vh auto auto -8vw;
  width: min(46vw, 620px);
  height: min(46vw, 620px);
  border-radius: 999px;
  background: radial-gradient(circle at 38% 38%, rgba(249, 115, 22, 0.34), rgba(251, 146, 60, 0.18) 42%, transparent 72%);
  filter: blur(42px);
  pointer-events: none;
}

.public-shell::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: auto -10vw 10vh auto;
  width: min(38vw, 520px);
  height: min(38vw, 520px);
  border-radius: 999px;
  background: radial-gradient(circle at 54% 48%, rgba(251, 146, 60, 0.24), rgba(253, 186, 116, 0.13) 45%, transparent 74%);
  filter: blur(48px);
  pointer-events: none;
}

.public-topbar,
.public-footer,
.landing-hero,
.landing-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.public-topbar,
.public-footer {
  display: flex;
  position: relative;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
}

.public-topbar {
  z-index: 90;
  overflow: visible;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.public-brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.public-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.public-content {
  padding: 24px 0;
}

.landing-banner {
  margin-bottom: 18px;
  overflow: hidden;
  border-radius: 34px;
  background: #e7efe7;
  box-shadow: 0 22px 60px rgba(63, 89, 67, 0.16);
}

.landing-banner-link,
.landing-banner picture {
  display: block;
}

.landing-banner img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
  padding: 28px;
  border-radius: 34px;
}

.landing-kicker,
.landing-card-eyebrow,
.landing-panel-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.09);
  font-size: 0.86rem;
  font-weight: 700;
}

.landing-copy h1 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.15;
}

.landing-copy p,
.landing-panel p,
.landing-card p {
  margin: 0;
  color: #445065;
  line-height: 1.9;
}

.landing-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.school-shell > *,
.main-frame,
.topbar,
.top-actions,
.section-title,
.search-row,
.inline-form,
.form-actions,
.form-actions-field,
.action-row,
.public-topbar,
.public-footer,
.public-actions,
.landing-banner,
.landing-banner-link,
.landing-hero,
.landing-sections,
.banner-admin-preview-grid,
.library-grid,
.library-card,
.calendar-grid,
.calendar-day,
.portal-student-item,
.auth-card,
.otp-status-card {
  min-width: 0;
  max-width: 100%;
}

.landing-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 18px;
  align-content: stretch;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(38, 63, 47, 0.98), rgba(87, 126, 91, 0.96) 56%, rgba(184, 151, 79, 0.92)), repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 24px);
  box-shadow: 0 26px 70px rgba(47, 73, 53, 0.28);
  color: white;
}

.landing-panel::before {
  content: "";
  position: absolute;
  inset: -35% -45%;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.2) 45%, transparent 56%);
  transform: translateX(-36%) rotate(4deg);
  animation: school-panel-sheen 7s ease-in-out infinite;
}

.landing-panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
}

.landing-panel p,
.landing-panel-label {
  color: rgba(255, 255, 255, 0.92);
}

.landing-panel-label {
  background: rgba(255, 255, 255, 0.12);
}

.school-snapshot-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.school-snapshot-head img {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  padding: 8px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 34px rgba(21, 40, 26, 0.22);
}

.school-snapshot-head strong {
  display: block;
  margin-top: 10px;
  font-size: 1.22rem;
  line-height: 1.65;
}

.school-snapshot-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 8px;
}

.school-snapshot-track::before {
  content: "";
  position: absolute;
  right: 24px;
  left: 24px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), rgba(248, 215, 140, 0.88), rgba(255, 255, 255, 0.22));
  transform: translateY(-50%);
}

.school-snapshot-track span {
  position: relative;
  z-index: 1;
  display: block;
  width: 30px;
  height: 30px;
  margin-inline: auto;
  border: 7px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  background: #f8d78c;
  box-shadow: 0 0 0 0 rgba(248, 215, 140, 0.36);
  animation: school-step-pulse 2.9s ease-in-out infinite;
}

.school-snapshot-track span:nth-child(2) {
  animation-delay: 0.35s;
}

.school-snapshot-track span:nth-child(3) {
  animation-delay: 0.7s;
}

.school-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.school-snapshot-grid div {
  display: grid;
  gap: 7px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  animation: school-card-rise 5.8s ease-in-out infinite;
}

.school-snapshot-grid div:nth-child(2) {
  animation-delay: 0.25s;
}

.school-snapshot-grid div:nth-child(3) {
  animation-delay: 0.5s;
}

.school-snapshot-grid span {
  color: #f8d78c;
  font-size: 0.82rem;
  font-weight: 900;
}

.school-snapshot-grid strong {
  font-size: 0.98rem;
  line-height: 1.55;
}

.school-snapshot-grid small {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.school-snapshot > p {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
}

@keyframes school-panel-sheen {
  0%, 42% {
    transform: translateX(-38%) rotate(4deg);
  }
  70%, 100% {
    transform: translateX(38%) rotate(4deg);
  }
}
@keyframes school-step-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(248, 215, 140, 0.32);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(248, 215, 140, 0);
    transform: scale(1.08);
  }
}
@keyframes school-card-rise {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .landing-panel::before,
  .school-snapshot-track span,
  .school-snapshot-grid div,
  .gallery-slide.is-active img,
  .gallery-slide-progress span {
    animation: none !important;
  }
  .gallery-slide,
  .gallery-slide-copy {
    transition: none !important;
  }
}
.landing-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.landing-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 28px;
}

.contact-hero {
  align-items: stretch;
}

.contact-copy {
  display: grid;
  align-content: start;
}

.contact-panel {
  gap: 18px;
}

.contact-summary-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-summary-list li {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
}

.contact-summary-list strong {
  display: block;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
}

.contact-summary-list address,
.contact-summary-list a {
  display: block;
  margin: 0;
  color: white;
  font-style: normal;
  font-weight: 700;
  line-height: 1.9;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.contact-card {
  align-content: start;
}

.contact-card h2,
.contact-map-card h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.contact-address,
.contact-link {
  font-weight: 700;
  line-height: 2;
}

.contact-address {
  margin: 0;
  font-style: normal;
}

.contact-link {
  color: var(--primary);
  font-size: 1.18rem;
}

.contact-card .button {
  width: fit-content;
}

.contact-map-card {
  margin-top: 18px;
}

.contact-map-frame {
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(var(--primary-rgb), 0.08), rgba(166, 190, 165, 0.18));
}

.gallery-showcase {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(248, 252, 247, 0.86)), var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.gallery-showcase-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.gallery-showcase-head h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 2.7vw, 2.4rem);
  line-height: 1.2;
}

.gallery-showcase-head p {
  margin: 0;
  max-width: 780px;
  color: #445065;
  line-height: 1.9;
}

.gallery-slideshow {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.68), transparent 18rem), linear-gradient(135deg, rgba(69, 103, 76, 0.12), rgba(249, 250, 251, 0.88));
  box-shadow: 0 24px 70px rgba(63, 89, 67, 0.16);
}

.gallery-slideshow::before {
  content: "";
  position: absolute;
  inset: 16px auto auto 16px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  filter: blur(18px);
  pointer-events: none;
}

.gallery-slideshow-frame {
  position: relative;
  overflow: hidden;
  min-height: clamp(340px, 48vw, 560px);
  border-radius: 24px;
  background: #d9e7da;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.035) translateX(-18px);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-slide.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateX(0);
}

.gallery-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 20, 16, 0.72), rgba(10, 20, 16, 0.18) 54%, rgba(10, 20, 16, 0.06)), linear-gradient(180deg, transparent 52%, rgba(10, 20, 16, 0.54));
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.gallery-slide.is-active img {
  animation: gallery-image-drift var(--gallery-interval, 5600ms) ease-out both;
}

.gallery-slide-copy {
  position: absolute;
  z-index: 2;
  inset-inline-start: clamp(18px, 4vw, 42px);
  inset-block-end: clamp(72px, 8vw, 112px);
  display: grid;
  gap: 10px;
  width: min(520px, 100% - 36px);
  color: white;
  transform: translateY(18px);
  opacity: 0;
  transition: opacity 0.52s ease 0.12s, transform 0.52s ease 0.12s;
}

.gallery-slide.is-active .gallery-slide-copy {
  opacity: 1;
  transform: translateY(0);
}

.gallery-slide-copy span {
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
  font-size: 0.84rem;
  font-weight: 800;
}

.gallery-slide-copy strong {
  font-size: clamp(1.55rem, 4vw, 3.25rem);
  line-height: 1.2;
}

.gallery-slide-copy small {
  max-width: 44rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  line-height: 1.9;
}

.gallery-slideshow-controls {
  position: absolute;
  z-index: 4;
  inset-inline: clamp(22px, 4vw, 44px);
  inset-block-end: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-slide-button {
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
  font-size: 2rem;
  line-height: 1;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.24);
}

.gallery-slide-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.gallery-slide-button span {
  display: block;
  direction: ltr;
  transform: translateY(-1px);
}

.gallery-slide-dots {
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
  gap: 8px;
}

.gallery-slide-dot {
  width: 10px;
  min-width: 10px;
  height: 10px;
  min-height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.24s ease, background 0.24s ease;
}

.gallery-slide-dot.is-active {
  width: 34px;
  background: white;
}

.gallery-slide-progress {
  position: absolute;
  z-index: 4;
  inset-inline: clamp(24px, 4vw, 46px);
  inset-block-end: 82px;
  overflow: hidden;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.gallery-slide-progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffffff, #d8f6df);
  transform-origin: right center;
  animation: gallery-slide-progress var(--gallery-interval, 5600ms) linear infinite;
}

.gallery-slideshow.is-paused .gallery-slide-progress span {
  animation-play-state: paused;
}

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  grid-column: span 4;
  border-radius: 26px;
  background: #d9e7da;
  box-shadow: 0 18px 50px rgba(63, 89, 67, 0.16);
  isolation: isolate;
  animation: gallery-rise 0.72s ease both;
  animation-delay: var(--gallery-delay, 0ms);
}

.gallery-tile.featured {
  grid-column: span 6;
  grid-row: span 2;
  min-height: 100%;
}

.gallery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 24, 18, 0.02), rgba(12, 24, 18, 0.58));
  transition: opacity 0.24s ease;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.42s ease;
}

.gallery-tile-copy {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 18px;
  color: white;
}

.gallery-tile-copy strong {
  font-size: 1.12rem;
  line-height: 1.45;
}

.gallery-tile-copy span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.8;
}

.gallery-tile:hover img {
  transform: scale(1.06);
}

.gallery-tile:hover::after {
  opacity: 0.88;
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

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

.gallery-summary-grid.cards {
  gap: 18px;
}

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

.banner-admin-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(107, 143, 113, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
}

.banner-admin-preview > span {
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.banner-admin-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16/5;
  border-radius: 14px;
  background: #e7efe7;
  object-fit: cover;
}

.banner-admin-preview.mobile img {
  aspect-ratio: 4/5;
  max-height: 340px;
}

.banner-admin-preview label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--danger);
  font-weight: 700;
}

.banner-admin-preview input {
  width: auto;
  min-height: auto;
}

.gallery-admin-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(63, 89, 67, 0.14);
}

.gallery-admin-preview {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #e7efe7;
}

.gallery-admin-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-admin-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.gallery-admin-body h3 {
  margin: 0;
  font-size: 1.06rem;
}

.gallery-admin-body p,
.gallery-admin-body small {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.gallery-admin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  align-items: stretch;
  gap: 10px;
  padding: 0 18px 18px;
}

.gallery-admin-actions form,
.gallery-admin-actions a {
  min-width: 0;
  width: 100%;
}

.gallery-admin-actions form {
  margin: 0;
}

.gallery-admin-actions .button,
.gallery-admin-actions button {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  white-space: normal;
  line-height: 1.35;
}

@keyframes gallery-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes gallery-image-drift {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1.02);
  }
}
@keyframes gallery-slide-progress {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
.contact-map-frame iframe {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 0;
}

.landing-card-head,
.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.action-row form {
  margin: 0;
}

.responsive-table td,
.responsive-table th {
  overflow-wrap: anywhere;
}

.persian-date-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
}

.persian-date-field.is-calendar-open {
  z-index: 1200;
}

.persian-datetime-field {
  grid-template-columns: minmax(0, 1fr) 116px 44px;
}

.persian-date-toggle {
  display: inline-flex;
  color: var(--primary);
  background: var(--primary-soft);
}

.persian-calendar {
  position: absolute;
  z-index: 1200;
  inset-block-start: calc(100% + 8px);
  inset-inline: 0;
  width: min(320px, 100%);
  max-width: calc(100vw - 24px);
  max-height: min(420px, 100dvh - 24px);
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
}

.persian-calendar.is-floating {
  position: fixed;
  inset: auto;
  z-index: 1800;
}

.persian-calendar-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  text-align: center;
}

.persian-calendar-title {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(82px, 0.8fr);
  gap: 6px;
}

.persian-calendar-select {
  min-height: 36px;
  padding: 6px 8px;
  padding-inline-start: 40px;
  border-radius: 10px;
  background-position: left 18px center;
  background-size: 14px 14px;
  font-size: 0.86rem;
  text-align: right;
  text-align-last: right;
}

.persian-calendar-nav,
.persian-calendar-day {
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
}

.persian-calendar-nav:hover,
.persian-calendar-day:hover {
  background: var(--primary-soft);
}

.persian-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.persian-calendar-weekday {
  display: grid;
  min-height: 28px;
  place-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.persian-calendar-day.selected {
  color: white;
  background: var(--primary);
}

.persian-time-input {
  text-align: center;
  direction: ltr;
}

.auth-stage {
  display: grid;
  min-height: min(620px, 72vh);
  place-items: center;
}

.refined-auth-stage {
  position: relative;
  isolation: isolate;
  padding: 28px 12px;
}

.auth-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 36px;
}

.auth-orbit {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: 0.78;
}

.orbit-one {
  width: 260px;
  height: 260px;
  inset-block-start: 4%;
  inset-inline-start: 12%;
  background: radial-gradient(circle, rgba(var(--primary-rgb), 0.22), transparent 68%);
}

.orbit-two {
  width: 220px;
  height: 220px;
  inset-block-end: 2%;
  inset-inline-end: 16%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.2), transparent 70%);
}

.orbit-three {
  width: 160px;
  height: 160px;
  inset-block-start: 24%;
  inset-inline-end: 24%;
  background: radial-gradient(circle, rgba(166, 190, 165, 0.26), transparent 70%);
}

.auth-card {
  width: min(560px, 100%);
}

.refined-auth-card {
  position: relative;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 243, 0.86)), var(--surface);
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.15);
}

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

.auth-kicker {
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-close-button {
  display: inline-flex;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 14px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.92);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.auth-close-button:hover {
  background: white;
}

.auth-card [data-otp-request-panel],
.auth-card.otp-active [data-password-panel] {
  display: none;
}

.auth-card.otp-active [data-otp-request-panel] {
  display: block;
}

.compact-title {
  align-items: start;
  margin-bottom: 20px;
}

.compact-title h2 {
  margin-bottom: 6px;
}

.compact-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-primary-actions {
  align-items: center;
}

.auth-primary-actions .primary {
  min-width: 132px;
}

.otp-code-form {
  --otp-width: min(100%, 310px);
}

.otp-code-actions {
  justify-content: center;
}

.otp-status-card {
  display: flex;
  grid-column: 1/-1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: var(--otp-width);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid rgba(var(--primary-rgb), 0.12);
  border-radius: 18px;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(var(--primary-soft-rgb), 0.92), rgba(255, 244, 227, 0.68));
}

.otp-status-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.otp-status-card strong {
  direction: ltr;
  min-width: 58px;
  font-size: 1.1rem;
  text-align: left;
}

.otp-boxes {
  display: grid;
  grid-column: 1/-1;
  width: var(--otp-width);
  grid-template-columns: repeat(5, minmax(0, 54px));
  justify-content: center;
  gap: 10px;
  margin: 0 auto;
}

.otp-box {
  width: 100%;
  min-height: 56px;
  padding: 0;
  border: 1px solid rgba(var(--primary-rgb), 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  font-size: 1.45rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.otp-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.auth-resend-form {
  margin-top: 12px;
  text-align: center;
}

.link-button {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.link-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

@media (max-width: 1100px) {
  .cards,
  .two-col,
  .landing-sections,
  .progress-summary-grid,
  .gallery-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .landing-hero {
    grid-template-columns: 1fr;
  }
  .gallery-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gallery-tile,
  .gallery-tile.featured {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 280px;
  }
  .calendar-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
  }
  .calendar-day {
    min-height: 320px;
  }
  .student-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fee-filter-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .student-filter-actions {
    grid-column: 1/-1;
  }
}
@media (max-width: 960px) {
  .school-shell {
    grid-template-columns: 260px minmax(0, 1fr);
  }
  .topbar {
    align-items: flex-start;
  }
  .top-actions {
    width: 100%;
    justify-content: center;
    margin-inline-start: 0;
  }
  .portal-student-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .portal-student-item .badge:last-child {
    grid-column: 1/-1;
    justify-self: start;
  }
  .calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 820px) {
  body.sidebar-open {
    overflow: hidden;
    overscroll-behavior: contain;
  }
  .school-shell {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    overflow-x: clip;
  }
  body.sidebar-open .school-shell::before {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    top: calc(10px + env(safe-area-inset-top));
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: auto;
    width: min(84vw, 324px);
    max-width: calc(100vw - 20px);
    height: auto;
    max-height: calc(100dvh - 20px);
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.34);
    opacity: 0;
    transform: translate3d(calc(100% + 24px), 0, 0);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, visibility 0s linear 0.24s, box-shadow 0.24s ease;
    z-index: 1000;
    overscroll-behavior: contain;
  }
  .sidebar.open {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease, visibility 0s linear 0s, box-shadow 0.24s ease;
  }
  .sidebar .brand {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }
  .sidebar .brand strong {
    line-height: 1.55;
  }
  .nav-menu {
    gap: 6px;
    padding-bottom: 8px;
  }
  .nav-menu a {
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 0.95rem;
  }
  .main-frame {
    width: 100%;
    max-width: 100vw;
    min-height: 100dvh;
    padding: 12px;
    overflow-x: clip;
  }
  .topbar,
  .footer,
  .public-topbar,
  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px;
    border-radius: 22px;
    text-align: right;
  }
  .topbar > div:first-of-type,
  .top-actions,
  .account-menu,
  .account-trigger,
  .search-row,
  .inline-form,
  .form-actions,
  .form-actions-field,
  .action-row,
  .library-actions,
  .public-actions {
    width: 100%;
  }
  .topbar-copy {
    display: grid;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-items: start;
    width: 100%;
    padding: 0;
    text-align: right;
  }
  .topbar > .sidebar-toggle {
    position: static;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    z-index: auto;
  }
  .top-actions {
    display: flex;
    grid-column: 3;
    grid-row: 1;
    align-items: center;
    align-content: center;
    justify-self: end;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    width: auto;
    min-width: 0;
    margin-inline-start: 0;
  }
  .top-actions > .alert-pill {
    grid-column: 1/-1;
    flex-basis: 100%;
    order: 2;
  }
  .top-actions > .account-menu {
    order: 1;
  }
  .public-topbar,
  .public-footer {
    text-align: center;
  }
  .public-footer {
    align-items: center;
  }
  .public-brand {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
  .public-brand-copy {
    justify-items: center;
  }
  .public-actions {
    justify-content: center;
  }
  .account-menu-list {
    position: absolute;
    z-index: 1900;
    inset-block-start: calc(100% + 8px);
    inset-inline-start: auto;
    inset-inline-end: 0;
    width: min(220px, 100vw - 36px);
    min-width: min(210px, 100%);
    margin-top: 0;
    text-align: right;
  }
  .top-actions .account-menu,
  .public-actions .account-menu {
    width: auto;
    min-width: 0;
    max-width: min(42vw, 204px);
  }
  .top-actions .account-trigger,
  .public-actions .account-trigger {
    width: 100%;
    min-width: 0;
    white-space: nowrap;
  }
  .top-actions .account-name,
  .public-actions .account-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .profile-overview {
    align-items: stretch;
    flex-direction: column;
  }
  .profile-overview-actions {
    justify-content: stretch;
  }
  .student-export-form {
    display: grid;
    width: 100%;
    min-width: 0;
  }
  .search-row > *,
  .inline-form > *,
  .form-actions > *,
  .form-actions-field > *,
  .action-row > *,
  .library-actions > *,
  .public-actions > *,
  .profile-overview-actions > *,
  .student-export-form > * {
    width: 100%;
    min-width: 0;
  }
  .icon-button {
    display: inline-flex;
  }
  .cards,
  .two-col,
  .form-grid,
  .appointment-modal-form,
  .landing-sections,
  .progress-summary-grid,
  .progress-insight-grid,
  .banner-admin-preview-grid,
  .gallery-admin-grid,
  .gallery-mosaic {
    grid-template-columns: 1fr;
  }
  .gallery-showcase-head {
    align-items: start;
    flex-direction: column;
  }
  .gallery-slideshow {
    padding: 10px;
    border-radius: 24px;
  }
  .gallery-slideshow-frame {
    min-height: clamp(320px, 68vw, 460px);
    border-radius: 20px;
  }
  .gallery-slide::after {
    background: linear-gradient(180deg, rgba(10, 20, 16, 0.06), rgba(10, 20, 16, 0.76)), linear-gradient(90deg, rgba(10, 20, 16, 0.54), rgba(10, 20, 16, 0.14));
  }
  .gallery-slide-copy {
    inset-inline: 18px;
    inset-block-end: 86px;
    width: auto;
  }
  .gallery-slideshow-controls {
    inset-inline: 20px;
    inset-block-end: 18px;
  }
  .gallery-slide-progress {
    inset-inline: 22px;
    inset-block-end: 74px;
  }
  .gallery-admin-actions,
  .gallery-summary-grid {
    grid-template-columns: 1fr;
  }
  .public-shell {
    width: min(100% - 18px, 100%);
    padding-top: 14px;
  }
  .public-shell::before {
    inset-block-start: 8vh;
    inset-inline-start: -34vw;
    width: 92vw;
    height: 92vw;
    opacity: 0.78;
  }
  .public-shell::after {
    inset-inline-end: -38vw;
    width: 84vw;
    height: 84vw;
    opacity: 0.62;
  }
  .brand-logo-sidebar {
    width: min(80px, 24vw);
  }
  .brand-logo-header {
    width: min(86px, 26vw);
  }
  .persian-datetime-field {
    grid-template-columns: 1fr;
  }
  .appointment-modal-form .persian-datetime-field {
    grid-template-columns: 1fr;
  }
  .appointment-modal-form .persian-calendar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .calendar-grid {
    grid-template-columns: 1fr;
  }
  .calendar-day {
    min-height: unset;
  }
  .landing-hero,
  .landing-banner,
  .landing-card,
  .gallery-showcase,
  .public-topbar,
  .public-footer {
    border-radius: 24px;
  }
}
@media (max-width: 640px) {
  :root {
    --radius: 22px;
  }
  .student-filter-form {
    grid-template-columns: 1fr;
  }
  .fee-filter-form {
    grid-template-columns: 1fr;
  }
  .student-filter-actions {
    flex-direction: column;
    width: 100%;
  }
  .fee-filter-actions {
    flex-direction: column;
    width: 100%;
  }
  .student-filter-actions .button,
  .student-filter-actions button,
  .fee-filter-actions .button,
  .fee-filter-actions button {
    width: 100%;
  }
  .details-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }
  .details-dialog-shell {
    max-height: calc(100dvh - 20px);
    border-radius: 22px;
  }
  .details-dialog-header,
  .details-dialog-body {
    padding: 16px;
  }
  .details-dialog-body {
    max-height: calc(100dvh - 174px);
  }
  .birthday-modal-trigger {
    width: 100%;
  }
  .birthday-item {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }
  .birthday-avatar {
    width: 44px;
    height: 44px;
  }
  .birthday-call,
  .birthday-phone {
    grid-column: 1/-1;
    width: 100%;
    justify-self: stretch;
  }
  .details-grid {
    grid-template-columns: 1fr;
  }
  .details-button {
    width: auto;
    margin: 0;
  }
  .pre-registration-actions {
    max-width: 100%;
    overflow-x: auto;
  }
  .main-frame,
  .public-shell {
    padding-inline: 10px;
  }
  .card,
  .form-card,
  .table-card,
  .stat-card,
  .landing-card,
  .landing-hero,
  .gallery-showcase,
  .public-topbar,
  .public-footer {
    padding: 16px;
  }
  .landing-banner img {
    height: auto;
    max-height: none;
    object-fit: contain;
  }
  .school-snapshot-head {
    align-items: flex-start;
  }
  .school-snapshot-head img {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    border-radius: 18px;
  }
  .school-snapshot-head strong {
    font-size: 1.08rem;
  }
  .school-snapshot-grid {
    grid-template-columns: 1fr;
  }
  .school-snapshot-grid div {
    min-height: auto;
  }
  .contact-map-frame,
  .contact-map-frame iframe {
    min-height: 320px;
  }
  .section-title h2,
  .topbar h1 {
    line-height: 1.35;
  }
  .portal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .progress-timeline-chart {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 248px;
    padding: 12px;
  }
  .timeline-bars,
  .timeline-bar-shell {
    min-height: 164px;
  }
  .portal-cards .stat-card {
    padding: 14px;
    border-radius: 22px;
  }
  .portal-cards .stat-card span {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  .portal-cards .stat-card strong {
    margin-top: 10px;
    font-size: 1.72rem;
  }
  .table-wrap {
    margin-inline: 0;
    padding-inline: 0;
  }
  .compact-form {
    grid-template-columns: 1fr;
  }
  .otp-code-form {
    --otp-width: min(100%, 300px);
  }
  .otp-boxes {
    width: var(--otp-width);
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .otp-box {
    min-height: 50px;
    font-size: 1.18rem;
    border-radius: 14px;
  }
  .otp-status-card {
    width: var(--otp-width);
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
  }
  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table th,
  .responsive-table td,
  .responsive-table tr {
    display: block;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table tbody {
    display: grid;
    gap: 12px;
  }
  .responsive-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
  }
  .responsive-table tr.pending-row {
    background: rgba(245, 158, 11, 0.12);
  }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(92px, 40%) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 8px 0;
    border: 0;
    text-align: right;
  }
  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.85rem;
    white-space: normal;
  }
  .responsive-table td > form,
  .responsive-table td .inline-form,
  .responsive-table td .action-row {
    width: 100%;
    align-items: stretch;
  }
  .responsive-table td .inline-form,
  .responsive-table td .action-row {
    display: grid;
    gap: 8px;
  }
  .responsive-table td .class-assignment-form {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
  }
  .responsive-table td .button,
  .responsive-table td button,
  .responsive-table td select,
  .responsive-table td input {
    width: 100%;
  }
  .responsive-table td .class-assignment-form button {
    width: auto;
  }
  .responsive-table td.pre-registration-actions-cell {
    grid-template-columns: 1fr;
  }
  .responsive-table td.appointment-actions-cell {
    grid-template-columns: 1fr;
  }
  .responsive-table td.student-actions-cell {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .responsive-table td .pre-registration-actions {
    width: 100%;
  }
  .responsive-table td .student-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .responsive-table td .student-actions > button {
    width: 100%;
  }
  .responsive-table td .student-actions form {
    width: 100%;
  }
  .responsive-table td .student-actions form button {
    width: 100%;
  }
  .responsive-table td .appointment-actions {
    width: 100%;
  }
  .responsive-table td .pre-registration-actions .inline-form {
    display: flex;
    width: auto;
  }
  .responsive-table td .appointment-actions button {
    width: auto;
  }
  .responsive-table td .pre-registration-actions button {
    width: auto;
  }
  .responsive-table td.fee-actions-cell {
    grid-template-columns: 1fr;
  }
  .responsive-table td .fee-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .responsive-table td .fee-actions .inline-form {
    display: flex;
    width: auto;
  }
  .responsive-table td .fee-actions button {
    width: auto;
  }
  .fee-entry-wrap {
    overflow: visible;
  }
  .fee-entry-table {
    min-width: 0;
  }
  .fee-entry-table tr {
    display: grid;
    align-items: center;
    gap: 10px;
  }
  .fee-entry-table tr[data-fee-row] td {
    align-items: center;
    min-height: 56px;
    padding-block: 10px;
  }
  .fee-entry-table td,
  .fee-entry-table td:first-child,
  .fee-entry-table td:nth-child(2),
  .fee-entry-table td:nth-child(3),
  .fee-entry-table td:nth-child(4),
  .fee-entry-table td:nth-child(5),
  .fee-entry-table td:nth-child(6),
  .fee-entry-table td:last-child {
    width: 100%;
  }
  .fee-entry-table td.fee-entry-actions-cell {
    grid-template-columns: 1fr;
  }
  .fee-entry-toolbar,
  .fee-bulk-actions {
    justify-content: stretch;
  }
  .fee-entry-toolbar button,
  .fee-bulk-actions button {
    width: 100%;
  }
}
@media (max-width: 480px) {
  body {
    background: radial-gradient(circle at 10% 10%, rgba(var(--primary-rgb), 0.16), transparent 18rem), radial-gradient(circle at 90% 0%, rgba(166, 190, 165, 0.24), transparent 20rem), linear-gradient(135deg, #f1f6ef 0%, #fcfbf6 48%, #edf4eb 100%);
  }
  .school-snapshot-head {
    flex-direction: column;
  }
  .sidebar {
    width: min(100vw - 20px, 316px);
    padding: 16px 14px;
    border-radius: 22px;
  }
  .topbar,
  .public-topbar,
  .public-footer,
  .landing-hero,
  .landing-banner,
  .landing-card {
    border-radius: 18px;
  }
  .topbar h1 {
    font-size: 1.2rem;
    line-height: 1.45;
  }
  .gallery-slideshow-frame {
    min-height: 380px;
  }
  .gallery-slide-copy {
    inset-block-end: 82px;
    gap: 8px;
  }
  .gallery-slide-copy strong {
    font-size: 1.35rem;
  }
  .gallery-slide-copy small {
    font-size: 0.84rem;
  }
  .gallery-slide-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    font-size: 1.7rem;
  }
  .gallery-slide-dot.is-active {
    width: 26px;
  }
  .topbar .eyebrow,
  .public-brand-copy small {
    font-size: 0.76rem;
  }
  .topbar-copy {
    padding: 0;
  }
  .public-brand {
    flex-direction: column;
    gap: 10px;
  }
  .portal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .progress-timeline-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .subject-bar-stack {
    grid-template-columns: 1fr;
  }
  .subject-bar-number {
    min-width: 0;
    text-align: right;
  }
  .portal-cards .stat-card {
    padding: 13px;
  }
  .portal-cards .stat-card strong {
    font-size: 1.55rem;
  }
  .top-actions > .button,
  .top-actions > button,
  .public-actions > .button,
  .public-actions > button,
  .landing-actions > .button,
  .landing-actions > button,
  .library-actions > .button,
  .library-actions > button,
  .auth-actions > .button,
  .auth-actions > button,
  .form-actions > .button,
  .form-actions > button,
  .form-actions-field > .button,
  .form-actions-field > button,
  .user-chip,
  .alert-pill,
  .badge {
    width: 100%;
    justify-content: center;
  }
  .icon-button,
  .persian-date-toggle,
  .persian-calendar-nav,
  .persian-calendar-day,
  .link-button {
    width: auto;
  }
  .top-actions > .user-chip,
  .top-actions > .alert-pill {
    width: 100%;
  }
  .persian-date-field {
    grid-template-columns: minmax(0, 1fr) 40px;
  }
  .persian-datetime-field {
    grid-template-columns: 1fr;
  }
  .otp-code-form {
    --otp-width: min(100%, 280px);
  }
  .otp-boxes {
    gap: 6px;
  }
  .otp-box {
    min-height: 46px;
    font-size: 1.06rem;
  }
  .auth-close-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.28rem;
    border-radius: 12px;
  }
  .topbar > .sidebar-toggle {
    position: static;
    top: auto;
    right: auto;
  }
}
@media (max-width: 380px) {
  .top-actions {
    grid-template-columns: 1fr;
  }
  .portal-cards {
    grid-template-columns: 1fr;
  }
}
