@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800;900&display=swap");

/* ─── CSS Variables ─── */
:root {
  --brand: #0f7a6a;
  --brand-dark: #0b5f52;
  --brand-soft: #e8f4f1;
  --danger: #e0392b;
  --danger-soft: #fdeceb;
  --amber: #a8790a;
  --amber-soft: #fdf5e2;
  --blue: #2a6fdb;
  --blue-soft: #ecf2fd;
  --ink: #2f2f2f;
  --muted: #767676;
  --faint: #a3a3a3;
  --line: #ebebeb;
  --line-strong: #e0e0e0;
  --canvas: #f7f7f7;
  --surface: #ffffff;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-800: #0f172a;
  --sidebar-w: 260px;
  --header-h: 60px;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Vazirmatn", "Tahoma", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  direction: rtl;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
::selection { background: #cdeae4; color: #0b5f52; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #dcdcdc; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #c4c4c4; background-clip: content-box; }

/* ─── Utility ─── */
.no-bar::-webkit-scrollbar { display: none; }
.no-bar { scrollbar-width: none; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-center { text-align: center; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.font-semibold { font-weight: 600; }

/* ─── Grid ─── */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 768px) {
  .md-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .md-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-sidebar { grid-template-columns: 1fr 340px; }
}
@media (min-width: 1024px) {
  .lg-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .lg-grid-sidebar { grid-template-columns: 1fr 340px; }
}

/* ─── Animations ─── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.35s ease-out both; }

/* ─── Divider ─── */
.divider { border-top: 1px solid var(--slate-50); }
.divider-strong { border-top: 1px solid var(--line); }

/* ─── Responsive ─── */
@media (max-width: 767px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-sidebar { grid-template-columns: 1fr; }
}
