/* =========================================================================
   الو شبکه — استایل سراسری
   تم: قرمز و کرم (Light) | مشکی و قرمز (Dark)
   ========================================================================= */

/* ===== ۱. متغیرها ===== */
:root {
  /* ===== قرمز دارک چری (Primary) ===== */
  --primary: #8B1A2B;
  --primary-700: #5C0F1C;
  --primary-600: #731626;
  --primary-400: #A83A4B;
  --primary-300: #C97A85;
  --primary-100: #EBD8DA;
  --primary-50: #F7EFEF;
  --primary-glow: rgba(139, 26, 43, .28);

  /* ===== Background (کرم گرم) ===== */
  --bg: #FAF7F4;
  --surface: #FFFFFF;
  --surface-2: #FBF8F5;
  --surface-3: #F2ECE7;

  /* ===== Text (مشکی گرم) ===== */
  --text: #1F1417;
  --text-2: #3D2A30;
  --muted: #7C676C;
  --muted-2: #A8969A;

  /* ===== Border ===== */
  --border: #EBE0DE;
  --border-2: #D6C5C3;
  --border-soft: #F3EAE8;

  /* ===== Status ===== */
  --success: #12805C;
  --success-bg: #E4F4EE;
  --success-deep: #0D5F44;
  --warning: #B45309;
  --warning-bg: #FBEEDC;
  --danger: #8B1A2B;
  --danger-bg: #F2D9DC;
  --info: #2F5BEA;
  --info-bg: #EAF0FF;
  --gold: #B58D2C;
  --gold-bg: #FAF0D7;

  /* ===== Shadows ===== */
  --shadow-xs: 0 1px 2px rgba(31,20,23,.04);
  --shadow-sm: 0 1px 2px rgba(31,20,23,.04), 0 2px 6px rgba(31,20,23,.05);
  --shadow: 0 2px 4px rgba(31,20,23,.04), 0 6px 16px rgba(31,20,23,.06);
  --shadow-md: 0 4px 8px rgba(31,20,23,.05), 0 12px 32px rgba(31,20,23,.08);
  --shadow-lg: 0 8px 16px rgba(31,20,23,.06), 0 24px 48px rgba(31,20,23,.14);

  /* ===== Motion & Layout ===== */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-bounce: cubic-bezier(.68,-.55,.27,1.55);
  --dur-fast: .15s;
  --dur: .25s;
  --dur-slow: .4s;
  --font-sans: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --topbar-h: 62px;
  --sidebar-w: 240px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}
:root {
  /* ===== Primary — سرمه‌ای (پیش‌فرض dental) ===== */
  --primary: #1E3A5F;
  --primary-700: #142847;
  --primary-600: #183356;
  --primary-400: #4A6B94;
  --primary-300: #7C96B5;
  --primary-100: #D4DFEC;
  --primary-50: #EBF1F7;
  --primary-glow: rgba(30, 58, 95, .28);

  /* Background */
  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --surface-2: #F7F7F2;
  --surface-3: #F0F0EA;

  /* Text */
  --text: #1A2432;
  --text-2: #3D4A5C;
  --muted: #6E7A8A;
  --muted-2: #A0A8B2;

  /* Border */
  --border: #E5E8ED;
  --border-2: #CFD5DD;
  --border-soft: #EFF1F4;

  /* Status */
  --success: #12805C;
  --success-bg: #E4F4EE;
  --success-deep: #0D5F44;
  --warning: #B45309;
  --warning-bg: #FBEEDC;
  --danger: #B03A2E;
  --danger-bg: #F4DCD7;
  --info: #1E3A5F;
  --info-bg: #EBF1F7;
  --gold: #B8892E;
  --gold-bg: #FAF3DF;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(26,36,50,.04);
  --shadow-sm: 0 1px 2px rgba(26,36,50,.04), 0 2px 6px rgba(26,36,50,.05);
  --shadow: 0 2px 4px rgba(26,36,50,.04), 0 6px 16px rgba(26,36,50,.06);
  --shadow-md: 0 4px 8px rgba(26,36,50,.05), 0 12px 32px rgba(26,36,50,.08);
  --shadow-lg: 0 8px 16px rgba(26,36,50,.06), 0 24px 48px rgba(26,36,50,.14);

  /* Motion & Layout */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-bounce: cubic-bezier(.68,-.55,.27,1.55);
  --dur-fast: .15s;
  --dur: .25s;
  --dur-slow: .4s;
  --font-sans: Vazirmatn, "Segoe UI", Tahoma, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --topbar-h: 62px;
  --sidebar-w: 240px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

[data-theme="dark"] {
  --bg: #0B121B;
  --surface: #121A25;
  --surface-2: #18222F;
  --surface-3: #0F1822;
  --text: #E8EDF2;
  --text-2: #C0C9D4;
  --muted: #8A96A6;
  --muted-2: #5C6874;
  --border: #2A3644;
  --border-2: #3F4C5C;
  --border-soft: #1E2A37;
  --primary: #6B92C4;
  --primary-700: #8AAEDB;
  --primary-600: #7BA1CE;
  --primary-400: #96B5D6;
  --primary-300: #B0C8E0;
  --primary-100: #1A2538;
  --primary-50: #141E2F;
  --primary-glow: rgba(107, 146, 196, .3);
  --success: #4ECB93; --success-bg: #1A3228; --success-deep: #6ED9A6;
  --warning: #F0A742; --warning-bg: #3A2817;
  --danger: #E07B6B; --danger-bg: #3A1814;
  --info: #6B92C4; --info-bg: #14202E;
  --gold: #E5C36B; --gold-bg: #322A14;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.45);
  --shadow: 0 2px 4px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.5);
  --shadow-md: 0 4px 8px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.55);
  --shadow-lg: 0 8px 16px rgba(0,0,0,.5), 0 24px 48px rgba(0,0,0,.65);
}

[data-theme="dark"] {
  /* ===== Background — مشکی سرمه‌ای ===== */
  --bg: #0B121B;
  --surface: #121A25;
  --surface-2: #18222F;
  --surface-3: #0F1822;

  /* ===== Text ===== */
  --text: #E8EDF2;
  --text-2: #C0C9D4;
  --muted: #8A96A6;
  --muted-2: #5C6874;

  /* ===== Border ===== */
  --border: #2A3644;
  --border-2: #3F4C5C;
  --border-soft: #1E2A37;

  /* ===== Primary — سرمه‌ای روشن (کنتراست بالا) ===== */
  --primary: #6B92C4;
  --primary-700: #8AAEDB;
  --primary-600: #7BA1CE;
  --primary-400: #96B5D6;
  --primary-300: #B0C8E0;
  --primary-100: #1A2538;
  --primary-50: #141E2F;
  --primary-glow: rgba(107, 146, 196, .3);

  /* ===== Status ===== */
  --success: #4ECB93;
  --success-bg: #1A3228;
  --success-deep: #6ED9A6;
  --warning: #F0A742;
  --warning-bg: #3A2817;
  --danger: #E07B6B;
  --danger-bg: #3A1814;
  --info: #6B92C4;
  --info-bg: #14202E;
  --gold: #E5C36B;
  --gold-bg: #322A14;

  /* ===== Shadows ===== */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.4);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.45);
  --shadow: 0 2px 4px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.5);
  --shadow-md: 0 4px 8px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.55);
  --shadow-lg: 0 8px 16px rgba(0,0,0,.5), 0 24px 48px rgba(0,0,0,.65);
}
/* ===== ۳. پایه ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background .3s var(--ease), color .3s var(--ease);
}
body { overflow-x: hidden; }
a { color: var(--primary); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--primary-700); }
code {
  background: var(--primary-50); color: var(--primary-700);
  padding: 2px 7px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 12px;
  direction: ltr; display: inline-block;
  border: 1px solid var(--primary-100);
}
::selection { background: var(--primary-300); color: var(--text); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* ===== ۴. انیمیشن‌ها ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes scaleIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px) scale(.95); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes toastOut { from { opacity: 1; transform: translate(-50%, 0) scale(1); } to { opacity: 0; transform: translate(-50%, 20px) scale(.95); } }

/* ===== ۵. Topbar ===== */
.topbar {
  background: linear-gradient(135deg, var(--primary-700), var(--primary) 55%, var(--primary-600));
  color: #fff; padding: 12px 20px;
  padding-top: calc(12px + var(--safe-top));
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 6px 24px rgba(31,27,26,.18);
  position: sticky; top: 0; z-index: 100;
  min-height: var(--topbar-h); overflow: hidden;
}
.topbar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,.08), transparent 40%),
              radial-gradient(circle at 80% 30%, rgba(255,255,255,.05), transparent 40%);
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; position: relative; z-index: 1; }
.topbar .brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0;
}
.topbar .user { display: flex; align-items: center; gap: 10px; font-size: 12px; position: relative; z-index: 1; }
.topbar .user .uname { opacity: .92; display: none; }
.topbar .user .role {
  font-size: 11px; padding: 5px 12px; border-radius: 99px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22);
  font-family: var(--font-mono); font-weight: 600; white-space: nowrap;
}
.topbar .btn-ghost {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  color: #fff; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background var(--dur-fast) var(--ease);
  min-height: 40px; min-width: 40px;
}
.topbar .btn-ghost:hover { background: rgba(255,255,255,.24); }
.topbar .btn-ghost .logout-text { display: none; }

.theme-switch {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  color: #fff; cursor: pointer; padding: 0;
  display: grid; place-items: center; position: relative;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  flex-shrink: 0;
}
.theme-switch:hover { background: rgba(255,255,255,.24); transform: scale(1.05); }
.theme-switch .sw-icon {
  grid-column: 1 / 1; grid-row: 1 / 1;
  width: 20px; height: 20px; fill: #fff;
  transition: transform .5s var(--ease);
}
.theme-switch .sw-moon { transition-delay: 200ms; }
.theme-switch .sw-sun { transform: scale(0) rotate(0deg); }
[data-theme="dark"] .theme-switch .sw-moon { transform: rotate(360deg) scale(0); }
[data-theme="dark"] .theme-switch .sw-sun { transition-delay: 200ms; transform: scale(1) rotate(360deg); }

.hamburger {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; background: transparent; border: 0; cursor: pointer; padding: 8px;
  border-radius: 10px; min-width: 44px; min-height: 44px;
  position: relative; z-index: 1;
}
.hamburger:active { background: rgba(255,255,255,.14); }
.hamburger span { display: block; width: 22px; height: 2px; background: #fff; border-radius: 2px; }

/* ===== ۶. Layout و Sidebar ===== */
.layout { display: block; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  position: fixed; top: var(--topbar-h); right: -100%;
  width: min(var(--sidebar-w), 85vw);
  height: calc(100vh - var(--topbar-h));
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-left: 1px solid var(--border-soft);
  padding: 20px 12px calc(20px + var(--safe-bottom));
  overflow-y: auto; overflow-x: hidden;
  transition: right var(--dur-slow) var(--ease-out);
  z-index: 95; box-shadow: -12px 0 40px rgba(31,27,26,.18);
}
.sidebar.open { right: 0; }
.sidebar .menu-title {
  font-size: 10.5px; color: var(--muted); text-transform: uppercase;
  padding: 10px 14px 8px; letter-spacing: 1.2px; font-weight: 700; opacity: .7;
}
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px;
  border-radius: 12px; color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: all var(--dur-fast) var(--ease); position: relative;
  min-height: 48px; cursor: pointer;
}
.menu-item::before {
  content: ''; position: absolute; right: 0; top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px; height: 55%; background: var(--primary); border-radius: 3px;
  transition: transform var(--dur) var(--ease);
}
.menu-item:hover { background: var(--primary-50); color: var(--primary-700); }
.menu-item:hover::before { transform: translateY(-50%) scaleY(1); }
.menu-item.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.2);
}
.menu-item.active::before { display: none; }
.menu-item .ico { width: 22px; text-align: center; font-size: 17px; flex-shrink: 0; filter: grayscale(.15); }
.menu-item.active .ico { filter: none; }
.menu-item .lbl { flex: 1; }
.menu-badge {
  background: #fff; color: var(--danger); font-size: 10.5px; font-weight: 800;
  padding: 3px 8px; border-radius: 99px; min-width: 22px; text-align: center;
}
.menu-item.active .menu-badge { background: rgba(255,255,255,.28); color: #fff; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(31,27,26,.5); backdrop-filter: blur(4px);
  z-index: 90; animation: fadeIn var(--dur) var(--ease);
}
.sidebar-overlay.show { display: block; }

/* ===== ۷. Main ===== */
.main { padding: 16px 14px calc(28px + var(--safe-bottom)); animation: fadeInUp var(--dur) var(--ease); }
.main-blank { padding: 0; }
.page-title {
  margin: 0 0 18px; font-size: 20px; color: var(--primary-700);
  font-weight: 800; position: relative; padding-bottom: 10px;
}
.page-title::after {
  content: ''; position: absolute; bottom: 0; right: 0;
  width: 48px; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-400));
  border-radius: 3px;
}

.breadcrumb {
  display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  margin-bottom: 14px; padding: 8px 12px; background: var(--surface);
  border-radius: 10px; border: 1px solid var(--border-soft);
  flex-wrap: wrap; overflow-x: auto;
}
.breadcrumb a { color: var(--primary); font-weight: 600; padding: 2px 4px; border-radius: 4px; }
.breadcrumb .bc-sep { color: var(--muted-2); }
.breadcrumb .bc-current { color: var(--text); font-weight: 700; }

/* ===== ۸. Cards ===== */
.card {
  background: var(--surface); border-radius: 14px; padding: 18px;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
  border: 1px solid var(--border-soft); animation: fadeInUp var(--dur) var(--ease);
}
.card h2, .card h3 { margin: 0 0 14px; color: var(--primary-700); font-size: 16px; font-weight: 800; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-tile {
  background: var(--surface); border-radius: 12px; padding: 14px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border-soft);
  border-right: 4px solid var(--primary);
  transition: transform var(--dur-fast) var(--ease);
}
.stat-tile:active { transform: scale(.98); }
.stat-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.15; }
.stat-meta { margin-top: 8px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.stat-meta a { color: var(--primary); font-weight: 600; }
.stat-tile-info { border-right-color: var(--info); }
.stat-tile-gold { border-right-color: var(--gold); }
.stat-tile-danger { border-right-color: var(--danger); }
.stat-tile-success { border-right-color: var(--success); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-left: 4px; }
.dot-green { background: var(--success); }
.dot-orange { background: var(--warning); }

/* ===== ۹. Alerts ===== */
.alert {
  padding: 13px 16px; border-radius: 12px; margin-bottom: 12px;
  font-size: 13px; font-weight: 500; border-right: 4px solid;
  background: var(--surface); box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 10px; animation: slideInRight var(--dur) var(--ease);
}
.alert-error, .alert-danger { background: linear-gradient(135deg, var(--danger-bg), var(--surface)); color: var(--danger); border-color: var(--danger); }
.alert-warning { background: linear-gradient(135deg, var(--warning-bg), var(--surface)); color: var(--warning); border-color: var(--warning); }
.alert-success { background: linear-gradient(135deg, var(--success-bg), var(--surface)); color: var(--success-deep); border-color: var(--success); }
.alert-info { background: linear-gradient(135deg, var(--info-bg), var(--surface)); color: var(--info); border-color: var(--info); }

/* ===== ۱۰. Quick Actions ===== */
.quick-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
.qa-item {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  border-radius: 12px; color: var(--text); transition: all var(--dur-fast) var(--ease);
}
.qa-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-300); }
.qa-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: var(--primary-50); color: var(--primary-700);
}
.qa-danger .qa-icon { background: var(--danger-bg); color: var(--danger); }
.qa-warning .qa-icon { background: var(--warning-bg); color: var(--warning); }
.qa-gold .qa-icon { background: var(--gold-bg); color: var(--gold); }
.qa-info .qa-icon { background: var(--info-bg); color: var(--info); }
.qa-body { flex: 1; min-width: 0; }
.qa-title { font-weight: 700; font-size: 13.5px; }
.qa-count { font-size: 11.5px; color: var(--muted); }

/* ===== ۱۱. Charts ===== */
.chart-bars {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 6px; height: 170px; padding: 24px 4px 0;
  border-bottom: 2px solid var(--border-soft); margin-bottom: 10px;
}
.chart-bar-wrap { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 40px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%; max-width: 44px;
  background: linear-gradient(180deg, var(--primary-400), var(--primary));
  border-radius: 6px 6px 0 0; position: relative; min-height: 6px;
  animation: barGrow var(--dur-slow) var(--ease) backwards;
  transform-origin: bottom;
}
.chart-value { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--primary-700); font-weight: 800; white-space: nowrap; }
.chart-label { margin-top: 8px; font-size: 10px; color: var(--muted); direction: ltr; font-weight: 600; white-space: nowrap; }

/* ===== ۱۲. Quick Grid ===== */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px;
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border-soft); border-radius: 12px;
  color: var(--text-2); font-size: 11.5px; font-weight: 600;
  text-align: center; min-height: 88px; justify-content: center;
  transition: all var(--dur-fast) var(--ease);
}
.quick-tile:active { transform: scale(.96); border-color: var(--primary-300); background: var(--primary-50); }
.quick-icon { font-size: 24px; line-height: 1; }

/* ===== ۱۳. Tables ===== */
.table-wrap {
  background: var(--surface); border-radius: 12px;
  box-shadow: var(--shadow-sm); margin-bottom: 16px;
  border: 1px solid var(--border-soft);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td {
  padding: 11px 12px; text-align: right;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px; white-space: nowrap;
}
th {
  background: linear-gradient(180deg, var(--primary-50), var(--primary-100));
  color: var(--primary-700); font-weight: 800; font-size: 11.5px;
  position: sticky; top: 0; z-index: 1;
}
tbody tr { transition: background var(--dur-fast) var(--ease); }
tbody tr:active td { background: var(--primary-50); }
tr:last-child td { border-bottom: 0; }

/* ===== ۱۴. Forms ===== */
.form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 11px;
  font: inherit; font-size: 16px; background: var(--surface); color: var(--text);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  width: 100%; min-height: 48px;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A6F6B' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left 14px center;
  padding-left: 40px;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-actions .btn { flex: 1 1 auto; }

.form-inline { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.form-inline input, .form-inline select {
  padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 11px;
  font: inherit; font-size: 16px; background: var(--surface);
  min-height: 48px; flex: 1 1 100%;
}
.form-inline .btn { flex: 1 1 auto; min-height: 48px; }

/* ===== ۱۵. Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 7px; padding: 12px 20px; border: 0; border-radius: 11px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: all var(--dur-fast) var(--ease); line-height: 1;
  min-height: 46px; position: relative; overflow: hidden;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff; box-shadow: 0 2px 8px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.2);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); box-shadow: 0 6px 20px var(--primary-glow); }
.btn-danger {
  background: linear-gradient(135deg, var(--danger), #961F1B); color: #fff;
  box-shadow: 0 2px 8px rgba(194,52,47,.3);
}
.btn-danger:hover { background: linear-gradient(135deg, #DA5C56, var(--danger)); }
.btn-outline { background: var(--surface); color: var(--primary-700); border: 1.5px solid var(--primary-300); }
.btn-outline:active { background: var(--primary-50); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:active { background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 9px 14px; font-size: 12.5px; border-radius: 9px; min-height: 40px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }

/* ===== ۱۶. Badges ===== */
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.badge-active { background: var(--success-bg); color: var(--success-deep); }
.badge-inactive { background: var(--surface-3); color: var(--muted); }
.badge-suspended { background: var(--warning-bg); color: var(--warning); }
.badge-deleted { background: var(--danger-bg); color: var(--danger); }
.badge-pending { background: var(--info-bg); color: var(--info); }
.badge-approved { background: var(--success-bg); color: var(--success-deep); }
.badge-rejected { background: var(--danger-bg); color: var(--danger); }
.badge-cancelled { background: var(--surface-3); color: var(--muted); }
.badge-super_admin { background: #EDD8F5; color: #5B3494; }
.badge-sub_admin { background: #D5E8F7; color: #245A85; }
.badge-admin { background: #EDD8F5; color: #5B3494; }
.badge-clinic { background: #F7E2D5; color: #854B24; }
.badge-member { background: #D5F1F3; color: #1F6E70; }
.badge-system { background: var(--surface-3); color: var(--text-2); }

/* ===== ۱۷. Toast ===== */
.toast {
  position: fixed; bottom: calc(20px + var(--safe-bottom)); left: 50%;
  transform: translateX(-50%); min-width: 280px; max-width: calc(100vw - 32px);
  padding: 14px 20px; border-radius: 14px; font-size: 13.5px; font-weight: 600;
  text-align: center; box-shadow: var(--shadow-lg); z-index: 9999;
  animation: toastIn .3s var(--ease-bounce);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff;
}
.toast.toast-hide { animation: toastOut .3s var(--ease) forwards; }
.toast-success { background: linear-gradient(135deg, var(--success), var(--success-deep)); }
.toast-error { background: linear-gradient(135deg, var(--danger), #961F1B); }
.toast-info { background: linear-gradient(135deg, var(--info), #2349B5); }
.toast-warning { background: linear-gradient(135deg, var(--warning), #8A3F07); }

/* ===== ۱۸. Empty State ===== */
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state.small { padding: 24px 16px; font-size: 13px; }
.empty-icon { font-size: 44px; margin-bottom: 12px; opacity: .55; display: inline-block; }

/* ===== ۱۹. Pagination ===== */
.pagination { display: flex; gap: 5px; justify-content: center; padding: 14px 0 6px; flex-wrap: wrap; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--surface); color: var(--text-2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
}
.page-link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  color: #fff; border-color: var(--primary); font-weight: 800;
}
.page-link.disabled { opacity: .4; cursor: not-allowed; }
.page-info { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 14px; }

/* ===== ۲۰. Tree (شبکه) ===== */
.nt-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.nt-stat {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border-soft); box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.nt-stat::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 60%, rgba(194,52,47,.03) 100%); pointer-events: none; }
.nt-stat-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; background: var(--primary-50);
}
.nt-stat-primary .nt-stat-icon { background: var(--primary-100); }
.nt-stat-success .nt-stat-icon { background: var(--success-bg); }
.nt-stat-muted .nt-stat-icon { background: var(--surface-2); }
.nt-stat-gold .nt-stat-icon { background: var(--gold-bg); }
.nt-stat-value { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.nt-stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.nt-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.nt-modes { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 4px; flex: 1 1 100%; }
.nt-mode-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: var(--muted); transition: all var(--dur-fast) var(--ease); white-space: nowrap;
}
.nt-mode-btn:hover { background: var(--primary-50); color: var(--primary-700); }
.nt-mode-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: 0 3px 10px var(--primary-glow); }

.nt-tools { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.nt-tool-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--border-soft);
  cursor: pointer; transition: all var(--dur-fast) var(--ease); font-family: inherit;
  min-height: 40px; white-space: nowrap;
}
.nt-tool-btn:hover { background: var(--surface-2); border-color: var(--border-2); color: var(--text); }
.nt-tool-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px var(--primary-glow); }
.nt-tool-primary:hover { background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); color: #fff; }

.nt-search {
  position: relative; display: flex; align-items: center;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 14px; margin-bottom: 12px;
  transition: all var(--dur-fast) var(--ease); overflow: hidden;
}
.nt-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.nt-search-icon { padding: 0 14px; font-size: 16px; opacity: .55; flex-shrink: 0; }
.nt-search input {
  flex: 1; border: 0; background: transparent; padding: 14px 0;
  font-family: inherit; font-size: 16px; color: var(--text);
  outline: none; min-height: 50px; min-width: 0;
}
.nt-search input::placeholder { color: var(--muted-2); }
.nt-search input::-webkit-search-cancel-button { display: none; }
.nt-search-clear {
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; margin: 4px; background: transparent;
  border: 0; border-radius: 8px; cursor: pointer; color: var(--muted);
  transition: all var(--dur-fast) var(--ease); flex-shrink: 0;
}
.nt-search-clear:hover { background: var(--danger-bg); color: var(--danger); }

.nt-legend {
  display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted);
  margin-bottom: 14px; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border-soft); border-radius: 10px;
}
.nt-leg-item { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.nt-leg-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.nt-leg-root { background: var(--gold); }
.nt-leg-leader { background: var(--primary); }
.nt-leg-filled { background: var(--success); }
.nt-leg-empty { background: var(--border-2); border: 1px dashed var(--muted-2); }

.nt-container {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-soft); border-radius: 16px;
  padding: 16px 8px; box-shadow: var(--shadow-sm);
  overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch;
}
.nt-tree { list-style: none; margin: 0; padding: 0; min-width: fit-content; }
.nt-tree > .nt-li { padding-right: 0; }
.nt-li { padding: 0; margin: 0; }
.nt-branch { margin: 4px 0; }
.nt-branch > summary { list-style: none; cursor: pointer; display: block; }
.nt-branch > summary::-webkit-details-marker { display: none; }
.nt-children { list-style: none; margin: 0; padding: 0; padding-right: 28px; position: relative; }
.nt-children::before {
  content: ''; position: absolute; right: 14px; top: 0; bottom: 20px; width: 2px;
  background: linear-gradient(180deg, var(--primary-300), var(--border-soft)); border-radius: 2px;
}
.nt-children > .nt-li { position: relative; padding-right: 14px; padding-top: 6px; }
.nt-children > .nt-li::before {
  content: ''; position: absolute; right: 0; top: 0;
  width: 14px; height: 28px;
  border-right: 2px solid var(--primary-300); border-bottom: 2px solid var(--primary-300);
  border-bottom-right-radius: 8px;
}

.nt-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: 12px; min-height: 56px;
  box-shadow: 0 1px 3px rgba(31,27,26,.04);
  transition: all var(--dur-fast) var(--ease);
  position: relative; max-width: 100%; flex-wrap: nowrap;
}
.nt-summary:hover .nt-card, .nt-branch-leaf .nt-card:hover {
  border-color: var(--primary-300); box-shadow: 0 3px 12px var(--primary-glow); transform: translateX(-2px);
}
.nt-chev {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--primary-50); color: var(--primary-700);
  flex-shrink: 0; transition: all var(--dur-fast) var(--ease);
}
.nt-chev svg { transition: transform .25s var(--ease); }
details[open] > .nt-summary .nt-chev { background: var(--primary); color: #fff; }
details[open] > .nt-summary .nt-chev svg { transform: rotate(90deg); }
.nt-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; margin: 0 7px; }

.nt-code {
  font-family: var(--font-mono); font-weight: 800; font-size: 12px;
  color: var(--primary-700);
  background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
  padding: 4px 10px; border-radius: 7px; border: 1px solid var(--primary-100);
  direction: ltr; flex-shrink: 0; letter-spacing: -.3px; white-space: nowrap;
}
.nt-role { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.nt-role-icon { font-size: 13px; }
.nt-member { flex: 1; display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.nt-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-400), var(--primary));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; flex-shrink: 0;
  box-shadow: 0 2px 6px var(--primary-glow);
}
.nt-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nt-name { font-weight: 700; font-size: 12.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.nt-mcode { font-family: var(--font-mono); font-size: 10px; color: var(--muted); line-height: 1.2; }
.nt-empty-label { color: var(--muted-2); font-size: 12px; font-style: italic; font-weight: 500; }
.nt-info-simple { flex: 1; font-size: 12px; color: var(--muted); font-weight: 700; white-space: nowrap; }

.nt-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; margin-right: auto; }
.nt-action {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; text-decoration: none;
  transition: all var(--dur-fast) var(--ease); flex-shrink: 0;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border-soft);
}
.nt-action:hover { transform: scale(1.1); }
.nt-action-add { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-100); }
.nt-action-add:hover { background: var(--primary); color: #fff; border-color: var(--primary-700); }
.nt-action-view:hover { background: var(--info-bg); color: var(--info); border-color: var(--info); }

.nt-card.nt-root { background: linear-gradient(135deg, #FFFCF3, var(--gold-bg)); border-color: var(--gold); border-right-width: 5px; min-height: 64px; }
.nt-card.nt-root .nt-code { background: var(--gold); color: #fff; border-color: var(--gold); }
.nt-card.nt-root .nt-avatar { background: linear-gradient(135deg, var(--gold), #8A6A1A); }
.nt-card.nt-leader { border-right-width: 5px; border-right-color: var(--primary); }
.nt-card.nt-leader .nt-code { background: var(--primary); color: #fff; border-color: var(--primary-700); }
.nt-card.nt-leaf { border-right-width: 3px; border-right-color: var(--primary-300); }
.nt-card.nt-empty { opacity: .72; background: var(--surface-2); border-style: dashed; }
.nt-card.nt-empty .nt-code { background: var(--surface-3); color: var(--muted); border-color: var(--border); }
.nt-card.nt-empty:hover { opacity: 1; background: var(--primary-50); border-style: solid; border-color: var(--primary-300); }

.nt-branch.nt-search-hidden { display: none !important; }
.nt-branch.nt-search-match > .nt-summary .nt-card,
.nt-branch.nt-search-match.nt-branch-leaf .nt-card {
  border-color: var(--gold) !important;
  background: linear-gradient(135deg, #FFFCF3, var(--gold-bg)) !important;
  box-shadow: 0 0 0 3px rgba(181,141,44,.22), 0 4px 12px rgba(181,141,44,.15) !important;
}
.nt-no-results { text-align: center; padding: 50px 24px; color: var(--muted); background: var(--surface); border: 1px dashed var(--border-2); border-radius: 16px; margin-top: 16px; }
.nt-no-results-icon { font-size: 48px; margin-bottom: 12px; opacity: .6; }

/* ===== ۲۱. Team Panel ===== */
.team-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--primary-700), var(--primary));
  color: #fff; padding: 18px 20px; border-radius: 16px; margin-bottom: 14px;
  box-shadow: 0 8px 24px var(--primary-glow);
  position: relative; overflow: hidden;
}
.team-hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 60%); pointer-events: none; }
.team-hero-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(255,255,255,.2); border: 2px solid rgba(255,255,255,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; flex-shrink: 0;
}
.team-hero-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.team-hero-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; line-height: 1.3; }
.team-hero-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.team-hero-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.22);
  padding: 4px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
}
.team-hero-chip code { background: rgba(0,0,0,.15); color: #fff; border: 0; padding: 1px 6px; font-size: 11px; }

.team-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.team-stat {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  box-shadow: var(--shadow-sm);
}
.team-stat-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: var(--primary-50); }
.team-stat-success .team-stat-icon { background: var(--success-bg); }
.team-stat-warning .team-stat-icon { background: var(--warning-bg); }
.team-stat-muted .team-stat-icon { background: var(--surface-3); }
.team-stat-value { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1; }
.team-stat-label { font-size: 11px; color: var(--muted); font-weight: 600; }

.team-month-card { background: linear-gradient(135deg, var(--surface), var(--surface-2)); border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.team-month-head h3 { font-size: 14px; font-weight: 800; color: var(--primary-700); margin: 0 0 12px; }
.team-month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.team-month-item { text-align: center; padding: 10px 6px; background: var(--surface); border-radius: 10px; border: 1px solid var(--border-soft); }
.team-month-value { font-size: 16px; font-weight: 800; color: var(--text); line-height: 1.2; }
.team-month-label { font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.team-month-success .team-month-value { color: var(--success-deep); }
.team-month-gold .team-month-value { color: var(--gold); }

.team-actions-bar { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.team-action-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px; background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: 12px; color: var(--text-2); font-size: 13px; font-weight: 700;
  transition: all var(--dur-fast) var(--ease); min-height: 48px;
}
.team-action-btn:hover { border-color: var(--primary-300); background: var(--primary-50); color: var(--primary-700); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.team-action-btn.team-action-primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px var(--primary-glow); }
.team-action-btn.team-action-primary:hover { background: linear-gradient(135deg, var(--primary-600), var(--primary-700)); color: #fff; }
.team-action-icon { font-size: 18px; flex-shrink: 0; }

.team-tabs { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 12px; padding: 5px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.team-tab-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 12px; border: 0; background: transparent; border-radius: 9px;
  color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all var(--dur-fast) var(--ease); min-height: 44px;
}
.team-tab-btn:hover { background: var(--primary-50); color: var(--primary-700); }
.team-tab-btn.active { background: linear-gradient(135deg, var(--primary), var(--primary-600)); color: #fff; box-shadow: 0 3px 10px var(--primary-glow); }
.team-tab-count { background: rgba(255,255,255,.25); padding: 2px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.team-tab-btn:not(.active) .team-tab-count { background: var(--primary-100); color: var(--primary-700); }

.team-search-wrap { flex: 1 1 100%; position: relative; display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; overflow: hidden; }
.team-search-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.team-search-icon { padding: 0 12px; opacity: .55; font-size: 15px; flex-shrink: 0; }
.team-search-wrap input { flex: 1; border: 0; background: transparent; padding: 12px 4px; font-family: inherit; font-size: 16px; color: var(--text); outline: none; min-height: 46px; min-width: 0; }
.team-tool-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 10px 12px; border: 1px solid var(--border-soft); background: var(--surface);
  border-radius: 10px; font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--text-2); cursor: pointer; transition: all var(--dur-fast) var(--ease); min-height: 42px;
}
.team-tool-btn:hover { background: var(--surface-2); border-color: var(--border-2); }
.team-status-select { flex: 1 1 100%; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 14px; background: var(--surface); color: var(--text); min-height: 46px; cursor: pointer; }

.team-tree-wrap { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; padding: 14px 12px; box-shadow: var(--shadow-sm); overflow-x: auto; }
.team-node { margin: 4px 0; }
.team-node-branch > summary { list-style: none; cursor: pointer; display: block; }
.team-node-branch > summary::-webkit-details-marker { display: none; }
.team-node-children { padding-right: 22px; margin-right: 8px; margin-top: 4px; padding-bottom: 4px; border-right: 2px dashed var(--primary-300); }
.team-card {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: var(--surface); border: 1.5px solid var(--border-soft);
  border-radius: 12px; min-height: 52px; transition: all var(--dur-fast) var(--ease);
}
.team-card:hover { border-color: var(--primary-300); box-shadow: 0 3px 12px var(--primary-glow); transform: translateX(-2px); }
.team-node.is-me .team-card { border-color: var(--gold); background: linear-gradient(135deg, #FFFCF3, var(--gold-bg)); box-shadow: 0 0 0 3px rgba(181,141,44,.18); }
.team-node.is-empty .team-card { opacity: .72; background: var(--surface-2); border-style: dashed; }
.team-node.is-match .team-card { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(181,141,44,.22); }
.team-chev { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--primary-50); color: var(--primary-700); font-size: 11px; font-weight: 900; flex-shrink: 0; transition: transform var(--dur); }
details[open] > .team-node-summary > .team-card .team-chev { transform: rotate(90deg); background: var(--primary); color: #fff; }
.team-chev-dot { background: transparent; color: var(--muted-2); }
.team-code { font-family: var(--font-mono); font-weight: 800; font-size: 11.5px; color: var(--primary-700); background: linear-gradient(135deg, var(--primary-50), var(--primary-100)); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--primary-100); flex-shrink: 0; white-space: nowrap; }
.team-role-tag { font-size: 11px; color: var(--muted); font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.team-member-info { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-400), var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.team-member-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.team-member-name { font-size: 12.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.team-member-sub { font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.team-member-sub code { padding: 0 4px; font-size: 10px; }
.team-badge-me { display: inline-block; background: var(--gold); color: #fff; font-size: 9px; font-weight: 800; padding: 1px 6px; border-radius: 99px; margin-right: 4px; vertical-align: middle; }
.team-empty-label { flex: 1; color: var(--muted-2); font-size: 12px; font-style: italic; }
.team-status-tag { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }
.team-status-active { background: var(--success-bg); color: var(--success-deep); }
.team-status-suspended { background: var(--warning-bg); color: var(--warning); }
.team-status-inactive { background: var(--surface-3); color: var(--muted); }
.team-status-deleted { background: var(--danger-bg); color: var(--danger); }

.team-members-list { display: flex; flex-direction: column; gap: 10px; }
.team-member-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border-soft); border-right: 4px solid var(--primary-300); border-radius: 12px; box-shadow: var(--shadow-sm); transition: all var(--dur-fast) var(--ease); }
.team-member-card:hover { transform: translateX(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.team-member-card.is-me { border-right-color: var(--gold); background: linear-gradient(135deg, var(--surface), var(--gold-bg)); }
.team-member-card[data-status="SUSPENDED"] { border-right-color: var(--warning); }
.team-member-card[data-status="INACTIVE"] { border-right-color: var(--muted-2); opacity: .85; }
.team-member-card-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-400), var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800; flex-shrink: 0; }
.team-member-card-body { flex: 1; min-width: 0; }
.team-member-card-name { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 6px; line-height: 1.3; }
.team-member-card-meta { display: flex; flex-wrap: wrap; gap: 5px; }
.team-chip { display: inline-flex; align-items: center; gap: 3px; background: var(--surface-2); border: 1px solid var(--border-soft); padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; color: var(--text-2); }
.team-chip code { padding: 0 4px; font-size: 10px; background: var(--surface); }
.team-member-card-status { flex-shrink: 0; }
.team-member-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.team-member-action { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--muted); text-decoration: none; font-size: 15px; transition: all var(--dur-fast) var(--ease); }
.team-member-action:hover { background: var(--primary-50); color: var(--primary-700); border-color: var(--primary-300); transform: scale(1.08); }

.team-empty { text-align: center; padding: 50px 20px; background: var(--surface); border: 1px dashed var(--border-2); border-radius: 16px; }
.team-empty-icon { font-size: 48px; opacity: .6; margin-bottom: 12px; }
.team-no-results { text-align: center; padding: 40px 20px; background: var(--surface); border: 1px dashed var(--border-2); border-radius: 14px; margin-top: 12px; }
.team-no-results-icon { font-size: 42px; opacity: .6; margin-bottom: 10px; }
.team-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; margin-top: 14px; border-right: 4px solid; }
.team-alert-warning { background: linear-gradient(135deg, var(--surface), var(--warning-bg)); border-right-color: var(--warning); }
.team-alert-icon { font-size: 22px; flex-shrink: 0; }
.team-alert-title { font-size: 13.5px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.team-alert-msg { font-size: 12.5px; color: var(--text-2); line-height: 1.7; }

/* ===== ۲۲. Clinic Card ===== */
.clinic-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.clinic-card { background: var(--surface); border: 1px solid var(--border-soft); border-right: 4px solid var(--primary); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-sm); transition: all var(--dur-fast) var(--ease); }
.clinic-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary-300); }
.clinic-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.clinic-avatar { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, var(--primary-400), var(--primary)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; box-shadow: 0 4px 12px var(--primary-glow); }
.clinic-info { flex: 1; min-width: 0; }
.clinic-name { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.clinic-phone { font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.clinic-phone-icon { font-size: 14px; flex-shrink: 0; }
.clinic-phone a { color: var(--primary-700); font-weight: 700; font-family: var(--font-mono); }
.clinic-address { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; font-size: 13px; line-height: 1.8; color: var(--text-2); margin-bottom: 12px; }
.clinic-address-icon { font-size: 15px; flex-shrink: 0; margin-top: 2px; }
.clinic-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.clinic-actions .btn { flex: 1 1 auto; min-width: 110px; }

/* ===== ۲۳. Login ===== */
.login-theme-btn {
  position: fixed !important; top: 20px !important; left: 20px !important;
  z-index: 9999 !important;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(31,27,26,.15);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  overflow: hidden;
}
.login-theme-btn:hover { transform: scale(1.08) rotate(-8deg); border-color: var(--primary); box-shadow: 0 12px 32px var(--primary-glow); }
.login-theme-icon { grid-column: 1 / 1; grid-row: 1 / 1; width: 24px; height: 24px; fill: var(--primary); transition: transform .5s var(--ease); }
.login-theme-btn .icon-moon { transition-delay: 200ms; }
.login-theme-btn .icon-sun { transform: scale(0) rotate(0deg); }
[data-theme="dark"] .login-theme-btn .icon-moon { transform: rotate(360deg) scale(0); }
[data-theme="dark"] .login-theme-btn .icon-sun { transition-delay: 200ms; transform: scale(1) rotate(360deg); }
[data-theme="dark"] .login-theme-btn { background: #1E1A17; border-color: #3D332B; }
[data-theme="dark"] .login-theme-icon { fill: #E85A54; }

.login-card {
  position: fixed !important; top: 50% !important; left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: calc(100% - 40px); max-width: 420px;
  max-height: calc(100vh - 40px); overflow-y: auto;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(20px) saturate(1.1);
  border-radius: 24px; padding: 36px 28px 28px;
  box-shadow: 0 20px 60px rgba(31,27,26,.15), 0 8px 24px rgba(31,27,26,.08);
  border: 1px solid rgba(255,255,255,.8);
  z-index: 100; box-sizing: border-box;
  animation: scaleIn .4s var(--ease-bounce);
}
[data-theme="dark"] .login-card { background: rgba(30,26,23,.96); border-color: rgba(255,255,255,.08); }
.login-card-branch::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--primary-400), var(--primary-700)); }
.login-card-branch[data-branch="dental"]::before { background: linear-gradient(90deg, #6BA3E8, #4A90E2); }
.login-card-branch[data-branch="beauty"]::before { background: linear-gradient(90deg, #F39BC5, #E24A90); }

.login-logo { width: 76px; height: 76px; border-radius: 24px; background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary) 50%, var(--primary-700) 100%); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 18px; box-shadow: 0 12px 32px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.3); }
.login-card-branch[data-branch="dental"] .login-logo { background: linear-gradient(135deg, #6BA3E8 0%, #4A90E2 60%, #2563A8 100%); box-shadow: 0 12px 32px rgba(74,144,226,.32); }
.login-card-branch[data-branch="beauty"] .login-logo { background: linear-gradient(135deg, #F39BC5 0%, #E24A90 60%, #B02E6F 100%); box-shadow: 0 12px 32px rgba(226,74,144,.32); }
.login-title { text-align: center; color: var(--primary-700); font-size: 22px; margin: 0 0 6px; font-weight: 800; }
.login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 26px; font-weight: 500; }
.login-alert { background: linear-gradient(135deg, var(--danger-bg), var(--surface)); color: var(--danger); padding: 12px 16px; border-radius: 12px; border-right: 4px solid var(--danger); font-size: 13px; font-weight: 500; margin-bottom: 18px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-field { display: flex; flex-direction: column; gap: 8px; }
.login-field label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.login-field > input, .login-pw-wrap > input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--border-2); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 16px; font-weight: 500; transition: border-color .25s, box-shadow .25s, background .25s; -webkit-appearance: none; min-height: 50px; }
.login-pw-wrap > input { padding-left: 56px; }
.login-field > input:focus, .login-pw-wrap > input:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-glow); }
.login-pw-wrap { position: relative; display: block; width: 100%; }
.login-pw-toggle { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 10px; background: transparent; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 16px; padding: 0; transition: background .15s, color .15s; }
.login-pw-toggle:hover { background: var(--primary-50); color: var(--primary); }
.login-submit { width: 100%; padding: 15px 24px; margin-top: 6px; border: 0; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-700)); color: #fff; font-size: 15px; font-weight: 800; cursor: pointer; box-shadow: 0 4px 16px var(--primary-glow), inset 0 1px 0 rgba(255,255,255,.2); min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; transition: transform .25s, box-shadow .25s; }
.login-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px var(--primary-glow); }
.login-submit:active:not(:disabled) { transform: scale(.97); }
.login-submit:disabled, .login-submit.loading { opacity: .85; cursor: not-allowed; }
.login-submit .login-arrow { font-size: 16px; transition: transform .25s var(--ease); }
.login-submit:hover:not(:disabled) .login-arrow { transform: translateX(-6px); }
.login-back { margin-top: 22px; text-align: center; font-size: 12.5px; }
.login-back a { color: var(--muted); font-weight: 600; }
.login-back a:hover { color: var(--primary); }

/* ===== ۲۴. Utilities ===== */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 14px; }
.mt-2 { margin-top: 14px; }
.d-flex { display: flex; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; }
.flex-1 { flex: 1; }
.flex-between { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.field-ok { color: var(--success); font-size: 12px; font-weight: 600; display: block; margin-top: 5px; }
.field-error { color: var(--danger); font-size: 12px; font-weight: 600; display: block; margin-top: 5px; }

/* ===== ۲۵. Responsive ===== */
@media (min-width: 640px) {
  body { font-size: 14px; }
  .topbar { padding: 12px 24px; min-height: 66px; --topbar-h: 66px; }
  .topbar .brand { font-size: 17px; }
  .topbar .brand .logo { width: 40px; height: 40px; font-size: 20px; }
  .topbar .user .uname { display: inline; }
  .topbar .btn-ghost .logout-text { display: inline; }
  .theme-switch { width: 42px; height: 42px; }
  .main { padding: 22px 24px calc(30px + var(--safe-bottom)); }
  .page-title { font-size: 22px; }
  .card { padding: 22px; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
  .stat-value { font-size: 24px; }
  .quick-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
  .quick-tile { padding: 20px 12px; font-size: 13px; min-height: 100px; }
  .quick-icon { font-size: 28px; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr 1fr; gap: 14px; }
  .form-inline input, .form-inline select { flex: 0 1 auto; font-size: 13.5px; padding: 10px 14px; }
  .chart-bars { height: 200px; }
  th, td { padding: 12px 14px; font-size: 13px; }
  .nt-stats { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .nt-toolbar { flex-wrap: nowrap; gap: 12px; }
  .nt-modes { flex: 0 0 auto; }
  .nt-tools { flex: 1; justify-content: flex-end; }
  .nt-tool-btn { flex: 0 0 auto; }
  .nt-container { padding: 24px 16px; }
  .nt-card { min-height: 60px; padding: 12px 14px; gap: 10px; }
  .nt-children { padding-right: 36px; }
  .nt-children::before { right: 18px; }
  .nt-children > .nt-li { padding-right: 18px; }
  .nt-children > .nt-li::before { width: 18px; height: 32px; }
  .team-stats { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .team-stat { padding: 16px 18px; }
  .team-stat-icon { width: 46px; height: 46px; font-size: 22px; }
  .team-stat-value { font-size: 22px; }
  .team-toolbar { flex-wrap: nowrap; gap: 12px; }
  .team-modes { flex: 0 0 auto; }
  .team-tools { flex: 1; justify-content: flex-end; }
  .team-tool-btn { flex: 0 0 auto; }
  .team-tree-wrap { padding: 24px 16px; }
  .team-card { min-height: 60px; padding: 12px 14px; gap: 10px; }
  .team-children { padding-right: 36px; }
  .clinic-card { padding: 18px 20px; }
  .clinic-actions .btn { flex: 0 0 auto; }
}

@media (min-width: 1024px) {
  .layout { display: flex; min-height: calc(100vh - var(--topbar-h)); }
  .sidebar {
    position: sticky; top: var(--topbar-h); right: auto;
    width: 240px; height: calc(100vh - var(--topbar-h));
    padding: 20px 12px; transform: none; box-shadow: none;
    border-left: 1px solid var(--border-soft); transition: none;
  }
  .sidebar.open { right: auto; }
  .hamburger { display: none; }
  .sidebar-overlay { display: none !important; }
  .main { flex: 1; padding: 28px 32px calc(34px + var(--safe-bottom)); }
  .page-title { font-size: 24px; }
  .card { padding: 24px; }
  .chart-bars { height: 220px; }
  .form { max-width: 680px; }
  table { min-width: 0; }
  .quick-actions { grid-template-columns: repeat(5, 1fr); }
  .qa-item { flex-direction: column; text-align: center; padding: 20px 12px; }
  .qa-icon { width: 52px; height: 52px; font-size: 24px; }
}

@media (max-width: 640px) {
  .login-theme-btn { top: 14px; left: 14px; width: 44px; height: 44px; }
  .login-theme-icon { width: 20px; height: 20px; }
  .login-card { padding: 30px 22px 24px; border-radius: 22px; width: calc(100% - 32px); }
  .login-logo { width: 68px; height: 68px; font-size: 30px; }
  .login-title { font-size: 20px; }

  .team-hero { padding: 16px; border-radius: 14px; }
  .team-hero-avatar { width: 50px; height: 50px; font-size: 24px; }
  .team-hero-title { font-size: 16px; }
  .team-hero-chip { font-size: 10.5px; padding: 3px 8px; }
  .team-stats { grid-template-columns: repeat(2, 1fr); }
  .team-stat { padding: 10px 8px; }
  .team-stat-icon { width: 34px; height: 34px; font-size: 16px; }
  .team-stat-value { font-size: 18px; }
  .team-month-grid { grid-template-columns: repeat(2, 1fr); }
  .team-month-value { font-size: 14px; }
  .team-actions-bar { grid-template-columns: 1fr 1fr; gap: 6px; }
  .team-action-btn { padding: 10px 8px; font-size: 12px; min-height: 46px; }
  .team-tab-btn { font-size: 12px; padding: 10px 8px; }
  .team-tree-wrap { padding: 10px 6px; margin: 0 -10px; border-radius: 0; border-left: 0; border-right: 0; }
  .team-card { padding: 8px 10px; gap: 6px; min-height: 46px; }
  .team-code { font-size: 10.5px; padding: 2px 6px; }
  .team-role-tag { font-size: 10px; }
  .team-avatar { width: 24px; height: 24px; font-size: 11px; }
  .team-member-name { font-size: 11.5px; }
  .team-member-card { padding: 12px; gap: 10px; }
  .team-member-card-avatar { width: 38px; height: 38px; font-size: 15px; }
  .team-member-card-name { font-size: 13px; }
  .team-member-card-actions { flex-direction: column; gap: 3px; }
  .team-member-action { width: 32px; height: 32px; font-size: 13px; }

  .nt-container { padding: 12px 4px; border-radius: 12px; }
  .nt-card { flex-wrap: nowrap; gap: 6px; padding: 8px 10px; min-height: 52px; font-size: 11px; }
  .nt-code { padding: 3px 8px; font-size: 11px; }
  .nt-role-label { display: none; }
  .nt-role-icon { font-size: 14px; }
  .nt-name { font-size: 12px; }
  .nt-children { padding-right: 18px; }
  .nt-children::before { right: 8px; }
  .nt-children > .nt-li { padding-right: 10px; }
  .nt-children > .nt-li::before { width: 10px; height: 24px; border-radius: 6px; }
  .nt-action { width: 28px; height: 28px; font-size: 12px; }

  .clinic-card { padding: 14px; border-radius: 12px; }
  .clinic-avatar { width: 42px; height: 42px; font-size: 20px; }
  .clinic-name { font-size: 14px; }
  .clinic-phone { font-size: 12.5px; }
  .clinic-address { font-size: 12.5px; padding: 9px 10px; }
  .clinic-actions .btn { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .team-stats { grid-template-columns: 1fr; }
  .team-actions-bar { grid-template-columns: 1fr; }
  .team-role-tag { display: none; }
  .page-title { font-size: 16px; }
  .card { padding: 12px; }
  .team-card { font-size: 10px; padding: 7px 8px; }
  .team-avatar { width: 22px; height: 22px; font-size: 10px; }
}

@media (hover: none) and (pointer: coarse) {
  .card:hover, .stat-tile:hover, .qa-item:hover, .quick-tile:hover, .btn:hover,
  .team-card:hover, .team-member-card:hover, .clinic-card:hover {
    transform: none;
  }
  .btn:active { transform: scale(.96); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

@media print {
  .topbar, .sidebar, .breadcrumb, .btn, .pagination, .sidebar-overlay, .hamburger { display: none !important; }
  .card, .table-wrap { box-shadow: none; border: 1px solid #ccc; }
  .main { padding: 0; }
  .layout { display: block; }
  body { background: #fff; }
}
/* =========================================================================
   🍒 تم چری — برای beauty.shabakeforoosh.ir
   این بلاک فقط وقتی فعال می‌شود که <body class="branch-beauty"> باشد
   ========================================================================= */

body.branch-beauty {
  --primary: #8B1A2B;
  --primary-700: #5C0F1C;
  --primary-600: #731626;
  --primary-400: #A83A4B;
  --primary-300: #C97A85;
  --primary-100: #EBD8DA;
  --primary-50: #F7EFEF;
  --primary-glow: rgba(139, 26, 43, .28);

  --bg: #FAF7F4;
  --surface: #FFFFFF;
  --surface-2: #FBF8F5;
  --surface-3: #F2ECE7;

  --text: #1F1417;
  --text-2: #3D2A30;
  --muted: #7C676C;
  --muted-2: #A8969A;

  --border: #EBE0DE;
  --border-2: #D6C5C3;
  --border-soft: #F3EAE8;

  --danger: #8B1A2B;
  --danger-bg: #F2D9DC;
  --info: #8B1A2B;
  --info-bg: #F7EFEF;
}

body.branch-beauty[data-theme="dark"] {
  --bg: #120C0E;
  --surface: #1C1215;
  --surface-2: #241720;
  --surface-3: #160F12;
  --text: #F2E8EA;
  --text-2: #D0BEC2;
  --muted: #95828A;
  --muted-2: #6E5D63;
  --border: #3A252B;
  --border-2: #523640;
  --border-soft: #291A20;
  --primary: #C74960;
  --primary-700: #E87A8E;
  --primary-600: #D65874;
  --primary-400: #DD7688;
  --primary-300: #E89AA8;
  --primary-100: #3A1A22;
  --primary-50: #2A1219;
  --primary-glow: rgba(199, 73, 96, .3);
  --danger: #E85A54;
  --danger-bg: #3A1A18;
}