/* ================= دانش‌آموزان — مرکز مدیریت پرونده‌ها =================
   صفحهٔ بازطراحی‌شده: سربرگ، شاخص‌های زنده، فهرست/کارت، نمای کلاس‌ها،
   مرکز «نیازمند توجه»، آرشیو و عملیات گروهی. همهٔ رنگ‌ها از توکن‌های
   app.css می‌آیند تا حالت شب بدون بازنویسی درست بماند. */

.st-page { display: flex; flex-direction: column; gap: 14px; }

/* ---------- سربرگ ---------- */
.st-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(520px 210px at 90% -45%, rgba(245, 158, 11, .38), transparent 70%),
    radial-gradient(430px 230px at 6% 135%, rgba(16, 185, 129, .30), transparent 70%),
    var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.st-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
}
.st-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; z-index: 1; }
.st-hero-ic {
  width: 54px; height: 54px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 26px;
  border-radius: 17px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.st-hero-title { margin: 0 0 4px; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.2px; }
.st-hero-sub { margin: 0; font-size: var(--fs-sm); color: rgba(255, 255, 255, .84); max-width: 680px; line-height: 1.8; }
.st-hero-actions { display: flex; gap: 7px; flex-wrap: wrap; position: relative; z-index: 1; }
.st-hero-actions .btn {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(4px);
}
.st-hero-actions .btn:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .46); }
.st-hero-actions .btn.accent { background: var(--gold); border-color: var(--gold); color: #17252d; font-weight: 800; }
.st-hero-actions .btn.accent:hover { background: #fbbf24; }

/* ---------- شاخص‌ها ---------- */
.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.st-kpi {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  gap: 0 10px; align-items: center; text-align: right;
  padding: 12px 14px; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  font-family: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.st-kpi::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line); border-radius: 0 4px 4px 0;
}
.st-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--side-2); }
.st-kpi:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.st-kpi.is-active { border-color: var(--accent-2); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 22%, transparent); }
.st-kpi-ic { grid-row: 1 / 3; font-size: 20px; display: grid; place-items: center; color: var(--side-2); }
.st-kpi b { font-size: var(--fs-2xl); line-height: 1.05; font-weight: 800; color: var(--side); font-variant-numeric: tabular-nums; }
.st-kpi-l { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.st-kpi.tone-good::before { background: var(--good); }
.st-kpi.tone-good b { color: var(--good); }
.st-kpi.tone-warn::before { background: var(--warn); }
.st-kpi.tone-warn b { color: var(--warn); }
.st-kpi.tone-bad::before { background: var(--bad); }
.st-kpi.tone-bad b { color: var(--bad); }
.st-kpi.tone-info::before { background: var(--info); }
.st-kpi.tone-info b { color: var(--info); }
.st-kpi.tone-heart::before { background: #a21caf; }
.st-kpi.tone-heart b { color: #a21caf; }
.st-kpi.is-zero { opacity: .72; }
.st-kpi.is-zero b { color: var(--muted); }

/* ---------- تب‌ها ---------- */
.st-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch;
  padding: 4px;
  background: color-mix(in srgb, var(--paper) 65%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.st-tab {
  flex: 1 1 130px; min-width: 124px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; font-size: var(--fs-sm); font-weight: 700;
  border-radius: var(--radius-md); border: 1px solid transparent;
  background: transparent; color: var(--ink); font-family: inherit; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.st-tab:hover { background: var(--paper); border-color: var(--line); }
.st-tab.active { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px rgba(13, 59, 52, .28); }
.st-tab .st-tab-n {
  min-width: 21px; padding: 1px 7px; border-radius: var(--radius-full);
  font-size: var(--fs-2xs); font-weight: 800;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.st-tab.active .st-tab-n { background: rgba(255, 255, 255, .22); }

/* ---------- کارت‌ها و پنل‌ها ---------- */
.st-panel { animation: stPanelIn var(--dur-base) var(--ease-out) both; }
@keyframes stPanelIn { from { opacity: 0; transform: translateY(5px); } }
.st-card { padding: 18px; border-radius: var(--radius-lg); }
.st-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.st-card-title { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.st-card-sub { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.7; }
.st-card-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-count {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: var(--radius-full);
}

/* ---------- نوار ابزار ---------- */
.st-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.7fr) repeat(2, minmax(126px, 1fr)) auto;
  gap: 9px; align-items: end;
}
.st-toolbar .field { margin: 0; min-width: 0; }
.st-toolbar .field label { font-size: var(--fs-2xs); font-weight: 700; color: var(--muted); }
.st-toolbar .btn { min-height: 38px; }
.st-search { position: relative; }
.st-search input { padding-inline-start: 34px; }
.st-search .st-search-ic {
  position: absolute; inset-inline-start: 10px; bottom: 11px;
  color: var(--muted); pointer-events: none; display: grid; place-items: center;
}
.st-search .st-search-clear {
  position: absolute; inset-inline-end: 6px; bottom: 6px;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: none; place-items: center; font-family: inherit;
}
.st-search.has-value .st-search-clear { display: grid; }
.st-search .st-search-clear:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--paper)); }
.st-toolbar-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-kbd {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px;
  padding: 0 4px; border-radius: 5px; font-size: var(--fs-3xs);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--muted);
}

/* ---------- فیلترهای سریع ---------- */
.st-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.st-chips-l { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.st-chip {
  cursor: pointer; font-family: inherit; font-size: var(--fs-xs); font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-full);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.st-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.st-chip.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.st-chip .st-chip-n { opacity: .8; font-weight: 600; }

/* ---------- کلید نمایش ---------- */
.st-viewtoggle {
  display: inline-flex; padding: 3px; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.st-viewtoggle button {
  display: inline-grid; place-items: center; width: 34px; height: 30px;
  border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.st-viewtoggle button:hover { color: var(--ink); background: var(--paper); }
.st-viewtoggle button.active { background: var(--paper); color: var(--accent-2); box-shadow: var(--shadow-xs); }

/* ---------- جدول ---------- */
.st-tablewrap {
  position: relative; margin-top: 12px;
  max-height: 66vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper);
}
.st-table { min-width: 780px; width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.st-table thead th {
  font-size: var(--fs-2xs); font-weight: 700; color: var(--muted);
  text-align: start; border-bottom: 1px solid var(--line);
}
.st-table tbody td { border-bottom: 1px solid var(--line); }
.st-table tbody tr:last-child td { border-bottom: 0; }
.st-table tbody tr:hover td { background: var(--surface-2); }
.st-table th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg); padding: 9px 10px; white-space: nowrap;
}
[data-theme="dark"] .st-table th { background: var(--surface-2); }
.st-table td { padding: 8px 10px; vertical-align: middle; }
.st-table tbody tr { cursor: pointer; }
.st-table tbody tr.is-selected td { background: color-mix(in srgb, var(--accent-2) 8%, transparent); }
.st-table tbody tr.is-selected:hover td { background: color-mix(in srgb, var(--accent-2) 13%, transparent); }
.st-col-check { width: 38px; text-align: center !important; }
.st-col-check input { width: 16px; height: 16px; accent-color: var(--accent-2); cursor: pointer; }
.st-col-actions { width: 126px; white-space: nowrap; }
.st-th-sort { border: 0; background: transparent; font: inherit; color: inherit; cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }
.st-th-sort:hover { color: var(--accent-2); }
.st-th-sort .st-sort-ic { opacity: .45; font-size: var(--fs-2xs); }
.st-th-sort.sorted .st-sort-ic { opacity: 1; color: var(--accent); }

.st-stu { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.st-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: var(--fs-sm); font-weight: 800; color: #fff;
  background: var(--side-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  user-select: none;
}
.st-avatar.lg { width: 44px; height: 44px; font-size: var(--fs-md); }
.st-avatar { position: relative; overflow: hidden; }
.st-avatar img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: inherit;
}
.st-avatar.has-photo { color: transparent; }
.st-stu-main { min-width: 0; }
.st-name { display: block; font-weight: 800; color: var(--ink); line-height: 1.5; }
.st-sub { display: block; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.6; }
.st-cell-ltr { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-copy { cursor: copy; }
.st-copy:hover { color: var(--accent-2); }
.st-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.st-table .badge { font-size: var(--fs-2xs); padding: 2px 8px; gap: 3px; }
.st-actions { display: inline-flex; gap: 3px; }
.st-icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; font-family: inherit;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.st-icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--side-2); }
.st-icon-btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--paper)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--bad); }
.st-more-row td { text-align: center !important; background: var(--surface-2); }

/* ---------- نمای کارتی ---------- */
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 10px; margin-top: 12px; }
.st-scard {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 9px;
  padding: 14px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.st-scard::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent-2); opacity: 0; transition: opacity var(--dur-fast);
}
.st-scard:hover, .st-scard:focus-visible {
  transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--side-2); outline: none;
}
.st-scard:hover::before, .st-scard:focus-visible::before { opacity: 1; }
.st-scard.is-selected {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 22%, transparent);
}
.st-scard.is-selected::before { opacity: 1; }
.st-scard-top { display: flex; align-items: center; gap: 10px; }
.st-scard-name { font-weight: 800; font-size: var(--fs-md); line-height: 1.5; }
.st-scard-cls { font-size: var(--fs-2xs); color: var(--muted); }
.st-scard-meta { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); color: var(--muted); }
.st-scard-meta span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.st-scard-meta b { color: var(--ink); font-weight: 600; }
.st-scard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }

/* ---------- نمای کلاس‌ها ---------- */
.st-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(226px, 1fr)); gap: 10px; }
.st-class-card {
  position: relative; overflow: hidden;
  padding: 14px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.st-class-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--side-2); }
.st-class-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--gold));
}
.st-class-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.st-class-name { margin: 0; font-size: var(--fs-md); font-weight: 800; }
.st-class-teacher { margin: 2px 0 0; font-size: var(--fs-2xs); color: var(--muted); }
.st-class-n {
  min-width: 42px; padding: 3px 10px; border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--accent-2) 10%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--accent-2) 25%, var(--line));
  font-size: var(--fs-xs); font-weight: 800; color: var(--side-2); text-align: center;
}
.st-class-bar { height: 7px; margin: 11px 0 6px; border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.st-class-bar i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--grad-good); }
.st-class-bar i.low { background: var(--grad-gold); }
.st-class-bar i.bad { background: var(--grad-danger); }
.st-class-hint { font-size: var(--fs-3xs); color: var(--muted); }
.st-class-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.st-class-actions .btn { flex: 1 1 auto; }

/* ---------- مرکز نیازمند توجه ---------- */
.st-att-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; margin-bottom: 14px; }
.st-att-card {
  position: relative; overflow: hidden; text-align: right;
  padding: 13px 14px; cursor: pointer; font-family: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur);
}
.st-att-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--side-2); }
.st-att-card .st-att-ic { font-size: 18px; }
.st-att-card b { display: block; font-size: var(--fs-2xl); line-height: 1.1; color: var(--side); margin-top: 2px; font-variant-numeric: tabular-nums; }
.st-att-card span { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; margin-top: 2px; }
.st-att-card.tone-warn b { color: var(--warn); }
.st-att-card.tone-bad b { color: var(--bad); }
.st-att-card.tone-info b { color: var(--info); }
.st-att-card.tone-heart b { color: #a21caf; }
.st-att-card.is-zero { opacity: .66; }

/* ---------- آرشیو ---------- */
.st-arch-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.st-arch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-md);
}
.st-arch-row:hover { border-color: var(--side-2); }
.st-arch-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-arch-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.st-arch-note {
  margin: 0 0 12px; padding: 9px 12px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--warn) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color: var(--warn); font-size: var(--fs-xs); font-weight: 600; line-height: 1.8;
}

/* ---------- نوار عملیات گروهی ---------- */
.st-bulkbar {
  position: fixed; inset-inline: 0; bottom: 18px; z-index: 80;
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  width: max-content; max-width: calc(100vw - 32px); margin-inline: auto;
  padding: 9px 12px;
  background: var(--side); color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: stBulkIn var(--dur-base) var(--ease-spring) both;
}
@keyframes stBulkIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.st-bulkbar b { font-size: var(--fs-sm); }
.st-bulkbar .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); color: #fff; }
.st-bulkbar .btn:hover { background: rgba(255, 255, 255, .22); }
.st-bulkbar .btn.danger { background: rgba(220, 38, 38, .82); border-color: rgba(255, 255, 255, .2); }
.st-bulkbar .st-bulk-x { width: 30px; height: 30px; border-radius: 50%; padding: 0; }

/* ---------- حالت‌های خالی/خطا ---------- */
.st-mini-empty { padding: 18px 10px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.st-scope-note {
  margin: 0; padding: 8px 12px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--info) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--info) 26%, transparent);
  color: var(--info); font-size: var(--fs-xs); font-weight: 600;
}

/* ---------- حالت شب ---------- */
[data-theme="dark"] .st-kpi b,
[data-theme="dark"] .st-att-card b { color: var(--ink); }
[data-theme="dark"] .st-kpi-ic { color: #34d399; }
[data-theme="dark"] .st-class-n { color: #6ee7b7; background: rgba(16, 185, 129, .14); }
[data-theme="dark"] .st-kpi.tone-good b,
[data-theme="dark"] .st-att-card.tone-good b { color: #34d399; }
[data-theme="dark"] .st-kpi.tone-warn b,
[data-theme="dark"] .st-att-card.tone-warn b { color: #fbbf24; }
[data-theme="dark"] .st-kpi.tone-bad b,
[data-theme="dark"] .st-att-card.tone-bad b { color: #f87171; }
[data-theme="dark"] .st-kpi.tone-info b,
[data-theme="dark"] .st-att-card.tone-info b { color: #93c5fd; }
[data-theme="dark"] .st-kpi.tone-heart b,
[data-theme="dark"] .st-att-card.tone-heart b { color: #e879f9; }
[data-theme="dark"] .st-tab { color: var(--ink); }
[data-theme="dark"] .st-chip { background: var(--paper); }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1050px) {
  .st-toolbar { grid-template-columns: 1fr 1fr; }
  .st-toolbar .st-search { grid-column: 1 / -1; }
  .st-toolbar-btns { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 640px) {
  .st-hero { padding: 16px; }
  .st-hero-actions { width: 100%; }
  .st-hero-actions .btn { flex: 1 1 auto; }
  .st-toolbar { grid-template-columns: 1fr; }
  .st-tab { flex: 1 1 100%; }
  .st-kpis { grid-template-columns: 1fr 1fr; }
  .st-arch-row { flex-direction: column; align-items: stretch; }
  .st-bulkbar { border-radius: var(--radius-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .st-panel, .st-bulkbar { animation: none; }
  .st-kpi, .st-scard, .st-class-card, .st-att-card { transition: none; }
}

/* ================= پروندهٔ دانش‌آموز (sp-) =================
   نمای یکپارچهٔ پرونده: سربرگ هویتی، شاخص‌ها، هفت زبانه، خط زمانی،
   نمودارهای SVG سبک‌پذیر و بخش‌های مالی/آموزشی. همهٔ رنگ‌ها از
   توکن‌های app.css می‌آیند تا حالت شب بدون بازنویسی درست بماند. */

.sp-page { display: flex; flex-direction: column; gap: 14px; }
.sp-back {
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start;
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  text-decoration: none; padding: 4px 8px; border-radius: var(--radius-md);
  border: 1px solid transparent;
}
.sp-back:hover { color: var(--accent-2); background: var(--paper); border-color: var(--line); }
.sp-back:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

/* ---------- سربرگ ---------- */
.sp-hero { align-items: flex-start; }
.sp-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; z-index: 1; flex: 1 1 320px; }
.sp-hero-av { flex: 0 0 auto; }
.sp-avatar-xl { width: 58px; height: 58px; font-size: var(--fs-xl); border-radius: 19px; }
.sp-hero-id { min-width: 0; }
.sp-hero-titleline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.sp-hero-titleline .st-hero-title { margin: 0; }
.sp-hero-badges { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.sp-hero-badges .badge { backdrop-filter: blur(3px); }
.sp-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 5px; }
.sp-meta-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); color: rgba(255, 255, 255, .86);
}
.sp-meta-item svg { opacity: .8; }
.sp-hero-actions { max-width: 100%; }
.sp-hero-danger { color: #ffe4e6 !important; border-color: rgba(255, 180, 190, .45) !important; }
.sp-hero-danger:hover { background: rgba(220, 38, 38, .35) !important; border-color: rgba(255, 190, 200, .7) !important; }

/* ---------- شاخص‌های پرونده ---------- */
.sp-kpis { margin-top: 0; }
.sp-kpi { min-height: 74px; }

/* ---------- چیدمان زبانه‌ها ---------- */
.sp-panel { display: flex; flex-direction: column; gap: 14px; }
.sp-panel[hidden] { display: none; }
.sp-ov { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.sp-ov-main, .sp-ov-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.sp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sp-top { margin-top: 0; }
.sp-insights { margin-top: 14px; }

/* ---------- آمار کوچک ---------- */
.sp-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-stat-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
.sp-grid-3 .sp-stat { height: 100%; }
.sp-stat {
  display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto;
  gap: 0 8px; align-items: center;
  padding: 9px 11px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper);
}
.sp-stat-ic { grid-row: 1 / 3; display: grid; place-items: center; color: var(--side-2); }
.sp-stat b { font-size: var(--fs-md); font-weight: 800; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sp-stat > span:last-child { font-size: var(--fs-2xs); color: var(--muted); font-weight: 600; }
.sp-stat.tone-good b, .sp-stat.tone-good .sp-stat-ic { color: var(--good); }
.sp-stat.tone-warn b, .sp-stat.tone-warn .sp-stat-ic { color: var(--warn); }
.sp-stat.tone-bad b, .sp-stat.tone-bad .sp-stat-ic { color: var(--bad); }
.sp-stat.tone-info b, .sp-stat.tone-info .sp-stat-ic { color: var(--info); }

/* ---------- مشخصات ---------- */
.sp-info { margin: 0; display: flex; flex-direction: column; }
.sp-info-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.sp-info-row:last-child { border-bottom: 0; }
.sp-info-row dt { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; white-space: nowrap; }
.sp-info-row dd { margin: 0; font-size: var(--fs-sm); font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.sp-ltr { direction: ltr; unicode-bidi: embed; font-variant-numeric: tabular-nums; }
.sp-inline-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.sp-status-line { margin-inline-start: auto; }
.sp-w100 { width: 100%; justify-content: center; margin-top: 12px; }

/* ---------- حلقهٔ تکمیل ---------- */
.sp-complete { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sp-ring {
  --pct: 0; --ring-size: 84px;
  position: relative; flex: 0 0 auto;
  width: var(--ring-size); height: var(--ring-size); border-radius: 50%;
  display: grid; place-items: center;
  background: conic-gradient(var(--good) calc(var(--pct) * 1%), var(--line) 0);
}
.sp-ring::before {
  content: ''; position: absolute; inset: 7px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line);
}
.sp-ring > span {
  position: relative; z-index: 1; text-align: center;
  font-size: var(--fs-md); font-weight: 800; color: var(--ink);
  line-height: 1.15; font-variant-numeric: tabular-nums;
}
.sp-ring > span small { display: block; font-size: var(--fs-3xs); font-weight: 600; color: var(--muted); }
.sp-ring-lg { --ring-size: 116px; }
.sp-ring-lg > span { font-size: var(--fs-xl); }
.sp-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; min-width: 0; }
.sp-check { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.sp-check svg { flex: 0 0 auto; color: var(--bad); opacity: .8; }
.sp-check.ok { color: var(--ink); }
.sp-check.ok svg { color: var(--good); opacity: 1; }

/* ---------- تماس سریع ---------- */
.sp-contact { display: flex; flex-direction: column; gap: 2px; }
.sp-contact-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.sp-contact-row:last-child { border-bottom: 0; }
.sp-contact-l { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; white-space: nowrap; }
.sp-contact-num {
  direction: ltr; unicode-bidi: embed; margin-inline-start: auto;
  font-size: var(--fs-sm); font-weight: 800; color: var(--side-2);
  text-decoration: none; font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
a.sp-contact-num:hover { text-decoration: underline; }
.sp-contact-nid { border-top: 1px solid var(--line); border-bottom: 0; margin-top: 4px; padding-top: 10px; }
.sp-contact-nid .sp-contact-num { color: var(--ink); font-weight: 700; }

/* ---------- ریزفهرست‌ها (تذکر/تماس/مسئولیت/ارزشیابی) ---------- */
.sp-list { display: flex; flex-direction: column; }
.sp-list-sm { gap: 2px; }
.sp-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.sp-item:last-child { border-bottom: 0; }
.sp-item-main { min-width: 0; flex: 1 1 auto; }
.sp-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-item-date { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.sp-item-title { display: block; margin-top: 5px; font-size: var(--fs-sm); font-weight: 800; color: var(--side); overflow-wrap: anywhere; }
.sp-item-text { margin: 4px 0 0; font-size: var(--fs-sm); line-height: 1.85; overflow-wrap: anywhere; }
.sp-item-note {
  margin: 5px 0 0; padding: 5px 9px; border-radius: var(--radius-md);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--fs-xs); line-height: 1.8; color: var(--ink);
}
.sp-item-meta { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-size: var(--fs-2xs); color: var(--muted); }
.sp-item-actions { display: inline-flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.sp-item .sp-details { margin-top: 6px; }
.sp-meta-line { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sp-meta-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 7px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: var(--fs-2xs); color: var(--muted); white-space: nowrap;
}
.sp-negah-unlock { margin-top: 8px; }
.sp-negah-unlock input { max-width: 190px; }

/* ---------- خط زمانی ---------- */
.sp-tl { position: relative; display: flex; flex-direction: column; gap: 2px; padding-inline-start: 6px; }
.sp-tl::before {
  content: ''; position: absolute; inset-block: 10px; inset-inline-start: 18px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(var(--line), color-mix(in srgb, var(--line) 35%, transparent));
}
.sp-tl-item { position: relative; display: flex; gap: 11px; padding: 7px 0; }
.sp-tl-dot {
  position: relative; z-index: 1; flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--line); color: var(--muted);
}
.sp-tl-item.tone-good .sp-tl-dot { color: var(--good); border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.sp-tl-item.tone-warn .sp-tl-dot { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.sp-tl-item.tone-bad .sp-tl-dot { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.sp-tl-item.tone-info .sp-tl-dot { color: var(--info); border-color: color-mix(in srgb, var(--info) 45%, var(--line)); }
.sp-tl-body { min-width: 0; flex: 1 1 auto; padding-bottom: 8px; }
.sp-tl-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.sp-tl-date { font-size: var(--fs-2xs); font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-tl-kind {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-3xs); font-weight: 700; color: var(--muted);
  padding: 1px 7px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--line);
}
.sp-tl-title { display: block; margin-top: 3px; font-size: var(--fs-sm); font-weight: 800; line-height: 1.7; }
.sp-tl-text { margin: 2px 0 0; font-size: var(--fs-xs); line-height: 1.9; color: var(--ink); overflow-wrap: anywhere; }
.sp-tl-extra { margin: 4px 0 0; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.8; }
.sp-more { display: flex; justify-content: center; margin-top: 10px; }

/* ---------- نمودارهای SVG ---------- */
.sp-chart { margin: 0 -4px; }
.sp-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.sp-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 4 4; }
.sp-axis { fill: var(--muted); font-size: 10.5px; font-family: inherit; }
.sp-line { fill: none; stroke: var(--accent-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sp-pt { fill: var(--paper); stroke: var(--side-2); stroke-width: 2.2; cursor: pointer; transition: r var(--dur-fast); }
.sp-pt:hover, .sp-pt:focus-visible { r: 7; outline: none; }
.sp-pt:focus-visible { stroke: var(--gold); }
.sp-pt.important { stroke: var(--warn); }
.sp-pt.critical { stroke: var(--bad); }
.sp-chart-note { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: var(--fs-2xs); color: var(--muted); }

/* ---------- توزیع ---------- */
.sp-dist { display: flex; flex-direction: column; gap: 7px; }
.sp-dist-row { display: grid; grid-template-columns: 66px 1fr 30px; align-items: center; gap: 8px; font-size: var(--fs-xs); }
.sp-dist-row > span:first-child { color: var(--muted); font-weight: 600; }
.sp-dist-row b { text-align: end; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-dist-track { height: 8px; border-radius: var(--radius-full); background: var(--surface-2); overflow: hidden; }
.sp-dist-track i { display: block; height: 100%; border-radius: inherit; background: var(--good); transition: width var(--dur-base) var(--ease-out); }
.sp-dist-row.important .sp-dist-track i { background: var(--warn); }
.sp-dist-row.critical .sp-dist-track i { background: var(--bad); }
.sp-dist-row.ok .sp-dist-track i { background: var(--warn); }
.sp-dist-row.weak .sp-dist-track i { background: var(--bad); }
.sp-dist-row.great .sp-dist-track i { background: var(--good); }

/* ---------- میله‌های ماهانه ---------- */
.sp-bars {
  direction: ltr;
  display: flex; align-items: flex-end; justify-content: space-around; gap: 8px;
  min-height: 132px; padding-top: 4px;
}
.sp-bcol { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; max-width: 76px; }
.sp-btrack {
  width: 100%; max-width: 44px; height: 104px;
  display: flex; align-items: flex-end;
  background: linear-gradient(var(--surface-2), transparent);
  border-radius: 7px; overflow: hidden;
}
.sp-bstack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 7px 7px 0 0; overflow: hidden; }
.sp-bstack i { display: block; width: 100%; }
.sp-bstack i.absent { background: var(--bad); }
.sp-bstack i.late { background: var(--warn); }
.sp-bcol > span { font-size: var(--fs-3xs); color: var(--muted); font-weight: 700; white-space: nowrap; }
.sp-legend { display: flex; align-items: center; gap: 14px; margin-top: 8px; font-size: var(--fs-2xs); color: var(--muted); }
.sp-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sp-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.sp-legend i.absent { background: var(--bad); }
.sp-legend i.late { background: var(--warn); }

/* ---------- گزارش‌های رفتاری ---------- */
.sp-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-chip-static .st-chip { cursor: default; }
.sp-reps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.sp-rep {
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper); box-shadow: var(--shadow-xs);
}
.sp-rep-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sp-rep-date { font-size: var(--fs-2xs); color: var(--muted); font-weight: 700; }
.sp-rep-by { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; font-size: var(--fs-3xs); color: var(--muted); }
.sp-rep-text { margin: 0; font-size: var(--fs-sm); line-height: 1.95; overflow-wrap: anywhere; flex: 1 1 auto; }
.sp-rep-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line); }
.sp-rep-actions .btn { padding: 4px 9px; font-size: var(--fs-2xs); }
.sp-rep-actions .btn.danger { color: var(--bad); }
.sp-del-btn { color: var(--bad) !important; border-color: color-mix(in srgb, var(--bad) 30%, var(--line)) !important; background: transparent !important; }
.sp-del-btn:hover { background: color-mix(in srgb, var(--bad) 10%, var(--paper)) !important; border-color: color-mix(in srgb, var(--bad) 45%, var(--line)) !important; }

/* ---------- فرم‌های داخل پرونده ---------- */
.sp-details {
  margin-top: 12px; padding: 10px 12px;
  border: 1px dashed var(--line); border-radius: var(--radius-md);
  background: var(--surface-2);
}
.sp-details > summary {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  font-size: var(--fs-sm); font-weight: 800; color: var(--accent-2);
  list-style: none;
}
.sp-details > summary::-webkit-details-marker { display: none; }
.sp-details[open] > summary { margin-bottom: 9px; }
.sp-form { display: flex; flex-direction: column; gap: 8px; }
.sp-form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sp-form .field { margin: 0; }
.sp-form-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sp-checks { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); }
.sp-checks label, .sp-check-inline { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.sp-checks input, .sp-check-inline input { width: auto; accent-color: var(--accent-2); }
.sp-check-inline { font-size: var(--fs-xs); margin-top: 8px; }

/* ---------- آموزشی ---------- */
.sp-acad-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sp-acad-main { min-width: 0; flex: 1 1 260px; }
.sp-acad-main .sp-inline-actions { margin-top: 8px; }
.sp-insight { padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--paper); }
.sp-insight strong { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 800; }
.sp-insight ul { margin: 6px 0 0; padding-inline-start: 16px; font-size: var(--fs-xs); line-height: 1.9; }
.sp-insight p { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.sp-insight.good { border-color: color-mix(in srgb, var(--good) 32%, var(--line)); background: color-mix(in srgb, var(--good) 6%, var(--paper)); }
.sp-insight.good strong { color: var(--good); }
.sp-insight.warn { border-color: color-mix(in srgb, var(--warn) 34%, var(--line)); background: color-mix(in srgb, var(--warn) 7%, var(--paper)); }
.sp-insight.warn strong { color: var(--warn); }
.sp-notes { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.sp-note-row { display: flex; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); }
.sp-note-row p { margin: 0; font-size: var(--fs-xs); line-height: 1.85; overflow-wrap: anywhere; }
.sp-note {
  display: flex; align-items: flex-start; gap: 5px; margin: 10px 0 0;
  font-size: var(--fs-2xs); color: var(--muted); line-height: 1.8;
}
.sp-note svg { flex: 0 0 auto; margin-top: 2px; }
.sp-call-quote { line-height: 1.9; margin: 0 0 10px; }
.sp-rep-open-text { line-height: 2; margin: 4px 0 0; overflow-wrap: anywhere; }
.sp-fallback { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- مالی ---------- */
.sp-fin-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sp-fin-amounts .sp-stat b { font-size: var(--fs-sm); }
.sp-progress {
  height: 10px; margin-top: 12px; border-radius: var(--radius-full);
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.sp-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--good), var(--accent-2)); }

/* ---------- جدول‌های داخل پرونده ---------- */
.sp-tablewrap { max-height: 420px; margin-top: 4px; overflow: auto; }
.sp-table { min-width: 560px; }
.sp-table tbody tr { cursor: default; }
.sp-table td { font-size: var(--fs-xs); }

/* ---------- حالت خالی و چرخان ---------- */
.sp-mini-empty {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 14px; border: 1px dashed var(--line); border-radius: var(--radius-md);
  background: var(--surface-2); color: var(--muted); font-size: var(--fs-xs); text-align: center;
}
.sp-spin { animation: spSpin 1s linear infinite; }
@keyframes spSpin { to { transform: rotate(360deg); } }
.sp-danger-zone { border-color: color-mix(in srgb, var(--bad) 34%, var(--line)); }
.sp-danger-zone .st-card-title { color: var(--bad); }

/* ---------- حالت شب ---------- */
[data-theme="dark"] .sp-ring::before { background: var(--paper); }
[data-theme="dark"] .sp-pt { fill: var(--paper); }
[data-theme="dark"] .sp-dist-track,
[data-theme="dark"] .sp-progress { background: var(--surface-2); }
[data-theme="dark"] .sp-details { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
[data-theme="dark"] .sp-tl-dot { background: var(--paper); }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1100px) {
  .sp-ov { grid-template-columns: 1fr; }
  .sp-ov-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .sp-ov-side > .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .sp-grid-2 { grid-template-columns: 1fr; }
  .sp-grid-3 { grid-template-columns: 1fr; }
  .sp-ov-side { grid-template-columns: 1fr; }
  .sp-fin-amounts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sp-hero-main { width: 100%; }
  .sp-hero-actions { width: 100%; }
  .sp-hero-actions .btn { flex: 1 1 auto; }
  .sp-form-2 { grid-template-columns: 1fr; }
  .sp-stat-grid { grid-template-columns: 1fr; }
  .sp-bars { gap: 4px; }
  .sp-bcol > span { font-size: 9px; }
  .sp-tabs .st-tab { flex: 1 1 calc(50% - 8px); min-width: 0; padding: 9px 6px; font-size: var(--fs-xs); }
  .sp-kpi b { font-size: var(--fs-xl); white-space: nowrap; }
  .sp-kpi { min-height: 68px; padding: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sp-spin { animation: none; }
  .sp-dist-track i, .sp-pt { transition: none; }
}

/* ---------- عکس دانش‌آموز: بارگذاری گروهی و ویرایش ---------- */
.st-photo-report { font-size: var(--fs-sm); }
.st-photo-report .badge { font-size: var(--fs-2xs); }
.st-edit-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.st-edit-photo-box {
  width: 88px; height: 88px; flex: 0 0 auto;
  display: grid; place-items: center; overflow: hidden;
  border-radius: 18px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--muted);
}
.st-edit-photo-box img { width: 100%; height: 100%; object-fit: cover; }
.st-edit-photo-actions { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-edit-photo-actions .muted { margin: 0; font-size: var(--fs-2xs); }
.st-form-more {
  margin-top: 10px; padding: 6px 10px;
  border: 1px dashed var(--line); border-radius: 12px;
}
.st-form-more > summary { cursor: pointer; font-weight: 700; color: var(--side-2); padding: 4px 0; }
.st-form-more[open] > summary { margin-bottom: 8px; }
.st-form-more textarea { min-height: 62px; }

/* ---------- ثبت گروهی: ورود از فایل ---------- */
.st-bulk-file {
  margin-top: 10px; padding: 10px 12px;
  border: 1px dashed var(--line); border-radius: 12px;
  background: var(--surface-2);
}
.st-bulk-file .field { margin-bottom: 0; }
.st-bulk-file input[type="file"] { width: 100%; }

/* ---------- پروندهٔ آموزشی: ارزشیابی کتاب (سطح هر عنوان کارنامه) ---------- */
.sp-eval-book { margin-top: 10px; }
.sp-eval-book-head {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 2px; font-size: var(--fs-sm);
  color: var(--accent-2);
}
.sp-eval-book .sp-tablewrap { max-height: 260px; }
