/* Admin & school panel chrome — docs/design-system.md §6.5. Shared components (buttons, chips, tables, forms) are in app.css. */

.panel { display: flex; min-height: 100vh; background: var(--gray-100); isolation: isolate; }
/* Scrollbars (2026-10-17): thin, rounded, design-system grey instead of the browser default; light on the navy
   sidebar. Standard properties (Chrome/Edge 121+, Firefox); ::-webkit-scrollbar covers older Chromium and Safari. */
html, .panel, .panel *, .help-dialog * { scrollbar-width: thin; scrollbar-color: var(--gray-300) transparent; }
.panel *:hover { scrollbar-color: var(--gray-400) transparent; }
.panel__sidebar, .panel__sidebar * { scrollbar-color: rgb(255 255 255 / .22) transparent; }
.panel ::-webkit-scrollbar, .help-dialog ::-webkit-scrollbar { width: 8px; height: 8px; }
.panel ::-webkit-scrollbar-track, .help-dialog ::-webkit-scrollbar-track { background: transparent; }
.panel ::-webkit-scrollbar-thumb, .help-dialog ::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
.panel ::-webkit-scrollbar-thumb:hover { background-color: var(--gray-400); }
.panel ::-webkit-scrollbar-corner { background: transparent; }


/* Ground: two blurred brand bubbles drifting slowly behind the content (design/panel-gradient-showcase.html, E).
   Fixed to the viewport, under every panel child; light enough that --text-muted stays readable on them. */
.panel::before, .panel::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; will-change: transform; }
.panel::before { width: 520px; height: 520px; top: -140px; left: 6%; background: var(--bubble-1); animation: panel-bubble-1 38s ease-in-out infinite alternate; }
.panel::after { width: 480px; height: 480px; bottom: -160px; left: 38%; background: var(--bubble-2); animation: panel-bubble-2 46s ease-in-out infinite alternate; }
@keyframes panel-bubble-1 { to { transform: translate(240px, 170px) scale(1.15); } }
@keyframes panel-bubble-2 { to { transform: translate(-280px, -190px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .panel::before, .panel::after { animation: none; } }

/* ---- Sidebar ---- */
/* flush with the window on top, bottom and the outer side; only the inner side (left in RTL) is rounded (2026-10-17) */
.panel__sidebar { width: 264px; flex: 0 0 264px; background: var(--sidebar-bg); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-start-end-radius: var(--r-lg); border-end-end-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: #fff; border-bottom: 1px solid rgb(255 255 255 / .1); }
.sidebar__brand:hover { text-decoration: none; color: #fff; }
.sidebar__mark { box-sizing: content-box; width: auto; height: 32px; padding: 5px 7px; flex: none; background: #fff; border-radius: 10px; }
.sidebar__brand > span { min-width: 0; }
.sidebar__brand strong { display: block; font-size: 1rem; line-height: 1.4; font-weight: 800; }
/* the user's school under the brand (AppClaims.SchoolName) */
.sidebar__brand small { display: block; margin-top: 2px; font-size: .78rem; line-height: 1.5; color: var(--tint-periwinkle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidenav { flex: 1; overflow-y: auto; padding: 10px 12px 16px; display: flex; flex-direction: column; }
.sidenav__section { font-size: .7rem; font-weight: 700; color: rgb(255 255 255 / .5); padding: 16px 12px 6px; }
.sidenav__link { display: flex; align-items: center; gap: 10px; color: rgb(255 255 255 / .85); padding: 9px 12px; border-radius: 10px; border-inline-start: 3px solid transparent; font-weight: 600; font-size: .95rem; margin-bottom: 2px; }
.sidenav__link svg { width: 20px; height: 20px; flex: none; opacity: .8; }
.sidenav__link:hover { background: rgb(255 255 255 / .08); color: #fff; text-decoration: none; }
.sidenav__link.active { background: rgb(255 255 255 / .12); color: #fff; border-inline-start-color: var(--brand-orange); }
.sidenav__link.active svg { opacity: 1; }
/* report sub-items under «گزارش‌ها» (Layout/ReportSubnav), shown while in the reports section */
.sidenav__sub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 8px; padding-inline-start: 22px; position: relative; }
.sidenav__sub::before { content: ""; position: absolute; top: 4px; bottom: 4px; inset-inline-start: 21px; width: 1px; background: rgb(255 255 255 / .14); }
.sidenav__sublink { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 8px; color: rgb(255 255 255 / .72); font-size: .86rem; font-weight: 600; white-space: nowrap; position: relative; }
.sidenav__sublink svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.sidenav__sublink:hover { background: rgb(255 255 255 / .07); color: #fff; text-decoration: none; }
.sidenav__sublink.active { color: #fff; background: rgb(255 255 255 / .1); }
.sidenav__sublink.active::before { content: ""; position: absolute; inset-inline-start: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--brand-orange); }
.sidenav__sublink.active svg { opacity: 1; }
/* current academic year pill (v0.2 / E1) */
.sidebar__year { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 12px 0; padding: 8px 12px; border-radius: 10px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); color: #fff; font-size: .8rem; }
.sidebar__year:hover { background: rgb(255 255 255 / .14); color: #fff; text-decoration: none; }
.sidebar__year b { color: var(--brand-amber); font-weight: 800; }
.sidebar__year svg { width: 16px; height: 16px; opacity: .7; }
.sidebar__user { border-top: 1px solid rgb(255 255 255 / .1); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--brand-orange); color: var(--accent-contrast); display: grid; place-items: center; font-weight: 800; flex: none; }
.sidebar__user-name { font-weight: 700; font-size: .9rem; line-height: 1.3; }
.sidebar__user-role { font-size: .75rem; color: var(--tint-periwinkle); }
.sidebar__logout { margin-inline-start: auto; }
.sidebar__build { padding: 0 16px 12px; font-size: .7rem; line-height: 1.6; color: var(--tint-periwinkle); opacity: .75; }
.sidebar__build .ltr { display: inline-block; direction: ltr; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 8px; display: inline-grid; place-items: center; background: rgb(255 255 255 / .1); color: #fff; border: 0; cursor: pointer; }
.btn-icon:hover { background: rgb(255 255 255 / .2); color: #fff; }
.btn-icon svg { width: 18px; height: 18px; }

/* ---- Collapsed sidebar: icon rail on desktop (html.sidebar-collapsed, js/site.js) ---- */
.panel__sidebar { transition: width .2s ease, flex-basis .2s ease; }
/* round toggle hanging on the sidebar's rounded inner edge */
.sidebar-toggle { position: absolute; top: 30px; inset-inline-end: -14px; z-index: 2; width: 28px; height: 28px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--heading); border: 1px solid var(--border); box-shadow: var(--shadow-1); cursor: pointer; }
.sidebar-toggle:hover { background: var(--tint-blue); }
.sidebar-toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.sidebar-toggle svg { width: 16px; height: 16px; transition: transform .2s ease; }
.sidebar-collapsed .sidebar-toggle svg { transform: rotate(180deg); }
@media (min-width: 992px) {
  .sidebar-collapsed .panel__sidebar { width: 76px; flex-basis: 76px; }
  .sidebar-collapsed .sidebar__brand { justify-content: center; padding: 18px 0; }
  .sidebar-collapsed .sidebar__brand > span,
  .sidebar-collapsed .sidebar__year > span,
  .sidebar-collapsed .sidenav__label,
  .sidebar-collapsed .sidebar__user > div,
  .sidebar-collapsed .sidebar__build { display: none; }
  .sidebar-collapsed .sidebar__year { justify-content: center; margin: 12px 12px 0; padding: 9px 0; }
  .sidebar-collapsed .sidebar__year svg { width: 18px; height: 18px; opacity: .9; }
  .sidebar-collapsed .sidenav { padding: 10px 12px 16px; }
  .sidebar-collapsed .sidenav__section { font-size: 0; height: 1px; padding: 0; margin: 12px 6px; background: rgb(255 255 255 / .12); }
  .sidebar-collapsed .sidenav__link { justify-content: center; padding: 10px 0; }
  .sidebar-collapsed .sidenav__sub { padding-inline-start: 0; }
  .sidebar-collapsed .sidenav__sub::before, .sidebar-collapsed .sidenav__sublink.active::before { display: none; }
  .sidebar-collapsed .sidenav__sublink { justify-content: center; padding: 8px 0; }
  .sidebar-collapsed .sidebar__user { flex-direction: column; padding: 12px 0; }
  .sidebar-collapsed .sidebar__logout { margin-inline-start: 0; }
}

/* ---- Body ---- */
.panel__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.panel__content { padding: 28px; width: 100%; }

/* ---- Page header ---- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { margin: 0; font-size: 1.6rem; font-weight: 900; color: var(--heading); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head__sub { color: var(--text-muted); font-size: .9rem; margin: 4px 0 0; }
.page-actions, .page-head .form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }

/* ---- Panel cards, tables, filters ---- */
.panel .card--pad { padding: 20px 24px 24px; }
.panel .card h3 { font-size: 1.05rem; font-weight: 800; color: var(--heading); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--gray-100); }
.panel .table-wrap { box-shadow: var(--shadow-1); }
.panel .table-brand th { font-size: .8125rem; height: 44px; }
.panel .table-brand td { font-size: .925rem; height: 46px; }
.panel .table-brand td.actions { white-space: nowrap; }
.row-actions { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.row-actions form { display: inline; margin: 0; }
.btn-sm svg { width: 16px; height: 16px; }
.btn .ico { width: 18px; height: 18px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--shadow-1); }
.filters .form-control { max-width: 280px; }
.filters .form-select { max-width: 180px; }
.filters .btn { margin-inline-start: auto; }
.filters .form-check-label { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.filters .form-check-input { margin: 0; }
.table-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: .85rem; margin-top: 8px; }
.empty { text-align: center; padding: 40px 16px; color: var(--text-muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 8px; color: var(--brand-blue-light); }
.empty p { margin: 0 0 12px; }

/* ---- KPI cards ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.kpi { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-1); color: inherit; transition: box-shadow .15s, transform .15s; }
.kpi:hover { text-decoration: none; box-shadow: var(--shadow-2); transform: translateY(-1px); color: inherit; }
.kpi__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--tint-blue); color: var(--link); display: grid; place-items: center; flex: none; }
.kpi--orange .kpi__icon { background: var(--tint-peach); color: var(--brand-orange-dark); }
.kpi--green .kpi__icon { background: var(--success-bg); color: var(--green-text); }
.kpi--gray .kpi__icon { background: var(--gray-100); color: var(--gray-600); }
.kpi__icon svg { width: 24px; height: 24px; }
.kpi__label { color: var(--text-muted); font-size: .85rem; }
.kpi__value { font-size: 1.85rem; font-weight: 900; color: var(--heading); line-height: 1.2; }

/* ---- Quick actions & section titles ---- */
.section-title { font-size: 1.1rem; font-weight: 800; margin: 28px 0 12px; display: flex; align-items: center; gap: 10px; color: var(--heading); }
.section-title .badge { font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.quick { display: flex; gap: 12px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); color: inherit; box-shadow: var(--shadow-1); }
.quick svg { width: 22px; height: 22px; color: var(--link); flex: none; }
.quick strong { display: block; font-size: .95rem; }
.quick small { color: var(--text-muted); font-size: .8rem; }
.quick:hover { border-color: var(--brand-orange); box-shadow: var(--shadow-2); text-decoration: none; color: inherit; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.steps li { position: relative; padding-inline-start: 40px; }
.steps li::before { counter-increment: step; content: counter(step, persian); position: absolute; inset-inline-start: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--tint-blue); color: var(--link); font-weight: 800; display: grid; place-items: center; font-size: .85rem; }

/* ---- Excel toolbar (list pages) ---- */
.excel-toolbar { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); overflow: hidden; height: 40px; }
.excel-toolbar__label { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; height: 100%; background: var(--success-bg); color: var(--green-text); font-weight: 700; font-size: .85rem; border-inline-end: 1px solid var(--border); }
.excel-toolbar__label svg { width: 18px; height: 18px; }
.excel-toolbar .btn { height: 100%; border-radius: 0; border: 0; color: var(--link); background: var(--surface); }
.excel-toolbar .btn + .btn { border-inline-start: 1px solid var(--border); }
.excel-toolbar .btn:hover { background: var(--tint-blue); }

/* ---- Import wizard ---- */
.stepper { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stepper__step { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-muted); font-weight: 600; font-size: .9rem; }
.stepper__num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gray-100); color: var(--gray-600); font-weight: 800; font-size: .85rem; flex: none; }
.stepper__num svg { width: 16px; height: 16px; }
.stepper__step.current { color: var(--link); border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--tint-blue); }
.stepper__step.current .stepper__num { background: var(--brand-orange); color: var(--accent-contrast); }
.stepper__step.done { color: var(--green-text); }
.stepper__step.done .stepper__num { background: var(--success-bg); color: var(--green-text); }
.import-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.step-badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint-blue); color: var(--link); font-size: .85rem; margin-inline-end: 8px; vertical-align: middle; }
.columns-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.columns-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 8px 12px; background: var(--gray-100); border-radius: var(--r-sm); font-size: .9rem; }
.columns-list li strong { color: var(--link); }
.columns-list li small { flex-basis: 100%; color: var(--text-muted); }
.columns-list .req { font-size: .7rem; font-weight: 700; color: var(--red); background: var(--error-bg); border-radius: 999px; padding: 1px 8px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; padding: 24px; border: 2px dashed var(--brand-blue-light); border-radius: var(--r-md); background: var(--gray-100); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin: 0; }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand-blue); background: var(--tint-blue); }
.dropzone.has-file { border-style: solid; border-color: var(--green); background: var(--success-bg); }
.dropzone__input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone__icon { width: 40px; height: 40px; color: var(--link); }
.dropzone__title { font-weight: 700; color: var(--link); }
.dropzone__hint { font-size: .8rem; color: var(--text-muted); }
.dropzone__file { font-size: .85rem; font-weight: 700; color: var(--green-text); direction: ltr; }
.import-summary { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.import-summary__stat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.import-summary__stat strong { font-size: 1.2rem; }
.import-summary__stat svg { width: 18px; height: 18px; }
.import-summary__stat.ok { color: var(--green-text); border-color: var(--success-line); background: var(--success-bg); }
.import-summary__stat.bad { color: var(--red); border-color: var(--error-line); background: var(--error-bg); }
.import-summary__stat.muted { color: var(--text-muted); }
.import-summary__hint { margin: 0; color: var(--text-muted); font-size: .85rem; flex-basis: 100%; }
.preview { position: relative; }
.only-bad-toggle { position: absolute; opacity: 0; pointer-events: none; }
.only-bad-label { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: .85rem; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.only-bad-label svg { width: 14px; height: 14px; }
.only-bad-toggle:checked + .only-bad-label { border-color: var(--red); color: var(--red); background: var(--error-bg); }
.only-bad-toggle:checked ~ .table-wrap .row-ok { display: none; }
.preview-table td.text-start { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-table tr.row-bad td { background: color-mix(in srgb, var(--error-bg) 50%, var(--surface)); }
.preview-table tr.row-bad:nth-child(even) td { background: var(--error-bg); }
.preview-table__msg { color: var(--red); font-size: .85rem; white-space: normal !important; max-width: 320px !important; }
.status { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.status svg { width: 15px; height: 15px; }
.status.ok { background: var(--success-bg); color: var(--green-text); }
.status.bad { background: var(--error-bg); color: var(--red); }
.import-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.import-result__head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.import-result__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.import-result__icon svg { width: 28px; height: 28px; }
.import-result__icon.ok { background: var(--success-bg); color: var(--green-text); }
.import-result__icon.warn { background: var(--warning-bg); color: var(--warning-text); }
.import-result__title { margin: 0 0 2px; border: 0; padding: 0; }
.import-result__sub { font-size: .95rem; margin: 20px 0 8px; color: var(--ink); }
.notes-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.notes-list li { padding: 8px 12px; background: var(--gray-100); border-radius: var(--r-sm); font-size: .9rem; }

/* ---- Exams ---- */
.switch { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 0; cursor: pointer; color: var(--text-muted); font-size: .8rem; font-weight: 700; font-family: inherit; }
.switch__knob { width: 40px; height: 22px; border-radius: 999px; background: var(--gray-300); position: relative; transition: background .15s; }
.switch__knob::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform .15s; }
.switch.on { color: var(--green-text); }
.switch.on .switch__knob { background: var(--green); }
.switch.on .switch__knob::after { transform: translateX(-18px); }
.table-brand td.exam-title { min-width: 220px; }
.btn.btn-ico { padding-inline: 8px; }
.btn.btn-ico svg { margin: 0; width: 18px; height: 18px; }
.table-brand td.exam-title .chips { gap: 4px; }
.switch-stack { display: grid; gap: 6px; justify-items: start; }
.switch-stack form { margin: 0; }
.vis-select { min-width: 120px; font-size: .8rem; padding: 4px 28px 4px 8px; height: 32px; }
.vis-cell { display: grid; gap: 4px; justify-items: center; }
.vis-cell small { font-size: .72rem; }
.bulk-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; font-size: .875rem; }
.bulk-row form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.check-row { display: flex; gap: 14px; flex-wrap: wrap; height: 40px; align-items: center; }
.check-row .form-check-label { display: inline-flex; align-items: center; gap: 6px; }
.exam-list { display: grid; gap: 12px; margin-bottom: 8px; }
.exam-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-inline-start: 5px solid var(--gray-300); border-radius: var(--r-md); padding: 14px 18px; box-shadow: var(--shadow-1); }
.exam-item.is-registered { border-inline-start-color: var(--green); }
/* not held yet (Advisor/Exams.razor): dashed and quiet; the next one keeps its weight with an orange edge */
.exam-item.is-ahead { background: color-mix(in srgb, var(--surface-soft) 70%, transparent); border-style: dashed; border-inline-start-style: solid; box-shadow: none; }
.exam-item.is-ahead .exam-item__title, .exam-item.is-ahead .exam-item__meta > :not(.badge-info) { opacity: .55; }
.exam-item.is-next { border-inline-start-color: var(--brand-orange); }
.exam-item__tag { display: inline-flex; align-items: center; height: 22px; padding-inline: 10px; border-radius: var(--r-pill); background: var(--brand-orange); color: var(--accent-contrast); font-size: .72rem; font-weight: 800; }
.exam-group { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 1rem; color: var(--heading); }
.exam-group:first-of-type { margin-top: 4px; }
.exam-group small { display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding-inline: 7px; border-radius: var(--r-pill); background: var(--gray-100); color: var(--text-muted); font-size: .74rem; font-weight: 800; }
.exam-item__title { font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.exam-item__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: .875rem; color: var(--text-muted); }
.exam-item__meta .em-date { display: inline-flex; align-items: center; gap: 4px; }
.exam-item__side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.exam-item__side form { margin: 0; }
.picker__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.picker__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--gray-100); }
.picker__head h3 { margin: 0; padding: 0; border: 0; font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.picker__table { border: 0; border-radius: 0 0 var(--r-md) var(--r-md); box-shadow: none !important; max-height: 60vh; overflow: auto; }
.picker__table .table-brand th { position: sticky; top: 0; z-index: 1; }
.picker__table .form-check-input { margin: 0; width: 18px; height: 18px; cursor: pointer; }
.picker__table tr.group-row td { background: var(--gray-100) !important; font-weight: 700; }
.sticky-actions { position: sticky; bottom: 0; background: var(--gray-100); padding: 12px 0; }

/* ---- Account ---- */
.tabbar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tabbar__tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; margin-bottom: -2px; border-bottom: 2px solid transparent; color: var(--text-muted); font-weight: 700; text-decoration: none; }
.tabbar__tab svg { width: 18px; height: 18px; }
.tabbar__tab:hover { color: var(--blue); }
.tabbar__tab.active { color: var(--blue); border-bottom-color: var(--orange); }
.account-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 20px; align-items: start; }
.account-facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 12px; }
.account-facts dt { color: var(--text-muted); font-weight: 400; }
.account-facts dd { margin: 0; font-weight: 700; }

/* ---- Academic year ---- */
.year-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 8px; }
.year-current { font-size: 2rem; font-weight: 800; color: var(--blue); margin: 4px 0 8px; }
.section-title form { display: inline; margin: 0; }

/* ===== Data tables (design system v0.2 · admin tables D′۲ «فشرده»): column header once, compact rich rows,
   live search + header sort + collapsible groups (wwwroot/js/table-tools.js, Shared/TableTools.razor) ===== */
.dt-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.dt-search { position: relative; flex: 1 1 300px; max-width: 440px; margin: 0; }
.dt-search svg { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; width: 18px; height: 18px; color: var(--gray-600); pointer-events: none; }
.dt-search .form-control { height: 42px; border-radius: var(--r-pill); padding-inline-start: 42px; border-color: var(--border); box-shadow: var(--shadow-1); }
.dt-count { font-size: .85rem; color: var(--text-muted); white-space: nowrap; }
.dt-count b { color: var(--text); }
.dt-hint { margin-inline-start: auto; font-size: .78rem; color: var(--text-muted); }
.dt-tools .form-select { height: 42px; width: auto; min-width: 150px; border-radius: var(--r-pill); }
.dt-tools .dt-toggle { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-inline: 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-size: .84rem; font-weight: 700; }
.dt-tools .dt-toggle:hover { text-decoration: none; color: var(--heading); border-color: var(--gray-300); }
.dt-tools .dt-toggle.is-on { background: var(--tint-blue); color: var(--heading); border-color: transparent; }

.table-wrap.dt-wrap { max-height: calc(100vh - 230px); overflow: auto; }
.dtable thead th { position: sticky; top: 0; z-index: 2; height: 36px; font-size: .74rem; }
.panel .dtable thead th { height: 36px; font-size: .74rem; }
.dtable th[data-sort] { cursor: pointer; user-select: none; }
.dtable th[data-sort]:hover { color: var(--heading); }
.dtable th[data-sort]::after { content: "▲▼"; font-size: .55rem; letter-spacing: -1px; margin-inline-start: 6px; color: var(--gray-300); }
.dtable th.is-asc::after { content: "▲"; color: var(--brand-orange); }
.dtable th.is-desc::after { content: "▼"; color: var(--brand-orange); }
.dtable th.is-asc, .dtable th.is-desc { color: var(--heading); }
.dtable th:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.dtable td, .panel .dtable td { height: auto; padding-block: 6px; font-size: .85rem; }
.dtable tbody tr:not(.dt-group):nth-child(even) td { background: var(--surface-soft); }
.dtable tbody tr:not(.dt-group):hover td { background: var(--hl); }
.dtable .dt-group td { position: sticky; top: 36px; z-index: 1; background: var(--surface-sunk); padding: 4px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--line-soft); }
.dt-group__btn { border: 0; background: none; padding: 0; font: inherit; font-size: .76rem; font-weight: 800; color: var(--heading); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.dt-group__btn::before { content: ""; width: 6px; height: 6px; border-inline-end: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin-top: -3px; opacity: .6; transition: transform .15s; }
.dt-group.is-closed .dt-group__btn::before { transform: rotate(135deg); margin-top: 0; }
.dt-group__count { font-weight: 700; color: var(--text-muted); }
.dtable mark { background: var(--tint-peach); color: inherit; padding: 0 1px; border-radius: 3px; }
.dtable .dt-empty td { background: var(--surface) !important; }

.dt-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dt-av { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--av, var(--brand-blue)); color: #fff; font-weight: 900; font-size: .76rem; flex: none; line-height: 1; }
.dt-av.is-off { background: var(--gray-300); }
.dt-date { width: 40px; flex: none; border-radius: 10px; background: var(--tint-blue); text-align: center; line-height: 1.15; padding: 3px 0; }
.dt-date b { display: block; font-size: .9rem; font-weight: 900; color: var(--heading); }
.dt-date small { display: block; font-size: .6rem; color: var(--text-muted); }
.dt-date.is-past { background: var(--gray-100); }
.dt-date.is-past b { color: var(--text-muted); }
.dt-main { min-width: 0; line-height: 1.4; }
.dt-main > a, .dt-main > strong { display: block; font-weight: 800; color: var(--text); font-size: .86rem; }
.dt-main > a:hover { color: var(--brand-orange-dark); text-decoration: none; }
.dt-sub { display: block; font-size: .72rem; color: var(--text-muted); line-height: 1.45; }
.dt-two { line-height: 1.4; }
.dt-two > b { display: block; font-weight: 700; font-size: .82rem; }
.dt-ltr { direction: ltr; unicode-bidi: isolate; text-align: right; }
.dt-num { font-variant-numeric: tabular-nums; }
.dt-meter { height: 4px; max-width: 140px; border-radius: 999px; background: var(--gray-100); overflow: hidden; margin-top: 3px; }
.dt-meter i { display: block; height: 100%; background: var(--brand-blue); border-radius: inherit; }
.dt-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .78rem; white-space: nowrap; }
.dt-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dt-status.is-on { color: var(--green-text); }
.dt-status.is-off { color: var(--gray-500); }
.dt-status.is-warn { color: var(--warning-text); }
.dtable td.actions { text-align: end; }
.dtable .row-actions { justify-content: flex-end; }
@media (hover: hover) {
  .dtable .row-actions { opacity: 0; transition: opacity .12s; }
  .dtable tr:hover .row-actions, .dtable tr:focus-within .row-actions { opacity: 1; }
}
/* toggles and the lock button side by side so exam rows stay one line high */
.dtable .switch-stack { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.dtable .switch-stack .btn-sm { height: 26px; padding-inline: 8px; font-size: .74rem; }
.dtable .switch { font-size: .72rem; }
.dtable .switch__knob { width: 32px; height: 18px; }
.dtable .switch__knob::after { top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; }
.dtable .switch.on .switch__knob::after { transform: translateX(-14px); }

/* ===== Exam schools page (design/exam-schools-showcase.html, A): compact head, 3-state switch, bulk menu ===== */
.exam-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow-1); }
.exam-head__title { flex: 1 1 320px; min-width: 0; }
.exam-head__title h1 { margin: 0; font-size: 1.3rem; font-weight: 900; color: var(--heading); line-height: 1.4; }
.exam-head__title p { margin: 2px 0 0; font-size: .8rem; color: var(--text-muted); }
.exam-head__stats { display: flex; gap: 18px; padding-inline-start: 18px; border-inline-start: 1px solid var(--border); }
.exam-head__stats div { font-size: .72rem; color: var(--text-muted); line-height: 1.3; }
.exam-head__stats b { display: block; font-size: 1.3rem; font-weight: 900; color: var(--heading); font-variant-numeric: tabular-nums; }
.exam-head__status { display: flex; gap: 14px; flex-wrap: wrap; padding-inline-start: 18px; border-inline-start: 1px solid var(--border); }
.exam-head__actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dt-status.is-lock { color: var(--red); }
@media (max-width: 991.98px) { .exam-head__stats, .exam-head__status { padding-inline-start: 0; border-inline-start: 0; } }

.tri-form { margin: 0; }
.tri { display: inline-flex; border: 1px solid var(--gray-300); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); white-space: nowrap; }
.tri button { border: 0; background: none; height: 26px; padding: 0 10px; font: inherit; font-size: .72rem; font-weight: 700; color: var(--text-muted); cursor: pointer; }
.tri button + button { border-inline-start: 1px solid var(--border); }
.tri button:hover { background: var(--gray-100); color: var(--heading); }
.tri button.on { background: var(--tint-blue); color: var(--heading); }
.tri button.on.show { background: var(--success-bg); color: var(--green-text); }
.tri button.on.hide { background: var(--error-bg); color: var(--red); }
.tri button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
.tri__eff { font-weight: 500; opacity: .75; }

.dt-menu { position: relative; margin-inline-start: auto; }
.dt-menu > summary { list-style: none; cursor: pointer; user-select: none; }
.dt-menu > summary::-webkit-details-marker { display: none; }
.dt-menu > summary svg { width: 16px; height: 16px; }
.dt-menu[open] > summary { background: var(--tint-blue); color: var(--heading); border-color: transparent; }
.dt-menu__panel { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 10; width: 250px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 8px; }
.dt-menu__head { font-size: .7rem; font-weight: 800; color: var(--text-muted); padding: 6px 6px 4px; }
.dt-menu__row { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 4px 6px; margin: 0; }
.dt-menu__row form { margin: 0; }
.dt-menu__row button { height: 30px; padding-inline: 12px; border-radius: var(--r-pill); border: 1px solid var(--gray-300); background: var(--surface); font: inherit; font-size: .78rem; font-weight: 700; color: var(--heading); cursor: pointer; }
.dt-menu__row button:hover { background: var(--tint-blue); border-color: transparent; }
.dt-tools .dt-menu ~ .dt-hint { margin-inline-start: 0; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .panel { flex-direction: column; }
  .panel__sidebar { position: static; height: auto; width: auto; flex-basis: auto; border-radius: 0 0 var(--r-md) var(--r-md); }
  .sidenav { flex-direction: row; flex-wrap: wrap; padding: 8px; gap: 2px; }
  .sidenav__section, .sidebar__user, .sidebar__build, .sidebar-toggle { display: none; }
  .sidenav__link { border-inline-start: 0; padding: 8px 10px; font-size: .875rem; }
  .sidenav__sub { display: contents; }
  .sidenav__sublink { padding: 8px 10px; font-size: .82rem; }
  .sidenav__link.active { border-bottom: 3px solid var(--brand-orange); border-radius: 8px 8px 0 0; }
  .panel__content { padding: 16px; }
  .import-grid { grid-template-columns: 1fr; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .picker__grid { grid-template-columns: 1fr; }
  .year-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .exam-item { flex-direction: column; align-items: stretch; }
  .exam-item__side { justify-content: flex-start; }
}

/* ===== Log pages (admin/logs/*) ===== */
.subtabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.subtabs a { display: inline-flex; align-items: center; height: 34px; padding-inline: 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--link); font-weight: 700; font-size: .9rem; }
.subtabs a:hover { text-decoration: none; background: var(--tint-blue); }
.subtabs a.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.filters--logs .form-control--date { max-width: 150px; }
.filters--logs .form-control--short { max-width: 150px; }
.filters--logs .form-control--trace { max-width: 300px; font-family: var(--font-mono); font-size: .85rem; }
.filters--logs .form-control { max-width: 220px; }
.filters--logs .btn { margin-inline-start: 0; }
.table-logs td { font-size: .875rem; vertical-align: top; padding-block: var(--s-2); }
.table-logs .nowrap { white-space: nowrap; }
.code { font-family: var(--font-mono); font-size: .8rem; direction: ltr; unicode-bidi: isolate; display: inline-block; text-align: left; word-break: break-all; }
.log-message { max-width: 640px; word-break: break-word; }
.log-detail { margin-top: 4px; }
.log-detail summary { cursor: pointer; color: var(--link); font-size: .8rem; font-weight: 700; }
.log-detail__pre { margin: 6px 0 0; max-height: 320px; max-width: 720px; overflow: auto; padding: 8px 10px; background: var(--gray-100); border: 1px solid var(--border); border-radius: var(--r-sm); font-family: var(--font-mono); font-size: .75rem; line-height: 1.5; white-space: pre-wrap; word-break: break-all; text-align: left; }
.pager { display: inline-flex; gap: 4px; }

/* ===== Page help dialog (Shared/PageHelp.razor; docs/data-entry-rules.md §2) ===== */
/* a square with the question-mark only (2026-10-21), the size and shape of the print button; its name is the tooltip */
.help-launcher { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 8px; border: 1.5px solid var(--brand-blue); background: var(--surface); color: var(--link); cursor: pointer; }
.help-launcher.tip[data-tip] { cursor: pointer; }
.help-launcher.tip[data-tip]:focus-visible { border-radius: 8px; }
.help-launcher:hover { background: var(--tint-blue); }
.help-launcher:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-blue-light); }
.help-launcher svg { width: 18px; height: 18px; }

.help-dialog { width: min(980px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: var(--r-md); box-shadow: 0 20px 60px rgb(0 0 0 / .28); color: var(--text); background: var(--surface); direction: rtl; }
.help-dialog::backdrop { background: rgb(28 46 99 / .55); backdrop-filter: blur(2px); }
.help-dialog[open] { display: flex; flex-direction: column; }
.help-dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--brand-navy); color: #fff; }
.help-dialog__head h2 { margin: 0; font-size: 1.05rem; font-weight: 800; color: #fff; }
.help-dialog__close { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; cursor: pointer; }
.help-dialog__close:hover { background: rgb(255 255 255 / .22); }
.help-dialog__close svg { width: 18px; height: 18px; }
.help-dialog__body { overflow-y: auto; padding: 16px 20px 24px; max-height: calc(88vh - 116px); scroll-behavior: smooth; }
.help-dialog__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--border); background: var(--gray-100); font-size: .85rem; }
.help-lead { font-size: 1rem; line-height: 1.9; margin: 0 0 14px; color: var(--ink); }

.help-flow { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; }
.help-flow__step { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); font-size: .875rem; font-weight: 700; color: var(--text-muted); }
.help-flow__num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gray-100); color: var(--text-muted); font-size: .8rem; }
.help-flow__step.is-done { border-color: var(--brand-blue-light); background: var(--tint-blue); color: var(--link); }
.help-flow__step.is-done .help-flow__num { background: var(--brand-blue); color: #fff; }
.help-flow__step.is-current { border-color: var(--brand-orange); background: var(--tint-peach); color: var(--ink); }
.help-flow__step.is-current .help-flow__num { background: var(--brand-orange); color: #fff; }
.help-flow__here { font-size: .72rem; font-weight: 800; color: var(--brand-orange-dark); }

.help-tasks { margin-bottom: 16px; }
.help-tasks h3 { font-size: .95rem; font-weight: 800; color: var(--link); margin: 0 0 8px; }
.help-tasks__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.help-task { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--gray-100); color: var(--ink); font-weight: 700; font-size: .875rem; line-height: 1.5; }
.help-task:hover { text-decoration: none; border-color: var(--brand-blue); background: var(--tint-blue); color: var(--link); }
.help-task svg { width: 16px; height: 16px; flex: none; color: var(--brand-orange); }

.help-sticky { position: sticky; top: -16px; z-index: 2; background: var(--surface); padding: 8px 0 10px; margin: 0 0 8px; border-bottom: 1px solid var(--border); }
.help-sticky .form-control { height: 38px; }
.help-chips { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; margin-top: 8px; padding-bottom: 2px; scrollbar-width: thin; }
.help-chip { flex: none; display: inline-flex; align-items: center; height: 28px; padding-inline: 12px; border-radius: var(--r-pill); background: var(--tint-blue); color: var(--link); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.help-chip:hover { background: var(--brand-blue); color: #fff; text-decoration: none; }

.help-section { padding: 12px 0 6px; border-radius: var(--r-sm); }
.help-section.is-flash { animation: help-flash 1.2s ease-out; }
@keyframes help-flash { 0% { background: var(--tint-peach); } 100% { background: transparent; } }
.help-section h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 800; color: var(--heading); margin: 0 0 6px; }
.help-num { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-orange); color: #fff; font-size: .8rem; }
.help-where { margin: 0 0 8px; font-size: .82rem; color: var(--text-muted); }
.help-where span { font-weight: 800; color: var(--link); margin-inline-end: 4px; }
.help-items { list-style: none; padding: 0; margin: 0; }
.help-item { position: relative; padding: 8px 12px 8px 10px; border-inline-start: 3px solid var(--tint-blue); margin-bottom: 6px; line-height: 1.9; font-size: .9375rem; background: var(--surface); border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); }
.help-item > b { color: var(--heading); margin-inline-end: 6px; }
.help-item > b::after { content: " \2014"; color: var(--text-muted); font-weight: 400; }
.help-item .help-item__text { color: var(--ink); }
.help-item.is-important { border-inline-start-color: var(--red); background: var(--error-bg); }
.help-item.is-careful { border-inline-start-color: var(--brand-amber); background: var(--warning-bg); }
.help-item.is-relax { border-inline-start-color: var(--green); background: var(--success-bg); }
.help-badge { display: inline-block; padding: 0 8px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 800; line-height: 1.9; margin-inline-end: 6px; vertical-align: middle; }
.is-important .help-badge { background: var(--error-bg); color: var(--red); }
.is-careful .help-badge { background: var(--warning-bg); color: var(--warning-text); }
.is-relax .help-badge { background: var(--success-bg); color: var(--green-text); }
.help-cond { display: inline-block; padding: 0 8px; border-radius: var(--r-pill); background: var(--gray-100); color: var(--gray-600); font-size: .72rem; font-weight: 700; line-height: 1.9; margin-inline-end: 6px; vertical-align: middle; }
.help-empty { padding: 24px; text-align: center; color: var(--text-muted); }

@media (max-width: 575.98px) {
  .help-dialog { width: 100vw; max-width: 100vw; max-height: 100vh; height: 100vh; border-radius: 0; }
  .help-dialog__body { max-height: none; flex: 1; }
  .help-tasks__grid { grid-template-columns: 1fr; }
}

/* ===== Content management («مدیریت محتوا», 2026-10-12) ===== */
.content-thumb { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--border); }
.content-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-4); }
.content-photo { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; }
.content-photo.is-hidden .content-photo__img img { opacity: .45; }
.content-photo__img { position: relative; aspect-ratio: 16 / 9; background: var(--gray-100); }
.content-photo__img img { width: 100%; height: 100%; object-fit: cover; }
.content-photo__num { position: absolute; top: 8px; inset-inline-start: 8px; min-width: 28px; height: 28px; padding-inline: 8px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--brand-navy); color: #fff; font-weight: 800; font-size: .8rem; }
.content-photo__state { position: absolute; top: 8px; inset-inline-end: 8px; }
.content-photo__body { padding: var(--s-3); display: grid; gap: 4px; }
.content-photo__body .form-label { font-size: .8rem; margin: 4px 0 0; }
.content-photo__row { display: flex; align-items: center; gap: var(--s-2); margin-top: 6px; }
.content-photo__actions { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-2); }
.content-order { max-width: 76px; }
.content-grid td { vertical-align: middle; }
.content-grid .form-control-sm, .content-grid .form-select-sm { min-width: 90px; }
.content-grid__new td { background: var(--hl); }
.req-th::after { content: "*"; color: var(--red); font-weight: 800; margin-inline-start: .3em; }
.content-section { border: 1px solid var(--border); border-radius: var(--r-sm); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); background: var(--surface); }
.content-section--new { border-style: dashed; background: var(--hl); }
.content-section__head { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; margin-bottom: var(--s-2); }
.content-section__num { font-weight: 800; color: var(--heading); margin-inline-end: auto; }
.content-stat { display: grid; gap: 4px; }
.content-stat .form-control:first-child { font-weight: 800; font-size: 1.05rem; }
.content-grid .check-row { flex-wrap: nowrap; gap: 10px; height: auto; white-space: nowrap; }

/* ===== Advisor / teacher dashboard: exam strip (design/advisor-exam-strip-showcase.html, A) ===== */
.xstrip-wrap { margin-bottom: 24px; }
.xstrip-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.xstrip-head h2 { margin: 0; font-size: 1.15rem; font-weight: 900; color: var(--heading); }
.xstrip-head small { color: var(--text-muted); font-size: .8rem; }
.xstrip { display: flex; gap: 18px; overflow-x: auto; padding: 16px 4px 12px; scrollbar-width: thin; }
.xbox { position: relative; flex: 0 0 196px; display: flex; flex-direction: column; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-1); color: inherit; transition: transform .25s, box-shadow .25s, border-color .25s, opacity .25s; }
.xbox:hover { text-decoration: none; color: inherit; border-color: var(--gray-300); box-shadow: var(--shadow-2); }
/* connector to the previous exam (on the right): solid once this exam is held, dashed before */
.xbox + .xbox::before { content: ""; position: absolute; top: 40px; inset-inline-start: -19px; width: 18px; height: 3px; border-radius: 3px; background: linear-gradient(to left, var(--brand-navy), var(--brand-blue)); }
.xbox.is-next::before, .xbox.is-upcoming::before { background: repeating-linear-gradient(to left, var(--gray-300) 0 5px, transparent 5px 9px); }
.xbox__ok, .xbox__ok.tip[data-tip] { position: absolute; top: 10px; inset-inline-end: 10px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--success-bg); color: var(--green-text); }
.xbox__ok svg { width: 13px; height: 13px; stroke-width: 3; }
.xbox:has(.xbox__ok) .xbox__t { padding-inline-end: 24px; }
.xbox__t { font-weight: 800; font-size: .84rem; color: var(--heading); line-height: 1.5; }
.xbox__d { font-size: .72rem; color: var(--text-muted); }
.xbox__s { margin-top: 6px; }
.xbox__x { margin-top: 4px; font-size: .74rem; color: var(--text-muted); }
.xbox__x b { color: var(--text); font-weight: 800; }
.xbox.is-next, .xbox.is-upcoming { background: color-mix(in srgb, var(--surface-soft) 92%, transparent); border-style: dashed; box-shadow: none; }
.xbox.is-next .xbox__t, .xbox.is-upcoming .xbox__t { color: var(--gray-700); }
.xbox.is-sel { border-color: var(--brand-navy); box-shadow: 0 0 0 3px rgb(28 46 99 / .12), var(--shadow-2); }
.xbox.is-latest::after { content: attr(data-tag); position: absolute; top: -11px; inset-inline-start: 12px; height: 20px; padding: 0 8px; border-radius: var(--r-pill); background: var(--brand-orange); color: var(--accent-contrast); font-size: .66rem; font-weight: 800; line-height: 20px; transition: opacity .2s; }
.xbox:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
/* stepping animation (js/site.js): boxes ahead of the step fade, the step box lifts with an orange ring */
.xstrip-wrap.is-playing .xbox.is-sel { border-color: var(--border); box-shadow: var(--shadow-1); }
.xstrip-wrap.is-playing .xbox.is-latest::after { opacity: 0; }
.xstrip-wrap.is-playing .xbox.is-ahead { opacity: .35; transform: scale(.96); }
.xstrip-wrap.is-playing .xbox.is-ahead::before { background: repeating-linear-gradient(to left, var(--gray-300) 0 5px, transparent 5px 9px); }
.xstrip-wrap.is-playing .xbox.is-step { border-color: var(--brand-orange); box-shadow: 0 0 0 4px rgb(244 123 32 / .2), var(--shadow-2); transform: translateY(-4px); }
.xstrip-wrap.is-playing .xdetail { opacity: 0; transform: translateY(8px); }
.chip.is-ok { background: var(--success-bg); color: var(--green-text); }
.chip.is-warn { background: var(--warning-bg); color: var(--warning-text); }
.chip.is-info { background: var(--tint-blue); color: var(--link); }
.chip.is-mut { background: var(--gray-100); color: var(--gray-600); }
.is-up { color: var(--green-text); font-weight: 800; }
.is-down { color: var(--red); font-weight: 800; }

.xdetail { margin-top: 6px; padding: 18px 20px 20px; transition: opacity .35s, transform .35s; }
.xdetail__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); margin-bottom: 14px; }
.panel .xdetail__head h3 { margin: 0 0 0 4px; padding: 0; border: 0; font-size: 1.15rem; font-weight: 900; color: var(--heading); }
/* track switch (segmented tabs) at the end of the summary head */
.xseg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--gray-100); border: 1px solid var(--border); }
.xseg__tab { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 14px; border-radius: var(--r-pill); font-size: .82rem; font-weight: 700; color: var(--gray-600); transition: background .15s, color .15s, box-shadow .15s; }
.xseg__tab i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray-300); }
.xseg__tab.math i { background: var(--track-math); }
.xseg__tab.exp i { background: var(--track-exp); }
.xseg__tab.hum i { background: var(--track-hum); }
.xseg__tab:hover { text-decoration: none; color: var(--heading); background: var(--surface); }
.xseg__tab.is-on { background: var(--surface); color: var(--heading); box-shadow: 0 1px 3px rgb(28 46 99 / .16); }
.xseg__tab:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.xdetail__go { margin-inline-start: auto; }
.xkp { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.xkp > div { background: var(--gray-100); border-radius: var(--r-md); padding: 10px 14px; font-size: .78rem; color: var(--text-muted); line-height: 1.5; }
.xkp b { display: block; font-size: 1.45rem; font-weight: 900; color: var(--heading); line-height: 1.3; font-variant-numeric: tabular-nums; }
.xkp b small { font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.xkp em { font-style: normal; font-size: .76rem; }
.xdetail__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px 36px; }
.xdetail h4 { font-size: .9rem; font-weight: 800; color: var(--heading); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.xdetail h4 small { font-weight: 600; color: var(--text-muted); font-size: .74rem; }
.xsbj { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
/* a row: name, the school's bar with everyone's mark, the two percents; a subject, part or book folds open (details) */
.xsbj__row { display: grid; grid-template-columns: minmax(110px, 170px) 1fr 120px; align-items: center; gap: 10px; font-size: .82rem; }
summary.xsbj__row { cursor: pointer; list-style: none; border-radius: 6px; }
summary.xsbj__row::-webkit-details-marker { display: none; }
summary.xsbj__row:hover { background: var(--surface-sunk); }
.xsbj__nm { display: flex; align-items: center; gap: 6px; min-width: 0; }
.xsbj__chev { flex: none; width: 14px; height: 14px; display: grid; place-items: center; }
.xsbj__chev::before { content: ""; width: 6px; height: 6px; border: solid var(--text-muted); border-width: 0 2px 2px 0; transform: rotate(135deg); transition: transform .2s; }
.xsbj__chev.is-leaf::before { content: none; }
.xsbj__d[open] > summary .xsbj__chev::before { transform: rotate(45deg); }
.xsbj--in { margin: 6px 0 4px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line-soft); gap: 5px; }
.xsbj--in .xsbj__row { font-size: .78rem; }
.xsbj__t { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; color: var(--heading); }
.xsbj__t > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xsbj--in .xsbj--in .xsbj__t { font-weight: 500; color: var(--text); }
.xsbj__tr i, .xsbj__tr u { transition: width .3s ease; }
.xsbj__name { color: var(--heading); font-weight: 700; text-decoration: underline dotted var(--gray-300); text-underline-offset: 4px; }
.xsbj__name:hover { color: var(--brand-orange-dark); }
.xsbj__tr { position: relative; height: 10px; border-radius: var(--r-pill); background: var(--gray-100); }
.xsbj__tr i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-blue); }
.xsbj__tr u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--brand-orange); border-radius: 2px; }
.xsbj__v { font-size: .76rem; color: var(--text-muted); text-align: end; white-space: nowrap; }
.xsbj__v b { color: var(--text); }
.xsbj__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .72rem; color: var(--text-muted); margin-top: 8px; }
.xsbj__legend > span:nth-child(3) { flex-basis: 100%; }
.xsbj__legend span { display: inline-flex; align-items: center; gap: 5px; }
.xsbj__legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--brand-blue); }
.xsbj__legend u { width: 2px; height: 12px; background: var(--brand-orange); }
.xcls__title { margin-top: 30px !important; }
.xcls { box-shadow: none; }
.xcls .table-brand th { height: 34px; font-size: .74rem; }
.xcls .table-brand td { height: 38px; font-size: .82rem; white-space: nowrap; }
.xcls .table-brand td small { font-size: .72rem; margin-inline-start: 4px; }
.xcls__pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.xstu { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 6px; }
.xstu li { display: flex; align-items: center; gap: 10px; font-size: .82rem; padding: 6px 10px; border-radius: var(--r-sm); background: var(--gray-100); }
.xstu li b { font-weight: 800; }
.xstu li small { color: var(--text-muted); font-size: .74rem; }
.xstu li.is-empty { color: var(--text-muted); }
.xstu__v { margin-inline-start: auto; font-size: .76rem; white-space: nowrap; cursor: help; font-variant-numeric: tabular-nums; }
.xnote { display: flex; gap: 14px; align-items: center; background: var(--gray-100); border-radius: var(--r-md); padding: 14px 16px; font-size: .88rem; }
.xnote > svg { width: 30px; height: 30px; color: var(--link); flex: none; }
.xnote .btn { margin-inline-start: auto; }
/* second row of the exam detail (client feedback 2026-11-03): subjects by rank or percent, the viewer's exam notes; then the top 10 schools */
.xdetail__grid--b { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--gray-100); }
.xbars__h { justify-content: space-between; }
.xbars__seg { margin-inline-start: auto; }
.xbars { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.xbars li { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 104px; align-items: center; gap: 10px; font-size: .82rem; }
.xbars__n { font-weight: 700; color: var(--heading); }
.xbars__t { position: relative; height: 12px; border-radius: var(--r-pill); background: var(--gray-100); }
.xbars__t i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-blue); transition: width .3s ease; }
.xbars__t u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--brand-orange); border-radius: 2px; }
.xbars__v { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; font-variant-numeric: tabular-nums; }
.xbars__v b { font-size: .8rem; color: var(--text); white-space: nowrap; }
.xbars__v small { font-size: .7rem; color: var(--text-muted); }
.xbars__note { font-size: .72rem; color: var(--text-muted); margin: 8px 0 0; }
.xnotes .form-control { font-size: .84rem; }
.xnotes .form-actions { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.xnotes__empty { font-size: .8rem; color: var(--text-muted); margin: 10px 0 0; }
.xnotes__list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.xnotes__list li { background: var(--gray-100); border-radius: var(--r-sm); padding: 8px 12px; font-size: .82rem; }
.xnotes__list p { margin: 4px 0 0; white-space: pre-line; }
.xnotes__meta { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--text-muted); }
.xnotes__acts { margin-inline-start: auto; display: inline-flex; gap: 4px; }
.xnotes__acts form { display: inline; }
.xtop tr.is-me td { background: var(--surface-sunk); font-weight: 800; }
.xtop__sep td { text-align: center; color: var(--text-muted); letter-spacing: .3em; height: 26px !important; }
.xreps { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--gray-100); }
.xreps__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.xrep { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: inherit; transition: border-color .15s, box-shadow .15s; }
.xrep:hover { text-decoration: none; color: inherit; border-color: var(--brand-orange); box-shadow: var(--shadow-2); }
.xrep b { display: flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--heading); }
.xrep b svg { width: 17px; height: 17px; color: var(--link); }
.xrep small { font-size: .72rem; color: var(--text-muted); line-height: 1.5; }
.xrep.is-off { opacity: .45; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .xbox, .xdetail { transition: none; } }
@media (max-width: 991.98px) {
  .xkp { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xdetail__grid { grid-template-columns: 1fr; }
  .xreps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xsbj li { grid-template-columns: 90px 1fr 100px; }
}

/* ===== Tooltip: <x class="tip" data-tip="…"> shows a navy bubble above on hover / keyboard focus (replaces title=) ===== */
.tip[data-tip] { position: relative; cursor: help; }
/* question difficulty icon (Components/Shared/LevelIcon.razor, docs/design-system.md §6.7) */
.lvl { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; vertical-align: middle; }
.lvl__i { width: 19px; height: 14px; flex: none; }
.lvl__i rect { fill: var(--gray-300); }
.lvl--easy .lvl__i rect.on { fill: var(--green); }
.lvl--medium .lvl__i rect.on { fill: var(--brand-amber); }
.lvl--hard .lvl__i rect.on { fill: var(--red); }
.lvl__t { font-weight: 700; }
thead .lvl__i rect { fill: rgb(255 255 255 / .35); }
.qtip__h .lvl { font-size: .72rem; color: var(--text-muted); }

/* rich hover cards (js/site.js initRichTips): options table, verdicts with what to do */
.htip { position: fixed; z-index: 1085; width: 300px; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 34px rgb(28 46 99 / .18); color: var(--text); font-size: .78rem; line-height: 1.7; direction: rtl; pointer-events: none; }
.htip__h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.htip__h b { font-size: .86rem; font-weight: 900; color: var(--heading); margin-inline-end: auto; }
.htip__tag { flex: none; height: 22px; padding: 0 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.htip__tag.is-bad { background: var(--error-bg); color: var(--red); }
.htip__tag.is-warn { background: var(--warning-bg); color: var(--warning-text); }
.htip__tag.is-good { background: var(--success-bg); color: var(--green-text); }
.htip__tag.is-info { background: var(--tint-blue); color: var(--link); }
.htip__opts { display: grid; gap: 4px; }
.htip__row { display: grid; grid-template-columns: 92px 1fr 1fr; gap: 8px; align-items: center; padding: 2px 4px; border-radius: 6px; }
.htip__opts.is-all .htip__row { grid-template-columns: 92px 1fr; }
.htip__hd { font-size: .68rem; font-weight: 800; color: var(--text-muted); padding-bottom: 0; }
.htip__row.is-k { background: var(--success-bg); }
.htip__row.is-t { background: var(--hl-strong); }
.htip__l { font-weight: 800; color: var(--heading); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.htip__l em { font-style: normal; font-size: .62rem; font-weight: 800; padding: 0 5px; border-radius: 5px; }
.htip__row.is-k .htip__l em { background: var(--surface); color: var(--green-text); }
.htip__row.is-t .htip__l em { background: var(--surface); color: var(--perf-2-text); }
.htip__row.is-bl .htip__l { color: var(--text-muted); font-weight: 700; }
.htip__bar { display: grid; grid-template-columns: 1fr 44px; gap: 6px; align-items: center; }
.htip__bar i { position: relative; height: 7px; border-radius: var(--r-pill); background: var(--gray-100); overflow: hidden; }
.htip__bar u { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-orange); }
.htip__bar.is-a u { background: var(--gray-500); }
.htip__row.is-k .htip__bar u { background: var(--green); }
.htip__bar b { font-size: .72rem; font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }
.htip__note, .htip__todo, .htip__p, .htip__foot { margin: 6px 0 0; }
.htip__note { font-size: .74rem; color: var(--mark-trap-text); background: var(--hl); border-radius: 8px; padding: 5px 8px; }
.htip__todo { font-weight: 700; color: var(--heading); }
.htip__todo::before { content: "چه کنیم: "; color: var(--text-muted); font-weight: 800; }
.htip__foot { font-size: .7rem; color: var(--text-muted); border-top: 1px solid var(--line-soft); padding-top: 6px; }
/* «people»: students below a line, weakest first (GroupTopics.razor) */
.htip:has(.htip__ppl) { width: 340px; }
.htip__ppl { display: grid; gap: 3px; }
.htip__pp { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: center; padding: 2px 4px; border-radius: 6px; }
.htip__pp:nth-child(odd) { background: var(--surface-sunk); }
.htip__pn { min-width: 0; font-weight: 800; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htip__pn b { font-weight: 800; }
.htip__pn small { display: inline-block; margin-inline-start: 2px; font-weight: 500; font-size: .66rem; color: var(--text-muted); }
.htip__bar.is-low u { background: var(--red); }
.htip__more { margin: 6px 0 0; font-size: .72rem; font-weight: 700; color: var(--text-muted); text-align: center; }
[data-htip] { cursor: help; }

/* question card on answer cells (js/site.js initQuestionTips) and its image dialog */
.qtip { position: fixed; z-index: 1080; width: 270px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 14px 34px rgb(28 46 99 / .18); color: var(--text); font-size: .8rem; line-height: 1.7; direction: rtl; }
.qtip__h { display: flex; align-items: center; gap: 6px; }
.qtip__h b { font-size: .95rem; font-weight: 900; color: var(--heading); margin-inline-end: auto; }
.qtip__o, .qtip__lv { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: .7rem; font-weight: 800; }
.qtip__o.is-c { background: var(--success-bg); color: var(--green-text); }
.qtip__o.is-w { background: var(--error-bg); color: var(--red); }
.qtip__o.is-b, .qtip__o.is-v { background: var(--gray-100); color: var(--text-muted); }
.qtip__lv { background: var(--tint-blue); color: var(--link); }
.qtip__sub { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.qtip__ans { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 6px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); font-size: .76rem; color: var(--text-muted); }
.qtip__opt { display: inline-flex; align-items: center; justify-content: center; height: 24px; padding: 0 9px; border-radius: 7px; font-weight: 800; font-size: .74rem; }
.qtip__opt.is-me { background: var(--error-bg); color: var(--red); }
.qtip__opt.is-k { background: var(--success-bg); color: var(--green-text); }
.qtip__opt.is-none { background: var(--gray-100); color: var(--text-muted); }
.qtip__ans span:nth-child(3) { text-align: end; }
.qtip__all { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; margin-top: 8px; font-size: .76rem; color: var(--text-muted); }
.qtip__all i { position: relative; height: 7px; border-radius: var(--r-pill); background: var(--gray-100); overflow: hidden; }
.qtip__all u { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: var(--r-pill); background: var(--brand-blue); }
.qtip__all b { color: var(--heading); font-weight: 800; font-variant-numeric: tabular-nums; }
.qtip__all.is-grp u { background: var(--brand-orange); }
.qtip__ref { margin-top: 8px; padding: 6px 9px; border-radius: var(--r-sm); background: var(--gray-100); font-size: .74rem; color: var(--text); }
.qtip__ref::before { content: "کتاب: "; color: var(--text-muted); font-weight: 700; }
.qtip__go { display: flex; width: 100%; justify-content: center; align-items: center; gap: 6px; height: 34px; margin-top: 10px; border: 0; border-radius: var(--r-pill); background: var(--brand-navy); color: #fff; font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer; }
.qtip__go:hover { background: var(--brand-blue); }
.qtip__none { margin-top: 10px; font-size: .72rem; color: var(--text-muted); }
[data-qtip] { cursor: pointer; }
[data-qtip]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
.qdlg { width: min(1180px, 94vw); max-height: 90vh; padding: 0; border: 0; border-radius: var(--r-md); box-shadow: 0 20px 60px rgb(0 0 0 / .28); color: var(--text); background: var(--surface); direction: rtl; }
.qdlg::backdrop { background: rgb(20 27 52 / .55); }
.qdlg__h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--border); background: var(--surface); }
.qdlg__h > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.qdlg__h b { font-size: 1.05rem; font-weight: 900; color: var(--heading); }
.qdlg__h small { color: var(--text-muted); font-size: .76rem; }
.qdlg__k { font-size: .8rem; font-weight: 700; color: var(--text); }
.qdlg__x { width: 34px; height: 34px; border: 1px solid var(--gray-300); border-radius: 50%; background: var(--surface); font-size: 1.2rem; line-height: 1; color: var(--text-muted); cursor: pointer; }
.qdlg__x:hover { color: var(--heading); border-color: var(--brand-navy); }
.qdlg__b { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; padding: 16px 18px; align-items: start; }
.qdlg__b figure { margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-soft); }
.qdlg__b figcaption { font-size: .8rem; font-weight: 800; color: var(--heading); margin-bottom: 6px; }
.qdlg__b img { display: block; max-width: 100%; height: auto; margin-inline: auto; border-radius: 6px; background: var(--surface); }
.qdlg__f { padding: 0 18px 16px; font-size: .8rem; color: var(--text-muted); }
@media (max-width: 767.98px) { .qdlg__b { grid-template-columns: 1fr; } }
/* floating tooltip of dense grids (js/site.js initFloatTips): same look as .tip, follows the pointer */
.ftip { position: fixed; z-index: 1080; max-width: 280px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--brand-navy); color: #fff; font-size: .74rem; font-weight: 600; line-height: 1.7; white-space: pre-line; direction: rtl; text-align: start; box-shadow: var(--shadow-2); pointer-events: none; }
/* a tooltip on something clickable keeps the hand cursor */
a.tip[data-tip], button.tip[data-tip] { cursor: pointer; }
.tip[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); inset-inline-end: 50%; transform: translateX(-50%) translateY(4px); z-index: 30; width: max-content; max-width: 260px; padding: 6px 10px; border-radius: var(--r-sm); background: var(--brand-navy); color: #fff; font-size: .74rem; font-weight: 600; line-height: 1.6; white-space: normal; text-align: start; direction: rtl; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, transform .15s, visibility .15s; }
.tip[data-tip]::before { content: ""; position: absolute; bottom: calc(100% + 2px); inset-inline-end: 50%; transform: translateX(-50%); z-index: 30; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--brand-navy); opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s; }
.tip[data-tip]:hover::after, .tip[data-tip]:focus-visible::after { opacity: 1; visibility: visible; transform: translateX(-50%); }
.tip[data-tip]:hover::before, .tip[data-tip]:focus-visible::before { opacity: 1; visibility: visible; }
.tip[data-tip]:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 4px; }
/* below the anchor, for spots near the top of a scroll box (exam strip) */
.tip--below[data-tip]::after { bottom: auto; top: calc(100% + 8px); inset-inline-end: 0; transform: translateY(-4px); }
.tip--below[data-tip]:hover::after, .tip--below[data-tip]:focus-visible::after { transform: none; }
.tip--below[data-tip]::before { bottom: auto; top: calc(100% + 2px); inset-inline-end: 5px; transform: none; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--brand-navy); }
@media (prefers-reduced-motion: reduce) { .tip[data-tip]::after, .tip[data-tip]::before { transition: none; } }

/* ===== Info tooltip (Shared/InfoTip.razor): «i» icon with a white card of rich text, on hover / focus / tap ===== */
.infotip { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-inline-start: 6px; vertical-align: -3px; border-radius: 50%; cursor: help; color: currentColor; opacity: .8; transition: opacity .15s; }
.infotip > svg { width: 16px; height: 16px; }
.infotip:hover, .infotip:focus, .infotip:focus-within { opacity: 1; outline: none; }
.infotip:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }
.infotip__body { position: absolute; top: calc(100% + 10px); inset-inline-end: -10px; z-index: 40; display: block; width: 300px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: 0 14px 40px rgb(28 46 99 / .22); font-size: .8rem; font-weight: 400; line-height: 1.8; text-align: start; white-space: normal; direction: rtl; opacity: 0; visibility: hidden; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s, visibility .15s; }
.infotip__body::before { content: ""; position: absolute; top: -6px; inset-inline-end: 14px; width: 10px; height: 10px; background: var(--surface); border-top: 1px solid var(--border); border-inline-start: 1px solid var(--border); transform: rotate(45deg); }
.infotip:hover .infotip__body, .infotip:focus .infotip__body, .infotip:focus-within .infotip__body { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.infotip--start .infotip__body { inset-inline-end: auto; inset-inline-start: -10px; }
.infotip--start .infotip__body::before { inset-inline-end: auto; inset-inline-start: 14px; }
.infotip__t { display: block; font-size: .88rem; font-weight: 800; color: var(--heading); margin-bottom: 4px; }
.infotip__p { display: block; color: var(--gray-600); margin-bottom: 6px; }
.infotip__li { display: block; position: relative; padding-inline-start: 14px; }
.infotip__li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-orange); }
.infotip__li b { color: var(--heading); font-weight: 700; }
.infotip__ex { display: grid; gap: 2px; margin-top: 8px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--gray-100); font-variant-numeric: tabular-nums; }
.infotip__ex i { font-style: normal; color: var(--gray-600); }
.infotip__ex b { color: var(--heading); }
.infotip__ex b.is-down { color: var(--red); }
/* report tables: the header cell holding a tooltip sits above its sticky neighbours */
table.rp-t th:has(.infotip) { z-index: 4; }
@media (prefers-reduced-motion: reduce) { .infotip__body { transition: none; } }

/* ---- Light / dark switch at the foot of the sidebar (Layout/ThemeSwitch.razor) ---- */
.theme-sw { display: flex; gap: 2px; margin: 10px 12px 12px; padding: 3px; border-radius: var(--r-pill); background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .12); }
.theme-sw button { flex: 1; display: inline-flex; gap: 4px; align-items: center; justify-content: center; height: 28px; padding: 0 6px; border: 0; border-radius: var(--r-pill); background: transparent; color: rgb(255 255 255 / .72); font: inherit; font-size: .74rem; font-weight: 700; cursor: pointer; }
.theme-sw button:hover { color: #fff; }
.theme-sw button.on { background: rgb(255 255 255 / .16); color: #fff; }
.theme-sw button:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 1px; }
.theme-sw svg { width: 15px; height: 15px; flex: none; }
@media (min-width: 992px) {
  .sidebar-collapsed .theme-sw { flex-direction: column; margin-inline: 12px; border-radius: 14px; }
  .sidebar-collapsed .theme-sw span { display: none; }
}

/* Textbooks (/admin/textbooks) and the question → textbook links of an exam (/admin/exams/{id}/topics). */
.tb-cover { width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; background: var(--tint-blue); color: var(--heading); flex: none; }
.tb-cover svg { width: 18px; height: 18px; }
.tb-major { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: var(--r-pill); margin-inline-end: 4px; }
.tb-major.math { background: var(--track-math-tint); color: var(--track-math); }
.tb-major.exp { background: var(--track-exp-tint); color: var(--track-exp); }
.tb-major.hum { background: var(--track-hum-tint); color: var(--track-hum); }
.tb-toc { display: grid; gap: 12px; }
.tb-ch { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.tb-ch__h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface-soft); border-bottom: 1px solid var(--line-soft); }
.tb-ch__h h2 { margin: 0; flex: 1; font-size: 1rem; font-weight: 900; color: var(--heading); }
.tb-ch:not(:has(.tb-list)) .tb-ch__h { border-bottom: 0; }
.tb-list { list-style: none; margin: 0; padding: 4px 0; }
.tb-row { display: flex; align-items: baseline; gap: 12px; padding: 6px 16px; font-size: .88rem; }
.tb-row + .tb-row { border-top: 1px solid var(--line-soft); }
.tb-row__t { flex: 1; min-width: 0; color: var(--text); font-weight: 700; }
.tb-row.d2 { padding-inline-start: 40px; font-size: .84rem; }
.tb-row.d3 { padding-inline-start: 64px; font-size: .82rem; }
.tb-row.is-head .tb-row__t { font-weight: 500; color: var(--text-muted); }
.tb-pages { font-size: .74rem; color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tb-q { min-width: 62px; text-align: center; font-size: .72rem; font-weight: 800; color: var(--heading); background: var(--tint-blue); border-radius: var(--r-pill); padding: 1px 8px; white-space: nowrap; }
.tb-q.is-zero { background: none; color: var(--gray-500); font-weight: 500; }
.tb-matter { display: flex; justify-content: space-between; gap: 12px; padding: 6px 16px; font-size: .84rem; color: var(--text-muted); }

.qt-flag { display: inline-block; margin-top: 2px; font-size: .72rem; font-weight: 800; text-decoration: none; }
.qt-flag.is-bad { color: var(--red); }
.qt-flag.is-ok { color: var(--green-text); font-weight: 600; }
.qt-flag:hover { text-decoration: underline; }
.exam-head__stats .qt-bad, .exam-head__stats .qt-bad b { color: var(--red); }
.sp-tabs a small.qt-tab-bad { background: var(--error-bg); color: var(--red); }
.qt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qt-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.qt-filter .rp-chip { padding: 3px 12px; font-size: .8rem; }
.qt-filter .qt-chip-bad:not(.on) { color: var(--red); }
.qt-filter .qt-chip-bad.on { background: var(--red); border-color: var(--red); }
.qt-meter { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--text-muted); }
.qt-meter i { position: relative; display: block; width: 160px; height: 8px; border-radius: var(--r-pill); background: var(--gray-200); overflow: hidden; }
.qt-meter u { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--green); border-radius: var(--r-pill); }
.qt-table td { vertical-align: middle; }
.qt-n { display: inline-grid; place-items: center; min-width: 34px; height: 28px; padding: 0 6px; border-radius: var(--r-sm); background: var(--tint-blue); color: var(--heading); font-weight: 900; font-variant-numeric: tabular-nums; }
.qt-miss .qt-n { background: var(--error-bg); color: var(--red); }
.qt-subj { font-size: .82rem; white-space: nowrap; }
.qt-ref { font-size: .78rem; color: var(--text-muted); max-width: 240px; }
.qt-place { font-size: .84rem; min-width: 260px; }
.qt-path b { color: var(--heading); }
.qt-sep { margin: 0 6px; color: var(--gray-500); }
.qt-src { display: inline-block; margin-inline-start: 8px; font-size: .68rem; font-weight: 800; padding: 0 8px; border-radius: var(--r-pill); vertical-align: 1px; }
.qt-src.is-auto { background: var(--gray-100); color: var(--text-muted); }
.qt-src.is-manual { background: var(--warning-bg); color: var(--warning-text); }
.qt-pp { display: block; font-size: .7rem; color: var(--text-muted); }
.qt-problem { color: var(--red); font-weight: 700; font-size: .8rem; }
.qt-problem::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-inline-end: 6px; vertical-align: 1px; }
tr.qt-on > td { background: var(--surface-soft); }
tr.qt-edit > td { background: var(--surface-soft); padding: 0 12px 14px; border-top: 0; }
.qt-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-1); }
.qt-ed:not(:has(.qt-ed__img)) { grid-template-columns: minmax(0, 1fr); }
.qt-ed__img { margin: 0; position: sticky; top: 12px; }
.qt-ed__img img { display: block; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--r-sm); }
.qt-ed__img figcaption { margin-top: 6px; font-size: .78rem; }
.qt-ed__ref { display: grid; gap: 2px; margin: 0 0 10px; font-size: .8rem; color: var(--text-muted); }
.qt-ed__ref b { color: var(--heading); font-size: .92rem; }
.qt-ed__book { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; margin-bottom: 10px; }
.qt-ed__book .form-label { margin: 0; }
.qt-ed fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.qt-ed legend { font-size: .9rem; margin-bottom: 6px; }
.qt-ed legend small { font-weight: 500; color: var(--text-muted); font-size: .74rem; margin-inline-start: 6px; }
.qt-pick { position: relative; max-height: 360px; overflow: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.qt-opt { display: flex; align-items: baseline; gap: 8px; padding: 6px 12px; margin: 0; cursor: pointer; font-size: .86rem; border-bottom: 1px solid var(--line-soft); }
.qt-opt:last-child { border-bottom: 0; }
.qt-opt:hover { background: var(--surface-soft); }
.qt-opt:has(input:checked) { background: var(--tint-blue); }
.qt-opt input { flex: none; accent-color: var(--brand-navy); }
.qt-opt.d0 { font-weight: 900; color: var(--heading); }
.qt-opt.d1 { padding-inline-start: 30px; font-weight: 700; }
.qt-opt.d2 { padding-inline-start: 52px; }
.qt-opt.d3 { padding-inline-start: 72px; }
.qt-opt.is-head .qt-opt__t { color: var(--text-muted); font-weight: 500; }
.qt-opt__t { flex: 1; min-width: 0; }
.qt-opt__p { font-size: .72rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.qt-opt__p em { font-style: normal; font-weight: 800; color: var(--warning-text); background: var(--warning-bg); border-radius: var(--r-pill); padding: 0 6px; margin-inline-start: 6px; }
.qt-opt.is-hit { box-shadow: inset -3px 0 0 var(--brand-orange); }
.qt-ed__actions { display: flex; gap: 8px; margin-top: 10px; }
.qt-ed__undo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.qt-ed__undo .form-text { margin: 0; font-size: .74rem; }
@media (max-width: 991.98px) { .qt-ed { grid-template-columns: minmax(0, 1fr); } .qt-ed__img { position: static; } .qt-ref { max-width: none; } }
/* On a phone the table scrolls sideways; keep the editor inside the visible width. */
@media (max-width: 767.98px) { .qt-ed { position: sticky; right: 0; width: calc(100vw - 56px); padding: 12px; } .qt-ed__book { grid-template-columns: minmax(0, 1fr); } }

/* Loading while the next page comes (js/site.js busyStart): a thin bar at the top, a spinner on the control that was
   used, the rest of the content dimmed and not clickable; shown only after 150 ms so fast loads do not flicker */
.nav-busy { position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 2000; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity .2s; }
.nav-busy::before { content: ""; position: absolute; inset-block: 0; width: 35%; border-radius: 2px; background: var(--brand-orange); animation: nav-busy 1.1s ease-in-out infinite; }
html.is-loading .nav-busy { opacity: 1; }
@keyframes nav-busy { from { right: -35%; } to { right: 100%; } }
.busy-spin { display: none; flex: none; width: 12px; height: 12px; margin-inline: 6px 0; border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%; vertical-align: -2px; animation: busy-spin .7s linear infinite; }
html.is-loading .busy-spin { display: inline-block; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
html.is-loading { cursor: progress; }
html.is-loading .panel__content > :not(:has(.is-busy)) { opacity: .6; pointer-events: none; transition: opacity .2s; }
html.is-loading .is-busy { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .nav-busy::before { animation-duration: 2.5s; } .busy-spin { animation-duration: 1.6s; } }

/* «یادداشت‌های من» (Pages/Advisor/Notes.razor, 2026-11-24) */
.mn-chips { margin-bottom: 14px; }
.mn-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mn-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 16px; }
.mn-item__h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .86rem; }
.mn-item__h b { color: var(--heading); }
.mn-item__h small { color: var(--text-muted); font-size: .74rem; }
.mn-item__go { margin-inline-start: auto; font-size: .78rem; }
.mn-item p { margin: 6px 0 0; white-space: pre-line; font-size: .88rem; }
