/* ═══════════════════════════════════════════════════════════════════════════
   اتووبسایت — سیستم طراحی یکپارچهٔ پلتفرم («زعفرانی روی کاغذ»)
   هماهنگ با صفحهٔ اصلی (landing.css): کاغذ کرم گرم، مرکب اسپرسو، شعلهٔ زعفرانی،
   فیروزه‌ای ایرانی، فونت پینار و وزیرمتن، همراه با تم روشن و تیرهٔ کامل.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Vazirmatn";
  src: url("/static/fonts/vazirmatn/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* نگاشت نام قلم پینار به وزیرمتن جهت یکپارچگی کامل تایپوگرافی سایت */
@font-face {
  font-family: "Pinar";
  src: url("/static/fonts/vazirmatn/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F2EA;
  --bg-2: #EEE7DA;
  --paper: #F6F2EA;
  --surface: #FFFFFF;
  --surface-2: #FAF6EF;
  --ink: #17140F;
  --ink-2: #3F3A32;
  --ink2: #3F3A32;
  --muted: #655D51;
  --soft: #655D51;
  --line: rgba(23, 20, 15, 0.11);
  --line-2: rgba(23, 20, 15, 0.22);
  --acc: #C2410C;
  --acc-bright: #FF6A2B;
  --acc-soft: rgba(255, 106, 43, 0.12);
  --blue: #C2410C;
  --cyan: #FF6A2B;
  --ok: #0F766E;
  --ok-soft: rgba(15, 118, 110, 0.12);
  --warn: #B45309;
  --warn-soft: rgba(180, 83, 9, 0.13);
  --bad: #DC2626;
  --bad-soft: rgba(220, 38, 38, 0.12);
  --gold: #A16207;
  --gold-soft: rgba(202, 138, 4, 0.15);
  --btn-bg: #C2410C;
  --btn-fg: #FFFFFF;
  --btn-bg-h: #A3360A;
  --ink-btn-bg: #17140F;
  --ink-btn-fg: #F6F2EA;
  --shadow-sm: 0 2px 6px rgba(23, 20, 15, 0.05);
  --shadow: 0 1px 2px rgba(23, 20, 15, 0.05), 0 14px 34px -14px rgba(23, 20, 15, 0.18);
  --shadow-lg: 0 32px 72px -28px rgba(23, 20, 15, 0.36);
  --header-bg: rgba(246, 242, 234, 0.84);
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0F0E0C;
  --bg-2: #161411;
  --paper: #0F0E0C;
  --surface: #1B1915;
  --surface-2: #24211C;
  --ink: #F3EEE5;
  --ink-2: #D5CDC0;
  --ink2: #D5CDC0;
  --muted: #A79E90;
  --soft: #A79E90;
  --line: rgba(243, 238, 229, 0.10);
  --line-2: rgba(243, 238, 229, 0.20);
  --acc: #FF7A3D;
  --acc-bright: #FF7A3D;
  --acc-soft: rgba(255, 122, 61, 0.15);
  --blue: #FF7A3D;
  --cyan: #2DD4BF;
  --ok: #2DD4BF;
  --ok-soft: rgba(45, 212, 191, 0.14);
  --warn: #FBBF24;
  --warn-soft: rgba(251, 191, 36, 0.15);
  --bad: #F87171;
  --bad-soft: rgba(248, 113, 113, 0.15);
  --gold: #FACC15;
  --gold-soft: rgba(250, 204, 21, 0.15);
  --btn-bg: #FF7A3D;
  --btn-fg: #1A0B03;
  --btn-bg-h: #FF9461;
  --ink-btn-bg: #F3EEE5;
  --ink-btn-fg: #0F0E0C;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 34px -14px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 36px 80px -28px rgba(0, 0, 0, 0.88);
  --header-bg: rgba(15, 14, 12, 0.82);
  color-scheme: dark;
}

/* ── پایه و تایپوگرافی ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15.5px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.25s, color 0.25s;
}
body::before {
  content: "";
  position: fixed;
  width: 52vmax;
  height: 52vmax;
  top: -22vmax;
  inset-inline-end: -16vmax;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(circle at 35% 35%, rgba(255, 106, 43, 0.14), rgba(15, 118, 110, 0.06) 55%, transparent 72%);
}
img, svg { max-width: 100%; }
a { color: var(--acc); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--acc-bright); }
h1, h2, h3, h4 {
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.38;
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--ink);
}
h1 { font-size: clamp(1.45rem, 3.2vw, 2.15rem); }
h2 { font-size: clamp(1.2rem, 2.4vw, 1.65rem); }
h3 { font-size: clamp(1.02rem, 1.8vw, 1.22rem); }
p { margin: 0 0 12px; }
ul, ol { margin: 0; padding: 0; }
.muted { color: var(--muted); }
.ltr, .mono {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--acc);
  background: var(--acc-soft);
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.eyebrow svg { width: 15px; height: 15px; }
.hl {
  color: var(--acc);
  position: relative;
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0.08em;
  height: 0.18em;
  background: var(--acc-soft);
  border-radius: 99px;
  z-index: -1;
}

.shell { width: min(1220px, 100% - 32px); margin-inline: auto; }
.shell--narrow { width: min(880px, 100% - 32px); margin-inline: auto; }

/* ── هدر عمومی و نوار بالا ──────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand__logo {
  width: 36px;
  height: 36px;
  flex: none;
}
.mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ink-btn-bg);
  color: var(--acc-bright);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 18px;
  flex: none;
}
.brand__tx b {
  display: block;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.25;
}
.brand__tx i {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  font-style: normal;
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.nav__links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-inline-start: 10px; }
.nav__actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 11px;
  transition: background-color 0.18s, color 0.18s;
}
.nav a:hover, .nav a.on {
  color: var(--ink);
  background: var(--line);
}
.nav a.btn--p, .nav a.btn--p:hover { color: var(--btn-fg); background: var(--btn-bg); }
.nav a.btn--ink, .nav a.btn--ink:hover { color: var(--ink-btn-fg); background: var(--ink-btn-bg); }
.nav a.btn--g, .nav a.btn--g:hover { color: var(--ink); background: var(--surface); }
.nav__out { color: var(--muted) !important; font-weight: 600 !important; }
.nav__admin {
  color: var(--acc) !important;
  background: var(--acc-soft) !important;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.15s;
  flex: none;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg { width: 19px; height: 19px; }
.theme-btn .moon { display: none; }
[data-theme="dark"] .theme-btn .sun { display: none; }
[data-theme="dark"] .theme-btn .moon { display: block; }

/* ── دکمه‌ها ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: clamp(0.83rem, 0.9vw, 0.9rem);
  line-height: 1.3;
  font-weight: 800;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 12px;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: transform 0.16s, box-shadow 0.18s, background-color 0.18s, border-color 0.18s;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.48; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn--p, .btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg) !important;
  box-shadow: 0 10px 24px -10px rgba(194, 65, 12, 0.55);
}
.btn--p:hover, .btn-primary:hover {
  background: var(--btn-bg-h);
  color: var(--btn-fg) !important;
  transform: translateY(-1px);
}
.btn--ink, .btn-ink {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg) !important;
}
.btn--ink:hover, .btn-ink:hover {
  opacity: 0.92;
  color: var(--ink-btn-fg) !important;
}
.btn--g, .btn-ghost {
  background: var(--surface);
  color: var(--ink) !important;
  border-color: var(--line-2);
}
.btn--g:hover, .btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}
.btn--cyan, .btn--ok {
  background: var(--ok);
  color: #FFFFFF !important;
}
[data-theme="dark"] .btn--cyan, [data-theme="dark"] .btn--ok {
  color: #0B1416 !important;
}
.btn--danger {
  background: var(--surface);
  color: var(--bad) !important;
  border-color: rgba(220, 38, 38, 0.35);
}
.btn--danger:hover {
  background: var(--bad-soft);
  border-color: var(--bad);
}
.btn--danger-solid {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-weight: 700 !important;
}
.btn--danger-solid:hover {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: #991b1b !important;
}
.btn--danger-solid span,
.btn--danger-solid i,
.btn--danger-solid svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}
.btn--sm, .btn-sm {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: 10px;
}
.btn-xs {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 0.78rem;
  border-radius: 8px;
}
.btn--w, .btn-block { width: 100%; }
.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line-2);
}
.btn-outline:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}

/* ── پوستهٔ اپلیکیشن (داشبورد کاربر و پنل مدیریت) ────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  padding-block: 24px 72px;
  align-items: start;
}
.app-sidebar {
  position: sticky;
  top: 88px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.app-sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.app-avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--acc), var(--acc-bright));
  color: #FFF;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.05rem;
  flex: none;
}
.app-sidebar__user-info { min-width: 0; flex: 1; }
.app-sidebar__user-info b {
  display: block;
  font-size: 0.94rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-sidebar__user-info small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}
.app-nav__label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  padding: 10px 10px 4px;
  letter-spacing: 0.04em;
}
.app-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--ink-2);
  font-weight: 700;
  font-size: 0.91rem;
  text-decoration: none;
  transition: background-color 0.16s, color 0.16s;
}
.app-nav__item svg {
  width: 19px;
  height: 19px;
  flex: none;
  opacity: 0.8;
}
.app-nav__item:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.app-nav__item.on {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
}
.app-nav__item.on svg { opacity: 1; color: var(--acc-bright); }
.app-nav__badge {
  margin-inline-start: auto;
  font-size: 0.73rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--acc-bright);
  color: #1A0B03;
}
.app-sidebar__cta {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
}

/* نوار پایین موبایل */
.mobile-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 55;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}
.mobile-nav a svg { width: 20px; height: 20px; }
.mobile-nav a.on {
  color: var(--acc);
  background: var(--acc-soft);
}

/* ═══════════════════════════════════════════════════════════════════════════
   سیستم پیشخوان و سایدبار مدرن (Modern Dashboard & Sidebar System)
   طراحی هماهنگ با سیستم «زعفرانی روی کاغذ» — تیره و روشن، بدون وابستگی به فریم‌ورک خارجی
   ═══════════════════════════════════════════════════════════════════════════ */

/* شکستن محدودیت عرض .shell برای ایجاد لی‌اوت تمام‌صفحهٔ سایدبار */
.panel-root {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
}

.panel-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg);
  position: relative;
}

/* ماسک پشت سایدبار در موبایل */
.sidebar-backdrop {
  display: none;
}
@media (max-width: 991px) {
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 14, 12, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* سایدبار ثابت پیشخوان */
.panel-sidebar {
  width: 270px;
  flex: 0 0 270px;
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--surface);
  border-inline-end: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 20px;
  z-index: 50;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.02);
}
.panel-sidebar::-webkit-scrollbar {
  width: 5px;
}
.panel-sidebar::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 99px;
}

/* برند و لوگوی بالای سایدبار */
.panel-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.panel-brand .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
}
.panel-brand .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--acc), var(--acc-bright));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.15rem;
  flex: none;
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.28);
}
.panel-brand .brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.panel-brand .brand-text strong {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}
.panel-brand .brand-text small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.panel-brand-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mobile-sidebar-close {
  display: none;
}

/* کارت کاربر در سایدبار */
.panel-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
  position: relative;
}
.panel-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.95rem;
  flex: none;
  border: 1.5px solid var(--line-2);
}
.panel-user-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.panel-user-info strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.panel-user-info .ltr {
  font-size: 0.76rem;
  color: var(--muted);
  direction: ltr;
  text-align: right;
  font-family: inherit;
}

/* دکمهٔ CTA در سایدبار */
.panel-cta {
  margin-bottom: 16px;
}
.panel-cta .btn {
  font-size: 0.92rem;
  font-weight: 800;
  min-height: 42px;
  border-radius: 12px;
  box-shadow: 0 6px 18px -4px rgba(194, 65, 12, 0.4);
}

/* ناوبری اصلی سایدبار */
.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.panel-nav-group {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 14px 10px 5px;
}
.panel-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.89rem;
  font-weight: 700;
  transition: background-color 0.16s, color 0.16s, transform 0.12s;
  position: relative;
}
.panel-nav-item:hover {
  background: var(--surface-2);
  color: var(--ink);
}
.panel-nav-item.active,
.panel-nav-item.on {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg) !important;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.panel-nav-item.active .nav-ico,
.panel-nav-item.on .nav-ico {
  color: var(--acc-bright);
  opacity: 1;
}
.panel-nav-item .nav-ico {
  width: 22px;
  font-size: 1.05rem;
  display: inline-grid;
  place-items: center;
  flex: none;
  opacity: 0.85;
}
.panel-nav-item .nav-badge {
  margin-inline-start: auto;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line-2);
  color: var(--ink);
}
.panel-nav-item.active .nav-badge,
.panel-nav-item.on .nav-badge {
  background: var(--acc-bright);
  color: #1A0B03;
}
.panel-nav-item .nav-badge-warn {
  background: var(--warn) !important;
  color: #FFFFFF !important;
}

/* فوتر سایدبار */
.panel-sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.text-danger {
  color: var(--bad) !important;
}
.btn-ghost.text-danger:hover {
  background: var(--bad-soft) !important;
  border-color: var(--bad) !important;
  color: var(--bad) !important;
}

/* محتوای اصلی پیشخوان (Main) */
.panel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* تاپ‌بار پیشخوان */
.panel-topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(16px);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.panel-topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.panel-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
}
/* ── N07: سوئیچر سایت سوپرادمین ─────────────────────────────────────────── */
.sa-switch { position: relative; }
.sa-switch-btn { gap: 6px; }
.sa-switch-btn i { width: 15px; height: 15px; }
.sa-switch-caret { width: 13px !important; height: 13px !important; opacity: .65; transition: transform .18s ease; }
.sa-switch.open .sa-switch-caret { transform: rotate(180deg); }
.sa-switch-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px;
  background: var(--acc-soft); color: var(--acc);
  font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center;
}
/* 🔴 بدون این قاعده، display:flex بر [hidden] غلبه می‌کند و پنل همیشه باز می‌ماند */
.sa-switch-panel[hidden] { display: none !important; }
.sa-switch-panel {
  position: absolute; top: calc(100% + 10px); inset-inline-start: 0; z-index: 80;
  width: min(430px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--r); box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column;
  max-height: min(70vh, 560px);
  animation: saSwitchIn .16s ease-out;
}
@keyframes saSwitchIn {
  from { opacity: 0; transform: translateY(-6px) scale(.99); }
  to   { opacity: 1; transform: none; }
}
.sa-switch-head {
  position: relative; padding: 10px 12px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); flex: none;
}
/* 🔴 ویژگی بالاتر از قاعدهٔ عمومی input[type=search] (0,1,1) لازم است، وگرنه padding آن می‌برد */
.sa-switch-head input.sa-switch-search,
.sa-switch-search {
  width: 100%; font-family: inherit; font-size: .84rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 8px 34px 8px 12px; outline: none; min-height: 38px;
}
.sa-switch-search:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.sa-switch-search::-webkit-search-decoration,
.sa-switch-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.sa-switch-search-ico {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.sa-switch-list { overflow-y: auto; padding: 6px; flex: 1 1 auto; min-height: 0; }
.sa-switch-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 6px 10px;
  padding: 9px 10px; border-radius: 12px; transition: background .15s ease;
}
.sa-switch-item:hover { background: var(--surface-2); }
.sa-switch-item[hidden] { display: none; }
.sa-switch-meta {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  grid-column: 1; grid-row: 1;
}
.sa-switch-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sa-switch-name strong {
  font-size: .86rem; color: var(--ink); font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sa-switch-meta strong {
  font-size: .86rem; color: var(--ink); font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sa-switch-sub {
  font-size: .7rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sa-switch-state {
  font-size: .66rem; font-weight: 800; padding: 3px 8px; border-radius: 99px; flex: none;
}
.sa-switch-state.is-live { background: var(--ok-soft); color: var(--ok); }
.sa-switch-state.is-building { background: var(--warn-soft); color: #92400E; }
[data-theme="dark"] .sa-switch-state.is-building { color: var(--warn); }
.sa-switch-acts {
  display: flex; gap: 6px; flex: none;
  grid-column: 2; grid-row: 1; align-self: center; justify-self: start;
}
.sa-switch-act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 700; text-decoration: none;
  padding: 6px 10px; min-height: 36px; border-radius: 9px; border: 1px solid var(--line-2);
  color: var(--ink); background: var(--surface);
  white-space: nowrap; transition: all .15s ease;
}
.sa-switch-act i { width: 13px; height: 13px; }
.sa-switch-act:hover { border-color: var(--acc); color: var(--acc); }
.sa-switch-act.is-primary {
  background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg);
}
.sa-switch-act.is-primary:hover {
  background: var(--btn-bg-h); border-color: var(--btn-bg-h); color: var(--btn-fg);
}
.sa-switch-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: .8rem; }
.sa-switch-foot {
  padding: 8px 14px; border-top: 1px solid var(--line);
  background: var(--surface-2); font-size: .76rem; flex: none;
}
.sa-switch-foot a { color: var(--acc); text-decoration: none; font-weight: 700; }
.sa-switch-foot a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  /* 🔴 topbar با backdrop-filter خودش containing block می‌سازد؛ پس absolute نسبت به آن
     می‌نشیند و کل عرض صفحه را می‌گیرد (fixed اینجا به تله می‌افتد). */
  .sa-switch { position: static; }
  .sa-switch-panel {
    position: absolute; top: calc(100% + 4px); inset-inline-start: auto;
    left: 12px; right: 12px; width: auto; max-height: 60vh;
  }
  .sa-switch-item { grid-template-columns: minmax(0, 1fr); }
  .sa-switch-meta { grid-column: 1; grid-row: 1; }
  .sa-switch-acts { grid-column: 1; grid-row: 2; justify-self: stretch; }
  .sa-switch-act { flex: 1; justify-content: center; min-height: 42px; }
}

.panel-page-title {
  font-size: 1.28rem;
  font-weight: 900;
  margin: 0;
  line-height: 1.25;
  color: var(--ink);
}
.panel-page-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 2px 0 0;
  line-height: 1.35;
}
.mobile-nav-toggle {
  display: none;
}

/* کانتینر محتوای اصلی پیشخوان */
.panel-content {
  flex: 1;
  padding: 24px 28px 48px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* پیام‌های فلش */
.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 28px 0;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
}

/* ریسپانسیو موبایل و تبلت برای سایدبار */
@media (max-width: 991px) {
  .panel-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: 285px;
    z-index: 100;
    transform: translateX(105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.35);
  }
  body.sidebar-open .panel-sidebar {
    transform: translateX(0);
  }
  .mobile-sidebar-close {
    display: inline-grid;
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }
  .mobile-nav-toggle {
    display: inline-grid;
  }
  .panel-topbar {
    padding: 12px 18px;
  }
  .panel-content {
    padding: 18px 16px 40px;
  }
  .flash-stack {
    padding: 12px 16px 0;
  }
}

/* ── مؤلفه‌های صفحات پیشخوان (Billing, Tickets, Sites, New Demo) ───────────── */
.billing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.billing-hero-main {
  flex: 1;
  min-width: 260px;
}
.billing-hero-main h2 {
  margin: 6px 0 8px;
  font-size: 1.45rem;
}
.billing-hero-main p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}
.billing-cycle-switch {
  display: inline-flex;
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.cycle-btn {
  padding: 8px 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s;
}
.cycle-btn.active {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  box-shadow: var(--shadow-sm);
}

.section-card {
  margin-bottom: 24px;
  padding: 24px 28px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 {
  margin: 0;
  font-size: 1.18rem;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-grid-4 {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1.2fr auto;
  gap: 16px;
  align-items: end;
}
@media (max-width: 900px) {
  .form-grid-2, .form-grid-4 {
    grid-template-columns: 1fr;
  }
}
.input-group {
  display: flex;
  gap: 6px;
}
.input-group .input {
  flex: 1;
}

.quote-preview {
  margin-top: 18px;
  padding: 16px 20px;
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  color: var(--ink-2);
}
.quote-row strong {
  font-variant-numeric: tabular-nums;
}
.quote-total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
}
.quote-total strong {
  color: var(--acc);
  font-size: 1.25rem;
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
@media (max-width: 960px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }
}
.plan-popular {
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 3px var(--acc-soft), var(--shadow) !important;
}
.plan-ribbon {
  position: absolute;
  top: -12px;
  inset-inline-start: 20px;
  background: var(--acc);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(194, 65, 12, 0.3);
}
.plan-head h3 {
  font-size: 1.3rem;
  margin: 0 0 4px;
}
.plan-tagline {
  font-size: 0.84rem;
  color: var(--muted);
  min-height: 2.6em;
  margin: 0 0 14px;
}
.plan-price-block {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.price-strike {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-bottom: 2px;
}
.price-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-main strong {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.price-main span {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}
.price-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}
.plan-quotas {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
}
.plan-quota-title {
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 6px;
}
.plan-quotas ul {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.plan-quotas li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink-2);
}
.plan-quotas li strong {
  color: var(--acc);
}
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
  margin-bottom: 20px;
  flex: 1;
}
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink-2);
}
.plan-features li.muted {
  color: var(--muted);
  opacity: 0.7;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.addon-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s, border-color 0.18s;
}
.addon-card:hover {
  transform: translateY(-2px);
  border-color: var(--acc);
}
.addon-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.addon-card h4 {
  font-size: 1.05rem;
  margin: 0;
}
.addon-card p {
  font-size: 0.84rem;
  color: var(--muted);
  flex: 1;
  margin: 0;
  line-height: 1.6;
}
.addon-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--acc);
  font-variant-numeric: tabular-nums;
}
.addon-price span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.addon-buy-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.filter-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-tab {
  padding: 7px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 9px;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
}
.filter-tab:hover {
  color: var(--ink);
  background: var(--surface-2);
}
.filter-tab.active {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.empty-state {
  text-align: center;
  padding: 48px 20px;
  background: var(--surface);
  border: 1.5px dashed var(--line-2);
  border-radius: 20px;
}
.empty-ico {
  font-size: 3rem;
  margin-bottom: 12px;
}
.empty-state h3 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.empty-state p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: 0.9rem;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.ticket-msg {
  padding: 18px 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  max-width: 85%;
}
.ticket-msg.msg-admin {
  background: var(--surface-2);
  border-inline-start: 4px solid var(--acc);
  align-self: flex-start;
}
.ticket-msg.msg-user {
  background: var(--surface);
  border-inline-start: 4px solid var(--ok);
  align-self: flex-end;
}
.ticket-msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.ticket-msg-head strong {
  color: var(--ink);
  font-size: 0.88rem;
}
.ticket-msg-body {
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-line;
}
.grid-2-asym {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 900px) {
  .grid-2-asym {
    grid-template-columns: 1fr;
  }
}
.sla-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sla-list li {
  padding: 12px 14px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sla-list strong {
  font-size: 0.95rem;
  color: var(--ink);
}
.sla-list p {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.meta-kv-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.meta-kv-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.meta-kv-list li:last-child {
  border-bottom: 0;
}
.meta-kv-list span {
  color: var(--muted);
}
.meta-kv-list strong {
  color: var(--ink);
}
.step-guide-card {
  position: relative;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--acc-soft);
  color: var(--acc);
  font-weight: 900;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  background: var(--surface-2);
}
.faq-item summary {
  font-weight: 800;
  font-size: 0.94rem;
  cursor: pointer;
  color: var(--ink);
}
.faq-item p {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.8;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.88rem;
}
.data-table th {
  padding: 12px 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.invoice-paper {
  max-width: 850px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
}
.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}
.invoice-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.88rem;
}
.invoice-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.party-box {
  background: var(--surface-2);
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.party-box h4 {
  font-size: 0.95rem;
  margin: 0 0 8px;
  color: var(--acc);
}
.party-box p {
  margin: 0 0 4px;
  font-size: 0.86rem;
}
.text-emerald { color: var(--ok) !important; }
.text-muted { color: var(--muted) !important; }
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.text-center { text-align: center; }

/* ── سربرگ صفحه در داشبورد/ادمین ────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head__title h1 { margin-bottom: 4px; }
.page-head__title p { margin: 0; color: var(--muted); font-size: 0.94rem; }
.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── کارت‌ها و شبکه ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(18px, 2.8vw, 28px);
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
.card--flat { box-shadow: var(--shadow-sm); }
.card--accent {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-color: var(--line-2);
}
.card--dark {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  border-color: transparent;
}
.card--dark h1, .card--dark h2, .card--dark h3, .card--dark b { color: var(--ink-btn-fg); }
.card--dark .muted { color: rgba(246, 242, 234, 0.72); }

.grid { display: grid; gap: 16px; }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* ── کارت‌های KPI و آمار ─────────────────────────────────────────────────── */
.stats, .kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  margin-bottom: 20px;
}
.stat, .kpi-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.stat b, .kpi-card__val {
  display: block;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat span, .kpi-card__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.kpi-card__icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--acc-soft);
  color: var(--acc);
  display: grid;
  place-items: center;
  margin-bottom: 6px;
}
.kpi-card__icon.ok { background: var(--ok-soft); color: var(--ok); }
.kpi-card__icon.warn { background: var(--warn-soft); color: var(--warn); }
.kpi-card__icon svg { width: 20px; height: 20px; }

/* ── نشان‌ها (Badges) ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.badge.ok, .badge-emerald { background: var(--ok-soft); color: var(--ok); border-color: rgba(15, 118, 110, 0.25); }
.badge.bad, .badge-bad { background: var(--bad-soft); color: var(--bad); border-color: rgba(220, 38, 38, 0.25); }
.badge.warn, .badge-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(180, 83, 9, 0.25); }
.badge.gold, .badge.acc, .badge-brand { background: var(--acc-soft); color: var(--acc); border-color: rgba(194, 65, 12, 0.25); }
.badge.ink { background: var(--ink-btn-bg); color: var(--ink-btn-fg); border-color: transparent; }
.badge-muted { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* ── بنرها و هشدارها ────────────────────────────────────────────────────── */
.note {
  padding: 14px 18px;
  border-radius: var(--r);
  font-size: 0.9rem;
  line-height: 1.85;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--ink);
}
.note--warn { background: var(--warn-soft); border-color: rgba(180, 83, 9, 0.3); color: var(--ink); }
.note--bad { background: var(--bad-soft); border-color: rgba(220, 38, 38, 0.3); color: var(--bad); }
.note--ok { background: var(--ok-soft); border-color: rgba(15, 118, 110, 0.3); color: var(--ink); }
.flashes { margin: 16px 0; }
.flash {
  padding: 13px 18px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.flash--error { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.flash--success { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

/* ── فرم‌ها و ورودی‌ها ──────────────────────────────────────────────────── */
label {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  margin: 0 0 7px;
  color: var(--ink);
}
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], input[type=search], textarea, select {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--line-2);
  border-radius: 13px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s;
}
input:focus, textarea:focus, select:focus {
  outline: 0;
  border-color: var(--acc);
  box-shadow: 0 0 0 4px var(--acc-soft);
}
textarea { min-height: 104px; resize: vertical; line-height: 1.9; }
.field { margin-bottom: 18px; }
.hint { font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; line-height: 1.75; }
.err { font-size: 0.82rem; font-weight: 700; color: var(--bad); margin: 6px 0 0; display: none; }
.err.show { display: block; }

.opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); }
.opt {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  cursor: pointer;
  background: var(--surface);
  color: var(--ink);
  transition: all 0.16s;
  text-align: start;
  font: inherit;
}
.opt:hover { border-color: var(--line-2); background: var(--surface-2); }
.opt.sel {
  border-color: var(--acc);
  background: var(--acc-soft);
  box-shadow: 0 0 0 3px var(--acc-soft);
}
.opt b { display: block; font-size: 0.92rem; margin-bottom: 3px; }
.opt small { color: var(--muted); font-size: 0.78rem; line-height: 1.65; display: block; }
.swatches { display: flex; gap: 5px; margin-top: 8px; }
.swatches i { width: 16px; height: 16px; border-radius: 5px; display: block; border: 1px solid rgba(0,0,0,.12); }

/* ── جدول‌ها ─────────────────────────────────────────────────────────────── */
.tw {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 580px; }
th, td {
  padding: 12px 15px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}
th {
  background: var(--surface-2);
  font-size: 0.79rem;
  font-weight: 800;
  color: var(--muted);
}
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ── کارت‌های سایت در داشبورد ────────────────────────────────────────────── */
.sitecard {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.sitecard:hover {
  border-color: var(--line-2);
  box-shadow: var(--shadow-lg);
}
.sitecard--off { background: var(--surface-2); border-style: dashed; }
.sitecard__head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
}
.thumb {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: #fff;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-weight: 900;
  font-size: 21px;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.sitecard__brand {
  font-size: 1.18rem;
  margin: 0 0 6px;
}
.sitecard__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.site__url {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.84rem;
  color: var(--acc);
  font-weight: 700;
  font-family: ui-monospace, Menlo, monospace;
}
.expiry {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.expiry__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 7px;
}
.expiry__bar {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-2);
  overflow: hidden;
}
.expiry__fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}
.spacer { flex: 1; }

/* ── نوارهای سهمیهٔ هوش مصنوعی (AI Quotas) ───────────────────────────────── */
.quota-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.quota-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.quota-card.warn { border-color: var(--warn); background: var(--warn-soft); }
.quota-card.exhausted { border-color: var(--bad); background: var(--bad-soft); }
.quota-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.quota-card__title { font-weight: 800; font-size: 0.9rem; color: var(--ink); }
.quota-card__nums {
  font-size: 0.82rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
}
.quota-bar {
  height: 8px;
  border-radius: 99px;
  background: var(--bg-2);
  overflow: hidden;
}
.quota-bar__fill {
  height: 100%;
  border-radius: 99px;
  background: var(--ok);
  transition: width 0.35s;
}
.quota-card.warn .quota-bar__fill { background: var(--warn); }
.quota-card.exhausted .quota-bar__fill { background: var(--bad); }

/* ── کارت‌های پلن تعرفه و سوییچ سالانه/ماهانه ────────────────────────────── */
.bill-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
}
.bill-toggle button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s;
}
.bill-toggle button.active, .bill-toggle button[aria-pressed="true"] {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
}
.bill-toggle em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 900;
  background: var(--acc-bright);
  color: #1A0B03;
  padding: 2px 9px;
  border-radius: 99px;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}
.plan-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.plan-card:hover { transform: translateY(-2px); }
.plan-card.pop {
  border: 2px solid var(--acc-bright);
  box-shadow: 0 0 0 6px var(--acc-soft), var(--shadow-lg);
}
.plan-card__badge {
  position: absolute;
  top: -13px;
  inset-inline-start: 22px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 99px;
}
.plan-card h3 { font-size: 1.25rem; margin-bottom: 4px; }
.plan-card__for { color: var(--muted); font-size: 0.86rem; min-height: 2.8em; margin-bottom: 12px; }
.plan-card__price {
  margin: 8px 0 4px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-card__price strong {
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.plan-card__price span { color: var(--muted); font-size: 0.86rem; font-weight: 700; }
.plan-card__strike {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-inline-end: 6px;
}
.plan-card__note { font-size: 0.8rem; color: var(--ok); font-weight: 700; min-height: 1.6em; margin-bottom: 14px; }
.plan-card__list {
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 0.88rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.plan-card__list li { display: flex; gap: 9px; align-items: flex-start; }
.plan-card__list li svg { width: 17px; height: 17px; flex: none; margin-top: 4px; color: var(--ok); }
.plan-card__list li.off { color: var(--muted); opacity: 0.7; }
.plan-card__list li.off svg { color: var(--muted); }

/* ── بسته‌های افزایشی AI ─────────────────────────────────────────────────── */
.pack-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.pack-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, transform 0.18s;
}
.pack-card:hover { border-color: var(--acc); transform: translateY(-2px); }
.pack-card__price {
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--acc);
}

/* ── گفت‌وگوی تیکت پشتیبانی ──────────────────────────────────────────────── */
.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 18px 0;
}
.chat-msg {
  max-width: 86%;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.chat-msg--user {
  align-self: flex-start;
  background: var(--surface);
  border-start-start-radius: 6px;
}
.chat-msg--staff {
  align-self: flex-end;
  background: var(--ok-soft);
  border-color: rgba(15, 118, 110, 0.28);
  border-start-end-radius: 6px;
}
.chat-msg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.chat-msg__head b { color: var(--ink); font-size: 0.84rem; }
.chat-msg__body {
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--ink);
}

/* ── گالری دموها و نمونه‌ها ──────────────────────────────────────────────── */
.gal {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}
.demo {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
}
.demo:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--acc);
  color: var(--ink);
}
.demo__shot {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.demo__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s ease;
}
.demo:hover .demo__shot img { transform: scale(1.04); }
.demo__shot--ph {
  display: grid;
  place-items: center;
  font-family: "Vazirmatn", Tahoma, system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.demo__body { padding: 15px 18px 17px; flex: 1; display: flex; flex-direction: column; }
.demo__body b { display: block; font-size: 1.02rem; margin-bottom: 3px; }
.demo__body span { font-size: 0.84rem; color: var(--muted); }
.demo__ext {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--acc);
  margin-top: auto;
  padding-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.gal__more { text-align: center; margin-top: 28px; }

/* ── ویزارد ساخت سایت و آپلود ────────────────────────────────────────────── */
.steps { display: flex; gap: 7px; margin-bottom: 24px; }
.steps i {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--bg-2);
  transition: background 0.3s;
}
.steps i.on { background: var(--ok); }
.steps i.cur { background: var(--acc-bright); }
.pane { display: none; }
.pane.on { display: block; }
.formrow {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.drop {
  border: 2px dashed var(--line-2);
  border-radius: 16px;
  padding: 28px 18px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.18s;
}
.drop:hover, .drop.over {
  border-color: var(--acc);
  background: var(--acc-soft);
}
.drop b { display: block; font-size: 0.96rem; margin-bottom: 4px; }
.drop small { color: var(--muted); font-size: 0.8rem; }
#logoPrev {
  max-height: 96px;
  max-width: 100%;
  margin-top: 12px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--surface);
}
.logo-ok { color: var(--ok); font-weight: 700; font-size: 0.85rem; margin-top: 9px; display: none; }
.mediagrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.mediacell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 1;
}
.mediacell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mediacell span {
  position: absolute;
  bottom: 4px;
  inset-inline-start: 4px;
  font-size: 10px;
  background: rgba(23, 20, 15, 0.78);
  color: #fff;
  padding: 1px 5px;
  border-radius: 5px;
}
.mediadel {
  position: absolute;
  top: 4px;
  inset-inline-end: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: var(--bad);
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}
.prodrow {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: var(--surface-2);
}
.prodrow__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
.prodrow__del {
  border: 0;
  background: transparent;
  color: var(--bad);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.prodrow__grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1.2fr 0.9fr 1.4fr auto;
  align-items: center;
}
.p-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 11px;
  font-size: 0.78rem;
  cursor: pointer;
  background: var(--surface);
  margin: 0;
  white-space: nowrap;
}
.p-file input { display: none; }

/* ── لیست گام‌ها، کپی‌باکس، لاگ و اسپینر ────────────────────────────────── */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
  display: grid;
  gap: 12px;
}
.steps-list li {
  counter-increment: step;
  position: relative;
  padding: 14px 16px 14px 16px;
  padding-inline-start: 52px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  font-weight: 900;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
}
.steps-list li b { display: block; font-size: 0.95rem; margin-bottom: 3px; }
.steps-list li p { margin: 0; font-size: 0.85rem; color: var(--muted); }

.copybox {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.copybox code {
  flex: 1;
  direction: ltr;
  text-align: start;
  font-family: ui-monospace, Menlo, monospace;
  font-weight: 700;
  font-size: 0.88rem;
}

.log {
  background: #141210;
  color: #E7E0D3;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.85;
  padding: 16px;
  border-radius: 14px;
  max-height: 320px;
  overflow: auto;
  direction: ltr;
  text-align: start;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid var(--line);
}
.spin {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 4px solid var(--line-2);
  border-top-color: var(--acc-bright);
  animation: sp 0.9s linear infinite;
}
@keyframes sp { to { transform: rotate(360deg); } }

.livebox {
  padding: 18px 20px;
  border: 1.5px solid rgba(15, 118, 110, 0.35);
  border-radius: 16px;
  background: var(--ok-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.livebox a.livebox__url {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--ok);
  direction: ltr;
  font-family: ui-monospace, Menlo, monospace;
}

/* ── صفحهٔ ورود دوتایی (Editorial Auth Split) ────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
  margin-block: clamp(24px, 5vw, 56px);
}
.auth-showcase {
  background: var(--ink-btn-bg);
  color: var(--ink-btn-fg);
  border-radius: var(--r-lg);
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.auth-showcase::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  bottom: -180px;
  inset-inline-start: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 43, 0.28), transparent 68%);
  pointer-events: none;
}
.auth-showcase h2 { color: var(--ink-btn-fg); font-size: clamp(1.5rem, 3vw, 2.2rem); margin-top: 12px; }
.auth-showcase p { color: rgba(246, 242, 234, 0.78); font-size: 0.96rem; }
.auth-perks {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.auth-perks li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}
.auth-perks li i {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(255, 106, 43, 0.2);
  color: var(--acc-bright);
  display: grid;
  place-items: center;
  font-style: normal;
  flex: none;
}

/* ── پنل ادمین (سازگار با کلاس‌های قبلی و جدید) ─────────────────────────── */
.admin {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-block: 22px 64px;
}
.aside {
  position: sticky;
  top: 86px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: var(--shadow);
}
.aside a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.89rem;
  font-weight: 700;
  transition: all 0.16s;
}
.aside a:hover { background: var(--surface-2); color: var(--ink); }
.aside a.on { background: var(--ink-btn-bg); color: var(--ink-btn-fg); }
.aside hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

/* ── تب‌های داخل صفحه ───────────────────────────────────────────────────── */
.tabs-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.on {
  color: var(--acc);
  border-bottom-color: var(--acc);
}
.tab-pane { display: none; }
.tab-pane.on { display: block; }

/* ── فوتر ───────────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 36px 0 44px;
  background: var(--surface-2);
}
.foot__in {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 32px;
  align-items: start;
}
.foot__brand p { margin: 6px 0 0; }
.foot__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot__cols h4 { margin: 0 0 10px; font-size: 0.92rem; font-weight: 800; color: var(--ink); }
.foot__cols a { display: block; font-size: 0.85rem; color: var(--muted); padding: 4px 0; text-decoration: none; }
.foot__cols a:hover { color: var(--acc); }
.foot__bar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px;
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) {
  .foot__in { grid-template-columns: 1fr; gap: 22px; }
  .foot__cols { grid-template-columns: 1fr 1fr; gap: 18px; }
}
.foot b { font-family: "Vazirmatn", Tahoma, system-ui, sans-serif; font-size: 1rem; }
.foot p { margin: 4px 0 0; font-size: 0.84rem; color: var(--muted); max-width: 420px; }
.foot__links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot__links a { font-size: 0.88rem; font-weight: 700; color: var(--ink-2); }
.foot__links a:hover { color: var(--acc); }
.foot__note { font-size: 0.78rem; color: var(--muted); }

/* ── فاکتور رسمی قابل چاپ ───────────────────────────────────────────────── */
.invoice-box {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 44px);
  max-width: 820px;
  margin: 24px auto;
  box-shadow: var(--shadow-lg);
}
@media print {
  .topbar, .app-sidebar, .mobile-nav, .foot, .no-print { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .app-layout { display: block !important; padding: 0 !important; }
  .invoice-box { box-shadow: none !important; border: 1px solid #000 !important; margin: 0 !important; max-width: 100% !important; }
}

/* ── ریسپانسیو ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .app-layout, .admin { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .mobile-nav { display: grid; }
  body { padding-bottom: 70px; }
  .aside {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .plans-grid, .auth-split { grid-template-columns: 1fr; }
  .plan-card.pop { order: -1; }
}
@media (max-width: 640px) {
  .prodrow__grid { grid-template-columns: 1fr; }
  .opts { grid-template-columns: 1fr 1fr; }
  .topbar__in .nav a:not(.btn) { display: none; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   Lucide Icons, Persian Datepicker & Mobile Topbar Refinements
   ═══════════════════════════════════════════════════════════════════════════ */
svg.lucide {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  vertical-align: middle;
  flex-shrink: 0;
}
.btn svg.lucide {
  width: 16px;
  height: 16px;
}
.btn-xs svg.lucide, .btn--sm svg.lucide, .btn-sm svg.lucide {
  width: 15px;
  height: 15px;
}
.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}
.nav-ico svg.lucide {
  width: 18px;
  height: 18px;
}
.addon-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--acc-tint);
  color: var(--acc);
  margin-bottom: 10px;
}
.addon-icon svg.lucide {
  width: 24px;
  height: 24px;
}
.empty-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--acc-tint);
  color: var(--acc);
  margin: 0 auto 14px;
}
.empty-ico svg.lucide {
  width: 32px;
  height: 32px;
}

/* ── بهینه‌سازی هدر پنل (Topbar) در موبایل (بدون شلوغی و به‌هم‌ریختگی) ── */
@media (max-width: 768px) {
  .panel-topbar {
    padding: 10px 14px !important;
    min-height: 58px !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  .panel-topbar-right {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .panel-topbar-right > div {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .panel-page-title {
    font-size: 1.02rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .panel-page-sub {
    display: none !important;
  }
  .panel-topbar-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }
  .panel-topbar-left .btn {
    padding: 6px 10px !important;
    font-size: 0.76rem !important;
    min-height: 34px !important;
    white-space: nowrap !important;
  }
  .panel-topbar-left .btn-ghost.hide-sm {
    display: none !important;
  }
  .panel-content {
    padding: 14px !important;
  }
  .page-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
  }
  .page-head__title h1 {
    font-size: 1.25rem !important;
  }
  .page-head__title p {
    font-size: 0.84rem !important;
    line-height: 1.65 !important;
  }
  .page-head__actions {
    display: flex !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .page-head__actions .btn {
    flex: 1 !important;
    justify-content: center !important;
  }
}

/* ── استایل تقویم شمسی (Persian Datepicker) هماهنگ با تم زعفرانی روی کاغذ ── */
.pdp-box {
  position: absolute;
  z-index: 99999;
  width: 288px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  box-shadow: var(--sh-lg);
  padding: 14px;
  display: none;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  direction: rtl;
}
.pdp-box.open { display: block; }
.pdp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pdp-nav {
  width: 32px; height: 32px; border: 1px solid var(--line);
  background: var(--surface-2); border-radius: 9px; cursor: pointer;
  font-size: 18px; color: var(--ink); line-height: 1;
}
.pdp-nav:hover { background: var(--acc); color: #fff; border-color: var(--acc); }
.pdp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.pdp-wd { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 700; }
.pdp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pdp-cell { height: 34px; display: flex; align-items: center; justify-content: center; font-size: 13px; border-radius: 9px; }
.pdp-day { cursor: pointer; color: var(--ink); font-weight: 500; }
.pdp-day:hover { background: var(--acc-tint); color: var(--acc); }
.pdp-sel { background: var(--acc) !important; color: #fff !important; font-weight: 800; }
.pdp-empty { visibility: hidden; }
.pdp-foot { display: flex; gap: 8px; margin-top: 12px; }
.pdp-today, .pdp-ok {
  flex: 1; padding: 8px; border: none; border-radius: 9px;
  cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px;
}
.pdp-today { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.pdp-ok { background: var(--acc); color: #fff; }
.pdp-msel, .pdp-ysel {
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-family: inherit;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
}

/* ── نوار پایین موبایل پنل صاحب فروشگاه + میانبرهای سریع + استودیو انیمیشنی ساخت سایت ── */
html, body {
  overflow-x: clip;
  max-width: 100vw;
}
.panel-mobile-bottom-nav { display: none; }

@media (max-width: 991px) {
  body:not(.sidebar-open) .panel-sidebar {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  body.sidebar-open .panel-sidebar {
    display: flex !important;
    visibility: visible !important;
    pointer-events: auto !important;
    right: 0 !important;
    transform: none !important;
  }
  .panel-main {
    width: 100% !important;
    max-width: 100vw !important;
    margin-right: 0 !important;
    overflow-x: hidden;
  }
  .panel-content {
    padding-bottom: 84px !important;
  }
  .panel-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: var(--surface);
    border-top: 1px solid var(--line-2);
    box-shadow: 0 -6px 24px rgba(23, 20, 15, .09);
    z-index: 950;
    padding: 4px 6px env(safe-area-inset-bottom, 4px);
  }
  .pmbn-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; font-size: 0.68rem; font-weight: 700; color: var(--muted);
    text-decoration: none; border-radius: 10px; transition: color .18s;
  }
  .pmbn-item svg, .pmbn-item i { width: 20px; height: 20px; }
  .pmbn-item.active { color: var(--acc); }
  .pmbn-cta { position: relative; top: -10px; }
  .pmbn-cta-circle {
    width: 44px; height: 44px; border-radius: 14px;
    background: linear-gradient(135deg, #C2410C, #FF6A2B);
    color: #fff; display: grid; place-items: center;
    box-shadow: 0 6px 16px rgba(194, 65, 12, .35);
  }
  .pmbn-cta-circle svg, .pmbn-cta-circle i { width: 22px; height: 22px; color: #fff; }
}

/* میانبرهای سریع مدیریت فروشگاه در کارت‌های سایت */
.site-quick-shortcuts {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.site-quick-shortcuts__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.site-quick-shortcuts__label svg { width: 13px; height: 13px; }
.sq-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 99px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: all .18s ease;
}
.sq-pill svg, .sq-pill i { width: 13.5px; height: 13.5px; color: var(--acc); }
.sq-pill:hover {
  background: var(--acc-tint);
  border-color: var(--acc);
  color: var(--acc);
  transform: translateY(-1px);
}

/* استودیو گرافیکی و انیمیشنی ساخت زندهٔ سایت */
.build-studio {
  background: linear-gradient(145deg, #17140F 0%, #241E17 60%, #2E2116 100%);
  color: #F6F2EA;
  border-radius: 22px;
  padding: clamp(20px, 3.5vw, 34px);
  border: 1px solid rgba(255, 106, 43, .28);
  box-shadow: 0 24px 60px -20px rgba(23, 20, 15, .45);
  position: relative;
  overflow: hidden;
}
.build-studio__glow {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 106, 43, .22), transparent 70%);
  top: -140px; left: -100px;
  pointer-events: none;
  animation: bsPulseGlow 4s ease-in-out infinite alternate;
}
@keyframes bsPulseGlow {
  from { transform: scale(1); opacity: .7; }
  to { transform: scale(1.25); opacity: 1; }
}
.build-studio__grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 900px) {
  .build-studio__grid { grid-template-columns: 1fr; }
}
.bs-head-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 99px;
  background: rgba(255, 106, 43, .16);
  border: 1px solid rgba(255, 106, 43, .38);
  color: #FF8552; font-size: 0.78rem; font-weight: 800;
  margin-bottom: 10px;
}
.bs-dot-pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: #FF6A2B;
  box-shadow: 0 0 0 0 rgba(255, 106, 43, .7);
  animation: bsDot 1.4s infinite;
}
@keyframes bsDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 106, 43, .7); }
  70% { box-shadow: 0 0 0 9px rgba(255, 106, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 106, 43, 0); }
}
.bs-progress-wrap {
  margin: 16px 0 20px;
  background: rgba(255, 255, 255, .07);
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .1);
}
.bs-progress-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.84rem; margin-bottom: 8px;
}
.bs-progress-bar {
  height: 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden; position: relative;
}
.bs-progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #C2410C, #FF6A2B, #FBBF24);
  background-size: 200% 100%;
  animation: bsShimmer 2.2s linear infinite;
  transition: width .7s cubic-bezier(.4, 0, .2, 1);
}
@keyframes bsShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.bs-steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 9px;
}
.bs-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 14px; border-radius: 13px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: all .3s ease;
  opacity: .52;
}
.bs-step.done {
  opacity: 1;
  background: rgba(15, 118, 110, .16);
  border-color: rgba(45, 212, 191, .35);
}
.bs-step.active {
  opacity: 1;
  background: rgba(255, 106, 43, .15);
  border-color: #FF6A2B;
  box-shadow: 0 6px 20px rgba(255, 106, 43, .18);
  transform: translateX(-3px);
}
.bs-step-ico {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255, 255, 255, .08); color: #F6F2EA;
  font-weight: 800; font-size: 0.78rem;
}
.bs-step.done .bs-step-ico { background: #0F766E; color: #fff; }
.bs-step.active .bs-step-ico { background: #FF6A2B; color: #fff; animation: bsPulseGlow 1.2s infinite alternate; }
.bs-step-body b { display: block; font-size: 0.88rem; color: #F6F2EA; }
.bs-step-body p { margin: 2px 0 0; font-size: 0.76rem; color: rgba(246, 242, 234, .72); line-height: 1.55; }

/* بوم گرافیکی پیش‌نمایش زنده در حال ساخت */
.bs-canvas {
  background: #110F0C;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.bs-browser-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: #1C1813;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  font-size: 0.75rem;
}
.bs-dots { display: flex; gap: 5px; }
.bs-dots i { width: 9px; height: 9px; border-radius: 50%; background: #EF4444; display: inline-block; }
.bs-dots i:nth-child(2) { background: #F59E0B; }
.bs-dots i:nth-child(3) { background: #10B981; }
.bs-url {
  background: rgba(255,255,255,.06); padding: 3px 12px; border-radius: 99px;
  font-family: monospace; color: #E2DBD0; direction: ltr;
}
.bs-screen {
  padding: 16px;
  display: grid; gap: 12px;
  min-height: 300px;
  position: relative;
}
.bs-mock-nav {
  height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.08);
}
.bs-mock-hero {
  height: 108px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(194,65,12,.35), rgba(255,106,43,.12));
  border: 1px solid rgba(255,106,43,.3);
  padding: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  position: relative; overflow: hidden;
}
.bs-mock-hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-100%);
  animation: bsSweep 2.4s infinite;
}
@keyframes bsSweep { to { transform: translateX(100%); } }
.bs-mock-cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.bs-mock-card {
  height: 92px; border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  padding: 8px; display: flex; flex-direction: column; justify-content: space-between;
  transition: all .4s ease;
}
.bs-mock-card.lit {
  border-color: rgba(255,106,43,.45);
  background: rgba(255,106,43,.09);
}
.bs-mock-img {
  height: 46px; border-radius: 7px;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
}
.bs-mock-line {
  height: 7px; border-radius: 4px; background: rgba(255,255,255,.18); width: 75%;
}
.bs-mock-line.sm { width: 45%; background: #FF6A2B; }

/* ═══════════════════════════════════════════════════════════════════════════
   اصلاحات جامع دسکتاپ، گریدها، جداول (.tbl) و جلوگیری از سرریز محتوا — V10.0
   ═══════════════════════════════════════════════════════════════════════════ */
.panel-content, .flash-stack {
  max-width: 1460px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0;
}
.panel-main, .card, .field, .table-wrap, .tw {
  min-width: 0;
  box-sizing: border-box;
}
.grid {
  display: grid;
  gap: 18px;
  width: 100%;
  min-width: 0;
}
.grid > .card + .card,
.form-grid-2 > .card + .card {
  margin-top: 0 !important;
}
.grid > * {
  min-width: 0;
}
@media (min-width: 960px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 640px) and (max-width: 959px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 639px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr !important; }
}
.card .grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
@media (max-width: 639px) {
  .card .grid--2, .card .grid--3 {
    grid-template-columns: 1fr !important;
  }
}

/* استایل یکپارچه برای جداول .tbl (در صفحات همکاری در فروش، وبلاگ/برگه‌ها، زیرساخت و گزارشات) */
table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.87rem;
  text-align: right;
}
table.tbl th {
  padding: 12px 14px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 1.5px solid var(--line-2);
  white-space: nowrap;
}
table.tbl td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.tbl tbody tr:last-child td {
  border-bottom: none;
}
table.tbl tbody tr:hover td {
  background: rgba(194, 65, 12, 0.03);
}

/* بهبود ورودی‌ها و سلکت‌ها برای جلوگیری از بیرون‌زدگی در دسکتاپ */
.field input, .field select, .field textarea, input.input, select.input, textarea.input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* منوی موبایل صفحات عمومی */
.nav__burger { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.nav__drawer { display: none; position: absolute; top: 100%; right: 0; left: 0; background: var(--surface, #fff); border-bottom: 1px solid var(--line); padding: 8px 16px 12px; flex-direction: column; z-index: 59; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
.nav__drawer.open { display: flex; }
.nav__drawer a { padding: 9px 6px; font-size: .9rem; font-weight: 700; color: var(--ink-2); text-decoration: none; border-radius: 8px; }
.nav__drawer a:hover { background: var(--line); color: var(--ink); }
@media (max-width: 960px) {
  .nav__burger { display: inline-flex; }
  .nav__links { display: none; }
}

/* کمکی: متن کوتاه در موبایل */
.only-mobile { display: none; }
@media (max-width: 620px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline; }
}
