/* —— چیدمان پنل مدرسه: عریض‌تر، با فاصله کم از لبه‌ها —— */
body.is-school-panel {
  --school-gutter: clamp(0.45rem, 0.9vw, 0.75rem);
}
body.is-school-panel .shell.school-modern-dash,
body.is-school-panel .shell.portal-wrap.school-modern-dash {
  width: min(1600px, calc(100% - 1rem));
  max-width: 1600px;
  margin-inline: auto;
  box-sizing: border-box;
  padding-inline: var(--school-gutter) !important;
  padding-top: 1.1rem !important;
  padding-bottom: 2.75rem !important;
}
body.is-school-panel .school-modern-container {
  gap: 1.1rem;
}

@media (min-width: 1100px) {
  body.is-school-panel {
    --school-gutter: 0.75rem;
  }
  body.is-school-panel .shell.school-modern-dash,
  body.is-school-panel .shell.portal-wrap.school-modern-dash {
    width: min(1680px, calc(100% - 1.25rem));
    max-width: 1680px;
  }
}

@media (min-width: 1600px) {
  body.is-school-panel .shell.school-modern-dash,
  body.is-school-panel .shell.portal-wrap.school-modern-dash {
    width: min(1760px, calc(100% - 1.5rem));
    max-width: 1760px;
  }
}

@media (max-width: 720px) {
  body.is-school-panel {
    --school-gutter: max(0.5rem, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) !important;
  }
  body.is-school-panel .shell.school-modern-dash,
  body.is-school-panel .shell.portal-wrap.school-modern-dash {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    padding-inline: max(0.5rem, env(safe-area-inset-left, 0px)) max(0.5rem, env(safe-area-inset-right, 0px)) !important;
    padding-top: 0.55rem !important;
    padding-bottom: max(1.1rem, env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0;
  }
  body.is-school-panel .school-modern-container { gap: 0.75rem; }
  body.is-school-panel .school-header-card,
  body.is-school-panel .school-analysis-card,
  body.is-school-panel .school-filter-toolbar,
  body.is-school-panel .vf-range,
  body.is-school-panel .vf-chart-block,
  body.is-school-panel .vf-lookup,
  body.is-school-panel .school-dash__card,
  body.is-school-panel .school-kpi-card {
    border-radius: 14px !important;
  }
  body.is-school-panel .school-kpi-grid { gap: 0.55rem; }
  body.is-school-panel .topbar__inner {
    padding-inline: max(0.55rem, env(safe-area-inset-left, 0px)) max(0.55rem, env(safe-area-inset-right, 0px));
  }
}

/* —— دکمه تم —— */
.school-theme-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  border: 1.5px solid rgba(245, 225, 154, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: #f5e19a;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  touch-action: manipulation;
}
.school-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 225, 154, 0.65);
  background: rgba(30, 41, 59, 0.95);
}
.school-theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.4);
}
.school-theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  display: block;
}
.school-theme-toggle .icon-sun { display: none; }
.school-theme-toggle .icon-moon { display: block; }

html[data-ui-theme="light"] .school-theme-toggle,
html[data-school-theme="light"] .school-theme-toggle {
  border-color: rgba(14, 116, 144, 0.35);
  background: #fff;
  color: #0f766e;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}
html[data-ui-theme="light"] .school-theme-toggle:hover,
html[data-school-theme="light"] .school-theme-toggle:hover {
  background: #f0f9ff;
  border-color: rgba(14, 116, 144, 0.55);
}
html[data-ui-theme="light"] .school-theme-toggle .icon-sun,
html[data-school-theme="light"] .school-theme-toggle .icon-sun { display: block; }
html[data-ui-theme="light"] .school-theme-toggle .icon-moon,
html[data-school-theme="light"] .school-theme-toggle .icon-moon { display: none; }

.school-theme-toggle--header {
  width: 2.4rem;
  height: 2.4rem;
  border-color: rgba(245, 225, 154, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #f5e19a;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.school-top-meta__left {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* ============================================================================
   توکن‌های تم سراسری
   ============================================================================ */
html[data-ui-theme="dark"],
html[data-school-theme="dark"],
html:not([data-ui-theme="light"]) {
  --ui-page: #061324;
  --ui-surface: #0b172a;
  --ui-text: #f8fafc;
  --ui-muted: #94a3b8;
  --ui-border: rgba(255, 255, 255, 0.12);
}

html[data-ui-theme="light"],
html[data-school-theme="light"] {
  --ui-page: #f1f5f9;
  --ui-surface: #ffffff;
  --ui-text: #0f172a;
  --ui-muted: #475569;
  --ui-border: rgba(15, 23, 42, 0.12);
}

/* ============================================================================
   تم روشن سراسری سایت (هدر، بدنه، کارت‌ها، ورود مدرسه)
   ============================================================================ */
html[data-ui-theme="light"] {
  background: var(--ui-page) !important;
  color: var(--ui-text);
}
html[data-ui-theme="light"] body {
  background: var(--ui-page) !important;
  color: var(--ui-text) !important;
}
html[data-ui-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
html[data-ui-theme="light"] .logo,
html[data-ui-theme="light"] .logo strong {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .logo small {
  color: #64748b !important;
}
html[data-ui-theme="light"] .nav__link,
html[data-ui-theme="light"] .nav__dd__trigger {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .nav__link.is-active,
html[data-ui-theme="light"] .nav__dd__trigger.is-active {
  color: #b45309 !important;
}
html[data-ui-theme="light"] .burger span {
  background: #0f172a !important;
}
html[data-ui-theme="light"] .school-theme-toggle--header {
  border-color: rgba(15, 23, 42, 0.14);
  background: #ffffff;
  color: #0f766e;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
}
html[data-ui-theme="light"] .nav__dd__menu {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-ui-theme="light"] .nav__dd__item {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .nav__dd__item:hover,
html[data-ui-theme="light"] .nav__dd__item.is-active {
  background: #f1f5f9 !important;
  color: #b45309 !important;
}
/* فوتر تم روشن در site-ui-theme.css */

/* بخش‌های عمومی روشن: متن تیره روی زمینه روشن */
html[data-ui-theme="light"] main#content,
html[data-ui-theme="light"] .shell,
html[data-ui-theme="light"] .portal-wrap,
html[data-ui-theme="light"] .section:not(.hero):not(.cta-strip),
html[data-ui-theme="light"] .section--tight {
  color: #0f172a;
}
html[data-ui-theme="light"] .card,
html[data-ui-theme="light"] .panel,
html[data-ui-theme="light"] .section-card,
html[data-ui-theme="light"] .feature-card,
html[data-ui-theme="light"] .price-card,
html[data-ui-theme="light"] .dl-card,
html[data-ui-theme="light"] .review-card,
html[data-ui-theme="light"] .faq-item,
html[data-ui-theme="light"] .auth-card,
html[data-ui-theme="light"] .school-auth {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-ui-theme="light"] h1:not(.hero h1):not(.hero--intro h1),
html[data-ui-theme="light"] h2,
html[data-ui-theme="light"] h3,
html[data-ui-theme="light"] h4,
html[data-ui-theme="light"] .section-title,
html[data-ui-theme="light"] .page-title {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .muted,
html[data-ui-theme="light"] .lead,
html[data-ui-theme="light"] .subtitle,
html[data-ui-theme="light"] .hint {
  color: #475569 !important;
}
/* هیرو/CTA تم روشن در site-ui-theme.css */

/* صفحه ورود پنل مدرسه در تم روشن */
html[data-ui-theme="light"] .school-auth__card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 55%, #eef2ff 100%) !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12) !important;
}
html[data-ui-theme="light"] .school-auth__kicker {
  color: #b45309 !important;
}
html[data-ui-theme="light"] .school-auth__brand h1,
html[data-ui-theme="light"] .school-auth h1 {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .school-auth__brand p,
html[data-ui-theme="light"] .school-auth__foot,
html[data-ui-theme="light"] .school-auth__field span {
  color: #334155 !important;
}
html[data-ui-theme="light"] .school-auth__field input {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}
html[data-ui-theme="light"] .school-auth__field input::placeholder {
  color: #94a3b8 !important;
}
html[data-ui-theme="light"] .school-auth__field input:focus {
  background: #ffffff !important;
  border-color: rgba(14, 116, 144, 0.55) !important;
}
html[data-ui-theme="light"] .school-auth__foot a {
  color: #0f766e !important;
}
html[data-ui-theme="light"] .school-auth__err {
  background: #fef2f2 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  color: #b91c1c !important;
}

/* لایت‌باکس ورود مدرسه / معلم در تم روشن */
html[data-ui-theme="light"] .auth-lb__dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-ui-theme="light"] .auth-lb__brand strong,
html[data-ui-theme="light"] .auth-lb__main label,
html[data-ui-theme="light"] .auth-lb__submit {
  color: inherit;
}
html[data-ui-theme="light"] .auth-lb__brand strong,
html[data-ui-theme="light"] .auth-lb__main label {
  color: #0f172a !important;
}
html[data-ui-theme="light"] .auth-lb__brand span,
html[data-ui-theme="light"] .auth-lb__hint,
html[data-ui-theme="light"] .auth-lb__foot {
  color: #475569 !important;
}
html[data-ui-theme="light"] .auth-lb__field {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
}
html[data-ui-theme="light"] .auth-lb__field input {
  color: #0f172a !important;
  background: transparent !important;
}
html[data-ui-theme="light"] .auth-lb__field input::placeholder {
  color: #94a3b8 !important;
}
html[data-ui-theme="light"] .auth-lb__x {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-ui-theme="light"] .auth-lb__linkbtn,
html[data-ui-theme="light"] .auth-lb__foot a {
  color: #0f766e !important;
}

/* تم تاریک: فقط پنل مدرسه / پورتال تیره — صفحات عمومی ظاهر فعلی را نگه می‌دارند */
html[data-ui-theme="dark"] body.is-school-panel,
html:not([data-ui-theme="light"]) body.is-school-panel {
  color: #e2e8f0;
}
html[data-ui-theme="dark"] body.is-school-panel .logo strong,
html:not([data-ui-theme="light"]) body.is-school-panel .logo strong {
  color: #f8fafc;
}
html[data-ui-theme="dark"] body.is-school-panel .nav__link,
html[data-ui-theme="dark"] body.is-school-panel .nav__dd__trigger,
html:not([data-ui-theme="light"]) body.is-school-panel .nav__link,
html:not([data-ui-theme="light"]) body.is-school-panel .nav__dd__trigger {
  color: #e2e8f0;
}

/* ============================================================================
   پنل مدرسه — تم روشن (کنتراست کامل، غلبه بر !importantهای صفحه)
   ============================================================================ */
html[data-school-theme="light"] body.is-school-panel,
html[data-school-theme="light"] body.is-school-panel main#content,
html[data-school-theme="light"] body.is-school-panel .portal-wrap,
html[data-school-theme="light"] body.is-school-panel .school-modern-dash {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel .topbar {
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom-color: rgba(15, 23, 42, 0.08) !important;
}

/* سطوح / کارت‌ها */
html[data-school-theme="light"] body.is-school-panel :is(
  .school-header-card, .school-kpi-card, .school-analysis-card, .school-filter-toolbar,
  .school-dash__card, .school-empty-box, .school-section-head, .school-an-metric,
  .school-an-metric--clickable, .vf-range, .vf-range-nav, .vf-chart-block, .vf-lookup,
  .vf-acc, .vf-chart-card, .vf-hbar__row, .school-incident-acc, .school-class-card,
  .school-incident-lb__dialog, .sj-cal, .school-grade-filter__panel, .school-hw-card,
  .school-table-wrap, .school-roster-table, table.school-table
) {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-header-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-acc__trigger {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-acc__trigger:hover {
  background: #eef2ff !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-acc__panel {
  background: #f8fafc !important;
  border-top-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-range,
html[data-school-theme="light"] body.is-school-panel .vf-range-nav {
  background: #f8fafc !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-chart-block {
  background: #ffffff !important;
  --vf-bg: #ffffff;
  --vf-fg: #0f172a;
  --vf-muted: #64748b;
  --vf-border: rgba(15, 23, 42, 0.12);
  --vf-soft: #f8fafc;
  --school-bg-card: #ffffff;
  --school-border: rgba(15, 23, 42, 0.12);
  --school-gold: #a16207;
}

/* متن اصلی تیره */
html[data-school-theme="light"] body.is-school-panel :is(
  h1, h2, h3, h4, h5, p, span, strong, small, label, li, td, th, em, a, button, div,
  .school-top-title, .school-status-sync, .school-teacher-strong, .school-title-row h1,
  .school-officer-line strong, .school-date-tag, .school-range-tag, .school-kpi-val,
  .school-kpi-title, .school-analysis-title-group h3, .school-section-title-wrap h2,
  .school-an-metric__val strong, .school-an-label, .vf-acc__title, .vf-acc__trigger-main strong,
  .vf-lookup__head strong, .vf-chart-card__title, .school-dash__card h3,
  .school-incident-lb__head h3, .school-incident-acc__name, .school-class-card__title,
  .school-hw-text, .school-hw-title, .vf-hbar__name, .school-range-custom__head strong,
  .school-range-custom__label, .vf-range__custom label, .school-date-label,
  .school-grade-filter__title, .school-grade-filter__summary, .school-grade-filter__list li label,
  .school-grade-filter__list li label span, .school-dash__att-item strong, .school-dash__att-item span,
  .school-dash__school, .school-extra-badge, .school-an-inline-link, .sj-cal__title, .sj-cal__day,
  .sj-picker__label, .school-table td, .school-table th, .school-roster-table td, .school-roster-table th,
  .col-num, .student-name-link, .school-th-hw-title
) {
  color: #0f172a !important;
}

/* متن ثانویه */
html[data-school-theme="light"] body.is-school-panel :is(
  .muted, .school-officer-line, .school-kpi-unit, .school-kpi-foot, .school-analysis-title-group p,
  .school-analysis-desc p, .school-an-note, .vf-range__meta, .vf-lookup__head span, .vf-lookup__list li span,
  .vf-acc__trigger-main span, .vf-acc__toolbar p, .school-classes-count, .school-incident-lb__eyebrow,
  .school-incident-lb__sub, .school-incident-lb__meta, .school-incident-acc__meta, .school-class-card__meta,
  .vf-hbar__class, .school-top-meta, .school-range-custom__head span, .sj-picker__label.is-ph,
  .sj-picker__field.is-empty .sj-picker__label, .sj-cal__dow, .school-hw-subj, .school-table-empty,
  .school-incident-acc__dates .si-reason, .vf-stu-days__st, .vf-lookup__stats ul
) {
  color: #475569 !important;
}

/* جداکننده‌ها */
html[data-school-theme="light"] body.is-school-panel :is(.school-bullet, .school-top-sep) {
  color: rgba(15, 23, 42, 0.35) !important;
}

/* رنگ‌های معنایی روی زمینه روشن (تیره‌تر برای کنتراست) */
html[data-school-theme="light"] body.is-school-panel .school-role-text { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-loc-badge {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0369a1 !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-tag-live {
  background: rgba(14, 165, 233, 0.12) !important;
  color: #0369a1 !important;
  border-color: rgba(14, 165, 233, 0.28) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-emblem-box {
  background: linear-gradient(135deg, #fef3c7, #fff7ed) !important;
  border-color: rgba(201, 162, 39, 0.35) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-kpi-card--warn {
  background: #fff5f5 !important;
  border-color: rgba(220, 38, 38, 0.28) !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .school-kpi-val--warn, .school-kpi-title--warn, .text-warn-bold, .table-badge-warn
) { color: #b91c1c !important; }
html[data-school-theme="light"] body.is-school-panel :is(.text-ok-bold, .table-badge-ok) { color: #047857 !important; }
html[data-school-theme="light"] body.is-school-panel .school-kpi-val--gold { color: #a16207 !important; }
html[data-school-theme="light"] body.is-school-panel .table-badge-blue { color: #1d4ed8 !important; }
html[data-school-theme="light"] body.is-school-panel .table-badge-amber { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-pct { color: #1d4ed8 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-inline-link--warn strong { color: #b91c1c !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-inline-link--blue strong { color: #1d4ed8 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-inline-link--amber strong { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-inline-link--ok strong { color: #047857 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-inline-link--mute strong { color: #be123c !important; }
html[data-school-theme="light"] body.is-school-panel .school-incident-acc__dates .si-day { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__grade-tag { color: #0369a1 !important; }
html[data-school-theme="light"] body.is-school-panel .school-classes-count { color: #a16207 !important; }

/* بج‌ها */
html[data-school-theme="light"] body.is-school-panel .school-kpi-badge--ok {
  background: rgba(16, 185, 129, 0.14) !important; color: #047857 !important; border-color: rgba(16, 185, 129, 0.35) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-kpi-badge--blue {
  background: rgba(56, 189, 248, 0.14) !important; color: #0369a1 !important; border-color: rgba(56, 189, 248, 0.35) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-kpi-badge--gold {
  background: rgba(201, 162, 39, 0.16) !important; color: #a16207 !important; border-color: rgba(201, 162, 39, 0.4) !important;
}

/* دکمه‌ها و کنترل‌ها */
html[data-school-theme="light"] body.is-school-panel :is(
  .btn-school-ghost, .btn-school-today, .vf-range__mode, .school-range-pill, .vf-range-nav__btn,
  .school-grade-filter__btn, .school-incident-lb__x, .sj-cal__navbtn, .btn-school-back
) {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .vf-range__mode.is-on, .school-range-pill.is-active, .vf-range-nav__btn--curr
) {
  background: #0f172a !important;
  color: #ffffff !important;
  border-color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-range__mode.is-on {
  background: linear-gradient(135deg, #f5e19a 0%, #c9a227 100%) !important;
  color: #071526 !important;
  border-color: #c9a227 !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .school-select, .vf-lookup__input, .sj-picker__field, .vf-range__custom select,
  input[type="text"], input[type="search"], select
) {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .school-select option, .vf-range__custom select option
) {
  background: #ffffff !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel .sj-picker__svg { color: #64748b !important; }
html[data-school-theme="light"] body.is-school-panel .sj-cal {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16) !important;
}
html[data-school-theme="light"] body.is-school-panel .sj-cal__day.is-fri { color: #94a3b8 !important; }
html[data-school-theme="light"] body.is-school-panel .sj-cal__day.is-selected {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* فیلتر پایه و لیست کلاس‌ها */
html[data-school-theme="light"] body.is-school-panel .school-grade-filter__panel {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-grade-filter__list li:hover {
  background: #f1f5f9 !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__school {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__school small { color: #64748b !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__school.is-on {
  border-color: #c9a227 !important;
  color: #a16207 !important;
  background: #fffbeb !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__school.is-on small { color: #a16207 !important; }

/* آیتم‌های حضور */
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--ok {
  background: rgba(16, 185, 129, 0.1) !important; border-color: rgba(16, 185, 129, 0.3) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--ok strong { color: #047857 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--ok span { color: #065f46 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--blue {
  background: rgba(56, 189, 248, 0.1) !important; border-color: rgba(56, 189, 248, 0.3) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--blue strong { color: #1d4ed8 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--blue span { color: #1e40af !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--warn {
  background: rgba(244, 63, 94, 0.1) !important; border-color: rgba(244, 63, 94, 0.3) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--warn strong { color: #b91c1c !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--warn span { color: #9f1239 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--amber {
  background: rgba(245, 158, 11, 0.1) !important; border-color: rgba(245, 158, 11, 0.3) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--amber strong { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-dash__att-item--amber span { color: #92400e !important; }

/* متریک‌های تحلیل */
html[data-school-theme="light"] body.is-school-panel .school-an-metric--ok {
  border-color: rgba(16, 185, 129, 0.35) !important; background: rgba(16, 185, 129, 0.06) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-an-metric--warn {
  border-color: rgba(239, 68, 68, 0.35) !important; background: rgba(239, 68, 68, 0.06) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-an-metric--blue {
  border-color: rgba(59, 130, 246, 0.35) !important; background: rgba(59, 130, 246, 0.06) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-an-metric--amber {
  border-color: rgba(245, 158, 11, 0.35) !important; background: rgba(245, 158, 11, 0.06) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-an-metric--ok .school-an-pct { color: #047857 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-metric--warn .school-an-pct { color: #b91c1c !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-metric--blue .school-an-pct { color: #1d4ed8 !important; }
html[data-school-theme="light"] body.is-school-panel .school-an-metric--amber .school-an-pct { color: #b45309 !important; }
html[data-school-theme="light"] body.is-school-panel .school-analysis-desc p {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}

/* لایت‌باکس و آکاردئون رخدادها */
html[data-school-theme="light"] body.is-school-panel .school-incident-lb__dialog {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-incident-acc__trigger:hover,
html[data-school-theme="light"] body.is-school-panel a.school-class-card:hover {
  background: #f8fafc !important;
}
html[data-school-theme="light"] body.is-school-panel .school-incident-acc__dates li {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

/* جدول کلاس */
html[data-school-theme="light"] body.is-school-panel .school-table thead th,
html[data-school-theme="light"] body.is-school-panel .school-roster-table thead th {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-table tbody td,
html[data-school-theme="light"] body.is-school-panel .school-roster-table tbody td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-school-theme="light"] body.is-school-panel .school-table tbody tr:hover td,
html[data-school-theme="light"] body.is-school-panel .school-roster-table tbody tr:hover td {
  background: #f8fafc !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .badge-ok, .cell-ok, .status-ok
) {
  background: rgba(16, 185, 129, 0.14) !important; color: #047857 !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .badge-blue, .cell-blue, .status-blue
) {
  background: rgba(56, 189, 248, 0.14) !important; color: #0369a1 !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .badge-warn, .cell-warn, .status-warn
) {
  background: rgba(244, 63, 94, 0.14) !important; color: #b91c1c !important;
}
html[data-school-theme="light"] body.is-school-panel :is(
  .badge-amber, .cell-amber, .status-amber
) {
  background: rgba(245, 158, 11, 0.14) !important; color: #b45309 !important;
}
html[data-school-theme="light"] body.is-school-panel .student-name-link:hover {
  color: #a16207 !important;
}

/* نمودارها و lookup */
html[data-school-theme="light"] body.is-school-panel .vf-chart-card,
html[data-school-theme="light"] body.is-school-panel .vf-hbar__row {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-acc__badge {
  background: rgba(201, 162, 39, 0.16) !important;
  color: #a16207 !important;
  border-color: rgba(201, 162, 39, 0.35) !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-acc__chev {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] body.is-school-panel .vf-range__meta strong { color: #a16207 !important; }
html[data-school-theme="light"] body.is-school-panel .vf-stu-acc--unexcused .vf-stu-acc__trigger { color: #be123c !important; }
html[data-school-theme="light"] body.is-school-panel .vf-stu-days__date { color: #a16207 !important; }
html[data-school-theme="light"] body.is-school-panel .vf-stu-days > li {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

/* بوت لودر */
html[data-school-theme="light"] #school-boot {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(14,165,233,.12), transparent 55%),
    radial-gradient(900px 500px at 10% 110%, rgba(201,162,39,.14), transparent 50%),
    linear-gradient(165deg, #f8fafc 0%, #e2e8f0 100%) !important;
  color: #0f172a !important;
}
html[data-school-theme="light"] #school-boot .sb-card {
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(15,23,42,.1) !important;
}
html[data-school-theme="light"] #school-boot .sb-title { color: #0f172a !important; }
html[data-school-theme="light"] #school-boot .sb-sub { color: #64748b !important; }
html[data-school-theme="light"].is-school-boot,
html[data-school-theme="light"] body.is-school-panel.is-school-booting {
  background: #f1f5f9 !important;
}

/* دکمه‌های اکسل/خروج که پس‌زمینه رنگی دارند — متن سفید بماند */
html[data-school-theme="light"] body.is-school-panel .btn-school-excel,
html[data-school-theme="light"] body.is-school-panel .btn-school-logout,
html[data-school-theme="light"] body.is-school-panel .btn-school-submit {
  color: inherit;
}
html[data-school-theme="light"] body.is-school-panel .btn-school-excel { color: #ffffff !important; }
html[data-school-theme="light"] body.is-school-panel .btn-school-logout { color: #ffffff !important; }
html[data-school-theme="light"] body.is-school-panel .btn-school-submit { color: #071526 !important; }

/* ============================================================================
   پنل مدرسه — تم تاریک: تضمین متن روشن روی زمینه تیره
   ============================================================================ */
html[data-school-theme="dark"] body.is-school-panel .school-modern-dash,
html:not([data-school-theme="light"]) body.is-school-panel .school-modern-dash {
  color: #e2e8f0;
}
html[data-school-theme="dark"] body.is-school-panel :is(
  .school-title-row h1, .school-kpi-val, .school-top-title, .school-officer-line strong,
  .school-date-tag, .school-range-tag, .school-section-title-wrap h2, .vf-acc__trigger-main strong
),
html:not([data-school-theme="light"]) body.is-school-panel :is(
  .school-title-row h1, .school-kpi-val, .school-top-title
) {
  color: #ffffff !important;
}
/* —— صیقل ظاهری محدود به پنل مدرسه (بدون سلکتور سراسری) —— */
body.is-school-panel .school-modern-dash .school-title-row h1 {
  letter-spacing: -.01em;
  line-height: 1.3;
  font-weight: 800;
}
body.is-school-panel .school-modern-dash .btn:focus-visible,
body.is-school-panel .school-modern-dash a:focus-visible,
body.is-school-panel .school-modern-dash button:focus-visible {
  outline: 2px solid rgba(201, 162, 39, .7);
  outline-offset: 2px;
}
body.is-school-panel .school-modern-dash .vf-acc__trigger,
body.is-school-panel .school-modern-dash .school-kpi-card {
  transition: box-shadow .2s ease, border-color .2s ease;
}
@media (prefers-reduced-motion: reduce) {
  body.is-school-panel .school-modern-dash .vf-acc__trigger,
  body.is-school-panel .school-modern-dash .school-kpi-card {
    transition: none !important;
  }
}
