/* ==========================================================================
   سامانه‌ی «مسابقات فرهنگی هنری فردا» — سبک‌نامه‌ی اصلی
   تم کلاسیک میبد: لاجورد عمیق، تأکید طلایی، حاشیه زیلو طرح زلفک
   ========================================================================== */

/* ---------- فونت‌های محلی ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Shabnam";
  src: url("../fonts/Shabnam-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- متغیرها ---------- */
:root {
  /* پالت لاجوردی–طلایی (الهام از کاشی‌کاری و زیلوی میبد) */
  --bg: #0f1e3d;
  --bg-soft: #13234a;
  --surface: #182b57;
  --surface-2: #1f3568;
  --surface-3: #28417c;
  --primary: #d9b44a;
  --primary-strong: #c39a2e;
  --primary-soft: rgba(217, 180, 74, 0.15);
  --accent: #7d9bd6;
  --accent-soft: rgba(125, 155, 214, 0.16);
  --gold: #d9b44a;
  --gold-bright: #ecd28a;
  --lapis-ink: #182645;
  --text: #f2ecdc;
  --muted: #aab5d3;
  --border: rgba(233, 214, 160, 0.10);
  --border-strong: rgba(233, 214, 160, 0.18);
  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.14);
  --error: #f87171;
  --error-soft: rgba(248, 113, 113, 0.14);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 12px 30px rgba(6, 9, 26, 0.35);
  --shadow-soft: 0 4px 14px rgba(6, 9, 26, 0.25);
  --font-body: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --font-title: "Shabnam", "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

/* ---------- پایه ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 100% -10%, rgba(217, 180, 74, 0.10), transparent 60%),
    radial-gradient(700px 480px at 0% 0%, rgba(125, 155, 214, 0.13), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
legend,
.dept-title,
.brand-title {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: 1.35rem;
  margin: 0 0 6px;
}

h2 {
  font-size: 1.1rem;
}

a {
  color: var(--primary);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

img,
svg {
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

.container-wide {
  max-width: 1240px;
}

.center {
  text-align: center;
}

.hint {
  color: var(--muted);
  font-size: 13.5px;
  margin: 6px 0 16px;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 26px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  margin: 16px 0;
}

.hidden {
  display: none !important;
}

/* ---------- آیکون ---------- */
.icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e2c25f, #b8912a);
  color: var(--lapis-ink);
  box-shadow: var(--shadow-soft);
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

/* ---------- برند ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.brand-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
}

main.main {
  padding: 28px 0 48px;
}

/* ---------- پاصفحه ---------- */
.site-footer {
  margin-top: 40px;
  padding: 0 0 22px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer .zilu-strip {
  opacity: 0.65;
  margin-bottom: 18px;
}

/* نشان خورشید‌خانم در پاصفحه */
.site-footer .footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.footer-mark {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.4));
}

/* ---------- کارت‌ها ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.card-narrow {
  max-width: 460px;
  margin: 0 auto 20px;
}

.card-soft {
  background: var(--surface-2);
  box-shadow: none;
}

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

.page-head h1 {
  margin: 0;
}

.section-title {
  font-size: 1rem;
  margin: 20px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

/* ---------- پیام‌ها ---------- */
.flash-area {
  margin-bottom: 18px;
  display: grid;
  gap: 10px;
}

.flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  border: 1px solid transparent;
}

.flash-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
}

.flash-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
}

.flash-error {
  background: var(--error-soft);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.35);
}

.flash-info {
  background: var(--info-soft);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}

.flash-text {
  flex: 1 1 auto;
}

.flash-close {
  flex: 0 0 auto;
  margin-inline-start: auto;
  padding: 0 2px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.65;
}

.flash-close:hover,
.flash-close:focus-visible {
  opacity: 1;
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

/* پیام شناور صفحه‌ی اصلی: بالای صفحه و بیرون از جریان محتوای وسط‌چین،
   تا پیام خروج/ورود جای خود را در میان عنوان و دکمه باز نکند. */
.flash-area.landing-flashes {
  position: fixed;
  top: 20px;
  inset-inline: 0;
  z-index: 80;
  width: min(520px, calc(100% - 32px));
  margin: 0 auto;
  margin-bottom: 0;
  animation: flash-drop 0.22s ease-out;
}

.flash-area.landing-flashes .flash {
  box-shadow: var(--shadow);
}

@keyframes flash-drop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-area.landing-flashes {
    animation: none;
  }
  .flash.is-hiding {
    transition: none;
  }
}

/* ---------- فرم‌ها ---------- */
label {
  display: block;
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder,
textarea::placeholder {
  color: #7b84a4;
}

select {
  cursor: pointer;
}

select option {
  background: var(--surface);
  color: var(--text);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #1e2444;
  box-shadow: 0 0 0 3px var(--primary-soft);
}

input[type="file"] {
  width: 100%;
  max-width: 100%;
  margin-bottom: 14px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

input[type="file"]::file-selector-button {
  font-family: inherit;
  font-size: 13.5px;
  margin-inline-end: 12px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  cursor: pointer;
}

textarea {
  resize: vertical;
  min-height: 90px;
}

select[multiple] {
  min-height: 130px;
}

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

.form-field {
  min-width: 0;
}

.field-error {
  display: block;
  color: #fca5a5;
  font-size: 13px;
  margin-top: 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 400;
  margin: 18px 0;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* گروه دکمه‌ی رمز عبور */
.password-field {
  position: relative;
  margin-bottom: 14px;
}

.password-field input {
  margin-bottom: 0;
  padding-inline-end: 74px;
}

.password-toggle {
  position: absolute;
  inset-inline-end: 8px;
  bottom: 8px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* ---------- دکمه‌ها ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  background: linear-gradient(135deg, #e2c25f, #c39a2e);
  color: var(--lapis-ink);
  border: 1px solid rgba(233, 214, 160, 0.35);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s, opacity 0.15s;
}

.btn:hover {
  box-shadow: 0 8px 20px rgba(217, 180, 74, 0.3);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-success {
  background: linear-gradient(135deg, #2fbf89, #1f9c6f);
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--surface-3);
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: none;
}

.btn-danger {
  background: transparent;
  color: var(--error);
  border-color: rgba(248, 113, 113, 0.4);
}

.btn-danger:hover {
  background: var(--error-soft);
  box-shadow: none;
}

.btn-block {
  display: flex;
  width: 100%;
  margin-top: 20px;
}

.btn-small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 13.5px;
}

.btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.btn.is-loading::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::before {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

.link:hover {
  text-decoration: underline;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--primary);
}

.link-btn:hover {
  text-decoration: underline;
}

.link-btn.danger {
  color: var(--error);
}

/* ---------- صفحه‌ی اصلی (Landing) ---------- */
.landing-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.landing {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 18px;
}

.landing-inner {
  width: 100%;
  max-width: 1020px;
  text-align: center;
}

.landing-inner.narrow {
  max-width: 520px;
}

.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  background: linear-gradient(135deg, #e2c25f, #b8912a);
  color: var(--lapis-ink);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.hero-mark svg {
  width: 46px;
  height: 46px;
}

.hero-mark-sm {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.hero-mark-sm svg {
  width: 34px;
  height: 34px;
}

.form-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 13.5px;
  color: var(--muted);
}

.login-panel {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.chev {
  color: var(--muted);
  flex: 0 0 auto;
}

/* سربرگ اداره و دکمه‌ی ورود (صفحه‌ی اصلی و صفحه‌ی ورود مشترک) */
.dept-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}

.dept-title {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--gold-bright);
  margin: 0;
  font-size: clamp(1.3rem, 3.4vw, 2.05rem);
  line-height: 1.6;
  max-width: 34ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 14px rgba(15, 30, 61, 0.6);
}

.dept-sub {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  margin: 8px 0 0;
  max-width: 620px;
}

.dept-title-sm {
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  font-weight: 500;
  color: var(--muted);
  line-height: 1.8;
  max-width: 40ch;
}

.landing-actions {
  display: flex;
  justify-content: center;
  margin: 34px 0 4px;
}

.btn-lg {
  padding: 15px 44px;
  font-size: 1.05rem;
  border-radius: var(--radius-pill);
}

.landing-note {
  margin-top: 26px;
  color: var(--muted);
  font-size: 13.5px;
}

.landing-note a {
  color: var(--primary);
}

/* ---------- قاب نارین‌قلعه و حاشیه زیلو ---------- */
.zilu-strip {
  height: 22px;
  background: url("../img/zilu-border.svg?v=2") repeat-x center / auto 22px;
  opacity: 0.9;
}

/* نوار سراسری زیلو در لبه‌ی بالای صفحه‌ی اصلی */
.zilu-band {
  height: 28px;
  background: url("../img/zilu-border.svg?v=2") repeat-x center / auto 28px;
  opacity: 0.95;
  border-bottom: 1px solid rgba(217, 180, 74, 0.25);
}

.zilu-strip.landing-zilu {
  max-width: 700px;
  margin: 26px auto 0;
}

.landing-hero + .zilu-strip.landing-zilu {
  margin-top: 22px;
}

.landing-hero {
  max-width: 700px;
  margin: 28px auto 0;
}

.hero-frame {
  position: relative;
  margin: 0;
  padding: 7px;
  border-radius: var(--radius);
  border: 1px solid rgba(217, 180, 74, 0.55);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* هاله‌ی لاجوردی ملایم روی لبه‌ی پایین عکس، برای پیوند عکس با تم */
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: calc(var(--radius) - 4px);
  pointer-events: none;
  background: linear-gradient(180deg, transparent 62%, rgba(15, 30, 61, 0.5));
}

.hero-frame img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 4px);
}

.hero-caption {
  margin-top: 10px;
  color: var(--gold-bright);
  opacity: 0.9;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

/* ---------- صفحه‌ی ورود مشترک ---------- */
.auth-card {
  margin-top: 8px;
  border-top: 2px solid rgba(217, 180, 74, 0.5);
}

/* حاشیه زیلو داخل کارت ورود */
.auth-card::before {
  content: "";
  display: block;
  height: 20px;
  margin: -4px 0 14px;
  background: url("../img/zilu-border.svg?v=2") repeat-x center / auto 20px;
  opacity: 0.85;
}

.auth-card .dept-header {
  margin-bottom: 18px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.35rem;
  text-align: center;
}

.auth-form {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .landing {
    padding: 34px 16px;
  }
  .dept-title {
    font-size: clamp(1.15rem, 5vw, 1.5rem);
    line-height: 1.75;
    max-width: 100%;
  }
  .landing-actions {
    margin-top: 26px;
  }
  .btn-lg {
    width: 100%;
    padding: 15px 20px;
  }
}
/* ---------- فهرست مدارس ---------- */
.school-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.school-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}

.school-item:hover {
  border-color: var(--primary);
  background: var(--surface-3);
}

.school-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}

.school-code {
  color: var(--muted);
  font-size: 13px;
}

.school-item .chev {
  color: var(--muted);
}

/* ---------- انتخابگر مدارس محل خدمت (پنل کارشناسان) ---------- */
.picker {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 20px;
  background: var(--bg-soft);
}

.picker legend {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  padding: 0 8px;
}

.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.picker-count {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.picker-count.is-empty {
  font-weight: 400;
  color: var(--muted);
}

.picker-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.picker-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-block: 4px;
  padding-inline: 12px 6px;
  background: var(--primary-soft);
  border: 1px solid rgba(217, 180, 74, 0.35);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  color: var(--text);
  animation: picker-chip-in 0.15s ease both;
}

@keyframes picker-chip-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .picker-chip {
    animation: none;
  }
}

.picker-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(10, 13, 30, 0.35);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
}

.picker-chip-remove:hover,
.picker-chip-remove:focus-visible {
  background: var(--error);
  transform: scale(1.1);
}

.picker-search {
  position: relative;
  margin-bottom: 12px;
}

.picker-search .icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.picker-search input[type="search"] {
  margin-bottom: 0;
  padding-inline-start: 40px;
}

.picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.picker-option:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.picker-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 0;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background-color: var(--surface);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.picker-option input[type="checkbox"]:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5 11-11'/%3E%3C/svg%3E");
}

.picker-option input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.picker-option.is-selected,
.picker-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(217, 180, 74, 0.35);
}

.picker-option-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.picker-option-name {
  font-family: var(--font-title);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.5;
}

.picker-option-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.picker-option-code {
  color: var(--muted);
  font-size: 12px;
}

.picker-empty {
  margin: 8px 0 0;
}

.hint-warn {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* ---------- جدول‌ها ---------- */
.table-wrap {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th,
.data-table td {
  text-align: right;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

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

.data-table tbody tr:hover {
  background: rgba(217, 180, 74, 0.06);
}

.badge {
  display: inline-block;
  background: var(--surface-3);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 12px;
  line-height: 1.7;
}

.badge-on {
  background: var(--success-soft);
  color: var(--success);
}

.badge-off {
  background: var(--error-soft);
  color: #fca5a5;
}

.badge-group {
  background: var(--accent-soft);
  color: #b79bff;
}

.badge-individual {
  background: var(--primary-soft);
  color: #a5c0ff;
}

.badge-girls {
  background: rgba(236, 72, 153, 0.16);
  color: #f9a8d4;
}

.badge-boys {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.row-actions form {
  display: inline;
  margin: 0;
}

/* ---------- جست‌وجو و فیلتر ---------- */
.search-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.search-form .search-field {
  flex: 1 1 240px;
  margin: 0;
}

.search-form label {
  margin-bottom: 6px;
}

.search-form input,
.search-form select {
  margin-bottom: 0;
}

.search-form .filter-field {
  flex: 0 1 180px;
}

/* ---------- صفحه‌بندی ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pagination a,
.pagination span {
  min-width: 38px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 13.5px;
  text-align: center;
}

.pagination a:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

.pagination .current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.pagination .disabled {
  color: #5c6588;
}

/* ---------- مدیریت فایل‌ها ---------- */
.file-box,
.member-box {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 20px;
  background: var(--bg-soft);
}

.file-box legend,
.member-box legend {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  padding: 0 8px;
}

.sub-title {
  font-size: 14px;
  margin: 18px 0 8px;
  color: var(--text);
}

.file-counter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13px;
}

.file-counter {
  color: var(--text);
  font-weight: 500;
}

.file-remaining {
  color: var(--muted);
}

.file-remaining.is-full {
  color: var(--accent);
}

/* کادر بارگذاری */
.uploader {
  position: relative;
}

input[type="file"].uploader-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.uploader-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.12s;
}

.uploader-label:hover {
  border-color: var(--primary);
  background: var(--surface-2);
}

.uploader.is-dragging .uploader-label {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: scale(1.01);
}

.uploader-input:focus-visible + .uploader-label {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.uploader-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

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

.uploader-text strong {
  font-family: var(--font-title);
  font-size: 14.5px;
}

.uploader-text .hint {
  margin: 0;
}

.uploader-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--error-soft);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.7;
}

/* کارت‌های فایل */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.saved-files {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
}

.file-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  animation: file-card-in 0.18s ease both;
}

@keyframes file-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .file-card {
    animation: none;
  }
}

.file-card.is-new {
  border-color: rgba(217, 180, 74, 0.5);
}

.file-card.is-pending-delete {
  opacity: 0.5;
  border-color: rgba(248, 113, 113, 0.55);
}

.file-thumb-wrap {
  position: relative;
  background: #10142a;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-thumb-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.file-thumb-icon .icon {
  width: 40px;
  height: 40px;
}

.file-remove-x {
  position: absolute;
  inset-inline-end: 6px;
  top: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(10, 13, 30, 0.72);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}

.file-remove-x:hover,
.file-remove-x:focus-visible {
  background: var(--error);
  color: #fff;
  transform: scale(1.08);
}

.file-card.is-pending-delete .file-remove-x {
  background: var(--error);
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px 12px;
  min-width: 0;
}

.file-name {
  font-size: 13.5px;
  word-break: break-all;
  line-height: 1.6;
}

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

.file-size {
  color: var(--muted);
  font-size: 12px;
}

.file-state {
  font-size: 12px;
  color: var(--muted);
}

.file-state.is-new {
  color: var(--primary);
}

.file-card.is-pending-delete .file-state {
  color: var(--error);
}

.file-card.is-saved .file-state {
  color: var(--success);
}

.file-audio {
  width: 100%;
  height: 34px;
  margin-top: 4px;
}


/* ---------- اعضای گروه و نوع رشته ---------- */
.type-block {
  margin-top: 8px;
}

.type-block.is-hidden {
  display: none;
}

.member-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}

.member-row:last-child {
  border-bottom: none;
}

.member-row .form-field {
  flex: 1 1 160px;
  min-width: 140px;
}

.member-row .link-btn {
  margin-bottom: 14px;
}

.members-inline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.members-inline li {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: 12.5px;
}

/* ---------- کارت مدرسه‌ی فعال و پنجره‌ی تغییر مدرسه ---------- */
.school-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.school-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.school-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--accent-soft);
  color: #b79bff;
}

.school-card-icon .icon {
  width: 26px;
  height: 26px;
}

.school-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.school-card-label {
  color: var(--muted);
  font-size: 12px;
}

.school-card-name {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text);
}

.school-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.school-card-code {
  color: var(--muted);
  font-size: 12.5px;
}

/* پنجره‌ی انتخاب مدرسه */
.modal {
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  width: min(560px, calc(100vw - 32px));
  max-height: 86vh;
  overflow: auto;
}

.modal::backdrop {
  background: rgba(9, 12, 28, 0.62);
  backdrop-filter: blur(2px);
}

.modal form {
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.modal-head h2 {
  margin: 0;
}

.modal-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--error-soft);
  border-color: rgba(248, 113, 113, 0.5);
  color: #fca5a5;
}

.modal .school-list {
  margin-top: 12px;
}

.modal .school-list li form {
  display: block;
  padding: 0;
}

.modal .school-name .badge {
  margin-inline-start: 6px;
  font-size: 11px;
}

/* ---------- خلاصه و صفحه‌ی موفقیت ---------- */
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 32px;
  border: 1px solid rgba(52, 211, 153, 0.4);
}

.summary {
  text-align: right;
  margin: 22px 0;
  border-top: 1px solid var(--border);
}

.summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.summary dt {
  color: var(--muted);
  font-size: 13.5px;
}

.summary dd {
  margin: 0;
  font-weight: 500;
  font-size: 14px;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.error-code {
  font-family: var(--font-title);
  font-size: 44px;
  color: var(--primary);
  margin: 0;
}

/* ---------- پنل کارشناسان ---------- */
.admin-body {
  background-attachment: fixed;
}

.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(13, 26, 54, 0.92);
  border-inline-end: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

/* حاشیه زیلو در انتهای نوار کناری */
.sidebar-footer::before {
  content: "";
  display: block;
  height: 14px;
  margin-bottom: 12px;
  background: url("../img/zilu-border.svg?v=2") repeat-x center / auto 14px;
  opacity: 0.45;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--primary-soft);
  color: var(--gold-bright);
}

.sidebar-nav a.active .icon {
  color: var(--primary);
}

/* منوهای سلسله‌مراتبی نوار کناری: منوی والد باز/بسته + زیرمنوها */
.sidebar-nav summary.menu-parent {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  list-style: none;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav summary.menu-parent::-webkit-details-marker {
  display: none;
}

.sidebar-nav summary.menu-parent:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-nav summary.menu-parent.active {
  background: var(--primary-soft);
  color: #fff;
}

.sidebar-nav summary.menu-parent.active .icon {
  color: var(--primary);
}

.menu-label {
  flex: 1 1 auto;
  min-width: 0;
}

.menu-caret {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.menu-group[open] > summary .menu-caret {
  transform: rotate(180deg);
}

.menu-children {
  display: grid;
  gap: 2px;
  margin: 2px 0 4px;
  margin-inline-start: 20px;
  padding-inline-start: 14px;
  border-inline-start: 1px dashed var(--border-strong);
  animation: menu-drop 0.16s ease-out;
}

.sidebar-nav a.menu-child {
  padding: 8px 10px;
  font-size: 13.5px;
}

.sidebar-nav a.menu-child .icon {
  width: 18px;
  height: 18px;
}

@keyframes menu-drop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu-children {
    animation: none;
  }
  .menu-caret {
    transition: none;
  }
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.sidebar-footer .who {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}

.sidebar-footer .school-line {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.sidebar-footer .school-line strong {
  color: var(--text);
}

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

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(23, 27, 53, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

/* رد-Zیلوی بسیار کم‌رنگ در لبه‌ی پایین نوار بالایی پنل‌ها */
.admin-topbar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -13px;
  height: 13px;
  background: url("../img/zilu-border.svg?v=2") repeat-x center / auto 13px;
  opacity: 0.28;
  pointer-events: none;
}

.admin-topbar .admin-title {
  font-family: var(--font-title);
  font-weight: 700;
}

.admin-topbar .spacer {
  margin-inline-start: auto;
}

.menu-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 40px;
  font-size: 18px;
  cursor: pointer;
}

.admin-content {
  padding: 26px 22px 48px;
  width: 100%;
  max-width: 1100px;
}

.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}

a.stat:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

/* ---------- سامانه‌ی داوری ---------- */
.muted-note {
  color: var(--muted);
  font-size: 12px;
}

/* مسیر بازگشت (داشبورد › گرایش › گروه) */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--muted);
}

.breadcrumb-sep {
  color: var(--muted);
  opacity: 0.7;
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* برچسب‌های مقطع و جنسیت روی کارت گروه داوری */
.group-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.group-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* کارت‌های گرایش در داشبورد داور */
.judge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.judge-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.judge-card:hover,
.judge-card:focus-visible {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.judge-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.judge-card-title {
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 700;
}

.judge-card-percent {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--primary);
  font-size: 1.05rem;
}

.progress {
  display: block;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  overflow: hidden;
}

.progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.judge-stats {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.judge-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 74px;
}

.judge-stat-value {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
}

.judge-stat-label {
  color: var(--muted);
  font-size: 12px;
}

.judge-card-action {
  color: var(--primary);
  font-size: 13.5px;
  margin-top: auto;
}

/* نوار پیشرفت بالای فهرست آثار */
.judge-progress {
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.judge-progress-text {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 13.5px;
}

.judge-progress-remaining {
  color: var(--muted);
}

.judge-progress-percent {
  margin-inline-start: auto;
  color: var(--primary);
  font-family: var(--font-title);
}

/* گرید آثار */
.artwork-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.artwork-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}

.artwork-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.artwork-card[data-scored="1"] {
  border-color: rgba(52, 211, 153, 0.35);
}

.artwork-open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  text-align: right;
  cursor: pointer;
}

.artwork-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  padding: 6px;
  background: #10142a;
}

.media-item {
  display: block;
  min-width: 0;
}

.media-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: #0d1124;
}

.media-audio,
.media-other {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 96px;
  padding: 10px;
  border-radius: 8px;
  background: #0d1124;
}

.media-audio audio {
  width: 100%;
  height: 32px;
}

.media-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.media-icon .icon {
  width: 34px;
  height: 34px;
}

.artwork-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}

.artwork-code {
  font-family: var(--font-title);
  font-size: 1.02rem;
  font-weight: 700;
}

.artwork-status {
  align-self: flex-start;
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: 12px;
}

.artwork-status.is-scored {
  background: var(--success-soft);
  color: var(--success);
}

.artwork-status.is-unscored {
  background: var(--surface-3);
  color: var(--muted);
}

.artwork-score {
  color: var(--muted);
  font-size: 13px;
}

.artwork-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 14px 14px;
  margin-top: auto;
}

/* نمایشگر اثر (Modal) */
.modal-wide {
  width: min(980px, calc(100vw - 32px));
}

.viewer {
  padding: 18px;
}

.viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.viewer-head h2 {
  margin: 0;
}

.viewer-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewer-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  max-height: 54vh;
  overflow: auto;
  padding: 2px;
}

.viewer-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.viewer-image {
  display: block;
  width: 100%;
  max-height: 44vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #0d1124;
  cursor: zoom-in;
}

.viewer-image.is-zoomed {
  position: fixed;
  inset: 3vh 3vw;
  width: auto;
  height: auto;
  max-width: 94vw;
  max-height: 94vh;
  object-fit: contain;
  padding: 8px;
  border-radius: var(--radius);
  background: #0b0f22;
  box-shadow: var(--shadow);
  z-index: 10;
  cursor: zoom-out;
}

.viewer-video {
  display: block;
  width: 100%;
  max-height: 44vh;
  border-radius: var(--radius-sm);
  background: #0d1124;
}

.viewer-audio,
.viewer-other {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.viewer-audio audio {
  flex: 1;
  min-width: 0;
}

.media-download {
  font-size: 12.5px;
}

.viewer-foot {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.viewer-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.viewer-position {
  color: var(--muted);
  font-size: 13px;
}

.viewer .score-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.score-label {
  font-size: 13.5px;
  color: var(--muted);
}

.score-row {
  display: flex;
  gap: 8px;
}

.score-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.12s, color 0.15s;
}

.score-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--surface-3);
  transform: translateY(-1px);
}

.score-btn.is-active {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  color: #fff;
}

.score-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.score-message {
  margin: 0;
  min-height: 20px;
  font-size: 13px;
  flex: 1 1 200px;
}

.score-message.is-error {
  color: #fca5a5;
}

.score-message.is-success {
  color: var(--success);
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    width: 260px;
    z-index: 60;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    height: 100vh;
  }
  .admin-layout.sidebar-open .sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* در نمایشگرهای کوچک تورفتگی زیرمنو کمتر می‌شود */
  .menu-children {
    margin-inline-start: 14px;
    padding-inline-start: 12px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 14.5px;
  }
  .card {
    padding: 16px;
  }
  .section-title {
    margin-top: 16px;
  }
  .school-card {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }
  .school-card-body {
    align-items: flex-start;
  }
  .file-grid {
    grid-template-columns: 1fr;
  }
  /* سامانه‌ی داوری: در نمایشگرهای کوچک هر کارت در یک ستون */
  .artwork-grid,
  .judge-grid {
    grid-template-columns: 1fr;
  }
  .viewer-media {
    grid-template-columns: 1fr;
    max-height: 60vh;
  }
  .judge-progress-percent {
    margin-inline-start: 0;
  }
  .viewer-nav .btn {
    flex: 1 1 auto;
  }
  .picker-list {
    grid-template-columns: 1fr;
    max-height: 60vh;
  }
  .picker-head {
    align-items: flex-start;
  }
  .modal form {
    padding: 16px;
  }
  .member-row .form-field {
    flex: 1 1 100%;
  }
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }
  .search-form .filter-field {
    flex: 1 1 auto;
  }

  /* جدول به کارت تبدیل می‌شود */
  .data-table thead {
    display: none;
  }
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }
  .table-wrap {
    border: none;
    overflow: visible;
  }
  .data-table tr {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    padding: 8px 10px;
    background: var(--surface-2);
  }
  .data-table td {
    border: none;
    white-space: normal;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 4px;
  }
  .data-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 500;
    flex: 0 0 auto;
  }
  .data-table td.row-actions {
    justify-content: flex-start;
    border-top: 1px dashed var(--border);
    margin-top: 4px;
    padding-top: 10px;
  }
  .data-table td.row-actions::before {
    display: none;
  }
}

/* ==========================================================================
   سامانه‌ی داوری — امتیاز ۱ تا ۱۰، «اوت»، امتیاز مشترک و ترتیب امتیازها
   (بخش تکمیلی؛ فقط کلاس‌های همین بخش اضافه شده‌اند)
   ========================================================================== */

/* ---------- نوار فیلترها و شمارنده‌ها ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-chip:hover {
  border-color: var(--primary);
  color: var(--text);
}

.filter-chip.is-active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: #f3e5b8;
}

.filter-count {
  background: var(--surface-3);
  border-radius: var(--radius-pill);
  padding: 0 8px;
  font-size: 12px;
  color: var(--text);
}

.filter-chip.is-active .filter-count {
  background: rgba(217, 180, 74, 0.28);
}

.filter-chip-tied.is-active {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fcd34d;
}

.filter-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.filter-sort label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.filter-sort select {
  margin: 0;
  min-width: 190px;
}

.filter-clear {
  flex: 0 0 auto;
}

.filter-summary {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 4px;
}

.filter-summary strong {
  color: var(--text);
}

/* ---------- هشدار امتیاز مشترک ---------- */
.tie-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.1);
  color: #fcd34d;
}

.tie-alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
}

.tie-alert-body {
  min-width: 0;
}

.tie-alert-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
}

.tie-alert-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.tie-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tie-chip {
  background: rgba(245, 158, 11, 0.18);
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: 12.5px;
  color: #fcd34d;
}

.tie-link {
  font-size: 13px;
  color: #fcd34d;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tie-link:hover {
  color: #fde68a;
}

/* ---------- نشان‌های وضعیت روی کارت اثر ---------- */
.artwork-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.artwork-status.is-tied {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.artwork-status.is-out {
  background: var(--error-soft);
  color: #fca5a5;
}

.artwork-rank {
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: 12px;
  background: var(--primary-soft);
  color: #a5c0ff;
}

.artwork-tie-note {
  color: #fcd34d;
  font-size: 12.5px;
}

.artwork-card[data-artwork-status="tied"] {
  border-color: rgba(245, 158, 11, 0.35);
}

.artwork-card[data-artwork-status="out"] {
  border-color: rgba(248, 113, 113, 0.3);
}

/* ---------- بخش «ترتیب آثار بر اساس امتیاز» ---------- */
.rank-block {
  margin-top: 26px;
}

.rank-hint {
  margin-bottom: 12px;
}

.rank-final {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 16px;
}

.rank-final.is-ready {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.08), transparent);
}

.rank-final.is-pending {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08), transparent);
}

.rank-final-title {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
}

.rank-final.is-ready .rank-final-title {
  color: var(--success);
}

.rank-final.is-pending .rank-final-title {
  color: #fcd34d;
}

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

.podium-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
}

.podium-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
}

.podium-code {
  font-family: var(--font-title);
  font-weight: 700;
}

.podium-score {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 13px;
}

.tie-groups {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.tie-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border: 1px dashed rgba(245, 158, 11, 0.45);
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.06);
}

.tie-group-score {
  font-size: 13px;
  color: #fcd34d;
}

.tie-group-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tie-member {
  border-radius: var(--radius-pill);
  padding: 3px 12px;
  background: var(--surface-3);
  color: var(--text);
  font-size: 12.5px;
  text-decoration: none;
}

.tie-member:hover {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.rank-score {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}

.status-badge {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 3px 11px;
  font-size: 12px;
}

.status-badge.status-normal {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.status-tied {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.status-badge.status-out {
  background: var(--error-soft);
  color: #fca5a5;
}

.status-badge.status-unscored {
  background: var(--surface-3);
  color: var(--muted);
}

.rank-row.status-out td,
.rank-row.status-unscored td {
  color: var(--muted);
}

/* ---------- دکمه‌های امتیاز: ۱ تا ۱۰ و اوت ---------- */
.score-row {
  flex-wrap: wrap;
}

.score-btn-out {
  width: auto;
  min-width: 64px;
  padding: 0 14px;
  border-color: rgba(248, 113, 113, 0.45);
  color: #fca5a5;
}

.score-btn-out:hover:not(:disabled) {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.score-btn-out.is-active {
  background: linear-gradient(135deg, #b91c1c, #ef4444);
  border-color: transparent;
  color: #fff;
}

.score-hint {
  flex: 1 1 100%;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.score-form.is-busy {
  opacity: 0.75;
}

.score-message.is-warn {
  color: #fcd34d;
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 640px) {
  .filter-bar,
  .filter-sort,
  .tie-alert,
  .tie-group,
  .podium-item {
    align-items: stretch;
  }

  .filter-chips,
  .filter-sort {
    width: 100%;
  }

  .filter-sort select {
    flex: 1 1 auto;
    min-width: 0;
  }

  .filter-chip {
    flex: 1 1 auto;
    justify-content: center;
  }

  .tie-alert {
    gap: 10px;
  }

  .podium-score,
  .filter-clear {
    margin-inline-start: 0;
  }

  .score-btn {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }

  .score-btn-out {
    width: auto;
    min-width: 58px;
  }

  .viewer .score-form {
    align-items: flex-start;
  }
}

/* نشان «امتیاز مشترک» روی کارت گروه‌های گرایش */
.judge-card-shared {
  align-self: flex-start;
  border-radius: var(--radius-pill);
  padding: 2px 11px;
  font-size: 12px;
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

/* تنظیمات: گزینه‌های فعال/غیرفعال (کادر تیک‌دار) */
.setting-checks {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.setting-checks .checkbox-row {
  align-items: flex-start;
  margin: 12px 0 6px;
}

.setting-check-hint {
  margin: 0 0 12px;
}

/* ==========================================================================
   بخش «نتایج مسابقات» (پنل کارشناسان)
   ========================================================================== */

/* ---------- ناحیه‌ی فیلترها ---------- */
.results-filter {
  margin: 14px 0 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

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

.filter-field {
  min-width: 0;
}

.filter-field label {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.filter-field select,
.filter-field input {
  margin-bottom: 0;
  width: 100%;
}

.filter-search {
  grid-column: 1 / -1;
}

.filter-status {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.filter-status:empty {
  margin: 0;
  min-height: 0;
}

.filter-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-active-note {
  color: var(--muted);
  font-size: 12.5px;
}

/* ---------- کارت‌های آماری ---------- */
.stat-tied .stat-value {
  color: #fcd34d;
}

/* ---------- نوار خروجی اکسل ---------- */
.export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(217, 180, 74, 0.32);
  border-radius: var(--radius-sm);
  background: linear-gradient(
    135deg,
    rgba(217, 180, 74, 0.12),
    rgba(125, 155, 214, 0.12)
  );
}

.export-text {
  min-width: 0;
}

.export-text h2 {
  margin: 0;
}

.export-text .hint {
  margin: 4px 0 0;
}

.export-button.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- گروه‌های مسابقه ---------- */
.group-strip {
  margin: 14px 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.group-strip > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13.5px;
}

.group-strip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 12px 0 4px;
  padding: 0;
}

.group-strip-list li {
  margin: 0;
}

.group-card {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s;
}

.group-card:hover {
  border-color: var(--primary);
}

.group-card-label {
  display: block;
  font-size: 13.5px;
}

.group-card-counts {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- سرصفحه‌ی گروه انتخاب‌شده ---------- */
.result-group-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}

.result-group-title {
  font-family: var(--font-title);
  font-weight: 700;
}

/* ---------- جدول نتایج ---------- */
.results-table-wrap {
  margin-top: 8px;
}

.results-table {
  min-width: 980px;
}

.results-table td {
  vertical-align: middle;
  white-space: normal;
}

.results-table .national-id-cell {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
}

.rank-badge {
  display: inline-block;
  min-width: 30px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
  font-family: var(--font-title);
  font-weight: 700;
  text-align: center;
}

.rank-badge.is-final {
  background: var(--success-soft);
  color: var(--success);
}

.rank-badge.is-pending {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.member-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  font-size: 13.5px;
}

.member-list li {
  margin: 0 0 2px;
}

.badge-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

.status-badge.status-final {
  background: var(--success-soft);
  color: var(--success);
}

.status-badge.status-pending {
  background: var(--info-soft);
  color: var(--info);
}

.result-row.status-out td,
.result-row.status-unscored td {
  color: var(--muted);
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1100px) {
  .filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .export-bar {
    align-items: stretch;
  }

  .export-button {
    width: 100%;
    text-align: center;
  }

  .results-table {
    min-width: 840px;
  }

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

@media (max-width: 460px) {
  .filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- کارت‌های آماری: دکمه‌ی فعال/غیرفعال ---------- */
.stat-toggle {
  margin: 16px 0 0;
}

.stat-toggle-btn {
  list-style: none;
  cursor: pointer;
}

.stat-toggle-btn::-webkit-details-marker {
  display: none;
}

.stat-toggle-btn .stat-toggle-hide {
  display: none;
}

.stat-toggle[open] .stat-toggle-btn {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: #f3e5b8;
}

.stat-toggle[open] .stat-toggle-show {
  display: none;
}

.stat-toggle[open] .stat-toggle-hide {
  display: inline;
}

.stat-toggle-caret {
  transition: transform 0.15s;
}

.stat-toggle[open] .stat-toggle-caret {
  transform: rotate(180deg);
}

.stat-toggle:not([open]) .stat-panel {
  display: none;
}

.stat-toggle[open] .stat-panel {
  display: block;
}

.stat-panel {
  margin-top: 12px;
}
