/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* ============================================================
   دیزاین‌سیستم پنل — توکن‌ها → پایه → کامپوننت‌ها → ریسپانسیو
   پالت: طلایی اعتماد + بنفش تکنولوژی روی زمینه‌ی سرمه‌ای تیره
   ============================================================ */

:root {
  /* سطوح */
  --bg: #0d1424;
  --surface: #131c30;
  --surface-2: #1a2742;
  --surface-3: #223154;
  --border: #263352;
  --border-strong: #34436b;

  /* متن */
  --text: #f1f5fb;
  --text-2: #c0cade;
  --muted: #93a0bd;

  /* برند و معنایی */
  --primary: #f5a524;
  --primary-hover: #f7b545;
  --on-primary: #201503;
  --accent: #8b5cf6;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f8717a;
  --info: #5b8cff;

  /* سایه و شعاع */
  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(3, 7, 18, .5);
  --shadow-2: 0 6px 20px -6px rgba(3, 7, 18, .55);
  --shadow-3: 0 18px 50px -12px rgba(3, 7, 18, .7);

  /* موشن */
  --t-fast: 140ms;
  --t: 200ms;
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* فاصله */
  --gap: 14px;
  --gap-lg: 22px;
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--surface-3) transparent; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(139, 92, 246, .07), transparent 60%),
    radial-gradient(900px 420px at 0% 0%, rgba(245, 165, 36, .05), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: Vazirmatn, Tahoma, system-ui, sans-serif;
  direction: rtl;
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: #8fb0ff; }

/* فوکوس کیبورد — همه‌جا یکدست */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: rgba(245, 165, 36, .3); }

/* پرش به محتوا برای کیبورد */
.skip-link {
  position: fixed;
  top: -48px;
  right: 16px;
  z-index: 200;
  background: var(--primary);
  color: var(--on-primary);
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 600;
  transition: top var(--t) var(--ease);
}
.skip-link:focus-visible { top: 12px; color: var(--on-primary); }

/* ---------- چیدمان کلی ---------- */

.layout { display: flex; min-height: 100dvh; }

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--surface), rgba(19, 28, 48, .75));
  border-left: 1px solid var(--border);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--on-primary);
  background: linear-gradient(135deg, #f7b545, #e8890c);
  box-shadow: 0 4px 14px -4px rgba(245, 165, 36, .55);
  flex-shrink: 0;
}
.brand-title { font-size: 14.5px; font-weight: 800; margin: 0; line-height: 1.4; }
.brand-sub { font-size: 11px; color: var(--muted); margin: 0; }

.nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--muted);
  padding: 14px 10px 5px;
}

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

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9.5px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a.active {
  background: linear-gradient(90deg, rgba(245, 165, 36, .16), rgba(245, 165, 36, .05));
  color: var(--primary);
  font-weight: 700;
}
.sidebar nav a.active::before {
  content: "";
  position: absolute;
  right: -14px;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: 3px;
  background: var(--primary);
}
.sidebar nav a .nav-ico { color: var(--muted); transition: color var(--t-fast) var(--ease); flex-shrink: 0; }
.sidebar nav a:hover .nav-ico, .sidebar nav a.active .nav-ico { color: inherit; }

.nav-badge {
  -webkit-margin-start: auto;
          margin-inline-start: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.sidebar-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.session-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 7px 10px;
  border-radius: 9px;
}

/* ---------- نوار بالا (موبایل) ---------- */

.topbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(13, 20, 36, .85);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar .brand-title { font-size: 14px; }

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 18, .6);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  z-index: 90;
  animation: fade-in var(--t) var(--ease);
}

.main {
  flex: 1 1;
  padding: 26px 30px 60px;
  min-width: 0;
}
.main-inner { max-width: 1240px; margin: 0 auto; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-title { font-size: 21px; font-weight: 800; margin: 0; }
.page-desc { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; max-width: 640px; }
.page-actions { display: flex; gap: 8px; align-items: center; }

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .2px;
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after { content: ""; flex: 1 1; height: 1px; background: var(--border); }

/* ---------- کارت ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  grid-gap: var(--gap);
  gap: var(--gap);
}

.stat-card { display: flex; gap: 13px; align-items: flex-start; transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-2); }
.stat-link { color: inherit; display: flex; }
.stat-link:hover { color: inherit; }

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.tone-ok { color: var(--ok); background: rgba(52, 211, 153, .12); }
.tone-warn { color: var(--warn); background: rgba(251, 191, 36, .12); }
.tone-danger { color: var(--danger); background: rgba(248, 113, 122, .12); }
.tone-info { color: var(--info); background: rgba(91, 140, 255, .12); }
.tone-neutral { color: var(--text-2); background: var(--surface-2); }
.tone-accent { color: #b79bff; background: rgba(139, 92, 246, .13); }

.tone-border-ok { border-color: rgba(52, 211, 153, .25); }
.tone-border-warn { border-color: rgba(251, 191, 36, .3); }
.tone-border-danger { border-color: rgba(248, 113, 122, .3); }

.stat-body { min-width: 0; }
.stat-label { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.stat-value { font-size: 20px; font-weight: 800; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; line-height: 1.35; }
.stat-sub { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

/* ---------- جدول ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);

  /* ── چرا نوار اسکرول عمداً همیشه دیده می‌شود ─────────────────────────
     جدول کمپین‌ها در عرض کم (زیر ~۱۲۸۰px) پهن‌تر از قاب می‌شود و ستون‌های
     «وضعیت» و «عملیات» بیرون می‌مانند. اسکرول کار می‌کرد، ولی روی ویندوز
     نوار اسکرول تا وقتی موس حرکت نکند پیدا نیست — یعنی ادمین دکمه‌های
     عملیات را نمی‌دید و فکر می‌کرد بریده شده‌اند. نوار نازکِ همیشه‌پیدا
     ارزان‌ترین راهِ نشان دادنِ «اینجا ادامه دارد» است، بدون پنهان کردن
     هیچ ستونی. */
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 6px;
}
.table-scroll::-webkit-scrollbar-track { background: transparent; }

table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td {
  padding: 11px 14px;
  text-align: right;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
th { color: var(--muted); font-weight: 600; font-size: 11.5px; background: var(--surface-2); position: -webkit-sticky; position: sticky; top: 0; }
tbody tr { transition: background var(--t-fast) var(--ease); }
tbody tr:hover { background: rgba(91, 140, 255, .045); }
tbody tr:last-child td { border-bottom: none; }
/* نام کمپین بلندترین ستون بود (۳۶۸px در تست) و تنهایی جدول را از قاب
   بیرون می‌برد؛ سقف عرض، پهنای کل جدول را کم می‌کند بدون حذف ستون. */
td.wrap { white-space: normal; min-width: 220px; max-width: 300px; }
.num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 600; }
/* این خطِ زیرِ نام (پیش‌نمایش متن آگهی) بود که ستون «کمپین» را روی ۳۶۸px
   قفل می‌کرد و کل جدول را از قاب بیرون می‌برد: nowrap + max-width بزرگ.
   متن از قبل با «…» بریده می‌شد، پس کم کردن سقف چیزی را پنهان نمی‌کند —
   فقط جدول را در عرض‌های معمول لپ‌تاپ داخل قاب نگه می‌دارد. */
.cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

tfoot th { border-top: 1px solid var(--border-strong); background: var(--surface-2); }

/* ── ستون «عملیات» همیشه در دید ────────────────────────────────────────
   جدول‌ها در عرض لپ‌تاپ پهن‌تر از قاب می‌شوند و چون چیدمان راست‌به‌چپ است،
   ستون آخر — که دکمه‌های تایید/رد/انتشار در آن است — بیرون از کادر و در
   لبه‌ی چپ می‌ماند. ادمین جدول را می‌دید و فکر می‌کرد دکمه‌ای ندارد.
   چسباندن همان یک ستون، بدون حذف هیچ ستون دیگری، مشکل را حل می‌کند؛
   بقیه‌ی جدول مثل قبل اسکرول می‌شود. */
.table-scroll th:last-child,
.table-scroll td:last-child {
  position: -webkit-sticky;
  position: sticky;
  left: 0;
  background: var(--surface);
  box-shadow: 1px 0 0 var(--border);
}
.table-scroll th:last-child { background: var(--surface-2); z-index: 2; }
.table-scroll tbody tr:hover td:last-child { background: var(--surface-2); }

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3.5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-ok { background: rgba(52, 211, 153, .13); color: var(--ok); border-color: rgba(52, 211, 153, .25); }
.badge-warn { background: rgba(251, 191, 36, .12); color: var(--warn); border-color: rgba(251, 191, 36, .28); }
.badge-danger { background: rgba(248, 113, 122, .12); color: var(--danger); border-color: rgba(248, 113, 122, .28); }
.badge-info { background: rgba(91, 140, 255, .12); color: var(--info); border-color: rgba(91, 140, 255, .28); }
.badge-neutral { background: var(--surface-2); color: var(--muted); border-color: var(--border); }

/* ---------- دکمه ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}
.btn:active:not(:disabled) { transform: scale(.975); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-md { padding: 8.5px 16px; font-size: 13px; }
.btn-sm { padding: 5.5px 11px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 3px 12px -4px rgba(245, 165, 36, .5); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }

.btn-success { background: rgba(52, 211, 153, .16); color: var(--ok); border-color: rgba(52, 211, 153, .35); }
.btn-success:hover:not(:disabled) { background: rgba(52, 211, 153, .24); }

.btn-danger { background: rgba(248, 113, 122, .13); color: var(--danger); border-color: rgba(248, 113, 122, .35); }
.btn-danger:hover:not(:disabled) { background: rgba(248, 113, 122, .22); }

.btn-ghost { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }

.btn-subtle { background: transparent; color: var(--muted); }
.btn-subtle:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ---------- فرم ---------- */

input, textarea, select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 10px;
  width: 100%;
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 165, 36, .18);
}
input::placeholder, textarea::placeholder { color: #6b7794; }
textarea { resize: vertical; min-height: 84px; }

.field { margin-bottom: 14px; }
.field label { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field .req { color: var(--danger); }
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.field-error { display: flex; align-items: center; gap: 6px; color: var(--danger); font-size: 12px; margin-top: 6px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap > svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 12px;
  color: var(--muted);
  pointer-events: none;
}
.input-icon-wrap input { padding-right: 38px; }
.input-trailing { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); }

.search-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Chip فیلتر ---------- */

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: rgba(245, 165, 36, .14);
  border-color: rgba(245, 165, 36, .5);
  color: var(--primary);
}
.chip-count {
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}
.chip.active .chip-count { background: rgba(245, 165, 36, .25); color: var(--primary); }

/* ---------- Toast ---------- */

.toast-region {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: min(380px, calc(100vw - 36px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 13px;
  box-shadow: var(--shadow-3);
  animation: toast-in var(--t) var(--ease);
}
.toast span { flex: 1 1; }
.toast-ok { border-color: rgba(52, 211, 153, .4); }
.toast-ok > svg { color: var(--ok); flex-shrink: 0; }
.toast-error { border-color: rgba(248, 113, 122, .4); }
.toast-error > svg { color: var(--danger); flex-shrink: 0; }
.toast-info > svg { color: var(--info); flex-shrink: 0; }
.toast-close { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px; display: grid; place-items: center; border-radius: 5px; }
.toast-close:hover { color: var(--text); }

/* ---------- Modal ---------- */

.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(5, 9, 18, .65);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 18px;
  animation: fade-in var(--t-fast) var(--ease);
}
.modal-box {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  animation: modal-in 220ms var(--ease);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
}
.modal-head h3 { margin: 0; font-size: 15.5px; }
.modal-body { padding: 14px 20px 20px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-start; margin-top: 18px; }
.confirm-msg { color: var(--text-2); font-size: 13.5px; margin: 4px 0 0; line-height: 1.8; }

/* ---------- Progress ---------- */

.progress-wrap { display: flex; align-items: center; gap: 9px; min-width: 130px; }
.progress-track { flex: 1 1; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 6px; transition: width var(--t) var(--ease); }
.tone-bg-ok { background: var(--ok); }
.tone-bg-warn { background: var(--warn); }
.tone-bg-danger { background: var(--danger); }
.tone-bg-info { background: var(--info); }
.tone-bg-neutral { background: var(--muted); }
.progress-num { font-size: 11px; color: var(--muted); font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; min-width: 34px; }

/* ---------- Skeleton / Empty / Alert ---------- */

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.empty {
  text-align: center;
  padding: 52px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: rgba(19, 28, 48, .5);
}
.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
}
.empty-title { font-weight: 700; font-size: 14.5px; }
.empty-hint { color: var(--muted); font-size: 12.5px; margin-top: 5px; max-width: 380px; margin-inline: auto; }
.empty-action { margin-top: 16px; }

.alert {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  border-radius: var(--radius);
  padding: 13px 16px;
  font-size: 13px;
  margin-bottom: var(--gap-lg);
  border: 1px solid;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-warn { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); color: var(--warn); }
.alert-warn .alert-text { color: var(--text-2); }
.alert-danger { background: rgba(248, 113, 122, .08); border-color: rgba(248, 113, 122, .35); color: var(--danger); }
.alert-danger .alert-text { color: var(--text-2); }
.alert-ok { background: rgba(52, 211, 153, .07); border-color: rgba(52, 211, 153, .3); color: var(--ok); }
.alert-ok .alert-text { color: var(--text-2); }
.alert-text { flex: 1 1; }
.alert-title { font-weight: 700; display: block; margin-bottom: 2px; color: inherit; }

/* ---------- نوار وضعیت توزیع ---------- */

.dist-row { display: flex; align-items: center; gap: 11px; padding: 7px 0; }
.dist-label { width: 130px; flex-shrink: 0; font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.dist-track { flex: 1 1; height: 8px; background: var(--surface-3); border-radius: 8px; overflow: hidden; }
.dist-fill { height: 100%; border-radius: 8px; min-width: 3px; }
.dist-num { width: 44px; text-align: left; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }

/* ---------- لاگین ---------- */

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.login-box {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  animation: modal-in 240ms var(--ease);
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 24px; text-align: center; }

.muted { color: var(--muted); font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 18px; }
.spacer { flex: 1 1; }
.ltr { direction: ltr; text-align: left; }

/* ---------- انیمیشن ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes slide-in { from { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- ریسپانسیو ---------- */

@media (max-width: 960px) {
  .layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    inset: 0 0 0 auto;
    right: 0;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 240ms var(--ease);
    box-shadow: var(--shadow-3);
    width: min(300px, 84vw);
  }
  .sidebar.open { transform: translateX(0); }
  .topbar {
    display: flex;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    width: 100%;
  }
  .main { padding: 18px 14px 60px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .stat-value { font-size: 18px; }
  .dist-label { width: 105px; font-size: 11.5px; }
}

/* ── Responsive: user detail page ─────────────────────────────────── */

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

@media (max-width: 900px) {
  .responsive-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .responsive-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Responsive: page-head با دکمه‌های زیاد ─────────────────────── */

@media (max-width: 700px) {
  .page-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px;
  }

  .page-head .page-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .page-head .page-actions > * {
    width: 100%;
    justify-content: center;
  }
}

/* ── Responsive: table scrollable با نشانگر ────────────────────── */

@media (max-width: 700px) {
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll::after {
    content: "◀ برای دیدن بیشتر بکشید";
    position: absolute;
    bottom: 4px;
    inset-inline-end: 8px;
    font-size: 10px;
    color: var(--muted);
    background: var(--surface);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
  }
}

