/*! VibeFarsi × Bootstrap 5.3 RTL kit. Design tokens and components from VibeFarsi (github.com/TronIsHere/vibefarsiui, MIT). */

/* ===== 0. design systems: graphite is the default on :root; set data-theme="…" on <html> (or any wrapper) for the others ===== */

/* گرافیت، مینیمال فنی و تم پیش‌فرض. این بلوک را در :root بگذارید. */
:root,
[data-theme="graphite"] {
  color-scheme: dark;

  /* رنگ */
  --background: oklch(0.115 0.002 285);
  --foreground: oklch(0.975 0 0);
  --card: oklch(0.14 0.002 285);
  --card-foreground: oklch(0.975 0 0);
  --popover: oklch(0.16 0.002 285);
  --popover-foreground: oklch(0.975 0 0);
  --primary: oklch(0.975 0 0);
  --primary-foreground: oklch(0.13 0 0);
  --secondary: oklch(0.2 0.002 285);
  --secondary-foreground: oklch(0.975 0 0);
  --muted: oklch(0.175 0.002 285);
  --muted-foreground: oklch(0.63 0.004 285);
  --accent: oklch(0.2 0.002 285);
  --accent-foreground: oklch(0.975 0 0);
  --destructive: oklch(0.65 0.2 25);
  --success: oklch(0.75 0.16 160);
  --warning: oklch(0.82 0.16 80);
  --border: oklch(1 0 0 / 8%);
  --input: oklch(1 0 0 / 11%);
  --ring: oklch(0.7 0 0);
  --brand: oklch(0.8 0.165 65);
  --brand-foreground: oklch(0.22 0.06 60);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 0.625rem;
  --type-display-weight: 700;
  --shape-control: calc(var(--radius) - 2px);
  --shape-field: calc(var(--radius) - 2px);
  --shape-surface: calc(var(--radius) + 12px);
  --shape-overlay: calc(var(--radius) + 4px);
  --line: 1px;
  --line-field: 1px;
  --line-style: solid;
  --field: color-mix(in oklch, var(--background) 60%, transparent);
  --depth-control: 0 0 #0000;
  --depth-press: 0 0 #0000;
  --depth-field: 0 0 #0000;
  --depth-surface: 0 1px 0 0 oklch(1 0 0 / 6%) inset;
  --depth-overlay: 0 20px 50px -20px oklch(0 0 0 / 80%);
  --surface-filter: none;
  --press: scale(0.98);
  --motion: 200ms;
  --motion-ease: cubic-bezier(0.2, 0, 0, 1);
  --backdrop: none;
  --spacing: 0.25rem;
}

/* فیروزه، شیشه‌ای. تیترها با Noto Kufi Arabic هستن. */
[data-theme="turquoise"] {
  color-scheme: dark;

  /* رنگ */
  --background: oklch(0.2 0.045 225);
  --foreground: oklch(0.97 0.01 200);
  --card: oklch(0.97 0.02 200 / 7%);
  --card-foreground: oklch(0.97 0.01 200);
  --popover: oklch(0.25 0.045 225 / 88%);
  --popover-foreground: oklch(0.97 0.01 200);
  --primary: oklch(0.86 0.12 190);
  --primary-foreground: oklch(0.2 0.05 210);
  --secondary: oklch(0.97 0.02 200 / 11%);
  --secondary-foreground: oklch(0.97 0.01 200);
  --muted: oklch(0.97 0.02 200 / 6%);
  --muted-foreground: oklch(0.8 0.04 205);
  --accent: oklch(0.97 0.02 200 / 12%);
  --accent-foreground: oklch(0.97 0.01 200);
  --destructive: oklch(0.7 0.18 22);
  --success: oklch(0.8 0.15 165);
  --warning: oklch(0.85 0.14 85);
  --border: oklch(0.97 0.03 200 / 16%);
  --input: oklch(0.97 0.03 200 / 22%);
  --ring: oklch(0.86 0.12 190);
  --brand: oklch(0.87 0.12 165);
  --brand-foreground: oklch(0.2 0.05 180);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 0.875rem;
  --type-display: "Noto Kufi Arabic", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display-weight: 600;
  --shape-control: 0.75rem;
  --shape-field: 0.75rem;
  --shape-surface: 1.375rem;
  --shape-overlay: 1rem;
  --line: 1px;
  --line-field: 1px;
  --line-style: solid;
  --field: oklch(0.97 0.02 200 / 6%);
  --depth-control: 0 1px 0 0 oklch(1 0 0 / 22%) inset, 0 10px 24px -14px oklch(0.8 0.14 190 / 60%);
  --depth-press: 0 1px 0 0 oklch(1 0 0 / 12%) inset;
  --depth-field: 0 0 #0000;
  --depth-surface: 0 1px 0 0 oklch(1 0 0 / 18%) inset, 0 30px 60px -30px oklch(0.08 0.03 230 / 70%);
  --depth-overlay: 0 1px 0 0 oklch(1 0 0 / 20%) inset, 0 30px 70px -24px oklch(0.08 0.03 230 / 80%);
  --surface-filter: blur(20px) saturate(1.6);
  --press: scale(0.97);
  --motion: 280ms;
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --backdrop: radial-gradient(55% 45% at 90% 0%, oklch(0.72 0.14 195 / 50%), transparent 70%), radial-gradient(45% 50% at 5% 100%, oklch(0.55 0.17 265 / 45%), transparent 70%), radial-gradient(35% 35% at 45% 55%, oklch(0.75 0.13 160 / 18%), transparent 70%);
  --spacing: 0.25rem;
}

/* زعفران، نئوبروتالیسم. تیترها با Lalezar هستن. */
[data-theme="saffron"] {
  color-scheme: light;

  /* رنگ */
  --background: oklch(0.95 0.05 92);
  --foreground: oklch(0.17 0.01 60);
  --card: oklch(0.995 0.01 95);
  --card-foreground: oklch(0.17 0.01 60);
  --popover: oklch(0.995 0.01 95);
  --popover-foreground: oklch(0.17 0.01 60);
  --primary: oklch(0.82 0.17 78);
  --primary-foreground: oklch(0.17 0.01 60);
  --secondary: oklch(0.995 0.01 95);
  --secondary-foreground: oklch(0.17 0.01 60);
  --muted: oklch(0.91 0.05 90);
  --muted-foreground: oklch(0.4 0.03 70);
  --accent: oklch(0.88 0.12 85);
  --accent-foreground: oklch(0.17 0.01 60);
  --destructive: oklch(0.58 0.22 28);
  --success: oklch(0.55 0.15 150);
  --warning: oklch(0.62 0.16 55);
  --border: oklch(0.17 0.01 60);
  --input: oklch(0.17 0.01 60);
  --ring: oklch(0.17 0.01 60);
  --brand: oklch(0.63 0.21 25);
  --brand-foreground: oklch(0.99 0 0);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 0rem;
  --type-display: "Lalezar", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display-weight: 400;
  --shape-control: 0rem;
  --shape-field: 0rem;
  --shape-surface: 0rem;
  --shape-overlay: 0rem;
  --line: 2px;
  --line-field: 2px;
  --line-style: solid;
  --field: var(--card);
  --depth-control: -3px 3px 0 0 var(--foreground);
  --depth-press: 0 0 0 0 var(--foreground);
  --depth-field: 0 0 #0000;
  --depth-surface: -6px 6px 0 0 var(--foreground);
  --depth-overlay: -8px 8px 0 0 var(--foreground);
  --surface-filter: none;
  --press: translate(-3px, 3px);
  --motion: 90ms;
  --motion-ease: linear;
  --backdrop: none;
  --spacing: 0.25rem;
}

/* انار، خمیری. متن و تیتر با Vazirmatn هستن. */
[data-theme="pomegranate"] {
  color-scheme: light;

  /* رنگ */
  --background: oklch(0.94 0.025 15);
  --foreground: oklch(0.27 0.05 15);
  --card: oklch(0.975 0.012 15);
  --card-foreground: oklch(0.27 0.05 15);
  --popover: oklch(0.985 0.008 15);
  --popover-foreground: oklch(0.27 0.05 15);
  --primary: oklch(0.6 0.2 18);
  --primary-foreground: oklch(0.99 0.005 15);
  --secondary: oklch(0.9 0.035 15);
  --secondary-foreground: oklch(0.27 0.05 15);
  --muted: oklch(0.92 0.03 15);
  --muted-foreground: oklch(0.5 0.05 15);
  --accent: oklch(0.9 0.04 15);
  --accent-foreground: oklch(0.27 0.05 15);
  --destructive: oklch(0.55 0.2 28);
  --success: oklch(0.58 0.14 160);
  --warning: oklch(0.68 0.15 65);
  --border: oklch(0.27 0.05 15 / 9%);
  --input: oklch(0.27 0.05 15 / 12%);
  --ring: oklch(0.6 0.2 18);
  --brand: oklch(0.6 0.17 340);
  --brand-foreground: oklch(0.99 0 0);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 1.25rem;
  --type-body: "Vazirmatn", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display: "Vazirmatn", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display-weight: 800;
  --shape-control: 999px;
  --shape-field: 1rem;
  --shape-surface: 1.75rem;
  --shape-overlay: 1.5rem;
  --line: 1px;
  --line-field: 1px;
  --line-style: solid;
  --field: var(--card);
  --depth-control: inset 0 -3px 0 0 oklch(0.2 0.08 15 / 16%), inset 0 2px 0 0 oklch(1 0 0 / 35%), 0 10px 20px -10px oklch(0.45 0.16 18 / 55%);
  --depth-press: inset 0 2px 5px 0 oklch(0.2 0.08 15 / 22%);
  --depth-field: inset 0 2px 5px 0 oklch(0.3 0.08 15 / 9%);
  --depth-surface: inset 0 2px 0 0 oklch(1 0 0 / 80%), inset 0 -4px 10px 0 oklch(0.45 0.1 15 / 7%), 0 24px 44px -24px oklch(0.45 0.14 18 / 40%);
  --depth-overlay: inset 0 2px 0 0 oklch(1 0 0 / 80%), 0 30px 60px -22px oklch(0.45 0.14 18 / 45%);
  --surface-filter: none;
  --press: scale(0.95);
  --motion: 420ms;
  --motion-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --backdrop: none;
  --spacing: 0.275rem;
}

/* لاجورد، ترمینال. متن و تیتر با IBM Plex Sans Arabic هستن. */
[data-theme="lapis"] {
  color-scheme: dark;

  /* رنگ */
  --background: oklch(0.14 0.03 268);
  --foreground: oklch(0.92 0.03 250);
  --card: oklch(0.165 0.035 268);
  --card-foreground: oklch(0.92 0.03 250);
  --popover: oklch(0.18 0.035 268);
  --popover-foreground: oklch(0.92 0.03 250);
  --primary: oklch(0.72 0.16 258);
  --primary-foreground: oklch(0.14 0.03 268);
  --secondary: oklch(0.22 0.04 268);
  --secondary-foreground: oklch(0.92 0.03 250);
  --muted: oklch(0.19 0.035 268);
  --muted-foreground: oklch(0.68 0.05 260);
  --accent: oklch(0.23 0.05 265);
  --accent-foreground: oklch(0.92 0.03 250);
  --destructive: oklch(0.68 0.19 25);
  --success: oklch(0.84 0.19 145);
  --warning: oklch(0.85 0.15 90);
  --border: oklch(0.72 0.1 260 / 26%);
  --input: oklch(0.72 0.1 260 / 34%);
  --ring: oklch(0.84 0.19 145);
  --brand: oklch(0.84 0.19 145);
  --brand-foreground: oklch(0.16 0.04 150);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 0.125rem;
  --type-body: "IBM Plex Sans Arabic", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display: "IBM Plex Sans Arabic", "IRANSans", "Vazirmatn", system-ui, sans-serif;
  --type-display-weight: 600;
  --shape-control: 0.125rem;
  --shape-field: 0.125rem;
  --shape-surface: 0.125rem;
  --shape-overlay: 0.125rem;
  --line: 1px;
  --line-field: 1px;
  --line-style: dashed;
  --field: oklch(0.12 0.03 268);
  --depth-control: 0 0 #0000;
  --depth-press: 0 0 #0000;
  --depth-field: 0 0 #0000;
  --depth-surface: 0 0 #0000;
  --depth-overlay: 0 0 0 1px oklch(0.72 0.16 258 / 35%), 0 18px 40px -20px oklch(0 0 0 / 80%);
  --surface-filter: none;
  --press: translateY(1px);
  --motion: 120ms;
  --motion-ease: steps(3, end);
  --backdrop: repeating-linear-gradient(to bottom, oklch(1 0 0 / 2.5%) 0 1px, transparent 1px 4px);
  --spacing: 0.225rem;
}

/* کاغذ، مجله‌ای. تیترها با Noto Naskh Arabic هستن. */
[data-theme="paper"] {
  color-scheme: light;

  /* رنگ */
  --background: oklch(0.985 0.004 85);
  --foreground: oklch(0.2 0.01 60);
  --card: oklch(0.985 0.004 85);
  --card-foreground: oklch(0.2 0.01 60);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.2 0.01 60);
  --primary: oklch(0.2 0.01 60);
  --primary-foreground: oklch(0.985 0.004 85);
  --secondary: oklch(0.94 0.008 85);
  --secondary-foreground: oklch(0.2 0.01 60);
  --muted: oklch(0.955 0.006 85);
  --muted-foreground: oklch(0.47 0.015 60);
  --accent: oklch(0.94 0.008 85);
  --accent-foreground: oklch(0.2 0.01 60);
  --destructive: oklch(0.55 0.2 25);
  --success: oklch(0.52 0.13 160);
  --warning: oklch(0.62 0.14 70);
  --border: oklch(0.2 0.01 60 / 14%);
  --input: oklch(0.2 0.01 60 / 30%);
  --ring: oklch(0.5 0.02 60);
  --brand: oklch(0.55 0.19 30);
  --brand-foreground: oklch(0.985 0 0);

  /* زبان طراحی: فونت، فرم، خط، عمق، حرکت و تراکم */
  --radius: 0.25rem;
  --type-display: "Noto Naskh Arabic", "IRANSans", "Vazirmatn", serif;
  --type-display-weight: 700;
  --shape-control: 0.125rem;
  --shape-field: 0rem;
  --shape-surface: 0.125rem;
  --shape-overlay: 0.25rem;
  --line: 1px;
  --line-field: 0 0 1px 0;
  --line-style: solid;
  --field: transparent;
  --depth-control: 0 0 #0000;
  --depth-press: 0 0 #0000;
  --depth-field: 0 0 #0000;
  --depth-surface: 0 0 #0000;
  --depth-overlay: 0 12px 32px -16px oklch(0.2 0.01 60 / 25%);
  --surface-filter: none;
  --press: translateY(1px);
  --motion: 160ms;
  --motion-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --backdrop: none;
  --spacing: 0.26rem;
}

/* ===== 0b. form-control icons, colored per theme (Bootstrap draws them as background SVGs) ===== */

:root {
  --vf-mask-x: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M18 6 6 18'/%3e%3cpath d='m6 6 12 12'/%3e%3c/svg%3e");
  --vf-mask-chevron-down: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-mask-chevron-left: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m15 18-6-6 6-6'/%3e%3c/svg%3e");
  --vf-mask-menu: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M4 6h16'/%3e%3cpath d='M4 12h16'/%3e%3cpath d='M4 18h16'/%3e%3c/svg%3e");
}

:root,
[data-theme="graphite"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2389898b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23070707' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23070707' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%23f7f7f7'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.3' fill='%23f7f7f7'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.3' fill='%23070707'/%3e%3c/svg%3e");
}

[data-theme="turquoise"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1c6ca' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001c22' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001c22' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%2360eae2'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23eef7f8'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23001c22'/%3e%3c/svg%3e");
}

[data-theme="saffron"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23524536' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23130e0b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23130e0b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%23ffb407'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23fffef6'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23130e0b'/%3e%3c/svg%3e");
}

[data-theme="pomegranate"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d585a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffafb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fffafb' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%23de3951'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.3' fill='%233b1b1e'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3.3' fill='%23fffafb'/%3e%3c/svg%3e");
}

[data-theme="lapis"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238799b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050815' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050815' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%2361a4ff'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23d6e7f8'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23050815'/%3e%3c/svg%3e");
}

[data-theme="paper"] {
  --vf-select-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23615953' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
  --vf-check: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbfaf7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M20 6 9 17l-5-5'/%3e%3c/svg%3e");
  --vf-dash: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbfaf7' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M5 12h14'/%3e%3c/svg%3e");
  --vf-radio: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='4' fill='%231a1512'/%3e%3c/svg%3e");
  --vf-switch-off: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%231a1512'/%3e%3c/svg%3e");
  --vf-switch-on: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3.3' y='-3.3' width='6.6' height='6.6' fill='%23fbfaf7'/%3e%3c/svg%3e");
}

/* ==================================================================
   VibeFarsi × Bootstrap 5.3 (RTL) kit
   Load AFTER bootstrap.rtl.min.css. Every color, radius, border, shadow,
   press and duration comes from the VibeFarsi theme tokens above, so
   switching data-theme re-skins Bootstrap and the vf-* components alike.
   Use logical properties only in this file: the page is dir="rtl".
================================================================== */

/* ---------------------------------------------------------------- 1. Bootstrap ← tokens */
:root,
[data-theme] {
  --vf-font: "IRANSans", "IRANSansX", "Vazirmatn", ui-sans-serif, system-ui, sans-serif;
  --vf-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --vf-radius-md: calc(var(--radius) - 2px);
  --vf-radius-xl: calc(var(--radius) + 4px);
  --vf-pill: calc(var(--shape-control) * 999);
  --vf-ring: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
  --vf-ring-soft: 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent);

  --bs-body-font-family: var(--type-body, var(--vf-font));
  --bs-font-sans-serif: var(--type-body, var(--vf-font));
  --bs-font-monospace: var(--vf-mono);
  --bs-body-font-size: 1.03125rem; /* 16.5px: Persian reads small */
  --bs-body-line-height: 1.8;
  --bs-body-font-weight: 400;
  --bs-body-color: var(--foreground);
  --bs-body-bg: var(--background);
  --bs-emphasis-color: var(--foreground);
  --bs-heading-color: inherit;
  --bs-secondary-color: var(--muted-foreground);
  --bs-tertiary-color: color-mix(in oklch, var(--muted-foreground) 75%, transparent);
  --bs-secondary-bg: var(--secondary);
  --bs-tertiary-bg: var(--muted);
  --bs-link-color: var(--foreground);
  --bs-link-hover-color: var(--foreground);
  --bs-code-color: var(--brand);
  --bs-highlight-bg: color-mix(in oklch, var(--brand) 30%, transparent);
  --bs-highlight-color: inherit;
  --bs-border-width: var(--line);
  --bs-border-style: var(--line-style);
  --bs-border-color: var(--border);
  --bs-border-color-translucent: var(--border);
  --bs-border-radius: var(--shape-control);
  --bs-border-radius-sm: calc(var(--radius) - 4px);
  --bs-border-radius-lg: var(--shape-overlay);
  --bs-border-radius-xl: var(--shape-surface);
  --bs-border-radius-xxl: var(--shape-surface);
  --bs-border-radius-2xl: var(--shape-surface);
  --bs-border-radius-pill: var(--vf-pill);
  --bs-box-shadow: var(--depth-overlay);
  --bs-box-shadow-sm: var(--depth-control);
  --bs-box-shadow-lg: var(--depth-overlay);
  --bs-box-shadow-inset: none;
  --bs-focus-ring-width: 2px;
  --bs-focus-ring-color: color-mix(in oklch, var(--ring) 60%, transparent);
  --bs-form-valid-color: var(--success);
  --bs-form-valid-border-color: color-mix(in oklch, var(--success) 60%, transparent);
  --bs-form-invalid-color: var(--destructive);
  --bs-form-invalid-border-color: color-mix(in oklch, var(--destructive) 60%, transparent);

  /* chart palette: a design system may set --chart-N; these are the library fallbacks */
  --vf-chart-1: var(--chart-1, var(--brand));
  --vf-chart-2: var(--chart-2, oklch(0.66 0.14 250));
  --vf-chart-3: var(--chart-3, oklch(0.7 0.14 165));
  --vf-chart-4: var(--chart-4, oklch(0.65 0.19 20));
  --vf-chart-5: var(--chart-5, oklch(0.62 0.16 300));
  --vf-chart-6: var(--chart-6, oklch(0.75 0.11 200));
  --vf-chart-7: var(--chart-7, oklch(0.6 0.03 260));
}

/* ---------------------------------------------------------------- 2. base */
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  background-color: var(--background);
  background-image: var(--backdrop, none);
  background-attachment: fixed;
  color: var(--foreground);
  letter-spacing: 0; /* never track Persian: it breaks letter joining */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
[data-theme]:not(html) { background-color: var(--background); background-image: var(--backdrop, none); color: var(--foreground); font-family: var(--bs-body-font-family); }
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .font-display {
  font-family: var(--type-display, var(--bs-body-font-family));
  font-weight: var(--type-display-weight, 700);
  font-synthesis-weight: none; /* single-weight display faces (Lalezar) */
  letter-spacing: 0;
}
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { line-height: 1.35; text-wrap: balance; }
h5, h6, .h5, .h6 { font-weight: 600; line-height: 1.5; }
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 { font-family: var(--type-display, inherit); font-weight: var(--type-display-weight, 700); line-height: 1.2; letter-spacing: 0; }
p { text-wrap: pretty; }
a { color: var(--foreground); text-underline-offset: 0.25em; text-decoration-color: color-mix(in oklch, var(--foreground) 35%, transparent); transition: text-decoration-color var(--motion) var(--motion-ease); }
a:hover { color: var(--foreground); text-decoration-color: currentColor; }
hr { border-color: var(--border); opacity: 1; }
::selection { background: color-mix(in oklch, var(--brand) 30%, transparent); }
:focus-visible { outline: 2px solid color-mix(in oklch, var(--ring) 70%, transparent); outline-offset: 2px; }
code, pre, kbd, samp { font-family: var(--vf-mono); font-feature-settings: "liga" 0; }
:is(code, pre, kbd, samp):not([dir]) { direction: ltr; unicode-bidi: isolate; }
pre { background: var(--muted); border: var(--line) solid var(--border); border-radius: var(--vf-radius-xl); padding: 1rem; font-size: 0.8125rem; }
kbd {
  display: inline-block; padding: 0.125rem 0.375rem; font-size: 0.6875rem; line-height: 1.25rem;
  color: color-mix(in oklch, var(--foreground) 80%, transparent); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--vf-radius-md); box-shadow: 0 1px 0 0 var(--border);
}
img, video { max-width: 100%; height: auto; }
/* iOS Safari zooms any focused field under 16px; only iOS matches this. */
@supports (-webkit-touch-callout: none) {
  input, textarea, select, .form-control, .form-select { font-size: max(1rem, 1em) !important; }
}

/* ---------------------------------------------------------------- 3. token utilities (same names as the VibeFarsi Tailwind map) */
.bg-background { background-color: var(--background) !important; }
.bg-card { background-color: var(--card) !important; color: var(--card-foreground); }
.bg-popover { background-color: var(--popover) !important; color: var(--popover-foreground); }
.bg-primary { background-color: var(--primary) !important; color: var(--primary-foreground); }
.bg-secondary { background-color: var(--secondary) !important; color: var(--secondary-foreground); }
.bg-muted { background-color: var(--muted) !important; }
.bg-accent { background-color: var(--accent) !important; color: var(--accent-foreground); }
.bg-brand { background-color: var(--brand) !important; color: var(--brand-foreground); }
.bg-field { background-color: var(--field) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-warning { background-color: var(--warning) !important; }
.bg-destructive, .bg-danger { background-color: var(--destructive) !important; color: #fff; }
.bg-foreground { background-color: var(--foreground) !important; color: var(--background); }
.bg-brand-subtle { background-color: color-mix(in oklch, var(--brand) 12%, transparent) !important; }
.bg-success-subtle { background-color: color-mix(in oklch, var(--success) 10%, transparent) !important; }
.bg-warning-subtle { background-color: color-mix(in oklch, var(--warning) 10%, transparent) !important; }
.bg-destructive-subtle, .bg-danger-subtle { background-color: color-mix(in oklch, var(--destructive) 10%, transparent) !important; }
.bg-body { background-color: var(--background) !important; }
.bg-body-secondary { background-color: var(--secondary) !important; }
.bg-body-tertiary { background-color: var(--muted) !important; }
.bg-transparent { background-color: transparent !important; }

.text-foreground, .text-body, .text-body-emphasis { color: var(--foreground) !important; }
.text-muted-foreground, .text-body-secondary, .text-muted, .text-secondary { color: var(--muted-foreground) !important; }
.text-body-tertiary { color: var(--bs-tertiary-color) !important; }
.text-primary { color: var(--primary) !important; }
.text-primary-foreground { color: var(--primary-foreground) !important; }
.text-brand { color: var(--brand) !important; }
.text-brand-foreground { color: var(--brand-foreground) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-destructive, .text-danger { color: var(--destructive) !important; }
.text-background { color: var(--background) !important; }

.border-border { border-color: var(--border) !important; }
.border-input { border-color: var(--input) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-brand { border-color: var(--brand) !important; }
.border-success { border-color: color-mix(in oklch, var(--success) 30%, transparent) !important; }
.border-warning { border-color: color-mix(in oklch, var(--warning) 30%, transparent) !important; }
.border-destructive, .border-danger { border-color: color-mix(in oklch, var(--destructive) 30%, transparent) !important; }
.border-line { border-width: var(--line) !important; border-style: var(--line-style) !important; }
.border-dashed { border-style: dashed !important; }

.rounded-control { border-radius: var(--shape-control) !important; }
.rounded-field { border-radius: var(--shape-field) !important; }
.rounded-surface { border-radius: var(--shape-surface) !important; }
.rounded-overlay { border-radius: var(--shape-overlay) !important; }
.rounded-xl { border-radius: var(--vf-radius-xl) !important; }
.shadow-control { box-shadow: var(--depth-control) !important; }
.shadow-surface { box-shadow: var(--depth-surface) !important; }
.shadow-overlay { box-shadow: var(--depth-overlay) !important; }
.shadow-none { box-shadow: none !important; }

.text-xs { font-size: 0.75rem !important; line-height: 1.5; }
.text-sm { font-size: 0.875rem !important; line-height: 1.6; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.4; }
.text-2xl { font-size: 1.5rem !important; line-height: 1.35; }
.text-3xl { font-size: 1.875rem !important; line-height: 1.3; }
.text-4xl { font-size: 2.25rem !important; line-height: 1.2; }
.text-5xl { font-size: 3rem !important; line-height: 1.2; }
@media (min-width: 768px) {
  .text-md-2xl { font-size: 1.5rem !important; line-height: 1.35; }
  .text-md-3xl { font-size: 1.875rem !important; line-height: 1.3; }
  .text-md-4xl { font-size: 2.25rem !important; line-height: 1.2; }
  .text-md-5xl { font-size: 3rem !important; line-height: 1.2; }
}
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.tnum { font-variant-numeric: tabular-nums; }
.leading-reading { line-height: 1.9 !important; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.line-clamp-2, .line-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }
.motion { transition: all var(--motion) var(--motion-ease); }
.press:active { transform: var(--press); }
.container-x { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 640px) { .container-x { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container-x { padding-inline: 2rem; } }
.icon, [data-lucide], svg.lucide { width: 1em; height: 1em; flex-shrink: 0; stroke-width: 2; vertical-align: -0.125em; }
.icon-sm { width: 0.875rem; height: 0.875rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }

/* decorative backgrounds */
.bg-grid {
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--foreground) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--foreground) 6%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
}
.bg-dots { background-image: radial-gradient(color-mix(in oklch, var(--foreground) 12%, transparent) 1px, transparent 1px); background-size: 22px 22px; }
.mask-fade-b { mask-image: linear-gradient(to bottom, #000 40%, transparent); }
.mask-radial-top { mask-image: radial-gradient(ellipse at top, #000 20%, transparent 70%); }
.glow-brand { background: radial-gradient(closest-side, color-mix(in oklch, var(--brand) 28%, transparent), transparent); filter: blur(40px); }

/* ---------------------------------------------------------------- 4. buttons  (.btn-primary = VibeFarsi "default") */
.btn {
  --bs-btn-padding-x: 1rem;
  --bs-btn-padding-y: 0;
  --bs-btn-font-family: inherit;
  --bs-btn-font-size: 0.875rem;
  --bs-btn-font-weight: 600;
  --bs-btn-line-height: 1.5;
  --bs-btn-border-width: var(--line);
  --bs-btn-border-radius: var(--shape-control);
  --bs-btn-box-shadow: var(--depth-control);
  --bs-btn-disabled-opacity: 0.5;
  --bs-btn-focus-box-shadow: var(--vf-ring);
  --bs-btn-color: var(--foreground);
  --bs-btn-hover-color: var(--foreground);
  --bs-btn-active-color: var(--foreground);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.5rem; white-space: nowrap; letter-spacing: 0;
  border-style: var(--line-style);
  box-shadow: var(--depth-control);
  transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease), border-color var(--motion) var(--motion-ease), box-shadow var(--motion) var(--motion-ease), transform var(--motion) var(--motion-ease);
}
.btn:active, .btn.active { transform: var(--press); box-shadow: var(--depth-press); }
.btn:focus-visible { box-shadow: var(--vf-ring); outline: 0; }
.btn:disabled, .btn.disabled { pointer-events: none; }
.btn > svg, .btn > [data-lucide], .btn > .icon { width: 1rem; height: 1rem; pointer-events: none; }
.btn-sm { --bs-btn-padding-x: 0.75rem; --bs-btn-font-size: 0.8125rem; --bs-btn-border-radius: var(--shape-control); min-height: 2rem; gap: 0.375rem; }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-font-size: 1rem; --bs-btn-border-radius: var(--shape-control); min-height: 3rem; gap: 0.625rem; }
.btn-icon { --bs-btn-padding-x: 0; width: 2.5rem; min-width: 2.5rem; }
.btn-icon.btn-sm { width: 2rem; min-width: 2rem; }
.btn-icon.btn-lg { width: 3rem; min-width: 3rem; }
.btn.rounded-pill { --bs-btn-border-radius: 999px; }
/* touch: keep ≥44px targets on coarse pointers */
@media (pointer: coarse) { .btn-icon { width: 2.75rem; min-width: 2.75rem; min-height: 2.75rem; } }
.btn-primary { --bs-btn-color: var(--primary-foreground); --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-color: var(--primary-foreground); --bs-btn-hover-bg: color-mix(in oklch, var(--primary) 90%, transparent); --bs-btn-hover-border-color: color-mix(in oklch, var(--primary) 90%, transparent); --bs-btn-active-color: var(--primary-foreground); --bs-btn-active-bg: color-mix(in oklch, var(--primary) 90%, transparent); --bs-btn-active-border-color: var(--primary); --bs-btn-disabled-color: var(--primary-foreground); --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary); }
.btn-secondary { --bs-btn-color: var(--secondary-foreground); --bs-btn-bg: var(--secondary); --bs-btn-border-color: var(--border); --bs-btn-hover-color: var(--secondary-foreground); --bs-btn-hover-bg: color-mix(in oklch, var(--secondary) 80%, transparent); --bs-btn-hover-border-color: var(--border); --bs-btn-active-color: var(--secondary-foreground); --bs-btn-active-bg: color-mix(in oklch, var(--secondary) 80%, transparent); --bs-btn-active-border-color: var(--border); --bs-btn-disabled-color: var(--secondary-foreground); --bs-btn-disabled-bg: var(--secondary); --bs-btn-disabled-border-color: var(--border); }
.btn-outline, .btn-outline-secondary, .btn-outline-primary, .btn-outline-dark, .btn-outline-light { --bs-btn-color: var(--foreground); --bs-btn-bg: transparent; --bs-btn-border-color: var(--input); --bs-btn-hover-color: var(--accent-foreground); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--input); --bs-btn-active-color: var(--accent-foreground); --bs-btn-active-bg: var(--accent); --bs-btn-active-border-color: var(--input); --bs-btn-disabled-color: var(--foreground); --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: var(--input); }
.btn-ghost { --bs-btn-color: var(--foreground); --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-color: var(--accent-foreground); --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: transparent; --bs-btn-active-color: var(--accent-foreground); --bs-btn-active-bg: var(--accent); --bs-btn-active-border-color: transparent; --bs-btn-disabled-color: var(--foreground); --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: transparent; }
.btn-brand { --bs-btn-color: var(--brand-foreground); --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-color: var(--brand-foreground); --bs-btn-hover-bg: color-mix(in oklch, var(--brand) 90%, transparent); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-color: var(--brand-foreground); --bs-btn-active-bg: color-mix(in oklch, var(--brand) 90%, transparent); --bs-btn-active-border-color: var(--brand); --bs-btn-disabled-color: var(--brand-foreground); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); }
.btn-danger, .btn-destructive { --bs-btn-color: #fff; --bs-btn-bg: var(--destructive); --bs-btn-border-color: var(--destructive); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: color-mix(in oklch, var(--destructive) 90%, transparent); --bs-btn-hover-border-color: var(--destructive); --bs-btn-active-color: #fff; --bs-btn-active-bg: color-mix(in oklch, var(--destructive) 90%, transparent); --bs-btn-active-border-color: var(--destructive); --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--destructive); --bs-btn-disabled-border-color: var(--destructive); }
.btn-success { --bs-btn-color: var(--background); --bs-btn-bg: var(--success); --bs-btn-border-color: var(--success); --bs-btn-hover-color: var(--background); --bs-btn-hover-bg: color-mix(in oklch, var(--success) 90%, transparent); --bs-btn-hover-border-color: var(--success); --bs-btn-active-color: var(--background); --bs-btn-active-bg: color-mix(in oklch, var(--success) 90%, transparent); --bs-btn-active-border-color: var(--success); --bs-btn-disabled-color: var(--background); --bs-btn-disabled-bg: var(--success); --bs-btn-disabled-border-color: var(--success); }
.btn-outline-danger { --bs-btn-color: var(--destructive); --bs-btn-bg: transparent; --bs-btn-border-color: color-mix(in oklch, var(--destructive) 40%, transparent); --bs-btn-hover-color: var(--destructive); --bs-btn-hover-bg: color-mix(in oklch, var(--destructive) 10%, transparent); --bs-btn-hover-border-color: color-mix(in oklch, var(--destructive) 40%, transparent); --bs-btn-active-color: var(--destructive); --bs-btn-active-bg: color-mix(in oklch, var(--destructive) 10%, transparent); --bs-btn-active-border-color: color-mix(in oklch, var(--destructive) 40%, transparent); --bs-btn-disabled-color: var(--destructive); --bs-btn-disabled-bg: transparent; --bs-btn-disabled-border-color: color-mix(in oklch, var(--destructive) 40%, transparent); }
.btn-ghost { --bs-btn-box-shadow: none; box-shadow: none; }
.btn-ghost:active { box-shadow: none; }
.btn-link { --bs-btn-color: var(--foreground); --bs-btn-hover-color: var(--foreground); --bs-btn-box-shadow: none; box-shadow: none; text-underline-offset: 0.25em; }
.btn-check:checked + .btn { background: var(--accent); color: var(--accent-foreground); border-color: var(--input); }

.btn-close {
  --bs-btn-close-opacity: 1; --bs-btn-close-hover-opacity: 1; --bs-btn-close-focus-shadow: var(--vf-ring);
  position: relative; width: 2rem; height: 2rem; padding: 0; background: none; border-radius: var(--vf-radius-md);
  color: var(--muted-foreground); transition: background-color var(--motion) var(--motion-ease), color var(--motion) var(--motion-ease);
}
.btn-close::before { content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; background: currentColor; mask: var(--vf-mask-x) center / contain no-repeat; -webkit-mask: var(--vf-mask-x) center / contain no-repeat; }
.btn-close:hover { background-color: var(--accent); color: var(--foreground); }
.btn-close-white { filter: none; }

/* ---------------------------------------------------------------- 5. forms */
.form-label, .vf-label { display: block; margin-bottom: 0.375rem; font-size: 0.875rem; font-weight: 500; line-height: 1.5; color: color-mix(in oklch, var(--foreground) 90%, transparent); }
.form-text, .vf-hint { margin-top: 0.375rem; font-size: 0.75rem; line-height: 1.6; color: var(--muted-foreground); }
.invalid-feedback, .vf-error { margin-top: 0.375rem; font-size: 0.75rem; line-height: 1.6; color: var(--destructive); }
.valid-feedback { font-size: 0.75rem; color: var(--success); }
.form-control, .form-select {
  min-height: 2.5rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; line-height: 1.5; color: var(--foreground);
  background-color: var(--field); border-width: var(--line-field); border-style: var(--line-style); border-color: var(--input); border-radius: var(--shape-field);
  box-shadow: var(--depth-field); transition: border-color var(--motion) var(--motion-ease), box-shadow var(--motion) var(--motion-ease);
}
.form-control:focus, .form-select:focus { color: var(--foreground); background-color: var(--field); border-color: transparent; box-shadow: var(--vf-ring-soft); outline: 0; }
.form-control::placeholder { color: color-mix(in oklch, var(--muted-foreground) 70%, transparent); opacity: 1; }
.form-control:disabled, .form-select:disabled { background-color: var(--muted); opacity: 0.6; }
.form-control-sm, .form-select-sm { min-height: 2rem; padding-block: 0.25rem; font-size: 0.8125rem; border-radius: var(--shape-field); }
.form-control-lg, .form-select-lg { min-height: 3rem; font-size: 1rem; border-radius: var(--shape-field); }
textarea.form-control { min-height: 5.5rem; line-height: 1.8; resize: vertical; }
.form-control.is-invalid, .form-select.is-invalid, .was-validated .form-control:invalid { border-color: var(--bs-form-invalid-border-color); background-image: none; padding-inline-end: 0.75rem; }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { border-color: transparent; box-shadow: 0 0 0 2px color-mix(in oklch, var(--destructive) 50%, transparent); }
.form-control.is-valid, .form-select.is-valid { border-color: var(--bs-form-valid-border-color); background-image: none; padding-inline-end: 0.75rem; }
.form-select { --bs-form-select-bg-img: var(--vf-select-chevron); padding-inline-end: 2.25rem; cursor: pointer; background-size: 1rem 1rem; }
.form-control-color { padding: 0.25rem; }
.form-control[type="file"]::file-selector-button { background: var(--secondary); color: var(--secondary-foreground); border-color: var(--border); }

.input-group > .form-control, .input-group > .form-select { min-height: 2.5rem; }
.input-group-text { font-size: 0.875rem; color: var(--muted-foreground); background-color: var(--muted); border-width: var(--line-field); border-style: var(--line-style); border-color: var(--input); border-radius: var(--shape-field); }

.form-check { min-height: 1.5rem; font-size: 0.875rem; }
.form-check-input {
  width: 1rem; height: 1rem; margin-top: 0.3rem; background-color: var(--field); border-width: var(--line); border-style: var(--line-style); border-color: var(--input);
  border-radius: min(var(--shape-control), 0.25rem); cursor: pointer; transition: background-color var(--motion) var(--motion-ease), border-color var(--motion) var(--motion-ease);
}
.form-check-input:focus { border-color: var(--input); box-shadow: var(--vf-ring); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input[type="checkbox"]:checked { background-image: var(--vf-check); background-size: 0.75rem; }
.form-check-input[type="checkbox"]:indeterminate { background-color: var(--primary); border-color: var(--primary); background-image: var(--vf-dash); }
.form-check-input[type="radio"] { border-radius: 50%; }
.form-check-input[type="radio"]:checked { background-color: var(--field); border-color: var(--primary); background-image: var(--vf-radio); background-size: 0.5rem; }
.form-check-label { cursor: pointer; }
.form-check-input:disabled ~ .form-check-label { opacity: 0.5; }
.form-switch { padding-inline-start: 3.25rem; min-height: 1.5rem; }
.form-switch .form-check-input {
  --bs-form-switch-bg: var(--vf-switch-off);
  width: 2.75rem; height: 1.5rem; margin-top: 0.125rem; margin-inline-start: -3.25rem;
  background-color: var(--input); border-color: transparent; border-radius: var(--vf-pill); background-size: contain;
}
.form-switch .form-check-input:focus { --bs-form-switch-bg: var(--vf-switch-off); border-color: transparent; }
.form-switch .form-check-input:checked { --bs-form-switch-bg: var(--vf-switch-on); background-color: var(--primary); border-color: transparent; background-image: var(--bs-form-switch-bg); }
.form-range { height: 1.25rem; }
.form-range::-webkit-slider-runnable-track { height: 0.375rem; background-color: var(--input); border-radius: var(--vf-pill); }
.form-range::-moz-range-track { height: 0.375rem; background-color: var(--input); border-radius: var(--vf-pill); }
.form-range::-webkit-slider-thumb { width: 1.125rem; height: 1.125rem; margin-top: -0.375rem; background-color: var(--primary); border: 2px solid var(--background); box-shadow: 0 0 0 1px var(--input); }
.form-range::-moz-range-thumb { width: 1.125rem; height: 1.125rem; background-color: var(--primary); border: 2px solid var(--background); }
.form-range:focus::-webkit-slider-thumb { box-shadow: var(--vf-ring); }
.form-floating > label { color: var(--muted-foreground); }

/* VibeFarsi field with addons inside one box: <div class="vf-input"><span class="vf-addon">+98</span><input>…</div> */
.vf-input {
  display: flex; align-items: center; gap: 0.5rem; width: 100%; min-height: 2.5rem; padding-inline: 0.75rem;
  font-size: 0.875rem; color: var(--foreground); background-color: var(--field);
  border-width: var(--line-field); border-style: var(--line-style); border-color: var(--input); border-radius: var(--shape-field); box-shadow: var(--depth-field);
  transition: border-color var(--motion) var(--motion-ease), box-shadow var(--motion) var(--motion-ease);
}
.vf-input:focus-within { border-color: transparent; box-shadow: var(--vf-ring-soft); }
.vf-input.is-invalid, .vf-input:has(input[aria-invalid="true"]) { border-color: var(--bs-form-invalid-border-color); }
.vf-input > input, .vf-input > textarea { flex: 1 1 auto; min-width: 0; height: 100%; min-height: 2.375rem; padding: 0; color: inherit; background: transparent; border: 0; outline: 0; font: inherit; }
.vf-input > input::placeholder { color: color-mix(in oklch, var(--muted-foreground) 70%, transparent); }
.vf-addon { flex-shrink: 0; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 0.25rem; }
.vf-input-lg { min-height: 3rem; font-size: 1rem; }

/* OTP: <div class="vf-otp" dir="ltr" data-length="6"> + inputs (vibefarsi.js wires it) */
.vf-otp { display: inline-flex; gap: 0.5rem; direction: ltr; }
.vf-otp input {
  width: 2.25rem; height: 2.75rem; padding: 0; font-size: 1rem; font-weight: 600; text-align: center; color: var(--foreground);
  caret-color: transparent; background: var(--card); border: 1px solid var(--input); border-radius: var(--vf-radius-md);
  transition: border-color var(--motion) var(--motion-ease), box-shadow var(--motion) var(--motion-ease);
}
.vf-otp input:focus { outline: 0; border-color: color-mix(in oklch, var(--foreground) 60%, transparent); box-shadow: 0 0 0 2px color-mix(in oklch, var(--foreground) 10%, transparent); }
.vf-otp.is-invalid input { border-color: var(--bs-form-invalid-border-color); }

/* option cards: <label class="vf-option"><input class="form-check-input" type="radio">…</label> */
.vf-option { display: flex; align-items: flex-start; gap: 0.625rem; width: 100%; padding: 0.75rem; font-size: 0.875rem; text-align: start; cursor: pointer; border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: var(--shape-control); transition: background-color var(--motion) var(--motion-ease), border-color var(--motion) var(--motion-ease); }
.vf-option:hover { background-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.vf-option:has(input:checked) { border-color: color-mix(in oklch, var(--foreground) 50%, transparent); background-color: color-mix(in oklch, var(--accent) 60%, transparent); }
.vf-option .form-check-input { margin: 0.2rem 0 0; flex-shrink: 0; }

/* segmented control: <div class="vf-segmented" role="radiogroup"><input type="radio" class="btn-check" id="a" name="p" checked><label for="a">ماهانه</label>… */
.vf-segmented { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 0.125rem; background: var(--muted); border-radius: calc(var(--shape-control) + 2px); isolation: isolate; }
.vf-segmented > label { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; height: 2rem; padding-inline: 0.875rem; font-size: 0.875rem; font-weight: 500; white-space: nowrap; color: var(--muted-foreground); border-radius: var(--shape-control); cursor: pointer; transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease), box-shadow var(--motion) var(--motion-ease); }
.vf-segmented > label:hover { color: var(--foreground); }
.vf-segmented > input:checked + label { color: var(--foreground); background: var(--background); box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.12); }
.vf-segmented > input:focus-visible + label { box-shadow: var(--vf-ring-soft); }
.vf-segmented-sm > label { height: 1.75rem; padding-inline: 0.625rem; font-size: 0.75rem; }

/* ---------------------------------------------------------------- 6. surfaces */
.card {
  --bs-card-spacer-y: 1.25rem; --bs-card-spacer-x: 1.25rem; --bs-card-title-spacer-y: 0.25rem;
  --bs-card-title-color: var(--card-foreground); --bs-card-subtitle-color: var(--muted-foreground);
  --bs-card-border-width: var(--line); --bs-card-border-color: var(--border); --bs-card-border-radius: var(--shape-surface);
  --bs-card-inner-border-radius: calc(var(--shape-surface) - var(--line)); --bs-card-box-shadow: var(--depth-surface);
  --bs-card-cap-padding-y: 1rem; --bs-card-cap-padding-x: 1.25rem; --bs-card-cap-bg: transparent; --bs-card-cap-color: inherit;
  --bs-card-color: var(--card-foreground); --bs-card-bg: var(--card);
  position: relative; isolation: isolate; border-style: var(--line-style); box-shadow: var(--depth-surface);
}
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; backdrop-filter: var(--surface-filter); -webkit-backdrop-filter: var(--surface-filter); }
.card-title { font-size: 1rem; font-weight: 600; line-height: 1.5; }
.card-subtitle, .card-description { font-size: 0.875rem; color: var(--muted-foreground); }
.card-header, .card-footer { border-color: var(--border); }
.card-interactive { transition: transform var(--motion) var(--motion-ease), border-color var(--motion) var(--motion-ease); }
.card-interactive:hover { border-color: color-mix(in oklch, var(--foreground) 20%, transparent); }

.list-group {
  --bs-list-group-color: var(--card-foreground); --bs-list-group-bg: var(--card); --bs-list-group-border-color: var(--border);
  --bs-list-group-border-width: var(--line); --bs-list-group-border-radius: var(--vf-radius-xl);
  --bs-list-group-item-padding-x: 1rem; --bs-list-group-item-padding-y: 0.75rem;
  --bs-list-group-action-color: var(--foreground); --bs-list-group-action-hover-color: var(--foreground);
  --bs-list-group-action-hover-bg: color-mix(in oklch, var(--accent) 50%, transparent);
  --bs-list-group-action-active-color: var(--foreground); --bs-list-group-action-active-bg: var(--accent);
  --bs-list-group-active-color: var(--accent-foreground); --bs-list-group-active-bg: var(--accent); --bs-list-group-active-border-color: var(--border);
  --bs-list-group-disabled-color: var(--muted-foreground); --bs-list-group-disabled-bg: transparent;
  font-size: 0.875rem;
}

.table {
  --bs-table-color-type: initial; --bs-table-bg-type: initial; --bs-table-color-state: initial; --bs-table-bg-state: initial;
  --bs-table-color: var(--foreground); --bs-table-bg: transparent; --bs-table-border-color: var(--border);
  --bs-table-accent-bg: transparent; --bs-table-striped-color: var(--foreground); --bs-table-striped-bg: color-mix(in oklch, var(--muted) 50%, transparent);
  --bs-table-active-color: var(--foreground); --bs-table-active-bg: var(--accent);
  --bs-table-hover-color: var(--foreground); --bs-table-hover-bg: color-mix(in oklch, var(--accent) 40%, transparent);
  margin-bottom: 0; font-size: 0.875rem; vertical-align: middle;
}
.table > :not(caption) > * > * { padding: 0.625rem 0.75rem; border-bottom-color: var(--border); }
.table > thead > tr > * { height: 2.5rem; padding-block: 0; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); background-color: color-mix(in oklch, var(--muted) 60%, transparent); white-space: nowrap; }
.table > tbody > tr:last-child > * { border-bottom-width: 0; }
.table th { text-align: start; }
.table caption { font-size: 0.75rem; color: var(--muted-foreground); }
.vf-table-wrap { position: relative; width: 100%; overflow-x: auto; border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: var(--vf-radius-xl); background: var(--card); }

.accordion {
  --bs-accordion-color: var(--card-foreground); --bs-accordion-bg: var(--card);
  --bs-accordion-transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease);
  --bs-accordion-border-color: var(--border); --bs-accordion-border-width: var(--line);
  --bs-accordion-border-radius: var(--vf-radius-xl); --bs-accordion-inner-border-radius: calc(var(--vf-radius-xl) - var(--line));
  --bs-accordion-btn-padding-x: 1rem; --bs-accordion-btn-padding-y: 0.875rem; --bs-accordion-btn-color: var(--foreground);
  --bs-accordion-btn-bg: transparent; --bs-accordion-btn-icon-width: 1rem; --bs-accordion-btn-focus-box-shadow: inset 0 0 0 2px color-mix(in oklch, var(--ring) 60%, transparent);
  --bs-accordion-body-padding-x: 1rem; --bs-accordion-body-padding-y: 1rem; --bs-accordion-active-color: var(--foreground); --bs-accordion-active-bg: transparent;
}
.accordion-button { font-size: 0.875rem; font-weight: 500; gap: 0.75rem; text-align: start; }
.accordion-button:hover { background-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.accordion-button:not(.collapsed) { box-shadow: none; }
.accordion-button::after { background: currentColor; color: var(--muted-foreground); mask: var(--vf-mask-chevron-down) center / contain no-repeat; -webkit-mask: var(--vf-mask-chevron-down) center / contain no-repeat; margin-inline-start: auto; transition: transform var(--motion) var(--motion-ease); }
.accordion-button:not(.collapsed)::after { background: currentColor; color: var(--muted-foreground); transform: rotate(180deg); }
.accordion-body { padding: 0 1rem 1rem; font-size: 0.875rem; line-height: 1.75; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- 7. overlays */
.modal {
  --bs-modal-padding: 1.25rem; --bs-modal-color: var(--popover-foreground); --bs-modal-bg: var(--popover);
  --bs-modal-border-color: var(--border); --bs-modal-border-width: var(--line); --bs-modal-border-radius: var(--shape-surface);
  --bs-modal-box-shadow: var(--depth-overlay); --bs-modal-inner-border-radius: calc(var(--shape-surface) - var(--line));
  --bs-modal-header-padding: 1.25rem 1.25rem 0; --bs-modal-header-border-width: 0; --bs-modal-footer-border-width: 0; --bs-modal-footer-gap: 0.5rem;
  --bs-modal-width: 28rem;
}
.modal-content { box-shadow: var(--depth-overlay); }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-header .btn-close { margin: -0.25rem; margin-inline-start: auto; }
.modal-footer { padding-top: 0; }
.modal-backdrop { --bs-backdrop-bg: #000; --bs-backdrop-opacity: 0.6; }
.modal-backdrop.show { backdrop-filter: blur(4px); }
@media (max-width: 575.98px) { .modal-dialog-bottom { display: flex; align-items: flex-end; min-height: calc(100% - 1rem); } }

.offcanvas, .offcanvas-sm, .offcanvas-md, .offcanvas-lg, .offcanvas-xl, .offcanvas-xxl {
  --bs-offcanvas-width: 24rem; --bs-offcanvas-height: 85vh; --bs-offcanvas-padding-x: 1rem; --bs-offcanvas-padding-y: 1rem;
  --bs-offcanvas-color: var(--popover-foreground); --bs-offcanvas-bg: var(--popover); --bs-offcanvas-border-width: var(--line);
  --bs-offcanvas-border-color: var(--border); --bs-offcanvas-box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}
.offcanvas-header { border-bottom: var(--line) solid var(--border); padding-block: 0.75rem; }
.offcanvas-title { font-size: 0.875rem; font-weight: 600; }
.offcanvas.offcanvas-bottom { border-start-start-radius: 1rem; border-start-end-radius: 1rem; }

.dropdown-menu {
  --bs-dropdown-min-width: 11rem; --bs-dropdown-padding-x: 0.25rem; --bs-dropdown-padding-y: 0.25rem; --bs-dropdown-spacer: 0.375rem;
  --bs-dropdown-font-size: 0.875rem; --bs-dropdown-color: var(--popover-foreground); --bs-dropdown-bg: var(--popover);
  --bs-dropdown-border-color: var(--border); --bs-dropdown-border-radius: var(--shape-overlay); --bs-dropdown-border-width: var(--line);
  --bs-dropdown-inner-border-radius: var(--vf-radius-md); --bs-dropdown-divider-bg: var(--border); --bs-dropdown-divider-margin-y: 0.25rem;
  --bs-dropdown-box-shadow: var(--depth-overlay); --bs-dropdown-link-color: color-mix(in oklch, var(--foreground) 90%, transparent);
  --bs-dropdown-link-hover-color: var(--foreground); --bs-dropdown-link-hover-bg: var(--accent);
  --bs-dropdown-link-active-color: var(--foreground); --bs-dropdown-link-active-bg: var(--accent); --bs-dropdown-link-disabled-color: var(--muted-foreground);
  --bs-dropdown-item-padding-x: 0.5rem; --bs-dropdown-item-padding-y: 0.375rem; --bs-dropdown-header-color: var(--muted-foreground);
  --bs-dropdown-header-padding-x: 0.5rem; --bs-dropdown-header-padding-y: 0.25rem;
  box-shadow: var(--depth-overlay); backdrop-filter: var(--surface-filter); -webkit-backdrop-filter: var(--surface-filter);
}
.dropdown-item { display: flex; align-items: center; gap: 0.5rem; border-radius: var(--vf-radius-md); text-align: start; transition: background-color var(--motion) var(--motion-ease); }
.dropdown-item.text-danger, .dropdown-item.text-destructive { color: var(--destructive) !important; }
.dropdown-header { font-size: 0.6875rem; }
.dropdown-toggle::after { display: none; } /* use a lucide chevron-down instead of the caret triangle */

.tooltip { --bs-tooltip-max-width: 14rem; --bs-tooltip-padding-x: 0.625rem; --bs-tooltip-padding-y: 0.25rem; --bs-tooltip-font-size: 0.75rem; --bs-tooltip-color: var(--background); --bs-tooltip-bg: var(--foreground); --bs-tooltip-border-radius: var(--shape-control); --bs-tooltip-opacity: 1; font-family: inherit; }
.popover { --bs-popover-font-size: 0.875rem; --bs-popover-bg: var(--popover); --bs-popover-border-width: var(--line); --bs-popover-border-color: var(--border); --bs-popover-border-radius: var(--shape-overlay); --bs-popover-inner-border-radius: calc(var(--shape-overlay) - var(--line)); --bs-popover-box-shadow: var(--depth-overlay); --bs-popover-header-bg: transparent; --bs-popover-header-color: var(--foreground); --bs-popover-body-color: var(--popover-foreground); --bs-popover-header-font-size: 0.875rem; font-family: inherit; box-shadow: var(--depth-overlay); }

.toast { --bs-toast-padding-x: 0.875rem; --bs-toast-padding-y: 0.75rem; --bs-toast-font-size: 0.875rem; --bs-toast-color: var(--popover-foreground); --bs-toast-bg: var(--popover); --bs-toast-border-width: var(--line); --bs-toast-border-color: var(--border); --bs-toast-border-radius: var(--shape-overlay); --bs-toast-box-shadow: var(--depth-overlay); --bs-toast-header-color: var(--foreground); --bs-toast-header-bg: transparent; --bs-toast-header-border-color: var(--border); backdrop-filter: var(--surface-filter); }
.toast.showing, .toast.show { animation: vf-slide-in 0.3s var(--motion-ease) both; }
.vf-toast-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; flex-shrink: 0; border-radius: 50%; background: var(--foreground); color: var(--background); }
.vf-toast-icon.is-error { background: var(--destructive); color: #fff; }
.vf-toast-icon > svg { width: 0.75rem; height: 0.75rem; }

/* ---------------------------------------------------------------- 8. feedback */
.alert {
  --bs-alert-bg: var(--card); --bs-alert-padding-x: 1rem; --bs-alert-padding-y: 1rem; --bs-alert-margin-bottom: 0;
  --bs-alert-color: color-mix(in oklch, var(--foreground) 80%, transparent); --bs-alert-border-color: var(--border);
  --bs-alert-border-width: var(--line); border-style: var(--line-style); border-color: var(--bs-alert-border-color); --bs-alert-border-radius: var(--shape-overlay); --bs-alert-link-color: var(--foreground);
  display: flex; align-items: flex-start; gap: 0.75rem; font-size: 0.875rem; line-height: 1.7;
}
.alert > svg, .alert > [data-lucide], .alert > .icon { width: 1rem; height: 1rem; margin-top: 0.2rem; flex-shrink: 0; color: var(--vf-alert-icon, var(--foreground)); }
.alert-heading, .alert-title { margin: 0 0 0.125rem; font-size: 0.875rem; font-weight: 600; color: var(--foreground); }
.alert-primary, .alert-secondary, .alert-light, .alert-dark, .alert-info { --bs-alert-bg: var(--card); --bs-alert-border-color: var(--border); --vf-alert-icon: var(--foreground); }
.alert-success { --bs-alert-bg: color-mix(in oklch, var(--success) 10%, transparent); --bs-alert-border-color: color-mix(in oklch, var(--success) 25%, transparent); --vf-alert-icon: var(--success); }
.alert-warning { --bs-alert-bg: color-mix(in oklch, var(--warning) 10%, transparent); --bs-alert-border-color: color-mix(in oklch, var(--warning) 25%, transparent); --vf-alert-icon: var(--warning); }
.alert-danger, .alert-destructive { --bs-alert-bg: color-mix(in oklch, var(--destructive) 10%, transparent); --bs-alert-border-color: color-mix(in oklch, var(--destructive) 30%, transparent); --vf-alert-icon: var(--destructive); }
.alert-dismissible { padding-inline-end: 3rem; }
.alert-dismissible .btn-close { padding: 0; top: 0.625rem; inset-inline-end: 0.625rem; left: auto; }

/* badge = VibeFarsi badge: colored label text, no fill; add .rounded-pill for an outlined chip */
.badge {
  --bs-badge-padding-x: 0; --bs-badge-padding-y: 0; --bs-badge-font-size: 0.75rem; --bs-badge-font-weight: 500;
  --bs-badge-color: var(--foreground); --bs-badge-border-radius: 0;
  display: inline-flex; align-items: center; gap: 0.25rem; line-height: 1.5rem; white-space: nowrap; vertical-align: middle;
}
.badge.rounded-pill { --bs-badge-padding-x: 0.625rem; border: 1px solid color-mix(in oklch, currentColor 30%, transparent); background: color-mix(in oklch, currentColor 8%, transparent); }
.badge-secondary { --bs-badge-color: var(--muted-foreground); }
.badge-outline { --bs-badge-color: color-mix(in oklch, var(--foreground) 55%, transparent); }
.badge-success { --bs-badge-color: var(--success); }
.badge-warning { --bs-badge-color: var(--warning); }
.badge-brand { --bs-badge-color: var(--brand); }
.badge-destructive, .badge-danger { --bs-badge-color: var(--destructive); }
.badge .vf-dot { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: currentColor; }
.text-bg-primary { color: var(--primary-foreground) !important; background-color: var(--primary) !important; }
.text-bg-secondary { color: var(--secondary-foreground) !important; background-color: var(--secondary) !important; }
.text-bg-success { color: var(--background) !important; background-color: var(--success) !important; }
.text-bg-warning { color: var(--background) !important; background-color: var(--warning) !important; }
.text-bg-danger { color: #fff !important; background-color: var(--destructive) !important; }
.vf-count { display: inline-flex; align-items: center; justify-content: center; min-width: 1rem; padding-inline: 0.375rem; font-size: 0.625rem; font-weight: 600; line-height: 1rem; color: var(--background); background: var(--foreground); border-radius: 999px; }

.progress, .progress-stacked { --bs-progress-height: 0.5rem; --bs-progress-font-size: 0.75rem; --bs-progress-bg: var(--input); --bs-progress-border-radius: var(--vf-pill); --bs-progress-box-shadow: none; --bs-progress-bar-color: var(--primary-foreground); --bs-progress-bar-bg: var(--primary); --bs-progress-bar-transition: width 0.5s var(--motion-ease); }
.progress-sm { --bs-progress-height: 0.375rem; }
.progress-bar { border-radius: inherit; }

.spinner-border, .spinner-grow { color: currentColor; }
.spinner-border-sm { --bs-spinner-width: 1rem; --bs-spinner-height: 1rem; --bs-spinner-border-width: 2px; }

/* skeleton shaped like the final content */
.skeleton, .placeholder { position: relative; display: block; overflow: hidden; min-height: 0.625rem; background-color: var(--secondary); border-radius: var(--vf-radius-md); opacity: 1; cursor: default; }
.placeholder { display: inline-block; }
.skeleton::before, .placeholder::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to left, transparent, color-mix(in oklch, var(--foreground) 10%, transparent), transparent); animation: vf-shine 2.2s ease-in-out infinite; }
.skeleton-circle { border-radius: 50%; }

/* empty state */
.vf-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2rem; text-align: center; border: 1px dashed var(--input); border-radius: var(--vf-radius-xl); }
.vf-empty-icon { display: flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--secondary); color: var(--muted-foreground); }
.vf-empty-icon > svg { width: 1.25rem; height: 1.25rem; }
.vf-empty-title { margin: 0.25rem 0 0; font-size: 0.875rem; font-weight: 500; }
.vf-empty-text { max-width: 20rem; margin: 0; font-size: 0.75rem; line-height: 1.25rem; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- 9. navigation */
.nav { --bs-nav-link-padding-x: 0.75rem; --bs-nav-link-padding-y: 0.5rem; --bs-nav-link-font-weight: 400; --bs-nav-link-color: var(--muted-foreground); --bs-nav-link-hover-color: var(--foreground); --bs-nav-link-disabled-color: color-mix(in oklch, var(--muted-foreground) 50%, transparent); font-size: 0.875rem; }
.nav-link { transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease), border-color var(--motion) var(--motion-ease); }
.nav-link:focus-visible { box-shadow: var(--vf-ring-soft); }
/* underline tabs */
.nav-tabs { --bs-nav-tabs-border-width: 1px; --bs-nav-tabs-border-color: var(--border); --bs-nav-tabs-border-radius: 0; --bs-nav-tabs-link-hover-border-color: transparent; --bs-nav-tabs-link-active-color: var(--foreground); --bs-nav-tabs-link-active-bg: transparent; --bs-nav-tabs-link-active-border-color: transparent; gap: 0.25rem; }
.nav-tabs .nav-link { margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; }
.nav-tabs .nav-link.active, .nav-tabs .nav-item.show .nav-link { font-weight: 600; border-bottom-color: var(--foreground); }
/* pill tabs = VibeFarsi segmented tabs */
.nav-pills { --bs-nav-pills-border-radius: var(--shape-control); --bs-nav-pills-link-active-color: var(--foreground); --bs-nav-pills-link-active-bg: var(--background); display: inline-flex; flex-wrap: nowrap; padding: 0.125rem; background: var(--muted); border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: calc(var(--shape-control) + 2px); }
.nav-pills .nav-link { padding: 0.375rem 0.75rem; white-space: nowrap; }
.nav-pills .nav-link.active { font-weight: 600; box-shadow: 0 0 0 1px var(--border), 0 1px 2px rgb(0 0 0 / 0.12); }
.tab-pane.fade { transition: opacity var(--motion) var(--motion-ease); }

.navbar { --bs-navbar-padding-y: 0.75rem; --bs-navbar-color: var(--muted-foreground); --bs-navbar-hover-color: var(--foreground); --bs-navbar-active-color: var(--foreground); --bs-navbar-disabled-color: color-mix(in oklch, var(--muted-foreground) 50%, transparent); --bs-navbar-brand-color: var(--foreground); --bs-navbar-brand-hover-color: var(--foreground); --bs-navbar-brand-font-size: 1rem; --bs-navbar-nav-link-padding-x: 0.75rem; --bs-navbar-toggler-border-color: transparent; --bs-navbar-toggler-focus-width: 2px; --bs-navbar-toggler-border-radius: var(--shape-control); font-size: 0.875rem; }
.navbar-brand { font-weight: 700; display: inline-flex; align-items: center; gap: 0.5rem; }
.navbar-toggler { width: 2.5rem; height: 2.5rem; padding: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--foreground); }
.navbar-toggler-icon { width: 1.25rem; height: 1.25rem; background: currentColor; mask: var(--vf-mask-menu) center / contain no-repeat; -webkit-mask: var(--vf-mask-menu) center / contain no-repeat; }
.vf-header { position: sticky; top: 0; z-index: 1030; background: color-mix(in oklch, var(--background) 80%, transparent); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4); border-bottom: var(--line) var(--line-style) var(--border); }

.breadcrumb { --bs-breadcrumb-margin-bottom: 0; --bs-breadcrumb-item-padding-x: 0.375rem; --bs-breadcrumb-divider-color: color-mix(in oklch, var(--muted-foreground) 60%, transparent); --bs-breadcrumb-item-active-color: var(--foreground); font-size: 0.875rem; align-items: center; }
.breadcrumb-item { display: inline-flex; align-items: center; color: var(--muted-foreground); }
.breadcrumb-item a { color: var(--muted-foreground); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--foreground); }
.breadcrumb-item.active { font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { content: ""; float: none; width: 0.875rem; height: 0.875rem; padding: 0; margin-inline-end: var(--bs-breadcrumb-item-padding-x); background: var(--bs-breadcrumb-divider-color); mask: var(--vf-mask-chevron-left) center / contain no-repeat; -webkit-mask: var(--vf-mask-chevron-left) center / contain no-repeat; }

.pagination { --bs-pagination-padding-x: 0.5rem; --bs-pagination-padding-y: 0; --bs-pagination-font-size: 0.875rem; --bs-pagination-color: var(--muted-foreground); --bs-pagination-bg: transparent; --bs-pagination-border-width: 1px; --bs-pagination-border-color: var(--border); --bs-pagination-border-radius: var(--vf-radius-md); --bs-pagination-hover-color: var(--foreground); --bs-pagination-hover-bg: var(--accent); --bs-pagination-hover-border-color: var(--border); --bs-pagination-focus-color: var(--foreground); --bs-pagination-focus-bg: var(--accent); --bs-pagination-focus-box-shadow: var(--vf-ring-soft); --bs-pagination-active-color: var(--primary-foreground); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-disabled-color: var(--muted-foreground); --bs-pagination-disabled-bg: transparent; --bs-pagination-disabled-border-color: var(--border); gap: 0.25rem; margin: 0; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; margin: 0 !important; border-radius: var(--vf-radius-md) !important; transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease); }
.page-item.active .page-link { font-weight: 600; }
.page-item.disabled .page-link { opacity: 0.4; }
.page-link > svg { width: 1rem; height: 1rem; }

/* sidebar (sits on the right in RTL by document order) */
.vf-sidebar { display: flex; flex-direction: column; width: 15rem; padding: 0.5rem; background: var(--card); border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: var(--vf-radius-xl); }
.vf-sidebar-head { padding: 0.25rem 0.625rem 0.75rem; border-bottom: 1px solid var(--border); }
.vf-sidebar-foot { margin-top: auto; padding: 0.75rem 0.625rem 0; border-top: 1px solid var(--border); }
.vf-sidebar-label { padding: 0.75rem 0.625rem 0.25rem; font-size: 0.6875rem; font-weight: 500; color: var(--muted-foreground); }
.vf-sidebar-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.625rem; font-size: 0.875rem; color: var(--muted-foreground); text-decoration: none; border-radius: var(--vf-radius-md); transition: color var(--motion) var(--motion-ease), background-color var(--motion) var(--motion-ease); }
.vf-sidebar-link:hover { color: var(--foreground); background: color-mix(in oklch, var(--accent) 60%, transparent); }
.vf-sidebar-link.active, .vf-sidebar-link[aria-current="page"] { color: var(--foreground); background: var(--accent); font-weight: 500; }
.vf-sidebar-link > svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.vf-sidebar-link .vf-count { margin-inline-start: auto; }

/* stepper */
.vf-stepper { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0; margin: 0; list-style: none; }
.vf-step { display: flex; flex: 1 1 0; align-items: flex-start; gap: 0.5rem; min-width: 0; }
.vf-step:last-child { flex: 0 0 auto; }
.vf-step-dot { display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; font-size: 0.75rem; font-weight: 600; color: var(--muted-foreground); border: 1px solid var(--border); border-radius: 50%; transition: all var(--motion) var(--motion-ease); }
.vf-step-dot > svg { width: 0.875rem; height: 0.875rem; }
.vf-step.is-done .vf-step-dot { color: var(--primary-foreground); background: var(--primary); border-color: var(--primary); }
.vf-step.is-current .vf-step-dot { color: var(--foreground); border: 2px solid var(--primary); }
.vf-step-body { min-width: 0; }
.vf-step-title { font-size: 0.875rem; line-height: 1.25rem; }
.vf-step:not(.is-done):not(.is-current) .vf-step-title { color: var(--muted-foreground); }
.vf-step-desc { font-size: 0.75rem; color: var(--muted-foreground); }
.vf-step-line { flex: 1 1 auto; height: 1px; margin-top: 0.875rem; background: var(--border); }
.vf-step.is-done .vf-step-line { background: var(--primary); }

/* ---------------------------------------------------------------- 10. data display */
.vf-stat { min-width: 0; padding: 1rem; overflow: hidden; background: var(--card); border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: var(--vf-radius-xl); }
.vf-stat-sm { padding: 0.75rem; }
.vf-stat-label { margin: 0; font-size: 0.75rem; color: var(--muted-foreground); }
.vf-stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; margin-top: 0.25rem; }
.vf-stat-value { margin: 0; min-width: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
@media (min-width: 640px) { .vf-stat:not(.vf-stat-sm) .vf-stat-value { font-size: 1.5rem; } }
.vf-stat-sm .vf-stat-value { font-size: 1.125rem; }
.vf-stat-unit { display: inline-block; white-space: nowrap; margin-inline-start: 0.375rem; font-size: 0.75rem; font-weight: 400; color: var(--muted-foreground); }
.vf-delta { display: inline-flex; flex-shrink: 0; align-items: center; gap: 0.125rem; font-size: 0.75rem; font-weight: 600; }
.vf-delta.is-up { color: var(--success); }
.vf-delta.is-down { color: var(--destructive); }
.vf-delta > svg { width: 0.875rem; height: 0.875rem; }

.vf-price { display: inline-flex; flex-direction: column; }
.vf-price-main { display: flex; align-items: baseline; gap: 0.375rem; }
.vf-price-amount { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.3; }
.vf-price-sm .vf-price-amount { font-size: 1rem; }
.vf-price-lg .vf-price-amount { font-size: 2.25rem; }
.vf-price-unit { font-size: 0.875rem; color: var(--muted-foreground); }
.vf-price-meta { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.125rem; font-size: 0.75rem; }
.vf-price-old { color: var(--muted-foreground); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.vf-price-off { padding: 0 0.375rem; font-size: 0.6875rem; font-weight: 600; color: var(--background); background: var(--foreground); border-radius: 999px; }

.vf-avatar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; flex-shrink: 0; overflow: hidden; font-size: 0.875rem; font-weight: 600; color: var(--secondary-foreground); background: var(--secondary); border-radius: 50%; }
.vf-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vf-avatar-sm { width: 1.75rem; height: 1.75rem; font-size: 0.6875rem; }
.vf-avatar-lg { width: 3rem; height: 3rem; font-size: 1rem; }
.vf-avatar-group { display: inline-flex; align-items: center; }
.vf-avatar-group > .vf-avatar { box-shadow: 0 0 0 2px var(--background); }
.vf-avatar-group > .vf-avatar + .vf-avatar { margin-inline-start: -0.5rem; }

.vf-timeline { position: relative; display: flex; flex-direction: column; gap: 1rem; padding: 0; padding-inline-start: 1.25rem; margin: 0; list-style: none; border-inline-start: 1px solid var(--border); }
.vf-timeline > li { position: relative; }
.vf-timeline > li::before { content: ""; position: absolute; top: 0.375rem; inset-inline-start: -1.5625rem; width: 0.625rem; height: 0.625rem; border-radius: 50%; border: 2px solid var(--background); background: color-mix(in oklch, var(--muted-foreground) 50%, transparent); }
.vf-timeline > li.is-active::before { background: var(--primary); }
.vf-timeline-meta { font-size: 0.6875rem; color: var(--muted-foreground); }
.vf-timeline-title { font-size: 0.875rem; font-weight: 500; line-height: 1.25rem; }
.vf-timeline-text { margin-top: 0.25rem; font-size: 0.75rem; color: var(--muted-foreground); }

.vf-section { padding-block: 4rem; }
@media (min-width: 768px) { .vf-section { padding-block: 6rem; } }
.vf-eyebrow { font-size: 0.75rem; font-weight: 500; color: var(--brand); }
.vf-lead { font-size: 1.0625rem; color: var(--muted-foreground); }
@media (min-width: 640px) { .vf-lead { font-size: 1.125rem; } }
.vf-feature-icon { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; color: var(--foreground); background: var(--secondary); border-width: var(--line); border-style: var(--line-style); border-color: var(--border); border-radius: var(--shape-control); }
.vf-feature-icon > svg { width: 1.25rem; height: 1.25rem; }

/* charts drawn as inline SVG read these */
.vf-chart { width: 100%; font-size: 0.75rem; color: var(--muted-foreground); }
.vf-chart text { fill: var(--muted-foreground); font-family: inherit; }
.vf-chart .grid line { stroke: var(--border); }
.vf-chart .s1 { color: var(--vf-chart-1); } .vf-chart .s2 { color: var(--vf-chart-2); } .vf-chart .s3 { color: var(--vf-chart-3); } .vf-chart .s4 { color: var(--vf-chart-4); } .vf-chart .s5 { color: var(--vf-chart-5); }

/* ---------------------------------------------------------------- 11. motion */
@keyframes vf-fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes vf-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vf-slide-in { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
@keyframes vf-shine { 0% { transform: translateX(-120%) skewX(-15deg); } 60%, 100% { transform: translateX(220%) skewX(-15deg); } }
@keyframes vf-pulse-soft { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.animate-fade-up { animation: vf-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both; }
.animate-fade-in { animation: vf-fade-in 0.6s ease-out both; }
.animate-pulse-soft { animation: vf-pulse-soft 3s ease-in-out infinite; }
.delay-1 { animation-delay: 60ms; } .delay-2 { animation-delay: 120ms; } .delay-3 { animation-delay: 180ms; } .delay-4 { animation-delay: 240ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
