/* ============================================================
   Panelland — Design System (design-system/panelland/MASTER.md)
   ------------------------------------------------------------
   Trust blue (#2563EB) + orange CTA (#C2410C) · Light by default,
   optional dark · Vazirmatn · Subtle motion · RTL-first
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-2: #F1F5F9;
  --muted-bg: #E9EFF8;
  --text: #1E293B;
  --text-muted: #475569;
  --text-faint: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-soft: #EFF6FF;
  --primary-soft-border: #BFDBFE;
  --on-primary: #FFFFFF;
  --link: #1D4ED8;

  --cta: #C2410C;
  --cta-hover: #9A3412;
  --cta-soft: #FFF7ED;
  --on-cta: #FFFFFF;

  --ok: #15803D;   --ok-soft: #F0FDF4;   --ok-border: #BBF7D0;
  --warn: #B45309; --warn-soft: #FFFBEB; --warn-border: #FDE68A;
  --danger: #DC2626; --danger-hover: #B91C1C; --danger-soft: #FEF2F2; --danger-border: #FECACA;
  --info: #0369A1; --info-soft: #F0F9FF; --info-border: #BAE6FD;

  --pf-telegram: #229ED9;
  --pf-instagram: #E1306C;
  --pf-tiktok: #111827;
  --pf-youtube: #E11D1D;

  --glass: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(226, 232, 240, 0.9);
  --overlay: rgba(15, 23, 42, 0.55);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 48px rgba(15, 23, 42, 0.16);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.35);

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;
  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

  --font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --container: 1200px;
  --header-h: 68px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0B1220;
  --surface: #111A2E;
  --surface-2: #16213A;
  --muted-bg: #1B2843;
  --text: #E5EAF2;
  --text-muted: #A9B6CA;
  --text-faint: #8A99B1;
  --border: #22304A;
  --border-strong: #2F4060;
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --primary-soft: #14223F;
  --primary-soft-border: #1E3A6B;
  --link: #93C5FD;
  --cta: #C2410C;
  --cta-hover: #EA580C;
  --cta-soft: #2A1A10;
  --ok: #4ADE80;   --ok-soft: #0F2A1B;   --ok-border: #1C4A30;
  --warn: #FBBF24; --warn-soft: #2B2210; --warn-border: #4A3A12;
  --danger: #F87171; --danger-hover: #EF4444; --danger-soft: #2E1414; --danger-border: #5A2222;
  --info: #7DD3FC; --info-soft: #0E2433; --info-border: #164059;
  --pf-tiktok: #F1F5F9;
  --glass: rgba(17, 26, 46, 0.72);
  --glass-border: rgba(47, 64, 96, 0.7);
  --overlay: rgba(2, 6, 23, 0.7);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 24px 56px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(96, 165, 250, 0.45);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 var(--space-sm); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0 0 var(--space-md); }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
::selection { background: var(--primary-soft-border); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: var(--r-sm);
  font-weight: 700; transition: top .2s;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Icons ---------- */
.i { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--surface); --btn-fg: var(--text); --btn-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: var(--r-sm); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 700; font-size: 0.95rem; line-height: 1.2; white-space: nowrap;
  text-decoration: none !important; cursor: pointer; user-select: none;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s, box-shadow .18s, transform .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: var(--primary); box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .55); }
.btn-primary:hover { --btn-bg: var(--primary-hover); --btn-bd: var(--primary-hover); }
.btn-cta { --btn-bg: var(--cta); --btn-fg: var(--on-cta); --btn-bd: var(--cta); box-shadow: 0 8px 20px -8px rgba(194, 65, 12, .6); }
.btn-cta:hover { --btn-bg: var(--cta-hover); --btn-bd: var(--cta-hover); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-bd: var(--border-strong); }
.btn-ghost:hover { --btn-bg: var(--surface-2); }
.btn-soft { --btn-bg: var(--primary-soft); --btn-fg: var(--link); --btn-bd: var(--primary-soft-border); }
.btn-danger { --btn-bg: var(--danger); --btn-fg: #fff; --btn-bd: var(--danger); }
.btn-danger:hover { --btn-bg: var(--danger-hover); }
.btn-danger-soft { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-bd: var(--danger-border); }
.btn-link { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--link); padding-inline: 8px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.875rem; }
.btn-xs { min-height: 32px; padding: 4px 10px; font-size: 0.8125rem; border-radius: 6px; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.0625rem; border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn.is-loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--btn-fg) transparent var(--btn-fg) transparent;
  animation: spin .8s linear infinite;
}
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--text-muted);
  transition: background-color .18s, color .18s, border-color .18s; position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .badge-dot {
  position: absolute; top: 6px; inset-inline-end: 6px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; line-height: 1; border: 2px solid var(--surface);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass); border-bottom: 1px solid var(--glass-border);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); backdrop-filter: saturate(1.6) blur(14px);
}
.nav-inner { display: flex; align-items: center; gap: var(--space-md); height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; color: var(--primary); flex: none; }
.nav-links { display: none; align-items: center; gap: 4px; margin-inline-start: var(--space-md); }
.nav-links a { color: var(--text-muted); font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: var(--r-sm); text-decoration: none; transition: color .15s, background-color .15s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.nav-actions .nav-cta { display: none; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; position: relative; transition: transform .2s, opacity .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
.nav-drawer { border-top: 1px solid var(--border); background: var(--surface); }
.nav-drawer .container { display: grid; gap: 4px; padding-block: 12px 16px; }
.nav-drawer a:not(.btn) { padding: 12px; border-radius: var(--r-sm); color: var(--text); font-weight: 600; text-decoration: none; }
.nav-drawer a:not(.btn):hover { background: var(--surface-2); }
.nav-drawer .btn { margin-top: 8px; }
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .nav-drawer { display: none !important; }
  .nav-actions .nav-cta { display: inline-flex; }
}
.theme-toggle svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: var(--space-3xl); padding-top: var(--space-2xl); color: var(--text-muted); font-size: .925rem; }
.footer-grid { display: grid; gap: var(--space-xl); grid-template-columns: 1fr; align-items: start; }
.footer-brand p { margin: 12px 0 0; max-width: 42ch; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.footer-links a { color: var(--text-muted); padding: 6px 0; }
.footer-links a:hover { color: var(--text); }
.footer-support { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.footer-support a, .footer-support span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--r-full); color: var(--text); font-weight: 600; font-size: .875rem; }
.footer-enamad img { width: 96px; height: 96px; object-fit: contain; background: #fff; border-radius: var(--r-md); padding: 6px; border: 1px solid var(--border); }
.footer-bottom { border-top: 1px solid var(--border); margin-top: var(--space-xl); padding-block: 18px; font-size: .85rem; color: var(--text-faint); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr auto; } }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-2xl); }
@media (min-width: 768px) { .section { padding-block: 72px; } }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: var(--space-xl); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-title { margin-bottom: 8px; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--link); background: var(--primary-soft); border: 1px solid var(--primary-soft-border); padding: 6px 12px; border-radius: var(--r-full); }
.eyebrow .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(21, 128, 61, .5); animation: pulse 2s infinite; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-faint); margin-bottom: var(--space-md); }
.breadcrumb a { color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: 40px 56px; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 640px; z-index: -1;
  background:
    radial-gradient(40% 50% at 80% 20%, rgba(37, 99, 235, .16), transparent 70%),
    radial-gradient(35% 45% at 15% 30%, rgba(234, 88, 12, .10), transparent 70%);
}
.hero-grid { display: grid; gap: var(--space-2xl); align-items: center; }
.hero h1 { margin-block: 18px 16px; }
.hero-sub { color: var(--text-muted); font-size: 1.1rem; max-width: 60ch; }
.hero-extra { margin-top: 12px; padding: 12px 16px; border-radius: var(--r-md); background: var(--cta-soft); color: var(--text); border: 1px solid rgba(194, 65, 12, .25); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-lg); }
.hero-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: var(--space-xl); }
.hero-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; box-shadow: var(--shadow-sm); }
.hero-stat .stat-num { font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 800; color: var(--text); line-height: 1.3; }
.hero-stat .stat-label { font-size: .8125rem; color: var(--text-muted); }
.hero-compact { padding-block: 32px 24px; }
@media (min-width: 1024px) {
  .hero { padding-block: 64px 80px; }
  .hero-grid { grid-template-columns: 1.15fr 1fr; }
}

/* Glass panel: live chart */
.glass-card {
  background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--r-xl);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-xl); padding: var(--space-lg);
}
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--space-md); }
.live-title { font-weight: 700; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-border); padding: 4px 10px; border-radius: var(--r-full); }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
.chart-bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; height: 180px; padding: 8px 4px 0; border-bottom: 1px dashed var(--border-strong); }
.chart-bar { position: relative; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--primary), #60A5FA); min-height: 6px; transition: height .6s var(--ease); }
.chart-bar.zero { background: var(--border); }
.chart-bar span { position: absolute; top: -24px; inset-inline: 0; text-align: center; font-size: .75rem; font-weight: 700; color: var(--text-muted); }
.chart-foot { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-top: 8px; text-align: center; font-size: .75rem; color: var(--text-faint); }
.hero-video { margin-bottom: var(--space-md); border-radius: var(--r-lg); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.hero-video video { width: 100%; height: 100%; object-fit: cover; display: block; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: var(--space-md); color: var(--text-muted); font-size: .875rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .i { color: var(--ok); width: 18px; height: 18px; }

/* ---------- Cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--space-lg); box-shadow: var(--shadow-sm); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--space-md); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.15rem; }
.card-sub { color: var(--text-muted); font-size: .925rem; margin: 4px 0 0; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.platform-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--space-lg); transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; overflow: hidden; }
.platform-card::after { content: ""; position: absolute; inset-inline-start: 0; top: 0; height: 4px; width: 100%; background: var(--pf, var(--primary)); }
.platform-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.pf-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; background: var(--pf, var(--primary)); margin-bottom: 14px; }
.pf-icon svg { width: 28px; height: 28px; }
.pf-telegram { --pf: var(--pf-telegram); }
.pf-instagram { --pf: var(--pf-instagram); }
.pf-tiktok { --pf: var(--pf-tiktok); }
.pf-youtube { --pf: var(--pf-youtube); }
:root[data-theme="dark"] .pf-tiktok .pf-icon { color: #111827; }
.platform-card p { color: var(--text-muted); margin-bottom: 10px; }
.pf-example { font-size: .85rem; color: var(--text-faint); padding-top: 10px; border-top: 1px dashed var(--border); }
.pf-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pf, var(--primary)); display: inline-block; flex: none; }

.products-grid { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
@media (min-width: 600px) { .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--primary-soft-border); }
.pc-cat { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; color: var(--text-muted); }
.pc-name { font-size: 1rem; margin: 0; line-height: 1.6; }
.pc-desc { font-size: .875rem; color: var(--text-muted); margin: 0; }
.pc-foot { margin-top: auto; display: flex; align-items: end; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.pc-price { font-weight: 800; font-size: 1.05rem; color: var(--text); line-height: 1.3; }
.pc-price small { display: block; font-weight: 500; font-size: .75rem; color: var(--text-faint); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-md); counter-reset: step; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--space-lg); }
.step-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; margin-bottom: 12px; }
.step p, .feature p { color: var(--text-muted); margin: 0; font-size: .95rem; }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: var(--space-lg); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); flex: none; }
.feature h3 { margin-bottom: 4px; }

.faq-list { display: grid; gap: 10px; max-width: 820px; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 700; min-height: 56px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .i { transition: transform .2s; color: var(--text-faint); }
.faq-item[open] summary .i { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 18px 18px; color: var(--text-muted); }

.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(28px, 5vw, 56px); background: linear-gradient(135deg, #1D4ED8, #2563EB 55%, #3B82F6); color: #fff; text-align: center; }
.cta-band::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(253, 186, 116, .35), transparent 65%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 56ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; position: relative; z-index: 1; }
.cta-band .btn-ghost { --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .55); }
.cta-band .btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .12); }

/* ---------- Chips / filters / tabs ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; flex: none;
  min-height: 40px; padding: 8px 16px; border-radius: var(--r-full);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-muted);
  font-weight: 600; font-size: .9rem; transition: all .15s;
}
.chip:hover { color: var(--text); border-color: var(--text-faint); }
.chip.active, .chip[aria-selected="true"], .chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .count { font-size: .75rem; padding: 0 6px; border-radius: var(--r-full); background: rgba(127, 127, 127, .15); }
.chip.active .count { background: rgba(255, 255, 255, .22); }
.chips-sub .chip { min-height: 34px; padding: 4px 12px; font-size: .825rem; }
.chips-sub .chip.active { background: var(--primary-soft); color: var(--link); border-color: var(--primary-soft-border); }
.segmented { display: inline-flex; padding: 4px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); gap: 4px; }
.segmented button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--text-muted); min-height: 34px; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: var(--space-md); }
.field > label, .label { font-weight: 700; font-size: .9rem; color: var(--text); }
.field-hint { font-size: .8125rem; color: var(--text-faint); }
.field-error { font-size: .8125rem; color: var(--danger); font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.select { appearance: none; padding-inline-end: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-size: 18px; background-position: left 12px center; }
.input-ltr { direction: ltr; text-align: left; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-group .addon { display: grid; place-items: center; padding-inline: 14px; border: 1px solid var(--border-strong); border-inline-start: 0; border-start-end-radius: var(--r-sm); border-end-end-radius: var(--r-sm); background: var(--surface-2); color: var(--text-muted); font-size: .9rem; white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.form-row { display: grid; gap: var(--space-md); }
@media (min-width: 640px) { .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.otp-input { letter-spacing: .6em; font-size: 1.5rem; font-weight: 800; text-align: center; direction: ltr; }
.search-input { position: relative; }
.search-input .input { padding-inline-start: 42px; }
.search-input .i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }

/* ---------- Alerts / badges ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid; font-size: .925rem; margin-bottom: var(--space-md); }
.alert .i { margin-top: 3px; }
.alert-error { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert-success { background: var(--ok-soft); border-color: var(--ok-border); color: var(--ok); }
.alert-info { background: var(--info-soft); border-color: var(--info-border); color: var(--info); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-full); font-size: .78rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; line-height: 1.6; }
.badge-success { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.badge-primary { background: var(--primary-soft); color: var(--link); border-color: var(--primary-soft-border); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.table th, .table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--surface-2); color: var(--text-muted); font-weight: 700; font-size: .8125rem; white-space: nowrap; position: sticky; top: 0; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg); }
.table .actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.table .t-title { font-weight: 600; color: var(--text); }
.table td.num, .table td.t-title, .table td.ltr, .table .badge { white-space: nowrap; }
.table .t-sub { font-size: .8rem; color: var(--text-faint); }
.table-compact { min-width: 0; }
.table-compact th, .table-compact td { padding: 8px 10px; }
.list-meta { font-size: .8125rem; color: var(--text-faint); margin-bottom: 8px; }

/* ---------- States ---------- */
.empty-state, .error-state { text-align: center; padding: 40px 20px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); background: var(--surface); }
.state-icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-faint); }
.state-icon svg { width: 28px; height: 28px; }
.error-state .state-icon { background: var(--danger-soft); color: var(--danger); }
.state-title { font-weight: 800; margin-bottom: 4px; }
.state-desc { color: var(--text-muted); font-size: .925rem; }
.state-actions { margin-top: 14px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--muted-bg) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--r-sm); }
.sk-line { height: 14px; margin-bottom: 10px; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-card { height: 190px; border-radius: var(--r-lg); }
.sk-row { height: 44px; margin-bottom: 8px; }
.skeleton-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary); animation: spin .8s linear infinite; display: inline-block; }
.loading-inline { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 28px; color: var(--text-muted); }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; z-index: 300; bottom: 16px; inset-inline: 16px; display: grid; gap: 10px; justify-items: center; pointer-events: none; }
@media (min-width: 640px) { .toast-wrap { inset-inline: auto 24px; bottom: 24px; justify-items: end; } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; width: min(420px, 100%);
  padding: 12px 14px; border-radius: var(--r-md); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-inline-start: 4px solid var(--ok); box-shadow: var(--shadow-lg);
  animation: toastIn .25s var(--ease);
}
.toast.out { animation: toastOut .2s ease forwards; }
.toast-error { border-inline-start-color: var(--danger); }
.toast-info { border-inline-start-color: var(--primary); }
.toast-icon { color: var(--ok); margin-top: 2px; }
.toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--primary); }
.toast-msg { flex: 1; font-size: .925rem; }
.toast-close { border: 0; background: transparent; color: var(--text-faint); font-size: 20px; line-height: 1; width: 28px; height: 28px; border-radius: 6px; }
.toast-close:hover { background: var(--surface-2); color: var(--text); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 150; display: flex; align-items: flex-end; justify-content: center;
  background: var(--overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  padding: 0; animation: fadeIn .18s ease;
}
.modal-overlay[hidden] { display: none !important; }
.modal {
  width: 100%; min-width: 0; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-xl);
  animation: sheetIn .25s var(--ease);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 1.1rem; margin: 0; }
.modal-body { padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { max-width: 560px; border-radius: var(--r-xl); animation: modalIn .22s var(--ease); }
  .modal-lg { max-width: 860px; }
  .modal-xl { max-width: 1040px; }
}
body.modal-open { overflow: hidden; }

/* ---------- App shell (dashboard / admin) ---------- */
.app-body { background: var(--bg); }
.app-header .nav-inner { height: 64px; }
.app-shell { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); padding-block: var(--space-lg) var(--space-2xl); align-items: start; }
.app-shell > *, .order-layout > *, .editor-layout > *, .blog-layout > *, .hero-grid > *, .tab-panel > * { min-width: 0; }
.app-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; position: sticky; top: 64px; z-index: 20; background: var(--bg); margin-inline: -16px; padding-inline: 16px; padding-top: 8px; scrollbar-width: none; }
.app-nav::-webkit-scrollbar { display: none; }
.side-link {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none;
  min-height: 44px; padding: 8px 14px; border-radius: var(--r-md);
  color: var(--text-muted); font-weight: 600; font-size: .925rem; border: 1px solid transparent; background: transparent;
  text-decoration: none !important; transition: background-color .15s, color .15s;
}
.side-link:hover { background: var(--surface); color: var(--text); }
.side-link.active { background: var(--surface); color: var(--link); border-color: var(--border); box-shadow: var(--shadow-sm); }
.side-link .i { color: inherit; }
.side-link .count-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.side-card { display: none; }
@media (min-width: 1024px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .app-nav { flex-direction: column; position: sticky; top: 88px; overflow: visible; margin: 0; padding: 0; background: transparent; }
  .side-link { width: 100%; }
  .side-card { display: block; margin-top: var(--space-md); }
}
.wallet-card { background: linear-gradient(135deg, #1E3A8A, #2563EB); color: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.wallet-card::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; inset-inline-end: -60px; top: -70px; background: rgba(255, 255, 255, .08); }
.wallet-card .label { color: rgba(255, 255, 255, .8); font-weight: 600; font-size: .85rem; }
.wallet-card .amount { font-size: 1.5rem; font-weight: 800; margin: 4px 0 14px; position: relative; z-index: 1; }
.wallet-card .btn { position: relative; z-index: 1; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: var(--r-full); border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: .9rem; max-width: 220px; }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--link); font-weight: 800; flex: none; }
.user-chip .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-full); background: var(--surface); border: 1px solid var(--border); font-size: .825rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.tab-panel { display: grid; gap: var(--space-lg); min-width: 0; }
.tab-panel[hidden] { display: none !important; }
.page-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-title h1 { font-size: 1.5rem; margin: 0; }
.stat-grid { display: grid; gap: var(--space-md); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-grid.three { grid-template-columns: 1fr; }
@media (min-width: 640px) { .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 16px; }
.stat-box .label { color: var(--text-muted); font-size: .825rem; font-weight: 600; }
.stat-box .value { font-size: 1.35rem; font-weight: 800; margin-top: 4px; line-height: 1.4; }
.stat-box.accent { border-color: var(--ok-border); background: var(--ok-soft); }
.stat-box.accent .value { color: var(--ok); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar .grow { flex: 1 1 220px; }

/* Notifications dropdown */
.notif-wrap { position: relative; }
.dropdown { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-xl); z-index: 80; overflow: hidden; animation: fadeIn .15s ease; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); font-weight: 700; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: var(--primary-soft); }
.notif-time { display: block; font-size: .75rem; color: var(--text-faint); margin-top: 4px; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--text-faint); font-size: .9rem; }

/* Order form */
.order-layout { display: grid; gap: var(--space-lg); }
@media (min-width: 1100px) { .order-layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.service-trigger {
  width: 100%; text-align: start; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); transition: border-color .15s, box-shadow .15s;
}
.service-trigger:hover { border-color: var(--primary); }
.service-trigger .grow { flex: 1; min-width: 0; }
.service-trigger .st-name { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; }
.service-trigger .st-meta { font-size: .825rem; color: var(--text-muted); }
.service-trigger .st-empty { color: var(--text-faint); }
.summary-card { position: sticky; top: 140px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: .925rem; }
.summary-row:last-of-type { border-bottom: 0; }
.summary-total { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.service-group { margin-bottom: 18px; }
.service-group-title { position: sticky; top: -20px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--surface); padding: 8px 0; font-weight: 800; font-size: .9rem; color: var(--text); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.service-group-title .count { font-weight: 600; font-size: .78rem; color: var(--text-faint); }
.service-item { width: 100%; display: flex; align-items: center; gap: 12px; text-align: start; padding: 12px; border-radius: var(--r-md); border: 1px solid transparent; background: transparent; min-height: 56px; }
.service-item:hover { background: var(--surface-2); }
.service-item.active { background: var(--primary-soft); border-color: var(--primary-soft-border); }
.service-item .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); flex: none; display: grid; place-items: center; }
.service-item.active .radio { border-color: var(--primary); }
.service-item.active .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.service-item .name { flex: 1; font-weight: 600; font-size: .925rem; }
.service-item .price { text-align: end; font-weight: 800; font-size: .9rem; white-space: nowrap; }
.service-item .price small { display: block; font-weight: 500; font-size: .72rem; color: var(--text-faint); }
.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; min-width: 90px; }
.progress > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .4s var(--ease); }
.progress-label { font-size: .75rem; color: var(--text-faint); margin-top: 4px; white-space: nowrap; }

/* Ticket thread */
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: .925rem; white-space: pre-wrap; word-break: break-word; }
.msg-customer { align-self: flex-start; background: var(--primary); color: #fff; border-end-start-radius: 4px; }
.msg-admin { align-self: flex-end; background: var(--surface-2); border: 1px solid var(--border); border-end-end-radius: 4px; }
.msg-time { display: block; font-size: .7rem; opacity: .75; margin-top: 4px; }
.msg img { display: block; max-width: 240px; border-radius: 10px; margin-top: 8px; }
.thread-form { display: grid; gap: 10px; margin-top: 14px; }
.file-pick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .875rem; color: var(--text-muted); min-width: 0; max-width: 100%; }
.file-pick input[type="file"] { max-width: 100% !important; min-width: 0; font-size: .8rem; }

/* Picker (admin homepage layout / landing) */
.pick-list { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.pick-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); text-align: start; width: 100%; }
.pick-item.active { border-color: var(--primary); background: var(--primary-soft); }
.pick-item .order { width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .78rem; font-weight: 800; display: grid; place-items: center; flex: none; }
.pick-item .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--border-strong); flex: none; }
.pick-item .main { flex: 1; min-width: 0; font-size: .875rem; font-weight: 600; }
.pick-item .main small { display: block; color: var(--text-faint); font-weight: 500; }
.pick-item .price { font-size: .825rem; font-weight: 700; white-space: nowrap; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.sel-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: var(--r-full); background: var(--primary-soft); color: var(--link); border: 1px solid var(--primary-soft-border); font-size: .8125rem; font-weight: 600; }
.sel-chip button { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; display: grid; place-items: center; }
.sel-chip button:hover { background: rgba(37, 99, 235, .15); }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: 32px 16px 56px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: clamp(20px, 5vw, 32px); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-steps { display: flex; gap: 8px; margin: 16px 0 20px; }
.auth-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--border); }
.auth-steps span.on { background: var(--primary); }
.auth-alt { text-align: center; margin-top: 18px; font-size: .925rem; color: var(--text-muted); }
.auth-points { display: grid; gap: 8px; margin-top: 20px; font-size: .875rem; color: var(--text-muted); }
.auth-points span { display: flex; gap: 8px; align-items: center; }
.auth-points .i { color: var(--ok); width: 18px; height: 18px; }

/* ---------- Prose (about / blog) ---------- */
.prose { font-size: 1.0625rem; line-height: 2; color: var(--text); overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.6em; }
.prose p { margin: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img { border-radius: var(--r-md); margin-inline: auto; display: block; }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin-inline: 0; padding: 12px 18px; border-inline-start: 4px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-muted); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; direction: ltr; unicode-bidi: isolate; }
.prose pre { position: relative; direction: ltr; text-align: left; background: #0F172A; color: #E2E8F0; padding: 18px; border-radius: var(--r-md); overflow-x: auto; font-size: .875rem; line-height: 1.7; }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; }
.prose th { background: var(--surface-2); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2em; }
.prose .callout { padding: 14px 18px; border-radius: var(--r-md); border: 1px solid var(--info-border); background: var(--info-soft); }
.prose .callout-warning { border-color: var(--warn-border); background: var(--warn-soft); }
.prose .callout-success { border-color: var(--ok-border); background: var(--ok-soft); }
.prose .callout-note { border-color: var(--border-strong); background: var(--surface-2); }
.prose .video-wrap { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #000; }
.prose .video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.code-copy { position: absolute; top: 8px; right: 8px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #E2E8F0; font-size: .75rem; padding: 4px 10px; border-radius: 6px; font-family: var(--font); }

/* ---------- Blog ---------- */
.blog-hero { padding-block: 36px 24px; }
.blog-layout { display: grid; gap: var(--space-xl); }
@media (min-width: 1024px) { .blog-layout { grid-template-columns: minmax(0, 1fr) 300px; } }
.blog-grid { display: grid; gap: var(--space-lg); grid-template-columns: 1fr; }
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .blog-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.post-thumb { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--primary-soft), var(--muted-bg)); color: var(--link); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.03); }
.post-thumb .ph { width: 100%; height: 100%; display: grid; place-items: center; }
.post-thumb .ph svg { width: 44px; height: 44px; opacity: .7; }
.post-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.post-cats a { font-size: .78rem; font-weight: 700; color: var(--link); }
.post-title { font-size: 1.05rem; line-height: 1.6; margin: 0; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--link); text-decoration: none; }
.post-excerpt { color: var(--text-muted); font-size: .9rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .78rem; color: var(--text-faint); }
.post-meta span { display: inline-flex; align-items: center; gap: 5px; }
.post-meta .i { width: 14px; height: 14px; }
.post-featured { display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); overflow: hidden; margin-bottom: var(--space-xl); box-shadow: var(--shadow-md); }
@media (min-width: 768px) { .post-featured { grid-template-columns: 1.1fr 1fr; } }
.post-featured .post-thumb { aspect-ratio: auto; min-height: 240px; }
.post-featured .post-body { padding: clamp(20px, 3vw, 32px); justify-content: center; }
.post-featured .post-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; margin-bottom: var(--space-md); }
.widget-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); color: var(--text); font-size: .9rem; }
.widget li:last-child a { border-bottom: 0; }
.widget .count { color: var(--text-faint); font-size: .8rem; white-space: nowrap; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: 4px 12px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted); font-size: .825rem; }
.tag-cloud a:hover { color: var(--link); border-color: var(--primary-soft-border); text-decoration: none; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: var(--space-xl); }
.pagination button, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); font-weight: 700; display: grid; place-items: center; }
.pagination span[aria-current] { background: var(--primary); color: #fff; border-color: var(--primary); }
.article { max-width: 800px; margin-inline: auto; }
.article-head { padding-block: 28px 8px; }
.article-head h1 { margin-block: 12px; }
.article-lead { font-size: 1.15rem; color: var(--text-muted); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; color: var(--text-faint); font-size: .875rem; padding-block: 14px; border-block: 1px solid var(--border); margin-block: 16px 24px; }
.article-meta .author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.article-meta .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--link); display: grid; place-items: center; font-weight: 800; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover { margin: 0 0 var(--space-xl); border-radius: var(--r-xl); overflow: hidden; }
.article-cover img { width: 100%; display: block; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 20px; margin-bottom: var(--space-xl); }
.toc summary { cursor: pointer; font-weight: 800; display: flex; align-items: center; gap: 8px; min-height: 32px; }
.toc ol { margin: 12px 0 0; padding-inline-start: 1.4em; font-size: .925rem; list-style-type: persian; }
.prose ol { list-style-type: persian; }
.prose ol[dir="ltr"], .prose [dir="ltr"] ol { list-style-type: decimal; }
.toc li { margin-block: 6px; }
.toc li.sub { margin-inline-start: 16px; list-style: circle; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-xl); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--border); }
.share .label { font-weight: 700; margin-inline-end: 6px; }
.read-progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 60; background: transparent; }
.read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary), var(--cta)); }
.preview-banner { background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--warn-border); text-align: center; padding: 8px 16px; font-weight: 700; font-size: .9rem; }

/* Blog admin / editor */
.status-badge { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); font-size: .75rem; font-weight: 700; }
.status-published { background: var(--ok-soft); color: var(--ok); }
.status-draft { background: var(--surface-2); color: var(--text-muted); }
.status-scheduled { background: var(--info-soft); color: var(--info); }
.status-private { background: var(--warn-soft); color: var(--warn); }
.status-trash { background: var(--danger-soft); color: var(--danger); }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--r-md); background: var(--primary-soft); border: 1px solid var(--primary-soft-border); }
.media-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.media-item { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--border); background: var(--surface-2); cursor: pointer; padding: 0; }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item.selected { border-color: var(--primary); box-shadow: var(--ring); }
.media-item .check-mark { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; display: none; place-items: center; font-size: 14px; }
.media-item.selected .check-mark { display: grid; }
.media-item .media-actions { position: absolute; inset-inline: 0; bottom: 0; display: flex; gap: 4px; justify-content: center; padding: 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); opacity: 0; transition: opacity .15s; }
.media-item:hover .media-actions, .media-item:focus-within .media-actions { opacity: 1; }
.media-actions button { border: 0; border-radius: 6px; padding: 4px 8px; font-size: .75rem; background: rgba(255, 255, 255, .92); color: #111; }
.editor-layout { display: grid; gap: var(--space-lg); padding-block: var(--space-lg) var(--space-2xl); align-items: start; }
@media (min-width: 1100px) { .editor-layout { grid-template-columns: minmax(0, 1fr) 340px; } }
.editor-title { width: 100%; border: 0; background: transparent; font-size: clamp(1.4rem, 1rem + 1.5vw, 2rem); font-weight: 800; padding: 8px 0; color: var(--text); }
.editor-title:focus { outline: none; box-shadow: none; }
.slug-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-faint); margin-bottom: 12px; }
.slug-line .input { min-height: 34px; padding: 4px 10px; font-size: .85rem; width: auto; flex: 1 1 200px; }
.editor-box { border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 64px; z-index: 5; border-radius: var(--r-md) var(--r-md) 0 0; }
.editor-status { border-radius: 0 0 var(--r-md) var(--r-md); }
.editor-toolbar .sep { width: 1px; background: var(--border-strong); margin: 4px 2px; }
.tb-btn { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--text-muted); display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem; }
.tb-btn:hover { background: var(--surface); color: var(--text); border-color: var(--border); }
.tb-btn svg { width: 18px; height: 18px; }
.editor-toolbar .select { min-height: 36px; width: auto; padding-block: 4px; font-size: .85rem; }
.editor-content { min-height: 420px; padding: 20px; outline: none; }
.editor-content:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.editor-status { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-faint); background: var(--surface-2); }
.side-panel { display: grid; gap: var(--space-md); }
@media (min-width: 1100px) { .side-panel { position: sticky; top: 84px; } }
.side-panel .card { padding: 16px; }
.side-panel .card h3 { font-size: .95rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cat-checks { display: grid; gap: 2px; max-height: 200px; overflow-y: auto; }
.cat-checks .check { min-height: 34px; font-size: .9rem; }
.serp { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; background: var(--bg); font-family: Arial, Tahoma, sans-serif; }
.serp-url { font-size: .78rem; color: var(--ok); direction: ltr; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { color: #1A0DAB; font-size: 1.05rem; line-height: 1.5; margin: 2px 0; }
:root[data-theme="dark"] .serp-title { color: #8AB4F8; }
.serp-desc { font-size: .825rem; color: var(--text-muted); line-height: 1.6; }
.seo-score { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; margin: 10px 0; }
.seo-score i { display: block; height: 100%; width: 0; transition: width .3s, background-color .3s; }
.seo-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .825rem; }
.seo-checks li { display: flex; gap: 6px; align-items: center; }
.seo-checks li.ok { color: var(--ok); }
.seo-checks li.warn { color: var(--text-faint); }
.featured-preview img { width: 100%; border-radius: var(--r-md); display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.rev-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: .85rem; }
.rev-item:last-child { border-bottom: 0; }

.tb-btn.active, .tb-btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--link); border-color: var(--primary-soft-border); }
.editor-content figure { margin: 1em 0; }
.editor-content figcaption, .prose figcaption { text-align: center; font-size: .85rem; color: var(--text-faint); margin-top: 6px; }
@media (max-width: 640px) {
  .user-chip { padding: 2px; }
  .user-chip .name { display: none; }
  .nav-actions { gap: 4px; }
  .app-header .badge { display: none; }
}

/* ---------- Motion ---------- */
.reveal-init { opacity: 0; transform: translateY(12px); }
.reveal-in { opacity: 1; transform: none; transition: opacity .4s var(--ease), transform .4s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21, 128, 61, .45); } 70% { box-shadow: 0 0 0 8px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheetIn { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal-init { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .share, .read-progress, .toc, .app-nav { display: none !important; }
  body { background: #fff; color: #000; }
}
