/* ═══════════════════════════════════════════════════════════════
   HiData-KB — سیستم طراحی (RTL، فارسی)  ·  «های دیتا»
   طراحی سرمه‌ای/آبی — فونت وزیرمتن self-host — رنگ برند از تنظیمات
   ═══════════════════════════════════════════════════════════════ */

/* ── فونت وزیرمتن ─────────────────────────────────────────────── */
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:100; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-Thin.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:300; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2'); }
@font-face { font-family:'Vazirmatn'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/vazirmatn/Vazirmatn-ExtraBold.woff2') format('woff2'); }

/* ── متغیرهای طراحی ───────────────────────────────────────────── */
:root {
  /* برند */
  --brand: #0d4a8f;
  --brand-strong: #0a3c75;
  --brand-2: #1160b4;
  --brand-contrast: #ffffff;
  --navy: #0a2c52;
  --navy-2: #0a3568;
  --hero-grad: linear-gradient(140deg, #0a2c52 0%, var(--brand) 74%, #1160b4 100%);
  --cta-grad: linear-gradient(135deg, var(--brand), #0a3568);

  --brand-weak: color-mix(in srgb, var(--brand) 9%, #fff);
  --brand-weak-2: color-mix(in srgb, var(--brand) 16%, #fff);
  --brand-tint: color-mix(in srgb, var(--brand) 8%, #fff);
  --brand-soft: #f1f6fb;

  /* سطح‌ها */
  --bg: #f5f8fb;
  --surface: #ffffff;
  --surface-2: #f4f8fc;
  --surface-3: #eef3f8;
  --input-bg: #f9fbfe;

  /* مرزها */
  --border: #dfe9f3;
  --border-2: #dbe6f1;
  --border-soft: #eef3f8;
  --border-strong: #c7d8e8;

  /* متن */
  --text: #14273a;
  --text-title: #20344a;
  --text-body: #33475c;
  --text-2: #33506b;
  --text-muted: #7189a0;
  --text-faint: #8ba0b4;
  --chevron: #b3c6d9;

  /* وضعیت‌ها */
  --success: #1e7d3f; --success-2: #2e9e56; --success-weak: #e7f6ec;
  --warning: #b45309; --warning-2: #e0871b; --warning-weak: #fdf2e3;
  --danger: #c2402f;  --danger-weak: #fdf1f0;
  --info: #0d4a8f;    --info-weak: #eef5fd;
  --muted: #5d7181;   --muted-weak: #eef1f3;

  /* پالت دسته‌ها (نقطه + آیکون‌چیپ) */
  --c-blue: #0d4a8f;   --c-blue-bg: #e6f0fb;
  --c-teal: #0e7a6e;   --c-teal-bg: #e4f5f2;
  --c-purple: #5b4bb8; --c-purple-bg: #edeafb;
  --c-amber: #b45309;  --c-amber-bg: #fdf2e3;
  --c-green: #1e7d3f;  --c-green-bg: #e7f6ec;
  --c-slate: #36474f;  --c-slate-bg: #eef1f3;

  /* شعاع‌ها */
  --r-card: 20px; --r-panel: 18px; --r-side: 16px; --r-chip: 12px;
  --radius: 12px; --radius-sm: 8px; --radius-lg: 18px; --r-btn: 12px; --r-inner: 10px;

  /* سایه‌ها */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05), 0 1px 3px rgba(15,23,42,.04);
  --shadow: 0 10px 30px rgba(10,44,82,.08);
  --shadow-card: 0 24px 60px rgba(10,44,82,.12);
  --shadow-search: 0 24px 54px rgba(4,24,48,.35);
  --shadow-btn: 0 14px 30px -8px rgba(13,74,143,.5);
  --shadow-lg: 0 24px 60px rgba(10,44,82,.16);
  --ring: 0 0 0 3px rgba(23,105,190,.16);

  --header-h: 74px;
  --sidebar-w: 264px;
  --wrap: 1180px;
  --font: 'Vazirmatn', system-ui, 'Segoe UI', Tahoma, sans-serif;
}

/* ── پایه ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[dir="rtl"] { direction: rtl; }
h1,h2,h3,h4,h5,h6 { font-weight: 800; line-height: 1.4; color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
svg { flex-shrink: 0; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
::selection { background: var(--brand-weak-2); }
mark { background: #fde6cf; color: #a85c08; border-radius: 4px; padding: 1px 2px; font-weight: 700; }
hr { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }
small { font-size: .82em; }

/* ── ابزارهای عمومی ───────────────────────────────────────────── */
.container { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 40px; }
.container-narrow { max-width: 820px; }
.icon { width: 1.25em; height: 1.25em; }
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; } .gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mt-4{margin-top:2rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}.mb-4{margin-bottom:2rem}
.w-full{width:100%}
.grid{display:grid;gap:1.25rem}
.section-title{display:flex;align-items:center;gap:.6rem;font-size:1.2rem;font-weight:800;color:var(--text);margin-bottom:1rem}
.section-title svg{color:var(--brand);width:1.35rem;height:1.35rem}

/* ── دکمه‌ها ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1.25rem; border-radius: var(--r-btn); border: 1px solid transparent;
  font-weight: 700; font-size: .92rem; line-height: 1.2; background: var(--surface-3);
  color: var(--text-2); transition: .18s ease; white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 1.15em; height: 1.15em; }
.btn-primary { background: var(--brand); color: var(--brand-contrast); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--brand-strong); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.94); color:#fff; }
.btn-soft { background: var(--brand-soft); border: 1px solid var(--border-2); color: var(--text-2); }
.btn-soft:hover { border-color: var(--border-strong); color: var(--brand); }
.btn-white { background:#fff; color:var(--brand); box-shadow: 0 16px 34px rgba(4,24,48,.30); }
.btn-white:hover { background: var(--brand-weak); color: var(--brand); }
.btn-sm { padding: .42rem .8rem; font-size: .82rem; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 1.4rem; font-size: .95rem; }
.btn-icon { padding: .5rem; border-radius: 9px; background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-icon:hover { background: var(--surface-3); color: var(--brand); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── کارت ─────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 1.35rem; }
.card-header { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.card-header h2, .card-header h3 { font-size: 1.05rem; }
.card-body { padding: 1.35rem; }

/* ── نشان (Badge) ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .7rem;
  border-radius: 999px; font-size: .74rem; font-weight: 700; line-height: 1.7;
  background: var(--surface-3); color: var(--text-2);
}
.badge-brand { background: var(--brand-weak); color: var(--brand); }
.badge-success { background: var(--success-weak); color: var(--success); }
.badge-danger { background: var(--danger-weak); color: var(--danger); }
.badge-warning { background: var(--warning-weak); color: var(--warning); }
.badge-info { background: var(--info-weak); color: var(--info); }
.badge-muted { background: var(--muted-weak); color: var(--muted); }
.badge-dot::before { content:''; width:7px; height:7px; border-radius:50%; background: currentColor; }

/* ── فرم‌ها ────────────────────────────────────────────────────── */
.field { margin-bottom: 1.3rem; }
.label { display: flex; align-items:center; gap:.4rem; font-weight: 700; font-size: .86rem; margin-bottom: .55rem; color: var(--text-2); }
.label .req { color: var(--danger); font-weight: 800; }
.label .opt { font-size:.7rem; font-weight:600; color:var(--text-faint); background:var(--brand-soft); border-radius:999px; padding:2px 9px; }
.input, .textarea, .select {
  width: 100%; padding: 0 1rem; height: 50px; border: 1.5px solid var(--border-2);
  border-radius: var(--r-chip); background: var(--input-bg); color: var(--text);
  font-family: inherit; font-size: .95rem; transition: .16s ease;
}
.textarea { height: auto; padding: .9rem 1rem; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: var(--ring); background:#fff; outline:none; }
.input::placeholder, .textarea::placeholder { color: #9aadbf; }
.textarea { resize: vertical; min-height: 130px; line-height: 1.95; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237189a0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 1rem center; padding-left: 2.4rem; }
.hint { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }
.field-error { font-size: .8rem; color: var(--danger); margin-top: .4rem; display:flex; align-items:center; gap:.3rem; }
.input.has-error, .textarea.has-error, .select.has-error { border-color: var(--danger); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.checkbox { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }
.checkbox input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }

/* ── جدول داده (پنل مدیریت) ───────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.table th, .table td { padding: .8rem 1rem; text-align: right; vertical-align: middle; }
.table thead th { background: var(--surface-3); color: var(--text-muted); font-weight: 700; font-size: .8rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
.table tbody tr:last-child { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table .actions { display: flex; gap: .35rem; justify-content: flex-start; }
.table a.cell-title { font-weight: 700; color: var(--text); }
.table a.cell-title:hover { color: var(--brand); text-decoration: none; }

/* ── وضعیت خالی ───────────────────────────────────────────────── */
.empty { text-align: center; padding: 3rem 1.5rem; color: var(--text-muted); }
.empty svg { width: 52px; height: 52px; color: var(--border-strong); margin: 0 auto 1rem; }
.empty h3 { color: var(--text-2); margin-bottom: .4rem; font-size: 1.05rem; }

/* وضعیت خالی بزرگ (عمومی) */
.empty-state { text-align:center; padding: 3.4rem 2.6rem 3rem; }
.empty-state__ico { width:92px; height:92px; border-radius:50%; background:var(--brand-weak); color:var(--brand); display:grid; place-items:center; margin:0 auto 1.4rem; }
.empty-state__ico svg { width:42px; height:42px; }
.empty-state h3 { font-size:1.3rem; font-weight:800; color:var(--text); margin:0 0 .65rem; }
.empty-state h3 span { color: var(--brand); }
.empty-state p { max-width:480px; margin:0 auto 1.6rem; font-size:.9rem; color:var(--text-muted); line-height:1.95; }
.empty-state__actions { display:flex; justify-content:center; gap:.75rem; flex-wrap:wrap; }

/* ── پیام فلش / توست ──────────────────────────────────────────── */
.toast-wrap { position: fixed; top: 1rem; left: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: .6rem; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: .6rem; padding: .85rem 1.1rem; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  border-inline-start: 4px solid var(--muted); animation: toast-in .25s ease;
}
.toast svg { width: 1.3rem; height: 1.3rem; margin-top: 2px; }
.toast-success { border-inline-start-color: var(--success); } .toast-success svg { color: var(--success); }
.toast-danger { border-inline-start-color: var(--danger); } .toast-danger svg { color: var(--danger); }
.toast-warning { border-inline-start-color: var(--warning); } .toast-warning svg { color: var(--warning); }
.toast-info { border-inline-start-color: var(--info); } .toast-info svg { color: var(--info); }
.toast p { font-size: .88rem; color: var(--text-2); flex: 1; }
.toast button { background: none; border: none; color: var(--text-muted); padding: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* ── مودال ────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(6,20,40,.55); backdrop-filter: blur(2px); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 440px; width: 100%; padding: 1.7rem; border: 1px solid var(--border); }
.modal h3 { font-size: 1.15rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.modal p { color: var(--text-muted); font-size: .92rem; margin-bottom: 1.4rem; }
.modal-actions { display: flex; gap: .6rem; justify-content: flex-start; }
.modal-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-weak); color: var(--danger); margin-bottom: 1rem; }

/* ── صفحه‌بندی ────────────────────────────────────────────────── */
.pagination, .pager { display: flex; align-items: center; gap: .4rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }
.pagination a, .pagination span, .pager a, .pager span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px;
  padding: 0 .6rem; border-radius: var(--r-inner); border: 1px solid #e6edf4; background: var(--surface);
  color: var(--text-2); font-size: .86rem; font-weight: 700;
}
.pagination a:hover, .pager a:hover { border-color: #b9d2ec; color: var(--brand); text-decoration: none; }
.pagination .current, .pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.pagination .disabled, .pager .disabled { color: #c8d5e1; pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════
   بخش کارمند (عمومی) — نوار سرمه‌ای، هیرو، محتوای شناور
   ═══════════════════════════════════════════════════════════════ */

/* چیدمان کلی صفحه‌ی عمومی: چسباندن پابرگ به پایین در صفحات کم‌محتوا */
body.site { display: flex; flex-direction: column; }
body.site > .float-up { flex: 1 0 auto; }   /* محتوا فضای خالی را پر می‌کند تا پابرگ پایین بماند */

/* نوار سرمه‌ای بالای صفحه (هدر + هیرو در یک گرادیان) */
.topband { position: relative; background: var(--hero-grad); overflow: hidden; flex-shrink: 0; }
.topband__decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.topband__decor .glow { position: absolute; width: 600px; height: 600px; inset-inline-end: -140px; top: -200px; background: radial-gradient(circle, rgba(64,140,220,.38), transparent 65%); animation: glowPulse 11s ease-in-out infinite; }
.topband__decor .wm { position: absolute; inset-inline-end: -70px; top: -30px; width: 460px; height: auto; opacity: .07; animation: floatY 16s ease-in-out infinite; }
@keyframes glowPulse { 0%,100%{opacity:.5;transform:translate(0,0)} 50%{opacity:.85;transform:translate(-34px,22px)} }
@keyframes floatY { 0%,100%{transform:translateY(0) rotate(0deg)} 50%{transform:translateY(-16px) rotate(1deg)} }
@keyframes fadeUp { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
@keyframes popIn { from{opacity:0;transform:translateY(8px) scale(.99)} to{opacity:1;transform:none} }
@keyframes pulseRing { 0%{transform:scale(1);opacity:.4} 75%,100%{transform:scale(1.7);opacity:0} }
@keyframes softPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.45;transform:scale(.7)} }

/* هدر عمومی (روی گرادیان) */
.site-header { position: relative; z-index: 3; }
.site-header .bar { max-width: var(--wrap); margin-inline: auto; padding-inline: 40px; height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; }
.brand:hover { color: #fff; text-decoration: none; }
.brand-logo { width: 34px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo svg { width: 34px; height: 36px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name b { font-size: 1.05rem; font-weight: 800; }
.brand-name span { font-size: .66rem; font-weight: 500; color: rgba(214,230,247,.75); }
.header-nav { display: flex; align-items: center; gap: .25rem; margin-inline-start: auto; }
.header-nav a { padding: .5rem .85rem; border-radius: var(--r-inner); color: rgba(224,237,250,.85); font-weight: 500; font-size: .84rem; display: inline-flex; align-items: center; gap: .45rem; transition: .15s ease; }
.header-nav a svg { width: 1.05rem; height: 1.05rem; }
.header-nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.header-nav a.active { color: #fff; background: rgba(255,255,255,.14); font-weight: 700; }
.header-sep { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 .5rem; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; border: none; transition: background .15s ease; }
.avatar:hover { background: rgba(255,255,255,.3); }
.avatar-menu { position: absolute; top: calc(100% + .5rem); inset-inline-start: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-chip); box-shadow: var(--shadow-lg); min-width: 210px; padding: .5rem; z-index: 60; }
.avatar-menu .who { padding: .55rem .7rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.avatar-menu .who b { display:block; font-weight: 700; font-size: .9rem; color: var(--text); }
.avatar-menu .who span { font-size: .76rem; color: var(--text-muted); }
.avatar-menu a, .avatar-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--text-2); font-size: .88rem; font-weight: 600; border: none; background: none; }
.avatar-menu a:hover, .avatar-menu button:hover { background: var(--surface-2); text-decoration: none; }
.avatar-menu svg { width: 1.15rem; height: 1.15rem; }

/* هیرو */
.hero { position: relative; z-index: 2; max-width: var(--wrap); margin-inline: auto; padding: 44px 40px 112px; }
.hero--home { text-align: center; padding-bottom: 128px; }
.hero--compact { padding: 26px 40px 100px; }
.hero__breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: rgba(214,230,247,.75); flex-wrap: wrap; }
.hero__breadcrumb a { color: rgba(230,241,252,.9); font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.hero__breadcrumb a:hover { color: #fff; }
.hero__breadcrumb svg { width: 13px; height: 13px; opacity: .8; }
.hero__breadcrumb .cur { color: rgba(255,255,255,.95); font-weight: 600; }
.hero h1 { color: #fff; letter-spacing: -.4px; margin: 0; }
.hero--home h1 { font-size: 2.5rem; max-width: 640px; margin: .7rem auto .6rem; line-height: 1.4; }
.hero__lead { color: rgba(213,229,246,.88); font-size: 1rem; max-width: 560px; margin: 0; }
.hero--home .hero__lead { margin: 0 auto; }
.hero__title-row { display:flex; align-items:flex-start; gap: 1.15rem; margin-top: 14px; }
.hero__ico { width: 62px; height: 62px; border-radius: 17px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.hero__ico svg { width: 29px; height: 29px; }
.hero--page h1 { font-size: 1.95rem; margin-bottom: .5rem; }
.hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.1rem; font-size: .78rem; color: rgba(213,229,246,.85); margin-top: .5rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.hero__meta svg { width: 14px; height: 14px; }
.hero__meta .dot { opacity:.5; }
.hero__meta b { color: rgba(230,241,252,.95); font-weight: 700; }
.hero__actions { margin-inline-start: auto; }

/* جستجوی هیرو (کادر سفید شناور) */
.hero-search { position: relative; z-index: 5; max-width: 680px; margin: 1.6rem auto 0; animation: fadeUp .8s cubic-bezier(.22,1,.36,1) both; }
.hero--page .hero-search { margin: 0; max-width: 720px; }
.hero-search__box { background: #fff; border-radius: var(--r-side); padding: 8px; display: flex; gap: 8px; box-shadow: var(--shadow-search); }
.hero-search__field { position: relative; flex: 1; display: flex; align-items: center; }
.hero-search__field svg { position: absolute; inset-inline-start: 16px; color: var(--text-faint); width: 20px; height: 20px; pointer-events: none; }
.hero-search__field input { width: 100%; height: 48px; padding: 0 48px 0 16px; border: none; border-radius: var(--r-inner); background: transparent; font-family: inherit; font-size: .98rem; color: var(--text); outline: none; text-align: right; }
.hero-search__kbd { position: absolute; inset-inline-end: 14px; font-size: .72rem; font-weight: 600; color: var(--text-faint); background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 7px; padding: 1px 9px; font-family: ui-monospace, monospace; direction: ltr; }
.hero-search__btn { height: 48px; padding: 0 26px; border: none; border-radius: 11px; background: var(--brand); color: #fff; font-family: inherit; font-size: .92rem; font-weight: 700; transition: .18s ease; }
.hero-search__btn:hover { background: var(--brand-strong); }
.hero-stats { margin-top: 1.15rem; display: flex; justify-content: center; align-items: center; gap: .65rem; font-size: .78rem; color: rgba(200,220,242,.78); font-weight: 500; flex-wrap: wrap; }
.hero-stats b { font-weight: 700; color: rgba(230,241,252,.95); }
.hero-stats .sep { opacity: .5; }

/* پیشنهاد زنده‌ی جستجو (dropdown) */
.search-suggest { position: absolute; top: calc(100% + 10px); inset-inline: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--r-side); box-shadow: 0 24px 54px rgba(4,24,48,.22); overflow: hidden; z-index: 70; text-align: right; animation: popIn .2s ease both; }
.search-suggest a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.1rem; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.search-suggest a:last-child { border-bottom: none; }
.search-suggest a > svg { color: #7fa4c9; }
.search-suggest a:hover, .search-suggest a.is-active { background: var(--surface-2); text-decoration: none; }
.search-suggest .s-body { flex: 1; min-width: 0; }
.search-suggest .s-title { font-weight: 700; font-size: .9rem; color: var(--text-title); }
.search-suggest .s-snippet { font-size: .8rem; color: var(--text-muted); margin-top: .1rem; display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden; }
.search-suggest .s-foot { padding: .7rem 1.1rem; background: #f7fafc; font-size: .8rem; color: var(--brand); font-weight: 700; display:flex; align-items:center; justify-content:space-between; }

/* محتوای شناور (روی نوار سرمه‌ای بالا می‌آید) */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 40px; }
.float-up { position: relative; z-index: 4; width: 100%; max-width: var(--wrap); margin: -80px auto 0; padding: 0 40px 64px; }
.float-up--narrow { max-width: 768px; }
.float-up--compact { margin-top: -60px; }
.content-grid { display: grid; grid-template-columns: 1fr 190px; gap: 20px; align-items: start; }
.content-grid--wide-aside { grid-template-columns: 1fr 320px; }

/* پنل سفید */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; }
.panel--flat { box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; gap: .7rem; padding: 1.3rem 1.6rem .8rem; }
.panel__head h2 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin: 0; }
.panel__head > svg { color: var(--brand); width: 1.3rem; height: 1.3rem; }
.panel__head .count { font-size: .74rem; font-weight: 700; color: var(--brand); background: var(--brand-weak); padding: 3px 11px; border-radius: 999px; }
.panel__head .more { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--brand); }

/* ── دسته‌بندی‌ها (صفحه‌ی اصلی) ── */
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; padding: .6rem 1rem 1.1rem; }
.cat-row { display: flex; align-items: center; gap: .9rem; padding: .9rem; border-radius: 14px; color: inherit; transition: background .15s ease; }
.cat-row:hover { background: var(--surface-2); text-decoration: none; }
.cat-ico { width: 44px; height: 44px; border-radius: var(--r-chip); display: grid; place-items: center; flex-shrink: 0; background: var(--c-blue-bg); color: var(--c-blue); }
.cat-ico svg { width: 21px; height: 21px; }
.cat-row__body { flex: 1; min-width: 0; }
.cat-row__body b { display: block; font-size: .95rem; font-weight: 700; color: var(--text); }
.cat-row__body span { display: block; font-size: .8rem; color: var(--text-muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-row .count-pill { font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--brand-soft); padding: 4px 12px; border-radius: 999px; flex-shrink: 0; }
.cat-row .chev { color: var(--chevron); width: 16px; height: 16px; flex-shrink: 0; }

/* پالت رنگی آیکون دسته (چرخشی) */
.cat-ico.c-0,.cat-ico.c-blue{background:var(--c-blue-bg);color:var(--c-blue)}
.cat-ico.c-1,.cat-ico.c-teal{background:var(--c-teal-bg);color:var(--c-teal)}
.cat-ico.c-2,.cat-ico.c-purple{background:var(--c-purple-bg);color:var(--c-purple)}
.cat-ico.c-3,.cat-ico.c-amber{background:var(--c-amber-bg);color:var(--c-amber)}
.cat-ico.c-4,.cat-ico.c-green{background:var(--c-green-bg);color:var(--c-green)}
.cat-ico.c-5,.cat-ico.c-slate{background:var(--c-slate-bg);color:var(--c-slate)}
.dot-0,.dot-blue{--dot:var(--c-blue)} .dot-1,.dot-teal{--dot:var(--c-teal)}
.dot-2,.dot-purple{--dot:var(--c-purple)} .dot-3,.dot-amber{--dot:var(--c-amber)}
.dot-4,.dot-green{--dot:var(--c-green)} .dot-5,.dot-slate{--dot:var(--c-slate)}

/* ── پرسش‌های پرتکرار (چیپ) ── */
.faq-section { margin-top: 3rem; }
.faq-chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.faq-chip { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--border-2); border-radius: 999px; padding: .6rem 1.1rem; font-size: .84rem; font-weight: 600; color: var(--text-2); transition: .18s ease; }
.faq-chip:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 8px 20px rgba(13,74,143,.1); text-decoration: none; }
.faq-chip--all { background: var(--brand-weak); border-color: transparent; color: var(--brand); font-weight: 700; }
.faq-chip--all:hover { background: var(--brand-weak-2); }

/* دو ستون صفحه‌ی اصلی (پرطرفدار + جدید) و فاصله‌ی بخش‌ها */
.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.2rem; margin-top: 3.2rem; }
.home-section { margin-top: 3rem; }

/* ── پرطرفدارترین (شماره‌دار) + جدیدترین (چیپ تاریخ) ── */
.rank { display: block; }
.rank__row { display: flex; align-items: center; gap: 1rem; padding: 1rem .75rem; border-bottom: 1px solid #e6edf4; border-radius: var(--r-chip); color: inherit; transition: background .15s ease; }
.rank__row:last-child { border-bottom: none; }
.rank__row:hover { background: var(--surface-2); text-decoration: none; }
.rank__num { width: 40px; font-size: 1.5rem; font-weight: 800; color: #c3d5e7; line-height: 1; font-variant-numeric: tabular-nums; text-align:center; flex-shrink:0; }
.rank__date { width: 50px; background: var(--brand-weak); border-radius: var(--r-chip); text-align: center; padding: .45rem 0; flex-shrink: 0; }
.rank__date b { display: block; font-size: 1.05rem; font-weight: 800; color: var(--brand); line-height: 1.2; }
.rank__date span { display: block; font-size: .66rem; font-weight: 600; color: var(--text-muted); }
.rank__body { flex: 1; min-width: 0; }
.rank__body b { display: block; font-size: .95rem; font-weight: 700; color: var(--text-title); }
.rank__body span { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.rank .chev { color: var(--chevron); width: 16px; height: 16px; flex-shrink: 0; }

/* ── ردیف فهرست عمومی (مقالات دسته، نتایج جستجو، تیکت) ── */
.list-panel { padding: .4rem .9rem .8rem; }
.list-row { display: flex; align-items: center; gap: .9rem; padding: .95rem .65rem; border-top: 1px solid var(--border-soft); border-radius: var(--r-chip); color: inherit; transition: background .15s ease; }
.list-row:hover { background: var(--surface-2); text-decoration: none; }
.list-row__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dot, var(--c-blue)); flex-shrink: 0; }
.list-row__body { flex: 1; min-width: 0; }
.list-row__body b { display: block; font-size: .92rem; font-weight: 700; color: var(--text-title); }
.list-row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .9rem; margin-top: .25rem; font-size: .78rem; color: var(--text-muted); }
.list-row__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.list-row__meta svg { width: 13px; height: 13px; }
.list-row .chev { color: var(--chevron); width: 16px; height: 16px; flex-shrink: 0; }
.list-row--rich { align-items: flex-start; }
.list-row--rich .list-row__dot { margin-top: 7px; }
.list-row--rich .chev { margin-top: 5px; }
.list-row--rich .list-row__body b { font-size: .98rem; line-height: 1.6; }
.list-row__snip { display: block; font-size: .82rem; color: #6f889d; line-height: 1.85; margin-top: .3rem; }

/* ── کارت نوار کناری ── */
.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-side); overflow: hidden; }
.side-card--float { box-shadow: var(--shadow-card); }
.side-card__head { display: flex; align-items: center; gap: .5rem; padding: .95rem 1rem .8rem; border-bottom: 1px solid var(--border-soft); font-size: .88rem; font-weight: 800; color: var(--text); }
.side-card__head svg { color: var(--brand); width: 17px; height: 17px; }
.side-card__body { padding: .5rem; display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: .65rem; padding: .55rem .75rem; border-radius: var(--r-inner); color: inherit; transition: background .15s ease; }
.side-link:hover { background: var(--surface-2); text-decoration: none; }
.side-link .d { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--c-blue)); flex-shrink: 0; }
.side-link .t { flex: 1; min-width: 0; font-size: .82rem; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-link .n { font-size: .72rem; font-weight: 600; color: var(--text-faint); }
.side-link.is-active { background: var(--brand-weak); }
.side-link.is-active .t { color: var(--brand); font-weight: 800; }
.side-link.is-active .n { color: var(--brand); background: var(--brand-weak-2); border-radius: 999px; padding: 2px 9px; }
.side-link--article { align-items: flex-start; }
.side-link--article svg { color: #7fa4c9; margin-top: 3px; width:15px; height:15px; flex-shrink:0; }
.side-link--article .t { white-space: normal; line-height: 1.7; }

/* کارت دعوت (گرادیان) */
.cta-card { background: var(--cta-grad); border-radius: var(--r-side); padding: 1.15rem 1.15rem 1.25rem; color: #fff; position: relative; overflow: hidden; }
.cta-card h3 { display: flex; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 800; color:#fff; margin-bottom: .4rem; }
.cta-card h3 svg { width: 17px; height: 17px; }
.cta-card p { margin: 0 0 .8rem; font-size: .8rem; color: rgba(213,229,246,.85); line-height: 1.85; }
.cta-card a { display: inline-flex; align-items: center; gap: .4rem; background: #fff; color: var(--brand); border-radius: var(--r-inner); padding: .5rem .95rem; font-size: .8rem; font-weight: 800; }
.cta-card a:hover { color: var(--brand-strong); }

/* نوار مرتب‌سازی (segmented) */
.result-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.result-bar__count { margin: 0; font-size: .86rem; color: var(--muted); }
.result-bar__count b { font-weight: 800; color: var(--text); }
.result-bar__count strong { color: var(--brand); font-weight: 700; }
.segmented { margin-inline-start: auto; display: inline-flex; align-items: center; gap: .5rem; }
.segmented > span { font-size: .78rem; color: #8299ab; font-weight: 600; }
.segmented__group { display: inline-flex; gap: 5px; background: var(--surface-3); border-radius: 11px; padding: 4px; }
.segmented__group a { height: 32px; padding: 0 13px; display: inline-flex; align-items: center; border-radius: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.segmented__group a:hover { color: var(--brand); text-decoration: none; }
.segmented__group a.is-active { background: var(--brand); color: #fff; box-shadow: 0 4px 12px -3px rgba(13,74,143,.5); }

/* ═══════════ صفحه‌ی مقاله ═══════════ */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-card); padding: 2.1rem 2.5rem 2rem; min-width: 0; }
.article__lead { margin: 0 0 1rem; font-size: 1rem; color: #2f4356; line-height: 2; }

/* متن غنی مقاله (prose) */
.prose { font-size: .98rem; line-height: 1.95; color: var(--text-body); }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: 1.2rem; font-weight: 800; color: var(--text); margin-top: 1.7rem; scroll-margin-top: 20px; }
.prose h3 { font-size: 1.05rem; font-weight: 800; color: var(--text); margin-top: 1.4rem; }
.prose p { color: var(--text-body); }
.prose ul, .prose ol { padding-inline-start: 1.4rem; }
.prose li { margin: .45rem 0; }
.prose li b, .prose p b, .prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { border-inline-start: 4px solid var(--brand); background: var(--brand-weak); padding: .9rem 1.2rem; border-radius: var(--radius-sm); color: var(--text-2); }
.prose img { border-radius: var(--radius); margin: 1.2rem auto; box-shadow: var(--shadow-sm); }
.prose pre { background: #102a49; color: #cfe3f7; padding: 1rem 1.2rem; border-radius: var(--r-chip); overflow-x: auto; direction: ltr; text-align: left; font-size: .84rem; line-height: 1.8; }
.prose code { background: #f1f5f9; border: 1px solid #e2e8f0; padding: .1rem .45rem; border-radius: 6px; font-size: .85em; font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--brand); direction: ltr; display: inline-block; }
.prose pre code { background: none; border: none; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--border); padding: .55rem .8rem; text-align: right; }
.prose th { background: var(--surface-3); }

/* کال‌اوت‌ها و بلوک‌های مقاله */
.callout { display: flex; gap: .65rem; border-radius: var(--r-chip); padding: .85rem 1rem; font-size: .86rem; line-height: 1.8; }
.callout svg { flex-shrink: 0; margin-top: 3px; width: 17px; height: 17px; }
.callout--info { background: #eef5fd; border: 1px solid #d5e6f8; color: #1f4e79; }
.callout--info svg { color: #2b6cb0; }
.callout--warn { background: #fdf6e8; border: 1px solid #f1e2c4; color: #7c5410; }
.callout--warn svg { color: var(--warning); }
.steps { display: flex; flex-direction: column; gap: .75rem; }
.step { display: flex; gap: .75rem; align-items: flex-start; }
.step__n { width: 26px; height: 26px; border-radius: 50%; background: var(--brand-weak); color: var(--brand); font-weight: 800; font-size: .82rem; display: grid; place-items: center; flex-shrink: 0; margin-top: 3px; }
.step p { margin: 0; font-size: .95rem; color: var(--text-body); line-height: 1.95; }
.terminal { direction: ltr; text-align: left; background: #102a49; border-radius: var(--r-chip); padding: .8rem 1rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; line-height: 1.8; color: #cfe3f7; overflow: auto; }
.terminal__label { display: flex; align-items: center; gap: .45rem; color: rgba(207,227,247,.55); font-size: .7rem; margin-bottom: .4rem; }
.terminal .pr { color: #8fb8e8; }

/* برچسب‌ها و ضمیمه‌ها */
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.6rem; padding-top: 1.25rem; border-top: 1px solid #e9f0f6; }
.tag-chip { display: inline-flex; align-items:center; gap:.4rem; background: var(--brand-soft); border: 1px solid var(--border-2); color: var(--text-2); padding: .3rem .8rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.tag-chip svg { color:#7fa4c9; width:13px; height:13px; }
.tag-chip:hover { border-color: #b9d2ec; color: var(--brand); text-decoration: none; }
.attachments { margin-top: 1.5rem; }
.attachments__title { display: flex; align-items: center; gap: .5rem; font-size: .95rem; font-weight: 800; color: var(--text); margin-bottom: .75rem; }
.attachments__title svg { color: var(--brand); width:17px; height:17px; }
.attach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.attach-item { display: flex; align-items: center; gap: .75rem; border: 1px solid #e3ecf4; border-radius: var(--r-chip); padding: .7rem .9rem; }
.attach-item__ico { width: 38px; height: 38px; border-radius: var(--r-inner); background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.attach-item__ico svg { width:19px; height:19px; }
.attach-item__body { flex: 1; min-width: 0; }
.attach-item__body b { display: block; font-size: .82rem; font-weight: 700; color: var(--text-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach-item__body span { display: block; font-size: .72rem; color: var(--text-faint); }
.attach-item a { color: var(--brand); }

/* فهرست مطالب (TOC) */
.toc-wrap { position: sticky; top: 20px; align-self: start; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.toc { display: flex; flex-direction: column; padding: .5rem; }
.toc a { display: block; padding: .5rem .75rem; border-radius: var(--radius-sm); font-size: .82rem; font-weight: 500; color: #44586b; transition: all .15s ease; }
.toc a:hover { background: var(--surface-2); text-decoration: none; }
.toc a.is-active { background: var(--brand-weak); color: var(--brand); font-weight: 700; }

/* ═══════════ تیکت‌ها ═══════════ */
.ticket-row { display: flex; align-items: center; gap: 1rem; padding: .95rem 1rem; border-radius: 14px; border-bottom: 1px solid var(--border-soft); color: inherit; transition: background .15s ease; }
.ticket-row:last-child { border-bottom: none; }
.ticket-row:hover { background: var(--surface-2); text-decoration: none; }
.ticket-row.is-unread { background: #f4faf6; }
.ticket-row.is-unread:hover { background: #eef7f1; }
.ticket-row__ico { width: 44px; height: 44px; border-radius: var(--r-chip); display: grid; place-items: center; flex-shrink: 0; }
.ticket-row__ico svg { width: 21px; height: 21px; }
.ticket-row__body { flex: 1; min-width: 0; }
.ticket-row__title { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.ticket-row__title b { font-size: .95rem; font-weight: 700; color: var(--text-title); }
.ticket-row__meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .35rem; font-size: .78rem; color: var(--text-muted); }
.ticket-row__meta .sep { opacity: .45; }
.ticket-row__meta .cat { display: inline-flex; align-items: center; gap: .35rem; }
.ticket-row__meta .cat .d { width: 7px; height: 7px; border-radius: 50%; background: var(--dot, var(--c-blue)); }
.ticket-row__aside { display: inline-flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.ticket-row .chev { color: var(--chevron); width: 17px; height: 17px; }
.msg-count { display: inline-flex; align-items: center; gap: .35rem; background: var(--brand-soft); color: var(--muted); font-size: .74rem; font-weight: 600; border-radius: 999px; padding: 5px 11px; }
.msg-count svg { width: 14px; height: 14px; }

/* آیکون‌چیپ بر پایه‌ی وضعیت */
.st-ico { }
.st-answered { background: var(--success-weak); color: var(--success); }
.st-open { background: var(--warning-weak); color: var(--warning); }
.st-progress { background: var(--brand-weak); color: var(--brand); }
.st-closed { background: var(--muted-weak); color: var(--muted); }

/* نشان وضعیت + متن وضعیت */
.status-pill { display: inline-flex; align-items: center; gap: .45rem; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.status-pill .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill--answered { background: var(--success-weak); color: var(--success); }
.status-pill--answered .d { background: var(--success-2); animation: softPulse 2.2s ease-in-out infinite; }
.status-pill--open { background: var(--warning-weak); color: var(--warning); }
.status-pill--progress { background: var(--brand-weak); color: var(--brand); }
.status-pill--closed { background: var(--muted-weak); color: var(--muted); }
.status-text { font-weight: 700; }
.status-text.t-answered { color: var(--success); }
.status-text.t-open { color: var(--warning); }
.status-text.t-progress { color: var(--brand); }
.status-text.t-closed { color: var(--muted); }
.list-live { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; color: var(--success); }
.list-live .d { width: 8px; height: 8px; border-radius: 50%; background: var(--success-2); animation: softPulse 2.2s ease-in-out infinite; }

/* هیرو تیکت — نشان وضعیت روشن روی سرمه‌ای */
.hero-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 5px 13px; }
.hero-status .d { width: 7px; height: 7px; border-radius: 50%; }
.hero-status--answered { background: rgba(46,158,86,.22); border: 1px solid rgba(126,214,160,.45); color: #c8f4d8; }
.hero-status--answered .d { background: #4ade80; }
.hero-status--awaiting { background: rgba(224,135,27,.22); border: 1px solid rgba(240,190,120,.45); color: #ffe4bd; }
.hero-status--awaiting .d { background: #f6ad3f; animation: softPulse 2.2s ease-in-out infinite; }

/* کارت سؤال/پاسخ تیکت */
.qa-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-card); overflow: hidden; }
.qa-card--answer { border-color: #d6eade; }
.qa-card__head { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border-soft); background: #fbfdff; }
.qa-card--answer .qa-card__head { border-bottom-color: #e7f2ea; background: linear-gradient(180deg,#f4faf6,#fbfefc); }
.qa-avatar { width: 42px; height: 42px; border-radius: var(--r-chip); display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex-shrink: 0; background: var(--brand); color: #fff; }
.qa-avatar--exp { background: var(--success-weak); color: var(--success); }
.qa-card__who { flex: 1; min-width: 0; }
.qa-card__who .r { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.qa-card__who b { font-size: .9rem; font-weight: 800; color: var(--text-title); }
.qa-card__who .chip { font-size: .72rem; font-weight: 600; color: #8299ab; background: var(--surface-3); border-radius: 999px; padding: 2px 9px; }
.qa-card__who time { display: block; font-size: .74rem; color: var(--text-faint); margin-top: .1rem; }
.qa-card__id { flex-shrink: 0; font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--brand-soft); border-radius: 8px; padding: 5px 11px; direction: ltr; }
.qa-card__body { padding: 1.25rem 1.5rem 1.4rem; }
.qa-card__body p { margin: 0 0 .9rem; font-size: .95rem; color: #3a5169; line-height: 2.05; }
.qa-official { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; color: var(--success); background: var(--success-weak); border-radius: 999px; padding: 2px 10px; }

/* بازخورد پاسخ */
.feedback { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px dashed #e2ecf5; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.feedback__q { font-size: .86rem; font-weight: 700; color: var(--text-2); }
.feedback__btns { display: inline-flex; gap: .55rem; }
.feedback__btns button { display: inline-flex; align-items: center; gap: .45rem; height: 38px; padding: 0 1rem; border-radius: var(--r-inner); border: 1.5px solid var(--border-2); background: #fff; color: var(--text-2); font-family: inherit; font-size: .82rem; font-weight: 700; transition: all .15s ease; }
.feedback__btns .yes:hover { border-color: var(--success); color: var(--success); background: #f4faf6; }
.feedback__btns .no:hover { border-color: var(--danger); color: var(--danger); background: #fdf3f1; }
.feedback__done { display: inline-flex; align-items: center; gap: .55rem; font-size: .86rem; font-weight: 700; color: var(--success); background: var(--success-weak); border-radius: var(--r-chip); padding: .6rem 1rem; }

/* خط‌زمانی وضعیت تیکت */
.timeline { padding: 1.15rem 1.25rem 1.25rem; }
.tl-step { position: relative; padding-inline-start: 30px; padding-bottom: 1.25rem; }
.tl-step:last-child { padding-bottom: 0; }
.tl-step::before { content:''; position: absolute; inset-inline-start: 8px; top: 19px; bottom: -3px; width: 2px; background: var(--border-2); }
.tl-step:last-child::before { display: none; }
.tl-step.done::before { background: var(--success); }
.tl-dot { position: absolute; inset-inline-start: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; }
.tl-step.done .tl-dot { background: var(--success); color: #fff; }
.tl-step.done .tl-dot svg { width: 11px; height: 11px; }
.tl-step.current .tl-dot { inset-inline-start: -1px; top: 0; width: 20px; height: 20px; background: var(--brand-weak); border: 2px solid var(--brand); }
.tl-step.current .tl-dot .p { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: softPulse 2.2s ease-in-out infinite; }
.tl-step.pending .tl-dot { inset-inline-start: 2px; top: 3px; width: 14px; height: 14px; background: #fff; border: 2px solid #cfdbe8; }
.tl-step b { display: block; font-size: .84rem; font-weight: 700; color: var(--text-title); }
.tl-step.current b { color: var(--brand); }
.tl-step.pending b { color: #9db0c2; font-weight: 700; }
.tl-step time { display: block; font-size: .74rem; color: var(--text-faint); margin-top: .1rem; }

/* فهرست جزئیات (کلید/مقدار) */
.detail-list { padding: .3rem 1.25rem 1rem; }
.detail-list .row { display: flex; align-items: center; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid #f2f6fa; }
.detail-list .row:last-child { border-bottom: none; }
.detail-list .k { font-size: .8rem; color: var(--text-muted); }
.detail-list .v { font-size: .82rem; font-weight: 700; color: var(--text-title); display: inline-flex; align-items: center; gap: .4rem; }
.detail-list .v .d { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--c-blue)); }

/* دراپ‌زون آپلود (فرم تیکت) */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 1.5rem; border: 1.5px dashed #cddbea; border-radius: 14px; background: #f7fafc; color: var(--muted); cursor: pointer; text-align: center; transition: all .15s ease; }
.dropzone:hover { border-color: var(--brand); text-decoration: none; }
.dropzone__ico { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; }
.dropzone b { font-size: .86rem; font-weight: 700; color: var(--text-2); }
.dropzone span { font-size: .78rem; color: #8299ab; }
.char-count { position: absolute; bottom: 12px; inset-inline-start: 14px; font-size: .72rem; font-weight: 600; color: #9aadbf; font-variant-numeric: tabular-nums; pointer-events: none; }

/* ═══════════ فوتر ═══════════ */
.site-footer { margin-top: 3.5rem; background: #0f2c4c; flex-shrink: 0; }
.site-footer .bar { max-width: var(--wrap); margin-inline: auto; padding: 1.4rem 40px; display: flex; align-items: center; gap: 1rem; font-size: .78rem; color: rgba(206,224,243,.75); }
.site-footer .links { margin-inline-start: auto; display: flex; gap: 1.25rem; }
.site-footer .links a { color: rgba(230,240,250,.9); font-weight: 600; }
.site-footer .links a:hover { color: #fff; }

/* ── ویجت چت هوش مصنوعی (دکمه‌ی قرصی + پنل) ──────────────────── */
.chat-fab { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 900; border: none; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 12px 30px rgba(13,74,143,.4); display: inline-flex; align-items: center; gap: .6rem; padding: 14px 22px; transition: .2s ease; }
.chat-fab:hover { box-shadow: 0 18px 40px rgba(13,74,143,.5); background: #0e529f; }
.chat-fab svg { width: 20px; height: 20px; }
.chat-fab .label { font-size: .84rem; font-weight: 700; }
.chat-fab .pulse { position: absolute; inset: 0; border-radius: 999px; background: var(--brand); animation: pulseRing 3s ease-out infinite; z-index: -1; pointer-events: none; }
.chat-panel { position: fixed; inset-block-end: 24px; inset-inline-start: 24px; z-index: 950; width: min(400px, calc(100vw - 2rem)); height: min(600px, calc(100vh - 3rem)); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-panel); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; }
.chat-head { padding: 1rem 1.2rem; background: var(--hero-grad); color: #fff; display: flex; align-items: center; gap: .7rem; }
.chat-head .ch-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.chat-head h3 { color: #fff; font-size: 1rem; }
.chat-head .ch-status { font-size: .74rem; opacity: .85; }
.chat-head button { margin-inline-start: auto; background: rgba(255,255,255,.15); border: none; color: #fff; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.chat-body { flex: 1; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: .9rem; background: var(--bg); }
.msg { max-width: 85%; padding: .7rem 1rem; border-radius: 14px; font-size: .9rem; line-height: 1.8; }
.msg-user { align-self: flex-start; background: var(--brand); color: #fff; border-end-start-radius: 4px; }
.msg-ai { align-self: flex-end; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); border-end-end-radius: 4px; }
.msg-ai p + p { margin-top: .5rem; }
.msg-ai .src-ref { color: var(--brand); font-weight: 700; font-size: .7rem; }
.ai-sources { margin-top: .7rem; padding-top: .6rem; border-top: 1px dashed var(--border); font-size: .8rem; }
.ai-sources__label { color: var(--text-muted); font-weight: 600; }
.ai-sources ol { padding-inline-start: 1.2rem; margin-top: .3rem; }
.ai-sources a { color: var(--brand); }
.chat-typing { align-self: flex-end; display: flex; gap: .3rem; padding: .8rem 1rem; }
.chat-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); animation: blink 1.4s infinite both; }
.chat-typing span:nth-child(2){animation-delay:.2s}.chat-typing span:nth-child(3){animation-delay:.4s}
@keyframes blink { 0%,80%,100%{opacity:.3} 40%{opacity:1} }
.chat-foot { padding: .8rem; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input-row { display: flex; gap: .5rem; align-items: flex-end; }
.chat-input-row textarea { flex: 1; resize: none; max-height: 100px; height: auto; min-height: 44px; border: 1px solid var(--border-2); border-radius: 12px; padding: .6rem .8rem; font-family: inherit; font-size: .9rem; background: var(--input-bg); color: var(--text); line-height: 1.7; }
.chat-input-row textarea:focus { border-color: var(--brand); box-shadow: var(--ring); outline: none; background:#fff; }
.chat-send { width: 44px; height: 44px; border-radius: 12px; background: var(--brand); color: #fff; border: none; display: grid; place-items: center; flex-shrink: 0; }
.chat-send:disabled { opacity: .5; }
.chat-ticket-btn { margin-top: .5rem; }

/* ── ورود ─────────────────────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2.5rem 1.25rem; background: var(--hero-grad); position: relative; overflow: hidden; }
.auth-wrap .glow { position: absolute; width: 640px; height: 640px; inset-inline-end: -160px; top: -220px; background: radial-gradient(circle, rgba(64,140,220,.4), transparent 65%); animation: glowPulse 12s ease-in-out infinite; pointer-events: none; }
.auth-col { position: relative; width: 100%; max-width: 428px; z-index: 2; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: .85rem; margin-bottom: 1.4rem; text-align: center; animation: fadeUp .8s cubic-bezier(.22,1,.36,1) .05s both; }
.auth-brand__logo { width: 66px; height: 66px; border-radius: 19px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; box-shadow: 0 14px 34px rgba(4,22,46,.4); }
.auth-brand__logo svg { width: 38px; height: 40px; }
.auth-brand__logo img { width: 60%; height: 60%; object-fit: contain; }
.auth-brand b { font-size: 1.2rem; font-weight: 800; color: #fff; }
.auth-brand span { font-size: .78rem; font-weight: 500; color: rgba(214,230,247,.72); }
.auth-card { background: #fff; border-radius: 22px; box-shadow: 0 32px 70px rgba(3,18,40,.42); overflow: hidden; animation: fadeUp .85s cubic-bezier(.22,1,.36,1) .16s both; }
.auth-card__accent { height: 4px; background: linear-gradient(90deg, var(--brand-2), var(--brand) 55%, #0a3568); }
.auth-card__inner { padding: 1.9rem 2.1rem; }
.auth-card h1 { font-size: 1.4rem; font-weight: 800; margin: 0 0 .45rem; color: var(--text); letter-spacing: -.3px; }
.auth-card__lead { font-size: .86rem; color: var(--text-muted); margin: 0 0 1.6rem; line-height: 1.85; }
.auth-field { position: relative; display: flex; align-items: center; }
.auth-field > svg { position: absolute; inset-inline-start: 14px; color: #93a8bc; width: 19px; height: 19px; pointer-events: none; }
.auth-field .input { padding-inline-start: 46px; }
.auth-field .toggle { position: absolute; inset-inline-start: 8px; width: 34px; height: 34px; border: none; background: transparent; color: #8ba0b4; display: grid; place-items: center; border-radius: 8px; }
.auth-field .toggle:hover { background: var(--brand-weak); color: var(--brand); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .95rem 2.1rem; border-top: 1px solid var(--border-soft); background: #fbfdff; font-size: .74rem; color: #8299ab; font-weight: 500; }
.auth-foot svg { color: var(--brand); width: 15px; height: 15px; }
.auth-copy { text-align: center; margin: 1.25rem 0 0; font-size: .72rem; color: rgba(206,224,243,.6); font-weight: 500; animation: fadeUp .85s cubic-bezier(.22,1,.36,1) .28s both; }

/* ═══════════════ پنل مدیریت (بدون تغییر طراحی — هماهنگ با توکن‌ها) ═══════════════ */
.admin-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--surface); border-left: 1px solid var(--border); position: fixed; top: 0; bottom: 0; right: 0; left: auto; display: flex; flex-direction: column; z-index: 60; transition: transform .25s ease; }
.sidebar-brand { height: var(--header-h); display: flex; align-items: center; gap: .6rem; padding: 0 1.3rem; border-bottom: 1px solid var(--border); font-weight: 800; }
.sidebar-brand .brand-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color:#fff; display:grid; place-items:center; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .8rem; }
.nav-group-label { font-size: .72rem; color: var(--text-muted); font-weight: 700; padding: .6rem .8rem .3rem; }
.nav-link { display: flex; align-items: center; gap: .7rem; padding: .62rem .85rem; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: .9rem; margin-bottom: .15rem; transition: .14s; }
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--brand-weak); color: var(--brand); font-weight: 700; }
.nav-link svg { width: 1.25rem; height: 1.25rem; opacity: .85; }
.nav-link .nav-badge { margin-inline-start: auto; background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; min-width: 20px; height: 20px; padding: 0 .35rem; border-radius: 999px; display: grid; place-items: center; }
.sidebar-foot { padding: .8rem; border-top: 1px solid var(--border); }
.admin-main { flex: 1; margin-right: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: var(--header-h); background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 1rem; padding: 0 1.6rem; position: sticky; top: 0; z-index: 40; }
.admin-topbar h1 { font-size: 1.15rem; }
.admin-topbar .spacer { margin-inline-start: auto; }
.admin-content { padding: 1.8rem 1.6rem; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.5rem; }
.page-head .subtitle { color: var(--text-muted); font-size: .88rem; margin-top: .2rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1.1rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.3rem; display: flex; align-items: center; gap: 1rem; box-shadow: var(--shadow-sm); }
.stat-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-weak); color: var(--brand); flex-shrink: 0; }
.stat-ico svg { width: 1.5rem; height: 1.5rem; }
.stat-card .s-value { font-size: 1.55rem; font-weight: 800; line-height: 1.2; }
.stat-card .s-label { font-size: .82rem; color: var(--text-muted); }
.stat-danger .stat-ico { background: var(--danger-weak); color: var(--danger); }
.stat-success .stat-ico { background: var(--success-weak); color: var(--success); }
.stat-warning .stat-ico { background: var(--warning-weak); color: var(--warning); }
.stat-info .stat-ico { background: var(--info-weak); color: var(--info); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 1.3rem; align-items: start; }
.chart { display: flex; align-items: flex-end; gap: .5rem; height: 190px; padding-top: 1rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 34px; background: var(--brand); border-radius: 6px 6px 0 0; min-height: 4px; transition: .3s; position: relative; }
.chart-bar:hover { background: var(--brand-strong); }
.chart-col .c-label { font-size: .68rem; color: var(--text-muted); white-space: nowrap; }
.chart-col .c-val { font-size: .7rem; font-weight: 700; color: var(--text-2); }

.rank-list { display: flex; flex-direction: column; }
.rank-item { display: flex; align-items: center; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.rank-item:last-child { border-bottom: none; }
.rank-num { width: 26px; height: 26px; border-radius: 8px; background: var(--surface-3); color: var(--text-muted); font-size: .78rem; font-weight: 700; display: grid; place-items: center; flex-shrink: 0; }
.rank-item .r-text { flex: 1; font-size: .9rem; font-weight: 500; }
.rank-item .r-count { font-size: .8rem; color: var(--text-muted); font-weight: 600; }
.rank-no-result .rank-num { background: var(--danger-weak); color: var(--danger); }

.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.3rem; background: var(--surface); padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius); }
.filters .field { margin: 0; flex: 1; min-width: 150px; }
.filters .input, .filters .select { height: 42px; padding: 0 .8rem; font-size: .86rem; }
.filters .select { padding-left: 2.2rem; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1.4rem; flex-wrap: wrap; }
.tab { padding: .6rem 1rem; font-weight: 700; font-size: .88rem; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }

/* ویرایشگر متن غنی (RTE) */
.rte { border: 1.5px solid var(--border-2); border-radius: var(--radius-sm); background: var(--surface); overflow: visible; }
.rte:focus-within { border-color: var(--brand); box-shadow: var(--ring); }
.rte-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .12rem; padding: .4rem .5rem; background: var(--surface-3); border-bottom: 1px solid var(--border); border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: sticky; top: 0; z-index: 5; }
.rte-btn { min-width: 32px; height: 32px; padding: 0 .4rem; border-radius: 7px; border: none; background: transparent; color: var(--text-2); display: inline-grid; place-items: center; font-weight: 700; font-size: .82rem; transition: .12s; }
.rte-btn:hover { background: var(--surface); color: var(--brand); }
.rte-btn svg { width: 1.05rem; height: 1.05rem; }
.rte-btn.is-active { background: var(--brand-weak); color: var(--brand); }
.rte-txt { font-family: var(--font); }
.rte-sep { width: 1px; align-self: stretch; background: var(--border); margin: .25rem .25rem; }
.rte-pop-wrap { position: relative; display: inline-flex; }
.rte-pop { position: absolute; top: calc(100% + .35rem); inset-inline-start: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .5rem; z-index: 20; display: grid; grid-template-columns: repeat(6, 1fr); gap: .3rem; width: max-content; }
.rte-swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-strong); cursor: pointer; padding: 0; }
.rte-swatch:hover { transform: scale(1.12); }
.rte-pop.rte-link { display: block; width: 260px; }
.rte-area { min-height: 300px; max-height: 640px; overflow-y: auto; padding: 1rem 1.2rem; outline: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.rte-area:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.rte-area.prose > *:first-child { margin-top: 0; }
.rte-foot { display: flex; align-items: center; justify-content: space-between; padding: .4rem .8rem; border-top: 1px solid var(--border); background: var(--surface-3); border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-size: .76rem; color: var(--text-muted); }
.rte-uploading { color: var(--brand); display: inline-flex; align-items: center; gap: .3rem; }
.rte-words { margin-inline-start: auto; }

.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.info-list li:last-child { border-bottom: none; }
.info-list .k { color: var(--text-muted); }
.info-list .v { font-weight: 700; }

/* مدیریت دسته‌بندی‌ها (درخت + آیکون‌پیکر) */
.cat-tree { display: flex; flex-direction: column; gap: .2rem; }
.cat-branch { margin-inline-start: 1rem; padding-inline-start: .9rem; border-inline-start: 2px solid var(--border); display: flex; flex-direction: column; gap: .2rem; margin-top: .2rem; position: relative; }
.cat-node { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border: 1px solid transparent; border-radius: var(--radius-sm); transition: .14s; }
.cat-node:hover { background: var(--surface-2); border-color: var(--border); }
.cat-node__icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; }
.cat-node__icon svg { width: 1.25rem; height: 1.25rem; }
.cat-node__body { flex: 1; min-width: 0; }
.cat-node__title { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .92rem; }
.cat-node__desc { font-size: .77rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.cat-node__actions { display: flex; align-items: center; gap: .1rem; opacity: 0; transition: opacity .14s; }
.cat-node:hover .cat-node__actions, .cat-node:focus-within .cat-node__actions { opacity: 1; }
.cat-node__actions form { display: inline-flex; margin: 0; }
.cat-move { display: inline-flex; flex-direction: column; margin-inline-end: .1rem; }
.cat-move button { width: 22px; height: 15px; padding: 0; border: none; background: transparent; color: var(--text-muted); display: grid; place-items: center; border-radius: 4px; }
.cat-move button svg { width: 14px; height: 14px; }
.cat-move button:hover:not(:disabled) { background: var(--surface-3); color: var(--brand); }
.cat-move button:disabled { opacity: .25; cursor: default; }
.cat-empty-hint { font-size: .8rem; color: var(--text-muted); padding: .6rem; border: 1px dashed var(--border); border-radius: var(--radius-sm); text-align: center; }

.icon-field-label { display: flex; align-items: center; justify-content: space-between; }
.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: .35rem; max-height: 172px; overflow-y: auto; padding: .5rem; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.icon-picker button { aspect-ratio: 1; border: 1px solid transparent; border-radius: 9px; background: var(--surface); color: var(--text-2); display: grid; place-items: center; transition: .12s; padding: 0; }
.icon-picker button svg { width: 1.2rem; height: 1.2rem; }
.icon-picker button:hover { border-color: var(--border-strong); color: var(--brand); }
.icon-picker button.is-selected { background: var(--brand); color: var(--brand-contrast); border-color: var(--brand); }

.cat-preview { display: flex; align-items: center; gap: .8rem; padding: .85rem .9rem; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); margin-bottom: 1.1rem; }
.cat-preview__icon { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-weak); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.cat-preview__icon svg { width: 1.55rem; height: 1.55rem; }
.cat-preview__title { font-weight: 700; font-size: .95rem; }
.cat-preview__desc { font-size: .78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

/* ── واکنش‌گرا ─────────────────────────────────────────────────── */
.sidebar-backdrop { display: none; }
.menu-toggle { display: none; }
@media (max-width: 1024px) {
  .dash-grid { grid-template-columns: 1fr; }
  .content-grid, .content-grid--wide-aside { grid-template-columns: 1fr; }
  .toc-wrap { position: static; }
}
@media (max-width: 860px) {
  .cat-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .attach-grid { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .admin-main { margin-right: 0; }
  .sidebar-backdrop.show { display: block; position: fixed; inset: 0; background: rgba(6,20,40,.5); z-index: 55; }
  .menu-toggle { display: inline-flex !important; }
  .home-cols { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .container, .wrap, .hero, .float-up, .site-header .bar, .site-footer .bar { padding-inline: 18px; }
  .hero { padding-top: 28px; }
  .hero--home h1 { font-size: 1.7rem; }
  .hero--page h1 { font-size: 1.4rem; }
  .header-nav .nav-text { display: none; }
  .header-nav a { padding: .5rem .55rem; }
  .float-up { margin-top: -60px; }
  .chat-fab .label { display: none; }
  .chat-fab { padding: 15px; }
  .toast-wrap { left: .6rem; right: .6rem; max-width: none; }
  .admin-content { padding: 1.2rem 1rem; }
  .page-head { align-items: flex-start; flex-direction: column; }
}

[x-cloak] { display: none !important; }
