/* ──────────────────────────────────────────────────────────
   سامانه رویداد برنامک‌سازی ایتا — سیستم طراحی مشترک
   Layout: RTL، پنل‌ها روی زمینه خنثی سرد، نارنجی برند فقط برای اقدام اصلی
   ────────────────────────────────────────────────────────── */
@font-face {
  font-family: "YekanBakh";
  src: url("../fonts/YekanBakhFaNum-Regular.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* رنگ */
  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --ink: #0b0d1a;
  --ink-2: #4a4f63;
  --ink-3: #80859a;
  --line: rgba(14, 18, 44, 0.09);
  --line-strong: rgba(14, 18, 44, 0.16);
  --brand: #f57200;
  --brand-strong: #db5f00;
  --brand-soft: #fff1e4;
  --brand-ink: #9a3f00;
  --sun: #ffc83a;
  --night: #0f1120;
  --night-2: #181b2e;

  /* معنایی */
  --ok: #138a52;      --ok-soft: #e4f6ec;
  --warn: #a86400;    --warn-soft: #fff4dc;
  --info: #2459c9;    --info-soft: #e7eefc;
  --danger: #c53030;  --danger-soft: #fdeaea;
  --muted-soft: #eef0f4;

  /* تایپوگرافی */
  --font: "YekanBakh", Tahoma, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(11, 13, 26, 0.04), 0 8px 24px rgba(11, 13, 26, 0.05);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.icon { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.muted { color: var(--ink-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ─── دکمه‌ها ───────────────────────────────────────────── */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background .18s, border-color .18s, color .18s, transform .18s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #23263a; }
.btn--ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink-3); }
.btn--soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn--soft:hover { background: #ffe4cc; }
.btn--danger { background: var(--surface); border-color: #f2c4c4; color: var(--danger); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { --h: 36px; padding: 0 14px; font-size: var(--fs-xs); }
.btn--lg { --h: 54px; padding: 0 28px; font-size: var(--fs-md); }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading { opacity: .65; pointer-events: none; }
.btn.is-loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-inline-end-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── فرم ───────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-size: var(--fs-sm); font-weight: 700; }
.field .hint { font-size: var(--fs-xs); color: var(--ink-3); }
.optional { font-weight: 400; color: var(--ink-3); font-size: var(--fs-xs); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(245, 114, 0, .14); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); color: var(--ink-2); }
.input--ltr { direction: ltr; text-align: right; }
.field-error { color: var(--danger); font-size: var(--fs-xs); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip-check span {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: var(--fs-sm);
  background: var(--surface); transition: .15s; cursor: pointer;
}
.chip-check input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-check input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 4px; flex: none; }

/* ─── اعلان‌ها و نشان‌ها ─────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px;
  border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; line-height: 1.9;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--info { background: var(--info-soft); color: var(--info); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--muted-soft); color: var(--ink-3); }
.badge--brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge--plain::before { display: none; }

.flash-stack { display: grid; gap: 10px; }
.flash {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px;
  border-radius: var(--r-md); font-size: var(--fs-sm); border: 1px solid transparent;
}
.flash .icon { margin-top: 3px; }
.flash--success { background: var(--ok-soft); color: #0d5c37; border-color: #c4ead5; }
.flash--error { background: var(--danger-soft); color: #8f1f1f; border-color: #f5cccc; }
.flash--info { background: var(--info-soft); color: #1b3f8f; border-color: #cddbf7; }
.flash__close { margin-inline-start: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; }

.notice {
  display: grid; gap: 14px; padding: 22px; border-radius: var(--r-lg);
  background: var(--night); color: #fff; position: relative; overflow: hidden;
}
.notice p { color: rgba(255, 255, 255, .78); max-width: 64ch; }
.notice__row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ─── کارت و پنل ────────────────────────────────────────── */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; display: grid; gap: 16px; align-content: start;
}
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel__title { font-size: var(--fs-lg); display: flex; align-items: center; gap: 8px; }
.panel__title .count { font-size: var(--fs-xs); background: var(--muted-soft); color: var(--ink-2); padding: 0 8px; border-radius: 999px; }
.panel--flat { background: var(--surface-2); }
.panel--accent { border-color: #ffd5b0; background: linear-gradient(180deg, #fffaf5, var(--surface)); }

.empty {
  display: grid; justify-items: center; text-align: center; gap: 10px;
  padding: 32px 16px; color: var(--ink-2); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
}
.empty__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--muted-soft); color: var(--ink-3); }
.empty strong { color: var(--ink); }
.empty p { font-size: var(--fs-sm); max-width: 42ch; }

.list { display: grid; }
.list-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 0;
  border-top: 1px solid var(--line);
}
.list-item:first-child { border-top: 0; padding-top: 0; }
.list-item:last-child { padding-bottom: 0; }
.list-item__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.list-item__title { font-weight: 700; overflow-wrap: anywhere; }
.list-item__meta { font-size: var(--fs-xs); color: var(--ink-3); }
.list-item__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.avatar {
  width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: var(--fs-sm);
}
.avatar--ink { background: var(--ink); color: #fff; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; font-size: var(--fs-sm); }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

.code-box {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 8px;
  background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md);
}
.code-box code { flex: 1; min-width: 0; direction: ltr; text-align: left; font-family: var(--mono); font-size: var(--fs-sm); overflow-x: auto; white-space: nowrap; padding-inline: 8px; }
.team-code { font-family: var(--mono); font-size: var(--fs-xl); font-weight: 700; letter-spacing: .12em; direction: ltr; }

/* ─── جدول (در موبایل به کارت تبدیل می‌شود) ─────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: right; font-weight: 700; color: var(--ink-3); font-size: var(--fs-xs); background: var(--surface-2); white-space: nowrap; }
.table th, .table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbfd; }
.table a { text-decoration: none; font-weight: 700; }
.table a:hover { color: var(--brand-strong); }
@media (max-width: 760px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .table--stack thead { display: none; }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 14px; margin-bottom: 10px; }
  .table--stack td { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; }
  .table--stack td:last-child { border-bottom: 0; }
  .table--stack td::before { content: attr(data-label); color: var(--ink-3); font-size: var(--fs-xs); text-align: right; flex: none; }
}

/* ─── Brand mark ────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; font-weight: 800; }
.brand img { width: 34px; height: 34px; }
.brand small { display: block; font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); line-height: 1.3; }
.brand span { line-height: 1.35; }

/* ═══ لایه داشبورد ═══════════════════════════════════════ */
.shell { display: grid; grid-template-columns: 268px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
  background: var(--surface); border-inline-start: 0; border-inline-end: 1px solid var(--line);
}
.sidebar .brand { padding-inline: 8px; }
.nav { display: grid; gap: 2px; }
.nav__label { font-size: var(--fs-xs); color: var(--ink-3); padding: 10px 12px 4px; letter-spacing: .02em; }
.nav a, .nav .nav__soon {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  text-decoration: none; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.is-active { background: var(--ink); color: #fff; }
.nav a.is-active .nav__badge { background: var(--brand); color: #fff; }
.nav__badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: var(--fs-xs); display: grid; place-items: center; font-weight: 800; }
.nav .nav__soon { color: var(--ink-3); cursor: not-allowed; }
.nav .nav__soon em { margin-inline-start: auto; font-style: normal; font-size: 11px; padding: 0 8px; border-radius: 999px; background: var(--muted-soft); }
.sidebar__foot { margin-top: auto; display: grid; gap: 10px; }
.channel-card {
  display: grid; gap: 8px; padding: 14px; border-radius: var(--r-md);
  background: var(--brand-soft); color: var(--brand-ink); font-size: var(--fs-xs); text-decoration: none;
}
.channel-card strong { font-size: var(--fs-sm); color: var(--ink); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding-block: 14px; padding-left: max(28px, var(--gutter-l)); padding-right: max(28px, var(--gutter-r));
  background: rgba(244, 245, 248, .86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar__title { font-size: var(--fs-lg); font-weight: 800; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__user { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.topbar__user .avatar { width: 36px; height: 36px; border-radius: 11px; font-size: var(--fs-xs); }
.icon-btn {
  position: relative; width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--ink);
}
.icon-btn .dot { position: absolute; top: 7px; inset-inline-end: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--surface); }
.menu-btn { display: none; }
.content {
  display: grid; gap: 22px; align-content: start; width: 100%;
  padding-block: 28px 56px; padding-left: max(28px, var(--gutter-l)); padding-right: max(28px, var(--gutter-r));
}
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-2xl); }
.page-head p { color: var(--ink-2); max-width: 64ch; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; align-content: start; }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; display: grid; gap: 4px; }
.stat__label { font-size: var(--fs-xs); color: var(--ink-3); }
.stat__value { font-size: var(--fs-xl); font-weight: 800; font-variant-numeric: tabular-nums; }
.stat__value small { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 400; }

.status-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center;
  padding: 24px; border-radius: var(--r-lg); background: var(--night); color: #fff; position: relative; overflow: hidden;
}
.status-hero::after {
  content: ""; position: absolute; inset-inline-start: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 114, 0, .35), transparent 70%); pointer-events: none;
}
.status-hero__seal { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.status-hero__seal .icon { width: 30px; height: 30px; stroke-width: 2.2; }
.status-hero h2 { font-size: var(--fs-xl); }
.status-hero p { color: rgba(255, 255, 255, .76); font-size: var(--fs-sm); }
.status-hero .notice__row { margin-top: 10px; position: relative; z-index: 1; }
.status-hero .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.choice {
  display: grid; gap: 12px; padding: 26px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s;
}
.choice:hover { border-color: var(--brand); transform: translateY(-2px); }
.choice__icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); }
.choice__icon .icon { width: 26px; height: 26px; }
.choice h3 { font-size: var(--fs-lg); }
.choice p { color: var(--ink-2); font-size: var(--fs-sm); }
.choice .go { color: var(--brand-strong); font-weight: 700; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 4px; }

.team-header { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: start; }
.team-header h2 { font-size: var(--fs-2xl); }
.team-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--ink-3); font-size: var(--fs-sm); align-items: center; }
.capacity { display: grid; gap: 6px; min-width: 200px; }
.capacity__bar { height: 8px; border-radius: 999px; background: var(--muted-soft); overflow: hidden; }
.capacity__bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; }
.ann { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.ann:first-of-type { border-top: 0; padding-top: 0; }
.ann h3 { font-size: var(--fs-md); }
.ann p { color: var(--ink-2); font-size: var(--fs-sm); white-space: pre-line; }
.notif { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; }
.notif:first-child { border-top: 0; }
.notif__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); margin-top: 9px; flex: none; }
.notif.is-unread .notif__dot { background: var(--brand); }
.notif strong { font-size: var(--fs-sm); }
.notif p { font-size: var(--fs-sm); color: var(--ink-2); }
.notif time { font-size: var(--fs-xs); color: var(--ink-3); }
details.disclosure > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure[open] > summary { margin-bottom: 14px; }
.inline-form { display: inline; }
.drawer-backdrop { display: none; }

@media (max-width: 1080px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; width: min(300px, 86vw); height: 100%;
    transform: translateX(100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .15);
    padding-top: calc(22px + env(safe-area-inset-top, 0px));
  }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(11, 13, 26, .4); }
  .menu-btn { display: grid; }
  .topbar__user .name { display: none; }
  .grid-2, .choice-grid { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
  .content { padding-block: 20px 48px; }
}
@media (max-width: 520px) {
  .panel { padding: 18px; }
  .stat-row { gap: 10px; }
  .team-header { grid-template-columns: 1fr; }
  .status-hero { grid-template-columns: 1fr; }
  .list-item { flex-wrap: wrap; }
  .list-item__actions { width: 100%; justify-content: flex-start; }
}

/* ═══ صفحات ورود و تکمیل ثبت‌نام ═══════════════════════ */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100vh; }
.auth__aside {
  position: relative; overflow: hidden; background: var(--night); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px;
}
.auth__aside .brand small { color: rgba(255, 255, 255, .55); }
.auth__aside h2 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); max-width: 16ch; }
.auth__aside p { color: rgba(255, 255, 255, .7); max-width: 40ch; }
.auth__apps { display: grid; grid-template-columns: repeat(4, 64px); gap: 14px; }
.auth__apps img { width: 64px; height: 64px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; background: #fff; }
.auth__apps .slot { width: 64px; height: 64px; border-radius: 14px; border: 1.5px dashed rgba(255, 255, 255, .35); display: grid; place-items: center; color: var(--sun); }
.auth__main {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding-block: 40px; padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.auth__card { width: min(460px, 100%); display: grid; gap: 22px; }
.auth__card--wide { width: min(640px, 100%); }
.auth__card h1 { font-size: var(--fs-2xl); }
.auth__card .lead { color: var(--ink-2); }
.auth__mobile-brand { display: none; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: var(--fs-sm); text-decoration: none; }
.back-link .icon { transform: scaleX(-1); width: 18px; }
.back-link:hover { color: var(--ink); }
.otp { display: flex; gap: 8px; direction: ltr; justify-content: center; }
.otp input {
  width: 52px; height: 60px; text-align: center; font-size: var(--fs-xl); font-weight: 800; font-family: var(--mono);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface);
}
.otp input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(245, 114, 0, .14); }
.dev-code {
  display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-md);
  background: #fffbe8; border: 1px dashed #e6c35a; color: #6b5200; font-size: var(--fs-sm);
}
.dev-code b { font-family: var(--mono); letter-spacing: .2em; direction: ltr; }
.steps { display: flex; gap: 8px; }
.steps span { flex: 1; height: 5px; border-radius: 999px; background: var(--muted-soft); }
.steps span.is-done { background: var(--brand); }
.step-label { font-size: var(--fs-xs); color: var(--ink-3); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.minimal { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter-r) 24px var(--gutter-l); }
.error-card { text-align: center; display: grid; gap: 14px; justify-items: center; max-width: 440px; }
.error-card .code { font-size: 4.5rem; font-weight: 900; color: var(--brand); line-height: 1; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__aside { display: none; }
  .auth__mobile-brand { display: inline-flex; }
  .auth__main { justify-content: flex-start; padding-top: calc(28px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 400px) {
  .otp { gap: 6px; }
  .otp input { width: 42px; height: 54px; }
}

/* ═══ پنل مدیریت ═══════════════════════════════════════ */
.admin .sidebar { background: var(--night); color: #fff; border-color: transparent; }
.admin .brand small { color: rgba(255, 255, 255, .5); }
.admin .nav a { color: rgba(255, 255, 255, .7); }
.admin .nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin .nav a.is-active { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset -3px 0 0 var(--brand); }
.admin .nav__label { color: rgba(255, 255, 255, .4); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters .input, .filters .select { min-height: 42px; width: auto; flex: 1 1 180px; }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: var(--fs-sm); }
.pager .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--muted-soft); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 6px 14px; border-radius: 9px; text-decoration: none; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; }
.tabs a.is-active { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: var(--shadow); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; font-size: var(--fs-sm); }
.bar-row__track { height: 10px; border-radius: 999px; background: var(--muted-soft); overflow: hidden; }
.bar-row__track span { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.bar-row b { text-align: left; font-variant-numeric: tabular-nums; }
.spark { display: grid; gap: 8px; }
.spark svg { width: 100%; height: 120px; overflow: visible; }
.spark__axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.log-line { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: baseline; font-size: var(--fs-sm); padding: 10px 0; border-top: 1px solid var(--line); }
.log-line:first-child { border-top: 0; }
.log-line code { font-family: var(--mono); font-size: 11px; color: var(--ink-3); direction: ltr; }
.export-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.export-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.export-card .form-actions { gap: 8px; }
