/* ==========================================================================
   گنجینه | پرتال موقوفات — سیستم طراحی پایه (مشترک سایت، پنل‌ها، نصب‌کننده)
   تم پیش‌فرض: فیروزه‌ای و لاجوردی (رنگ‌های نشان گنجعلی‌خان) + طلای شامپاینی + عاج کاغذی.
   رنگ‌های پایه (--c-brand, --c-brand2, --c-accent, --c-bg) از «تنظیمات ← پوسته» می‌آیند و بقیه با color-mix مشتق می‌شوند.
   حالت شب و روز با [data-theme]. فقط ویژگی‌های منطقی (inline-start/end) تا RTL/LTR خودکار باشد.
   ========================================================================== */

@font-face { font-family: 'RvFa'; src: url('../vendor/fonts/Vazirmatn-FD-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'RvFa'; src: url('../vendor/fonts/Vazirmatn-FD-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'RvFa'; src: url('../vendor/fonts/Vazirmatn-FD-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'RvFa'; src: url('../vendor/fonts/Vazirmatn-FD-Bold.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'RvFa'; src: url('../vendor/fonts/Vazirmatn-FD-ExtraBold.woff2') format('woff2'); font-weight: 800 900; font-display: swap; }
@font-face { font-family: 'RvSans'; src: url('../vendor/fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-ar-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-ar-500.woff2') format('woff2'); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-ar-700.woff2') format('woff2'); font-weight: 600 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-ar-800.woff2') format('woff2'); font-weight: 800 900; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-la-400.woff2') format('woff2'); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'GkVazir'; src: url('../vendor/fonts/vazir-la-700.woff2') format('woff2'); font-weight: 600 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: 'RvKufi'; src: url('../vendor/fonts/ReemKufi.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'RvKufi'; src: url('../vendor/fonts/ReemKufi-latin.woff2') format('woff2'); font-weight: 400 700; font-display: swap; unicode-range: U+0000-002F, U+003A-00FF, U+2000-206F; }
@font-face { font-family: 'GkNastaliq'; src: url('../vendor/fonts/Nastaliq-700.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'RvSerif'; src: url('../vendor/fonts/Cormorant-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ---------------------------------------------------------------- توکن‌ها: روز (عاج، فیروزه، طلا) */
:root {
  /* رنگ‌های پایه (با تنظیمات بازنویسی می‌شوند) */
  --c-brand: #0A7F99;
  --c-brand2: #27406E;
  --c-accent: #C9A96E;
  --c-bg: #F6F4EE;

  --bg: var(--c-bg);
  --bg-2: color-mix(in srgb, var(--c-bg) 90%, var(--c-brand2) 10%);
  --surface: #FFFEFB;
  --surface-2: color-mix(in srgb, var(--c-bg) 55%, #fff);
  --surface-3: color-mix(in srgb, var(--c-bg) 85%, var(--c-brand2) 6%);
  --glass: rgba(255, 254, 251, .74);
  --line: color-mix(in srgb, var(--c-accent) 26%, #E9E4D8);
  --line-strong: color-mix(in srgb, var(--c-accent) 48%, #D9D0BD);
  --text: #121C2B;
  --text-2: #33405A;
  --muted: #667085;
  --faint: #98A0AE;

  --brand: var(--c-brand);
  --brand-2: color-mix(in srgb, var(--c-brand) 55%, var(--c-brand2));
  --brand-3: color-mix(in srgb, var(--c-brand) 72%, #fff);
  --brand-ink: var(--c-brand2);
  --brand-soft: color-mix(in srgb, var(--c-brand) 11%, #fff);
  --on-brand: #FFFFFF;

  --gold: var(--c-accent);
  --gold-2: color-mix(in srgb, var(--c-accent) 72%, #fff);
  --gold-3: color-mix(in srgb, var(--c-accent) 45%, #fff);
  --gold-ink: color-mix(in srgb, var(--c-accent) 58%, #000);
  --gold-soft: color-mix(in srgb, var(--c-accent) 15%, #fff);
  --on-gold: #1A1408;

  --ok: #1F7A58;  --ok-soft: #DDF0E7;
  --warn: #A5711C; --warn-soft: #F8EBD0;
  --bad: #B03F37;  --bad-soft: #F7E0DD;
  --info: #2C6A98; --info-soft: #DDEAF5;

  --grad-gold: linear-gradient(135deg, var(--gold-ink) 0%, var(--c-accent) 38%, var(--gold-3) 52%, var(--c-accent) 70%, var(--gold-ink) 100%);
  --grad-brand: linear-gradient(135deg, var(--c-brand2) 0%, color-mix(in srgb, var(--c-brand2) 45%, var(--c-brand)) 55%, var(--c-brand) 100%);
  --grad-logo: linear-gradient(180deg, color-mix(in srgb, var(--c-brand) 70%, #22D3E6) 0%, var(--c-brand) 45%, var(--c-brand2) 100%);
  --grad-hero: radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--c-accent) 24%, transparent), transparent 60%),
               radial-gradient(900px 500px at -10% 30%, color-mix(in srgb, var(--c-brand) 16%, transparent), transparent 60%);

  --shadow-xs: 0 1px 2px rgba(18, 28, 43, .06);
  --shadow-sm: 0 2px 8px rgba(18, 28, 43, .06), 0 1px 2px rgba(18, 28, 43, .05);
  --shadow: 0 10px 30px -12px rgba(18, 28, 43, .18), 0 2px 6px rgba(18, 28, 43, .05);
  --shadow-lg: 0 30px 60px -24px color-mix(in srgb, var(--c-brand2) 38%, transparent), 0 8px 20px -10px rgba(18, 28, 43, .12);
  --shadow-gold: 0 10px 30px -10px color-mix(in srgb, var(--c-accent) 55%, transparent);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --ease: cubic-bezier(.22, .8, .24, 1);

  --font-body: 'RvFa';
  --font-head: 'RvKufi';
  --font: var(--font-body), 'RvSans', Tahoma, sans-serif;
  --font-display: var(--font-head), 'RvKufi', 'RvFa', serif;
  --font-serif: 'RvSerif', 'RvKufi', Georgia, serif;
  --font-nastaliq: 'GkNastaliq', 'RvKufi', serif;
  --container: 1240px;
  --pattern: url('../images/girih.svg');
  color-scheme: light;
}
html[lang="en"] { --font: 'RvSans', 'RvFa', system-ui, sans-serif; --font-display: 'RvSerif', 'RvKufi', Georgia, serif; }

/* ---------------------------------------------------------------- توکن‌ها: شب (سرمه‌ای نیمه‌شب، فیروزه‌ی روشن، طلا) */
[data-theme="dark"] {
  --bg: #070C16;
  --bg-2: #0A111E;
  --surface: #0E1626;
  --surface-2: #121C2F;
  --surface-3: #172339;
  --glass: rgba(14, 22, 38, .70);
  --line: color-mix(in srgb, var(--c-accent) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--c-accent) 28%, transparent);
  --text: #EDEAE2;
  --text-2: #CFCBC0;
  --muted: #8E97A8;
  --faint: #626C7E;

  --brand: color-mix(in srgb, var(--c-brand) 62%, #7FE3F0);
  --brand-2: color-mix(in srgb, var(--c-brand) 80%, #fff);
  --brand-3: color-mix(in srgb, var(--c-brand) 45%, #B9F2F8);
  --brand-ink: color-mix(in srgb, var(--c-brand) 40%, #CFF6FA);
  --brand-soft: color-mix(in srgb, var(--c-brand) 18%, transparent);
  --on-brand: #04121A;

  --gold: color-mix(in srgb, var(--c-accent) 85%, #fff);
  --gold-2: color-mix(in srgb, var(--c-accent) 65%, #fff);
  --gold-3: color-mix(in srgb, var(--c-accent) 40%, #fff);
  --gold-ink: color-mix(in srgb, var(--c-accent) 60%, #fff);
  --gold-soft: color-mix(in srgb, var(--c-accent) 13%, transparent);
  --on-gold: #140F04;

  --ok: #4CC291;  --ok-soft: rgba(76, 194, 145, .13);
  --warn: #E2AE52; --warn-soft: rgba(226, 174, 82, .13);
  --bad: #EE7B70;  --bad-soft: rgba(238, 123, 112, .13);
  --info: #6DB0E4; --info-soft: rgba(109, 176, 228, .13);

  --grad-brand: linear-gradient(135deg, #081226 0%, color-mix(in srgb, var(--c-brand2) 70%, #000) 50%, color-mix(in srgb, var(--c-brand) 55%, #000) 100%);
  --grad-hero: radial-gradient(1100px 600px at 85% -10%, color-mix(in srgb, var(--c-accent) 16%, transparent), transparent 60%),
               radial-gradient(900px 520px at -10% 30%, color-mix(in srgb, var(--c-brand) 20%, transparent), transparent 60%);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow: 0 14px 40px -16px rgba(0, 0, 0, .7), 0 0 0 1px color-mix(in srgb, var(--c-accent) 6%, transparent);
  --shadow-lg: 0 40px 80px -30px rgba(0, 0, 0, .8), 0 0 0 1px color-mix(in srgb, var(--c-accent) 8%, transparent);
  --shadow-gold: 0 12px 36px -12px color-mix(in srgb, var(--c-accent) 45%, transparent);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- پایه */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.85; color: var(--text); background: var(--bg);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; transition: background-color .3s var(--ease), color .3s var(--ease);
}
html[lang="en"] body { line-height: 1.7; }
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
:where([data-theme="dark"]) a { color: var(--brand-3); }
:where([data-theme="dark"]) a:hover { color: var(--gold-2); }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.35; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
hr { border: 0; height: 1px; background: var(--line); margin: 24px 0; }
::selection { background: var(--gold-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[x-cloak] { display: none !important; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed !important; inset-inline-start: 12px; top: 12px; width: auto; height: auto; clip: auto; z-index: 999; background: var(--surface); padding: 8px 14px; border-radius: 10px; box-shadow: var(--shadow); }

.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; vertical-align: middle; }
.icon-lg { width: 26px; height: 26px; flex-shrink: 0; }
.icon-xl { width: 38px; height: 38px; flex-shrink: 0; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

.display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.serif { font-family: var(--font-serif); }
.gold-text { background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small, small { font-size: .86em; }
.tiny { font-size: .76rem; }
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ltr { text-align: end; }
.num { font-variant-numeric: tabular-nums; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--grad-gold); }
.divider-gold { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); margin: 28px 0; opacity: .7; }

/* ---------------------------------------------------------------- چیدمان */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-sm { max-width: 820px; }
.row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap, 12px); flex-wrap: wrap; }
.row-nowrap { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: var(--gap, 20px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(var(--min, 260px), 1fr)); }
.with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.with-aside-start { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.aside-sticky { position: sticky; top: 96px; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 36px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 36px; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
@media (max-width: 1080px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .with-aside, .with-aside-start { grid-template-columns: 1fr; } .aside-sticky { position: static; } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .hide-sm { display: none !important; } body { font-size: 14.5px; } }
@media (max-width: 1020px) { .hide-md { display: none !important; } }
@media (min-width: 761px) { .show-sm { display: none !important; } }

/* ---------------------------------------------------------------- دکمه‌ها */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--b-bd); background: var(--b-bg); color: var(--b-fg);
  font: inherit; font-weight: 600; font-size: .93rem; line-height: 1; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s, color .2s, border-color .2s; position: relative; isolation: isolate;
}
.btn:hover { color: var(--b-fg); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn-primary { --b-bg: var(--brand); --b-fg: var(--on-brand); --b-bd: transparent; background: var(--grad-brand); }
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #1E8F76, #2EA88A); }
.btn-primary:hover { box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--c-brand2) 60%, transparent); }
.btn-gold { --b-fg: var(--on-gold); --b-bd: transparent; background: var(--grad-gold); background-size: 200% 100%; background-position: 0 0; box-shadow: var(--shadow-gold); }
.btn-gold:hover { background-position: 100% 0; box-shadow: 0 16px 36px -12px rgba(179, 138, 59, .6); }
.btn-outline { --b-bg: transparent; --b-bd: var(--gold-2); --b-fg: var(--gold-ink); }
.btn-outline:hover { --b-bg: var(--gold-soft); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { --b-bg: var(--surface-2); box-shadow: none; }
.btn-soft { --b-bg: var(--brand-soft); --b-bd: transparent; --b-fg: var(--brand-ink); }
.btn-danger { --b-bg: var(--bad-soft); --b-bd: transparent; --b-fg: var(--bad); }
.btn-danger:hover { --b-bg: var(--bad); --b-fg: #fff; }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .84rem; }
.btn-lg { min-height: 52px; padding: 0 30px; font-size: 1rem; }
.btn-xl { min-height: 60px; padding: 0 38px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.btn-icon.btn-sm { width: 34px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--b-fg); border-top-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.link-arrow .icon-sm { transition: transform .2s var(--ease); }
[dir="rtl"] .link-arrow:hover .icon-sm { transform: translateX(-4px); }
[dir="ltr"] .link-arrow:hover .icon-sm { transform: translateX(4px); }

/* ---------------------------------------------------------------- فرم‌ها */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: .86rem; font-weight: 600; color: var(--text-2); }
.req { color: var(--bad); margin-inline-start: 3px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; transition: border-color .2s, box-shadow .2s, background .2s;
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.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='%23B38A3B' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-inline-end: 40px; }
[dir="ltr"] .select { background-position: right 14px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--gold-2); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input[readonly] { background: var(--surface-2); }
.is-invalid { border-color: var(--bad) !important; }
.field .help { font-size: .8rem; color: var(--muted); }
.field .error { font-size: .8rem; color: var(--bad); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-start-end-radius: 0; border-end-end-radius: 0; }
.input-addon { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--line-strong); border-inline-start: 0; border-start-end-radius: 12px; border-end-end-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: .85rem; white-space: nowrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form-grid .full, .form-grid .field.full { grid-column: 1 / -1; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid, .form-grid-3 { grid-template-columns: 1fr; } }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding-top: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { position: relative; display: inline-flex; }
.check-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.check-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .86rem; background: var(--surface); transition: .2s; }
.check-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.check-chip input:focus-visible + span { outline: 2px solid var(--gold); }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { width: 44px; height: 24px; border-radius: 99px; background: var(--line-strong); position: relative; transition: background .2s; flex-shrink: 0; }
.toggle .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform .25s var(--ease); }
.toggle input:checked + .track { background: var(--brand); }
[dir="ltr"] .toggle input:checked + .track::after { transform: translateX(20px); }
[dir="rtl"] .toggle input:checked + .track::after { transform: translateX(-20px); }
.toggle input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }
.range { width: 100%; accent-color: var(--gold); }
.file-drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.img-preview { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.tr-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lang-tag { font-size: .7rem; font-weight: 700; color: var(--gold-ink); background: var(--gold-soft); border-radius: 6px; padding: 1px 7px; margin-inline-start: 6px; }
@media (max-width: 760px) { .tr-pair { grid-template-columns: 1fr; } }
.color-input { width: 52px; height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); padding: 3px; background: var(--surface); cursor: pointer; }
.scale-pick { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.scale-pick label { position: relative; }
.scale-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale-pick span { display: grid; place-items: center; height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); font-weight: 700; transition: .2s; }
.scale-pick input:checked + span { background: var(--grad-gold); color: var(--on-gold); border-color: transparent; box-shadow: var(--shadow-gold); }
.scale-pick input:focus-visible + span { outline: 2px solid var(--gold); }

/* ---------------------------------------------------------------- کارت و سطح */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); position: relative; }
.card-body { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.02rem; display: flex; align-items: center; gap: 10px; }
.card-head h2 .icon, .card-head h3 .icon { color: var(--gold); }
.card-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.card-lux { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, var(--gold-3), var(--line), var(--gold-2)) border-box; }
.card-glass { background: var(--glass); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.card-dark { background: var(--grad-brand); color: #F2ECDF; border: 0; }
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: #FBF6EA; }
.card-dark .muted { color: rgba(242, 236, 223, .72); }
.card-hover { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold-3); }
.surface-2 { background: var(--surface-2); }
.pad { padding: 20px; } .pad-lg { padding: 32px; }
.rounded { border-radius: var(--radius); }
.section-title { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin: 0 0 14px; }
.section-title .icon { color: var(--gold); }

/* ---------------------------------------------------------------- نشان‌ها، چیپ، آواتار */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: .76rem; font-weight: 700; line-height: 1.6; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; font-style: normal; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-gold { background: var(--gold-soft); color: var(--gold-ink); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }
.badge-mute { background: var(--surface-3); color: var(--muted); }
.badge-outline { background: transparent; border: 1px solid var(--line-strong); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem; color: var(--text-2); }
.chip .icon-sm { color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--gold-3); flex-shrink: 0; }
.avatar-sm { width: 30px; height: 30px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 112px; height: 112px; border-width: 4px; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person .meta { min-width: 0; }
.person .meta strong { display: block; font-size: .93rem; }
.person .meta span { display: block; font-size: .8rem; color: var(--muted); }

/* ---------------------------------------------------------------- جدول */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.table th { text-align: start; font-weight: 700; font-size: .78rem; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-compact td, .table-compact th { padding: 9px 12px; }
.dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- هشدار و وضعیت خالی */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; font-size: .92rem; border: 1px solid transparent; }
.alert .icon { margin-top: 3px; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-bad { background: var(--bad-soft); color: var(--bad); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-gold { background: var(--gold-soft); color: var(--gold-ink); border-color: var(--gold-3); }
.alert p:last-child { margin: 0; }
.disclaimer { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px dashed var(--gold-2); background: var(--gold-soft); color: var(--gold-ink); font-size: .84rem; line-height: 1.8; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .empty-icon { width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.empty .empty-icon .icon { width: 32px; height: 32px; }

/* ---------------------------------------------------------------- زبانه‌ها */
.tabs { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; width: max-content; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--gold-ink); }
.tabs .is-active, .tabs [aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tabs-line { display: flex; gap: 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs-line a, .tabs-line button { padding: 12px 2px; color: var(--muted); font: inherit; font-weight: 600; font-size: .92rem; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.tabs-line .is-active, .tabs-line [aria-selected="true"] { color: var(--text); border-color: var(--gold); }

/* ---------------------------------------------------------------- شاخص‌ها و نمودار */
.kpi { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi::after { content: ''; position: absolute; inset-inline-end: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, var(--gold-soft), transparent 70%); pointer-events: none; }
.kpi .kpi-label { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .kpi-label .icon-sm { color: var(--gold); }
.kpi .kpi-value { font-size: 1.75rem; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.kpi .kpi-foot { font-size: .8rem; color: var(--muted); }
.trend-up { color: var(--ok); } .trend-down { color: var(--bad); }
.meter { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--grad-gold); transition: width .8s var(--ease); }
.meter.ok > span { background: var(--ok); } .meter.warn > span { background: var(--warn); } .meter.bad > span { background: var(--bad); } .meter.brand > span { background: var(--brand); }
.ring { --v: 0; --c: var(--gold); --size: 96px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative; flex-shrink: 0;
  background: conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-3) 0); }
.ring::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring > * { position: relative; text-align: center; line-height: 1.15; }
.ring strong { font-size: calc(var(--size) / 4); font-weight: 800; display: block; }
.ring small { font-size: .7rem; color: var(--muted); }
.ring.ok { --c: var(--ok); } .ring.warn { --c: var(--warn); } .ring.bad { --c: var(--bad); } .ring.brand { --c: var(--brand); }
.chart-box { position: relative; height: var(--h, 280px); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 36px; }
.spark span { flex: 1; min-width: 3px; background: var(--gold-3); border-radius: 3px 3px 0 0; }

/* ---------------------------------------------------------------- تایم‌لاین */
.timeline { position: relative; padding-inline-start: 28px; }
.timeline::before { content: ''; position: absolute; inset-inline-start: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold-3), var(--line)); }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before { content: ''; position: absolute; inset-inline-start: -24px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.timeline-item.is-ok::before { border-color: var(--ok); background: var(--ok); }
.timeline-item.is-bad::before { border-color: var(--bad); }
.timeline-item .t-date { font-size: .78rem; color: var(--muted); }

/* ---------------------------------------------------------------- منو، مودال، toast */
.dropdown-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 210px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.dropdown-menu a, .dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: .9rem; cursor: pointer; text-align: start; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface-2); color: var(--gold-ink); }
.dropdown-menu .sep { height: 1px; background: var(--line); margin: 6px 4px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(4, 8, 18, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-lg { max-width: 860px; }
.toasts { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--line); border-inline-start: 4px solid var(--ok); font-size: .92rem; animation: toastIn .35s var(--ease); }
.toast.bad { border-inline-start-color: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

/* ---------------------------------------------------------------- انتخاب تاریخ */
.dp { position: absolute; z-index: 150; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 14px; font-size: .88rem; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-nav { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.dp-wd { font-size: .74rem; color: var(--muted); padding: 4px 0; }
.dp-grid button { height: 34px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.dp-grid button:hover:not([disabled]) { background: var(--gold-soft); }
.dp-grid button.is-today { box-shadow: inset 0 0 0 1px var(--gold); }
.dp-grid button.is-selected { background: var(--brand); color: var(--on-brand); }
.dp-grid button[disabled] { opacity: .3; cursor: default; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.dp-foot button { border: 0; background: none; color: var(--gold-ink); font: inherit; font-weight: 600; cursor: pointer; }

/* ---------------------------------------------------------------- صفحه‌بندی */
.pagination { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.pagination a, .pagination span { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 12px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-size: .88rem; }
.pagination .is-active { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.pagination .is-disabled { opacity: .45; }

/* ---------------------------------------------------------------- محتوای متنی غنی */
.prose { font-size: 1rem; line-height: 2.05; color: var(--text-2); overflow-wrap: anywhere; }
html[lang="en"] .prose { line-height: 1.8; }
.prose h2, .prose h3 { margin-top: 1.6em; color: var(--text); }
.prose img { border-radius: var(--radius); margin: 1.4em auto; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-inline-start: 3px solid var(--gold); background: var(--gold-soft); border-start-end-radius: 14px; border-end-end-radius: 14px; color: var(--text); }
.prose ul, .prose ol { padding-inline-start: 1.4em; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold-3); text-underline-offset: 4px; }
.rich-editor { border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--surface); }
.rich-editor .ql-toolbar { border: 0 !important; border-bottom: 1px solid var(--line) !important; background: var(--surface-2); }
.rich-editor .ql-container { border: 0 !important; min-height: 180px; font-family: var(--font) !important; font-size: .95rem; }
.rich-editor[data-dir="rtl"] .ql-editor { direction: rtl; text-align: right; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-fill { fill: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-picker { color: var(--text-2); }

/* ---------------------------------------------------------------- امضای دیجیتال */
.signature-pad { width: 100%; height: 180px; display: block; border: 1px dashed var(--gold-2); border-radius: 14px; background: repeating-linear-gradient(0deg, transparent 0 34px, var(--line) 34px 35px), var(--surface); touch-action: none; cursor: crosshair; }

/* ---------------------------------------------------------------- انیمیشن */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.shimmer { position: relative; overflow: hidden; }
.shimmer::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); animation: shimmer 3.2s infinite; pointer-events: none; }
@keyframes shimmer { 60%, 100% { transform: translateX(100%); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(216, 180, 106, .45); } 100% { box-shadow: 0 0 0 16px rgba(216, 180, 106, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

/* ---------------------------------------------------------------- چاپ */
@media print {
  body { background: #fff !important; color: #000; }
  .no-print, .site-header, .site-footer, .sidebar, .topnav, .toasts, .back-top { display: none !important; }
  .card { box-shadow: none; border-color: #ccc; }
  a { color: #000; }
}

/* ==========================================================================
   v3 — لایه‌ی «موزه‌ای»: توکن‌های تایپوگرافی و فاصله، بافت، قاب طاقی، دکمه‌های درخشان،
   حالت فوکوس، اسکلت بارگذاری، ظهور پلکانی. همه‌ی کلاس‌های قبلی سر جایشان‌اند.
   ========================================================================== */
:root {
  --ink: #0B1424;
  --ink-2: #111D35;
  --ink-text: #F4EEE0;
  --ink-muted: rgba(244, 238, 224, .74);
  --fs-display: clamp(2.5rem, 6vw, 5.2rem);
  --fs-h1: clamp(2rem, 4.2vw, 3.2rem);
  --fs-h2: clamp(1.75rem, 3.2vw, 2.7rem);
  --space-section: clamp(64px, 8vw, 112px);
  --img-grain: url('../images/brand/grain.svg');
  --img-girih: url('../images/brand/pattern-girih.svg');
  --mask-arch: url('../images/brand/arch.svg');
  --hairline: linear-gradient(90deg, transparent, color-mix(in srgb, var(--c-accent) 75%, transparent), transparent);
  --grad-ink: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--c-brand) 26%, transparent), transparent 55%),
              radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c-accent) 14%, transparent), transparent 60%),
              linear-gradient(160deg, #0E1A31 0%, #0A1426 55%, #070D1A 100%);
  --shadow-float: 0 40px 80px -40px rgba(11, 20, 36, .45), 0 12px 30px -18px rgba(11, 20, 36, .25);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}
[data-theme="dark"] {
  --shadow-float: 0 40px 90px -40px rgba(0, 0, 0, .9), 0 0 0 1px color-mix(in srgb, var(--c-accent) 10%, transparent);
  --grad-ink: radial-gradient(120% 90% at 85% 0%, color-mix(in srgb, var(--c-brand) 18%, transparent), transparent 55%),
              radial-gradient(90% 80% at 0% 100%, color-mix(in srgb, var(--c-accent) 10%, transparent), transparent 60%),
              linear-gradient(160deg, #0B1426 0%, #080F1E 55%, #050A14 100%);
}

/* بافت ریز کاغذ/مفرغ روی زمینه */
body { background-image: var(--img-grain); background-size: 180px; }

/* تایپوگرافی سرتیترها */
.display-2xl { font-family: var(--font-display); font-size: var(--fs-display); line-height: 1.16; font-weight: 700; letter-spacing: -.01em; }
html[lang="en"] .display-2xl { line-height: 1.06; letter-spacing: -.02em; }
.lede { font-size: clamp(1.02rem, 1.35vw, 1.16rem); line-height: 2.05; color: var(--text-2); }
html[lang="en"] .lede { line-height: 1.75; }
.kicker-num { font-family: var(--font-serif); font-weight: 600; letter-spacing: .06em; color: var(--gold-ink); direction: ltr; unicode-bidi: isolate; }
.hairline { height: 1px; border: 0; margin: 0; background: var(--hairline); }

/* فوکوس روشن و طلایی */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; box-shadow: 0 0 0 6px var(--gold-soft); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 0; }

/* دکمه‌ها: درخشش طلایی و حس عمق */
.btn-gold { overflow: hidden; background-image: linear-gradient(135deg, #8A6A33 0%, var(--c-accent) 30%, #F1DCAA 50%, var(--c-accent) 70%, #8A6A33 100%); background-size: 220% 100%; box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 250, 230, .55), inset 0 -1px 0 rgba(90, 62, 20, .25); }
.btn-gold::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(110deg, transparent 30%, rgba(255, 252, 238, .7) 48%, transparent 64%); transform: translateX(-130%); transition: transform .9s var(--ease-out); pointer-events: none; }
.btn-gold:hover::before { transform: translateX(130%); }
.btn-primary { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 22px -14px color-mix(in srgb, var(--c-brand2) 80%, transparent); }
.btn-glass { --b-bg: rgba(255, 255, 255, .06); --b-fg: var(--ink-text); --b-bd: rgba(233, 207, 148, .38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { --b-bg: rgba(255, 255, 255, .12); --b-bd: rgba(233, 207, 148, .7); color: #fff; }
[data-magnetic] { will-change: transform; }

/* کارت‌ها: لبه‌ی طلایی موی، نور داخلی */
.card { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .55); }
[data-theme="dark"] .card { box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .03); }
.card-lux::after { content: ''; position: absolute; top: 0; inset-inline: 18%; height: 1px; background: var(--hairline); pointer-events: none; }
.card-glass { background: var(--glass); border-color: color-mix(in srgb, var(--c-accent) 24%, transparent); backdrop-filter: blur(20px) saturate(1.35); -webkit-backdrop-filter: blur(20px) saturate(1.35); }
.card-hover:hover { box-shadow: var(--shadow-float); }
.card-ink { background: var(--grad-ink); color: var(--ink-text); border: 1px solid color-mix(in srgb, var(--c-accent) 22%, transparent); }
.card-ink h2, .card-ink h3, .card-ink h4 { color: #FFF8E8; }
.card-ink .muted { color: var(--ink-muted); }

/* قاب طاقی ایرانی (تیزه‌دار) با ماسک */
.iwan-mask { -webkit-mask: var(--mask-arch) center / 100% 100% no-repeat; mask: var(--mask-arch) center / 100% 100% no-repeat; }
.iwan-frame { position: relative; padding: 9px; isolation: isolate; }
.iwan-frame::before, .iwan-frame::after { content: ''; position: absolute; z-index: -1; -webkit-mask: var(--mask-arch) center / 100% 100% no-repeat; mask: var(--mask-arch) center / 100% 100% no-repeat; }
.iwan-frame::before { inset: 0; background: var(--grad-gold); }
.iwan-frame::after { inset: 1.5px; background: var(--surface); }
.iwan-frame > img, .iwan-frame > .iwan-inner { display: block; width: 100%; -webkit-mask: var(--mask-arch) center / 100% 100% no-repeat; mask: var(--mask-arch) center / 100% 100% no-repeat; }
.iwan-frame > img { object-fit: cover; aspect-ratio: 5 / 7; }

/* اسکلت بارگذاری */
.skeleton { display: block; min-height: 1em; border-radius: 10px; background: linear-gradient(100deg, var(--surface-3) 30%, var(--surface-2) 50%, var(--surface-3) 70%); background-size: 220% 100%; animation: skel 1.5s ease-in-out infinite; color: transparent !important; }
.skeleton-text { height: .9em; margin: .45em 0; }
.skeleton-img { aspect-ratio: 16 / 10; border-radius: var(--radius); }
@keyframes skel { from { background-position: 120% 0; } to { background-position: -120% 0; } }


/* ظهور پلکانی و ورود نرم */
.reveal { transition-delay: var(--d, 0s); transition-duration: 1s; transition-timing-function: var(--ease-out); }
.reveal.reveal-zoom { transform: scale(.96); }
.reveal.reveal-side { transform: translateX(calc(var(--side, 1) * 26px)); }
[dir="rtl"] .reveal.reveal-side { --side: -1; }
.reveal.is-visible.reveal-zoom, .reveal.is-visible.reveal-side { transform: none; }

/* نماد تندیس (تک‌رنگ با ماسک — هر تصویر جایگزین شفاف هم کار می‌کند) */
.statue-mark { display: inline-block; aspect-ratio: 2 / 5; height: var(--h, 120px); background: currentColor; -webkit-mask: var(--statue, url('../images/brand/statue-mono.svg')) center / contain no-repeat; mask: var(--statue, url('../images/brand/statue-mono.svg')) center / contain no-repeat; }

/* وضعیت خالی با تندیس */
.empty .empty-statue { position: relative; width: 96px; height: 124px; margin: 0 auto 20px; display: grid; place-items: end center; }
.empty .empty-statue::before { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 55% at 50% 28%, var(--gold-soft), transparent 80%); border: 1px solid color-mix(in srgb, var(--c-accent) 30%, transparent); -webkit-mask: none; border-radius: 999px 999px 16px 16px; }
.empty .empty-statue .statue-mark { position: relative; --h: 106px; color: color-mix(in srgb, var(--c-accent) 62%, transparent); margin-bottom: 7px; }
.empty .empty-statue .empty-badge { position: absolute; bottom: -10px; inset-inline-end: -12px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--gold); border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm); }
.empty .empty-statue .empty-badge .icon { width: 18px; height: 18px; }

/* جدول و فرم: ظرافت بیشتر */
.table th { letter-spacing: .06em; }
.table-wrap { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.input, .select, .textarea { box-shadow: inset 0 1px 2px rgba(18, 28, 43, .04); }
.tabs .is-active, .tabs [aria-selected="true"] { box-shadow: var(--shadow-sm), inset 0 -2px 0 var(--gold-2); }
.pagination .is-active { background: var(--grad-brand); box-shadow: var(--shadow-sm); }
.badge-gold { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-accent) 30%, transparent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--c-accent) 35%, transparent); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) { .btn-gold::before { display: none; } .skeleton { animation: none; } .reveal.reveal-zoom, .reveal.reveal-side { transform: none; } [data-magnetic] { transform: none !important; } }
@media print { body { background-image: none !important; } }
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, #0C6A82 0%, #1690AC 100%); --b-fg: #F4FBFD; }

/* ==========================================================================
   v3 — ممیزی: کنتراست (M-28)، چاپ (M-27)، ارقام (L-10)، فونت‌ها (L-08)، تعویض تم (L-12)
   ========================================================================== */
:root { --brand-text: color-mix(in srgb, var(--c-brand) 78%, #000); }   /* ≥ 4.5:1 روی عاج */
:root:not([data-theme="dark"]) { --warn: #8A5D14; --faint: #7A8292; }
[data-theme="dark"] { --brand-text: var(--brand-3); }
a { color: var(--brand-text); }
.link-arrow { color: var(--brand-text); }
.badge-mute { color: var(--text-2); }
.panel-foot, .side-foot { color: var(--muted) !important; }
.sidebar .side-foot { color: rgba(217, 210, 194, .7) !important; }
:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 3px; box-shadow: 0 0 0 5px var(--gold-soft); }
[data-theme="dark"] :focus-visible { outline-color: var(--gold-2); }
/* فارسی: رقم‌ها با فونت پایه (ارقام فارسی) — سریف لاتین فقط در انگلیسی بارگذاری می‌شود */
html[lang="fa"] { --font-serif: var(--font-display); }
html[lang="en"] .kicker-num, html[lang="en"] .gk-counter, html[lang="en"] .lx-stat b, html[lang="en"] .stat-band b { font-variant-numeric: lining-nums; }
/* هنگام تعویض تم، انتقال رنگ خاموش تا متن تیره روی تیره دیده نشود */
html.theme-switching, html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }

@media print {
  :root, [data-theme="dark"] {
    --bg: #fff; --surface: #fff; --surface-2: #f6f6f6; --surface-3: #eee; --text: #000; --text-2: #222; --muted: #444; --line: #ccc; --line-strong: #bbb;
    --gold-ink: #6b4f1d; --brand-text: #0a4f60; color-scheme: light;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn-gold::before, .skeleton { display: none !important; }
}
