/* ============================================================
   استایل مشترک هر سه برنامه — معادل Tailwind + shadcn/ui با
   فقط کلاسهای استفادهشده در پروژه (بدون مراحل build)
   ============================================================ */

:root {
  --radius: 0.625rem;
  --background: #ffffff;
  --foreground: #0f172a;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --popover: #ffffff;
  --popover-foreground: #0f172a;
  --primary: #0f172a;
  --primary-foreground: #f8fafc;
  --secondary: #f1f5f9;
  --secondary-foreground: #0f172a;
  --muted: #f1f5f9;
  --muted-foreground: #64748b;
  --accent: #f1f5f9;
  --accent-foreground: #0f172a;
  --destructive: #dc2626;
  --border: #e2e8f0;
  --input: #e2e8f0;
  --ring: #94a3b8;
  --chart-1: #ea580c;
  --chart-2: #0d9488;
  --chart-3: #1e3a5f;
  --chart-4: #eab308;
  --chart-5: #f97316;
  --sidebar: #f8fafc;
  --sidebar-foreground: #0f172a;
  --sidebar-primary: #0f172a;
  --sidebar-primary-foreground: #f8fafc;
  --sidebar-accent: #f1f5f9;
  --sidebar-accent-foreground: #0f172a;
  --sidebar-border: #e2e8f0;
  --sidebar-ring: #94a3b8;
}

* { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Vazirmatn, "Segoe UI", Tahoma, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
h1,h2,h3,h4,p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ---------- Layout ---------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-4 { top: 1rem; }
.right-2 { right: 0.5rem; }
.right-4 { right: 1rem; }
.left-2 { left: 0.5rem; }
.left-1\/2 { left: 50%; }
.inset-0 { inset: 0; }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.min-h-screen { min-height: 100vh; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mt-auto { margin-top: auto; }
.max-w-7xl { max-width: 80rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-xs { max-width: 20rem; }
.min-w-0 { min-width: 0; }
@media (min-width: 640px) {
  .sm\:flex { display: flex; }
  .sm\:block { display: block; }
  .sm\:hidden { display: none; }
  .sm\:inline { display: inline; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sm\:col-span-3 { grid-column: span 3 / span 3; }
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .sm\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .sm\:max-w-4xl { max-width: 56rem; }
  .sm\:text-\[10px\] { font-size: 10px; }
  .sm\:text-\[11px\] { font-size: 11px; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:block { display: block; }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
}
@media (min-width: 1280px) {
  .xl\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Spacing ---------- */
.p-0 { padding: 0; } .p-1 { padding: 0.25rem; } .p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; } .p-2\.5 { padding: 0.625rem; } .p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; } .p-10 { padding: 2.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-14 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.pt-1 { padding-top: 0.25rem; } .pt-0\.5 { padding-top: 0.125rem; }
.pt-3 { padding-top: 0.75rem; } .pt-4 { padding-top: 1rem; }
.pr-2 { padding-right: 0.5rem; }
.pb-1 { padding-bottom: 0.25rem; } .pb-2 { padding-bottom: 0.5rem; } .pb-3 { padding-bottom: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; } .mt-1 { margin-top: 0.25rem; } .mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }
.-mt-2 { margin-top: -0.5rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mr-1 { margin-right: 0.25rem; } .ml-1 { margin-left: 0.25rem; }
.ms-1 { margin-inline-start: 0.25rem; } .ms-2 { margin-inline-start: 0.5rem; }
.ms-auto { margin-inline-start: auto; }
.me-1 { margin-inline-end: 0.25rem; }
.-mx-4 { margin-left: -1rem; margin-right: -1rem; }
.gap-0\.5 { gap: 0.125rem; } .gap-1 { gap: 0.25rem; } .gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; } .gap-2\.5 { gap: 0.625rem; } .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.gap-x-4 { column-gap: 1rem; } .gap-x-5 { column-gap: 1.25rem; }
.gap-y-1 { row-gap: 0.25rem; } .gap-y-1\.5 { row-gap: 0.375rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.space-y-1\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.375rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }
.space-y-5 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.25rem; }
.space-y-0\.5 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.125rem; }

/* ---------- Sizes ---------- */
.w-2 { width: 0.5rem; } .w-2\.5 { width: 0.625rem; } .w-3 { width: 0.75rem; }
.w-4 { width: 1rem; } .w-5 { width: 1.25rem; } .w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; } .w-8 { width: 2rem; } .w-10 { width: 2.5rem; }
.w-12 { width: 3rem; } .w-14 { width: 3.5rem; }
.w-24 { width: 6rem; } .w-32 { width: 8rem; } .w-36 { width: 9rem; }
.w-40 { width: 10rem; } .w-44 { width: 11rem; } .w-52 { width: 13rem; }
.w-56 { width: 14rem; } .w-72 { width: 18rem; }
.w-px { width: 1px; }
.h-0\.5 { height: 0.125rem; } .h-1\.5 { height: 0.375rem; } .h-2 { height: 0.5rem; }
.h-2\.5 { height: 0.625rem; } .h-3 { height: 0.75rem; } .h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; } .h-5 { height: 1.25rem; } .h-6 { height: 1.5rem; }
.h-7 { height: 1.75rem; } .h-8 { height: 2rem; } .h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; } .h-12 { height: 3rem; }
.h-48 { height: 12rem; } .h-64 { height: 16rem; } .h-72 { height: 18rem; } .h-80 { height: 20rem; }
.h-\[300px\] { height: 300px; } .h-\[340px\] { height: 340px; }
.size-2 { width: 0.5rem; height: 0.5rem; }
.size-2\.5 { width: 0.625rem; height: 0.625rem; }
.size-3 { width: 0.75rem; height: 0.75rem; }
.size-3\.5 { width: 0.875rem; height: 0.875rem; }
.size-4 { width: 1rem; height: 1rem; }
.size-full { width: 100%; height: 100%; }
.w-\[74px\] { width: 74px; } .w-\[90px\] { width: 90px; } .w-\[100px\] { width: 100px; }
.w-\[110px\] { width: 110px; } .w-\[160px\] { width: 160px; } .w-\[190px\] { width: 190px; }
.w-\[210px\] { width: 210px; } .w-\[240px\] { width: 240px; } .w-\[280px\] { width: 280px; }
.max-w-\[110px\] { max-width: 110px; } .max-w-\[150px\] { max-width: 150px; }
.max-w-\[150px\] { max-width: 150px; } .max-w-\[240px\] { max-width: 240px; }
.max-w-\[260px\] { max-width: 260px; } .max-w-\[280px\] { max-width: 280px; }
.max-w-\[300px\] { max-width: 300px; } .max-w-\[320px\] { max-width: 320px; }
.min-w-\[150px\] { min-width: 150px; } .min-w-\[170px\] { min-width: 170px; }
.min-w-\[220px\] { min-width: 220px; } .min-w-\[260px\] { min-width: 260px; }
.min-w-\[340px\] { min-width: 340px; }
.min-w-\[680px\] { min-width: 680px; } .min-w-\[720px\] { min-width: 720px; }
.min-w-\[760px\] { min-width: 760px; } .min-w-\[860px\] { min-width: 860px; }
.min-w-\[900px\] { min-width: 900px; } .min-w-\[1150px\] { min-width: 1150px; }
.max-h-40 { max-height: 10rem; } .max-h-64 { max-height: 16rem; } .max-h-72 { max-height: 18rem; }
.max-h-\[320px\] { max-height: 320px; } .max-h-\[420px\] { max-height: 420px; }
.max-h-\[440px\] { max-height: 440px; } .max-h-\[460px\] { max-height: 460px; }
.max-h-\[520px\] { max-height: 520px; } .max-h-\[560px\] { max-height: 560px; }
.max-h-\[88vh\] { max-height: 88vh; }

/* ---------- Typography ---------- */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-\[9px\] { font-size: 9px; line-height: 1.2; }
.text-\[10px\] { font-size: 10px; line-height: 1.3; }
.text-\[11px\] { font-size: 11px; line-height: 1.4; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.leading-4 { line-height: 1rem; }
.leading-5 { line-height: 1.25rem; }
.leading-6 { line-height: 1.5rem; }
.leading-tight { line-height: 1.25; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.underline { text-decoration-line: underline; }
.underline-offset-4 { text-underline-offset: 4px; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }

/* ---------- Colors: text ---------- */
.text-slate-200 { color: #e2e8f0; } .text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; } .text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; } .text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; } .text-slate-900 { color: #0f172a; }
.text-white { color: #ffffff; }
.text-emerald-300 { color: #6ee7b7; } .text-emerald-600 { color: #059669; }
.text-emerald-700 { color: #047857; } .text-emerald-800 { color: #065f46; }
.text-emerald-900 { color: #064e3b; }
.text-amber-100 { color: #fef3c7; } .text-amber-200 { color: #fde68a; }
.text-amber-600 { color: #d97706; } .text-amber-700 { color: #b45309; }
.text-amber-800 { color: #92400e; } .text-amber-900 { color: #78350f; }
.text-rose-500 { color: #f43f5e; } .text-rose-600 { color: #e11d48; }
.text-rose-700 { color: #be123c; } .text-rose-800 { color: #9f1239; }
.text-rose-900 { color: #881337; }
.text-sky-100 { color: #e0f2fe; } .text-sky-200 { color: #bae6fd; }
.text-sky-400 { color: #38bdf8; } .text-sky-500 { color: #0ea5e9; }
.text-sky-600 { color: #0284c7; } .text-sky-700 { color: #0369a1; }
.text-sky-800 { color: #075985; } .text-sky-900 { color: #0c4a6e; }
.text-violet-600 { color: #7c3aed; } .text-violet-700 { color: #6d28d9; }
.text-violet-800 { color: #5b21b6; }
.text-indigo-600 { color: #4f46e5; } .text-indigo-700 { color: #4338ca; }
.text-muted-foreground { color: var(--muted-foreground); }
.text-foreground { color: var(--foreground); }
.text-current { color: currentColor; }

/* ---------- Colors: background ---------- */
.bg-white { background-color: #ffffff; }
.bg-background { background-color: var(--background); }
.bg-muted { background-color: var(--muted); }
.bg-muted\/40 { background-color: rgb(241 245 249 / 0.4); }
.bg-muted\/70 { background-color: rgb(241 245 249 / 0.7); }
.bg-primary { background-color: var(--primary); }
.bg-border { background-color: var(--border); }
.bg-foreground { background-color: var(--foreground); }
.bg-sidebar { background-color: var(--sidebar); }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-slate-400 { background-color: #94a3b8; }
.bg-slate-900 { background-color: #0f172a; }
.bg-slate-50\/50 { background-color: rgb(248 250 252 / 0.5); }
.bg-slate-50\/60 { background-color: rgb(248 250 252 / 0.6); }
.bg-slate-50\/70 { background-color: rgb(248 250 252 / 0.7); }
.bg-slate-50\/90 { background-color: rgb(248 250 252 / 0.9); }
.bg-slate-100\/70 { background-color: rgb(241 245 249 / 0.7); }
.bg-white\/70 { background-color: rgb(255 255 255 / 0.7); }
.bg-white\/90 { background-color: rgb(255 255 255 / 0.9); }
.bg-white\/95 { background-color: rgb(255 255 255 / 0.95); }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-100 { background-color: #d1fae5; }
.bg-emerald-600 { background-color: #059669; }
.bg-emerald-50\/40 { background-color: rgb(236 253 245 / 0.4); }
.bg-emerald-50\/60 { background-color: rgb(236 253 245 / 0.6); }
.bg-emerald-500\/20 { background-color: rgb(16 185 129 / 0.2); }
.bg-amber-50 { background-color: #fffbeb; }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-500 { background-color: #f59e0b; }
.bg-amber-600 { background-color: #d97706; }
.bg-amber-50\/60 { background-color: rgb(255 251 235 / 0.6); }
.bg-amber-500\/15 { background-color: rgb(245 158 11 / 0.15); }
.bg-rose-50 { background-color: #fff1f2; }
.bg-rose-600 { background-color: #e11d48; }
.bg-rose-700 { background-color: #be123c; }
.bg-rose-500\/25 { background-color: rgb(244 63 94 / 0.25); }
.bg-sky-50 { background-color: #f0f9ff; }
.bg-sky-100 { background-color: #e0f2fe; }
.bg-sky-600 { background-color: #0284c7; }
.bg-sky-50\/40 { background-color: rgb(240 249 255 / 0.4); }
.bg-sky-500\/15 { background-color: rgb(14 165 233 / 0.15); }
.bg-violet-100 { background-color: #ede9fe; }
.bg-violet-600 { background-color: #7c3aed; }
.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-500 { background-color: #6366f1; }
.bg-teal-600 { background-color: #0d9488; }

/* ---------- Borders ---------- */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-r { border-right-width: 1px; border-right-style: solid; }
.border-t-2 { border-top-width: 2px; border-top-style: solid; }
.border-dashed { border-style: dashed; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-200\/70 { border-color: rgb(226 232 240 / 0.7); }
.border-slate-300 { border-color: #cbd5e1; }
.border-amber-200 { border-color: #fde68a; }
.border-amber-300 { border-color: #fcd34d; }
.border-rose-200 { border-color: #fecdd3; }
.border-emerald-200 { border-color: #a7f3d0; }
.border-sky-200 { border-color: #bae6fd; }
.border-primary { border-color: var(--primary); }
.rounded-sm { border-radius: 0.125rem; }
.rounded-xs { border-radius: calc(var(--radius) - 6px); }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-xl { border-radius: calc(var(--radius) + 4px); }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-tl-sm { border-top-left-radius: 0.125rem; }
.rounded-\[2px\] { border-radius: 2px; }
.rounded-\[inherit\] { border-radius: inherit; }

/* ---------- Shadows / effects ---------- */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.backdrop-blur { backdrop-filter: blur(8px); }
.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }
.transition-colors { transition: color 0.15s, background-color 0.15s, border-color 0.15s; }
.transition-opacity { transition: opacity 0.15s; }
.transition-transform { transition: transform 0.15s; }
.transition-all { transition: all 0.15s; }
.duration-200 { transition-duration: 0.2s; }
.rotate-45 { transform: rotate(45deg); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }
.fill-current { fill: currentColor; }
.fill-primary { fill: var(--primary); }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.outline-none { outline: none; }
.accent-sky-600 { accent-color: #0284c7; }
.accent-emerald-600 { accent-color: #059669; }

/* ---------- States ---------- */
.hover\:bg-slate-50:hover { background-color: #f8fafc; }
.hover\:bg-slate-50\/70:hover { background-color: rgb(248 250 252 / 0.7); }
.hover\:bg-slate-800:hover { background-color: #1e293b; }
.hover\:bg-emerald-700:hover { background-color: #047857; }
.hover\:bg-rose-50:hover { background-color: #fff1f2; }
.hover\:bg-rose-700:hover { background-color: #9f1239; }
.hover\:bg-amber-100:hover { background-color: #fef3c7; }
.hover\:bg-sky-50:hover { background-color: #f0f9ff; }
.hover\:bg-sky-100:hover { background-color: #e0f2fe; }
.hover\:bg-sky-700:hover { background-color: #0369a1; }
.hover\:bg-white:hover { background-color: #fff; }
.hover\:bg-white\/10:hover { background-color: rgb(255 255 255 / 0.1); }
.hover\:bg-muted\/40:hover { background-color: rgb(241 245 249 / 0.4); }
.hover\:text-rose-600:hover { color: #e11d48; }
.hover\:text-rose-700:hover { color: #be123c; }
.hover\:text-slate-800:hover { color: #1e293b; }
.hover\:text-emerald-600:hover { color: #059669; }
.hover\:text-emerald-700:hover { color: #047857; }
.hover\:text-sky-700:hover { color: #0369a1; }
.hover\:text-sky-100:hover { color: #e0f2fe; }
.hover\:text-amber-100:hover { color: #fef3c7; }
.hover\:text-white:hover { color: #fff; }
.hover\:border-amber-400:hover { border-color: #fbbf24; }
.hover\:border-emerald-400:hover { border-color: #34d399; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:ring-4:hover { --tw-ring-offset-shadow: 0 0 #0000; box-shadow: 0 0 0 4px rgb(148 163 184 / 0.3); }
.disabled\:pointer-events-none:disabled { pointer-events: none; }
.disabled\:opacity-50:disabled { opacity: 0.5; }
.focus\:ring-1:focus { box-shadow: 0 0 0 1px var(--ring); }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgb(148 163 184 / 0.35); }
.focus\:ring-ring:focus { box-shadow: 0 0 0 2px var(--ring); }
.focus\:border-emerald-400:focus { border-color: #34d399; }
.focus\:ring-emerald-200:focus { box-shadow: 0 0 0 1px #a7f3d0; }
.focus\:border-sky-400:focus { border-color: #38bdf8; }
.focus\:ring-sky-200:focus { box-shadow: 0 0 0 1px #bae6fd; }
.focus\:outline-hidden:focus { outline: none; }
.group:hover .group-hover\:opacity-100, .hover\:opacity-100 { opacity: 1; }

/* ---------- Animations ---------- */
@keyframes cf-spin { to { transform: rotate(360deg); } }
.animate-spin { animation: cf-spin 1s linear infinite; }
@keyframes cf-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-pulse { animation: cf-pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ============================================================
   کامپوننتها (معادل shadcn/ui)
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  white-space: nowrap; border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem; font-weight: 500; line-height: 1.25rem;
  padding: 0.5rem 1rem; height: 2.25rem;
  border: 1px solid transparent; cursor: pointer; user-select: none;
  transition: color .15s, background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }
.btn-default { background: var(--primary); color: var(--primary-foreground); }
.btn-default:hover { background: #1e293b; }
.btn-outline { background: #fff; border-color: var(--input); color: var(--foreground); }
.btn-outline:hover { background: var(--accent); }
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.btn-secondary:hover { background: #e2e8f0; }
.btn-destructive { background: var(--destructive); color: #fff; }
.btn-destructive:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--accent); }
.btn-link { background: transparent; color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover { color: var(--muted-foreground); }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-sm { height: 2rem; padding: 0.25rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { height: 2.5rem; padding: 0.5rem 1.5rem; }
.btn-icon { height: 2rem; width: 2rem; padding: 0; }

.input, .select, .textarea {
  display: flex; width: 100%; min-width: 0;
  border: 1px solid var(--input); border-radius: calc(var(--radius) - 2px);
  background: transparent; padding: 0.5rem 0.75rem;
  font-size: 0.875rem; line-height: 1.25rem; color: var(--foreground);
  transition: border-color .15s, box-shadow .15s;
  height: 2.25rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: #34d399; box-shadow: 0 0 0 1px #a7f3d0;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-foreground); }
.input:disabled, .select:disabled { opacity: 0.5; cursor: not-allowed; background: var(--muted); }
.textarea { min-height: 4.5rem; height: auto; resize: vertical; }
.select { appearance: auto; cursor: pointer; }
.input-sm { height: 2rem; font-size: 0.8125rem; }

.label { font-size: 0.875rem; font-weight: 500; line-height: 1; }

.card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); color: var(--card-foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.card-header { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.5rem; }
.card-title { font-weight: 600; font-size: 1rem; line-height: 1.5rem; }
.card-description { font-size: 0.875rem; color: var(--muted-foreground); }
.card-content { padding: 1.5rem; padding-top: 0; }
.card-footer { display: flex; align-items: center; padding: 1.5rem; padding-top: 0; }

.badge { display: inline-flex; align-items: center; gap: 0.25rem; border-radius: 9999px; border: 1px solid transparent; padding: 0.125rem 0.625rem; font-size: 0.6875rem; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.badge-secondary { background: var(--secondary); color: var(--secondary-foreground); }
.badge-outline { border-color: var(--input); color: var(--foreground); background: transparent; }
.badge-emerald { background: #d1fae5; color: #065f46; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-rose { background: #ffe4e6; color: #9f1239; }
.badge-sky { background: #e0f2fe; color: #075985; }
.badge-violet { background: #ede9fe; color: #5b21b6; }
.badge-slate { background: #f1f5f9; color: #334155; }

/* Tabs */
.tabs { display: inline-flex; align-items: center; gap: 0.25rem; background: var(--muted); color: var(--muted-foreground); border-radius: calc(var(--radius) - 2px); padding: 0.25rem; flex-wrap: wrap; }
.tabs-item { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; border-radius: calc(var(--radius) - 4px); padding: 0.25rem 0.75rem; font-size: 0.8125rem; font-weight: 500; white-space: nowrap; cursor: pointer; border: none; background: transparent; color: inherit; transition: background .15s, color .15s, box-shadow .15s; }
.tabs-item:hover { color: var(--foreground); }
.tabs-item.active { background: #fff; color: var(--foreground); box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.tabs-item:disabled { opacity: 0.5; pointer-events: none; }
.tabs-item svg { width: 0.875rem; height: 0.875rem; }

/* Dialog */
.dialog-overlay { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.5); display: flex; align-items: center; justify-content: center; padding: 1rem; animation: cf-fade .15s ease-out; }
.dialog-panel { background: var(--background); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.2); width: 100%; max-width: 32rem; max-height: 88vh; display: flex; flex-direction: column; animation: cf-zoom .15s ease-out; }
.dialog-header { display: flex; flex-direction: column; gap: 0.375rem; padding: 1.5rem 1.5rem 0.75rem; text-align: right; }
.dialog-title { font-size: 1.125rem; font-weight: 600; line-height: 1.5; }
.dialog-desc { font-size: 0.875rem; color: var(--muted-foreground); }
.dialog-body { padding: 0.75rem 1.5rem; overflow-y: auto; font-size: 0.875rem; }
.dialog-footer { display: flex; flex-direction: row-reverse; gap: 0.5rem; padding: 1rem 1.5rem 1.5rem; }
.dialog-close-x { position: absolute; top: 1rem; left: 1rem; border: none; background: transparent; cursor: pointer; color: var(--muted-foreground); border-radius: calc(var(--radius) - 4px); padding: 0.25rem; display: flex; }
.dialog-close-x:hover { background: var(--accent); color: var(--foreground); }
@keyframes cf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cf-zoom { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }

/* Toast */
.toast-viewport { position: fixed; bottom: 1rem; left: 1rem; z-index: 100; display: flex; flex-direction: column; gap: 0.5rem; max-width: 22rem; }
.toast { display: flex; align-items: flex-start; gap: 0.5rem; background: var(--popover); color: var(--popover-foreground); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.15); padding: 0.75rem 1rem; font-size: 0.8125rem; line-height: 1.4; animation: cf-toast .2s ease-out; }
.toast-success { border-color: #a7f3d0; }
.toast-error { border-color: #fecdd3; }
.toast svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 0.125rem; }
.toast-success svg { color: #059669; }
.toast-error svg { color: #e11d48; }
.toast-info svg { color: #0284c7; }
@keyframes cf-toast { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Checkbox / Switch */
.checkbox { width: 1rem; height: 1rem; accent-color: #0f172a; cursor: pointer; }
.switch { position: relative; display: inline-flex; height: 1.25rem; width: 2.25rem; flex-shrink: 0; cursor: pointer; align-items: center; border-radius: 9999px; border: 2px solid transparent; background: #cbd5e1; transition: background .15s; }
.switch.on { background: var(--primary); }
.switch .knob { display: block; height: 1rem; width: 1rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform .15s; transform: translateX(0.0625rem); }
.switch.on .knob { transform: translateX(-1.0625rem); }
[dir="rtl"] .switch .knob { transform: translateX(-0.0625rem); }
[dir="rtl"] .switch.on .knob { transform: translateX(1.0625rem); }

/* Progress */
.progress { position: relative; height: 0.5rem; width: 100%; overflow: hidden; border-radius: 9999px; background: var(--secondary); }
.progress > div { height: 100%; width: 100%; background: var(--primary); transition: transform .3s; transform-origin: right; }

/* Table */
.table { width: 100%; caption-side: bottom; font-size: 0.8125rem; border-collapse: collapse; }
.table th { text-align: right; font-weight: 600; color: var(--muted-foreground); background: var(--muted)/50; background: rgb(241 245 249 / 0.5); border-bottom: 1px solid var(--border); padding: 0.5rem 0.75rem; white-space: nowrap; }
.table td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgb(248 250 252 / 0.7); }
.table .num, .num-latin { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: embed; }
.cf-table th, .cf-table td { padding-top: 0.5rem; padding-bottom: 0.5rem; white-space: nowrap; }
.cf-table td.num-cell, .cf-table th.num-cell { text-align: left; }

/* Scrollbar */
.cf-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.cf-scroll::-webkit-scrollbar-thumb { background: rgb(148 163 184 / 0.4); border-radius: 8px; }
.cf-scroll::-webkit-scrollbar-track { background: transparent; }

/* Spinner */
.spinner { width: 1rem; height: 1rem; border: 2px solid rgb(148 163 184 / 0.35); border-top-color: currentColor; border-radius: 9999px; animation: cf-spin 0.8s linear infinite; display: inline-block; }

/* Charts */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-tooltip { position: absolute; z-index: 30; pointer-events: none; background: rgb(15 23 42 / 0.92); color: #fff; border-radius: calc(var(--radius) - 2px); padding: 0.5rem 0.625rem; font-size: 11px; line-height: 1.5; box-shadow: 0 4px 6px rgb(0 0 0 / 0.15); max-width: 280px; direction: rtl; }
.chart-tooltip .tt-title { font-weight: 600; margin-bottom: 0.25rem; }
.chart-tooltip .tt-row { display: flex; align-items: center; gap: 0.375rem; white-space: nowrap; }
.chart-tooltip .tt-dot { width: 8px; height: 8px; border-radius: 9999px; flex-shrink: 0; }
.chart-tooltip .tt-val { margin-inline-start: auto; font-variant-numeric: tabular-nums; direction: ltr; padding-inline-start: 0.75rem; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.375rem 1rem; font-size: 11px; color: var(--muted-foreground); justify-content: center; }
.chart-legend .lg-item { display: inline-flex; align-items: center; gap: 0.3125rem; cursor: pointer; }
.chart-legend .lg-item.off { opacity: 0.35; }
.chart-legend .lg-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.chart-grid-line { stroke: rgb(226 232 240 / 0.8); stroke-width: 1; }
.chart-axis-text { font-size: 10px; fill: #94a3b8; }

/* Dropzone */
.dropzone { border: 2px dashed #cbd5e1; border-radius: var(--radius); background: rgb(248 250 252 / 0.5); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: #34d399; background: rgb(236 253 245 / 0.4); }

/* Monospace helpers */
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ============================================================ */
/* Auth — گیت ورود و نمای مدیر                                   */
/* ============================================================ */
html.auth-wait body { visibility: hidden !important; }
html.auth-wait::after { content: ""; position: fixed; top: 50%; left: 50%; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; border: 3px solid rgb(148 163 184 / 0.35); border-top-color: #0f172a; border-radius: 9999px; animation: auth-spin .7s linear infinite; z-index: 100; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
/* نمای مدیر: حذف توضیحات فارسی راهنما و بخشهای آپلود */
html.role-admin .fa-note { display: none !important; }
html.role-admin .admin-hide { display: none !important; }

/* Utilities تکمیلی صفحات login و انتخاب برنامه */
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.pt-7 { padding-top: 1.75rem; }
.w-96 { width: 24rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-8 { margin-top: 2rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-2\.5 { margin-bottom: 0.625rem; }
@media (min-width: 768px) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

