/* ==========================================================
   سامانه مدیریت مالی و حسابداری پروژه‌های ساختمانی «امیر سازه»
   طراحی و توسعه توسط: علیرضا رزقی
   استایل‌های لوکس، تایپوگرافی ویژه و منوی شیشه‌ای (Glassmorphism)
   ========================================================== */

/* تعریف فونت فارسی استاندارد وزیرمتن به‌صورت فایل محلی (بدون وابستگی به اینترنت و بدون فیلترینگ) */
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* اعمال قطعی و غیرقابل تغییر فونت وزیرمتن بر تمامی عناصر */
*, *::before, *::after,
html, body,
h1, h2, h3, h4, h5, h6,
p, span, a, label,
button, input, optgroup, select, textarea,
table, th, td, div, section, aside, header, footer,
.font-sans, .font-mono {
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

/* پشتیبانی از نمایش یکپارچه و بهینه اعداد مالی */
.font-mono, td, .financial-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

:root {
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --primary-500: #3B82F6;
  --primary-600: #2563EB;
  --primary-700: #1D4ED8;
  --primary-800: #1E40AF;
  --primary-900: #1E3A8A;
  --primary-950: #0B1329;
  
  --gold-300: #FCD34D;
  --gold-400: #FBBF24;
  --gold-500: #F59E0B;
  --gold-600: #D97706;
  --gold-gradient: linear-gradient(135deg, #F59E0B, #D97706);
}

/* پایه‌ای‌ترین قوانین چیدمان برای جلوگیری از به‌هم‌ریختگی در هر حالتی */
.hidden {
  display: none !important;
}

body {
  direction: rtl;
  text-align: right;
  background-color: #F8FAFC;
  color: #1E293B;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* افکت منوی شیشه‌ای و پنل‌های لوکس (Glassmorphism) */
.glass-sidebar {
  background: rgba(11, 19, 41, 0.88) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: -8px 0 32px 0 rgba(0, 0, 0, 0.3) !important;
}

.glass-header {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04) !important;
}

.glass-card {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.05), 0 0 1px 1px rgba(226, 232, 240, 0.6) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px -5px rgba(30, 58, 138, 0.1), 0 0 1px 1px rgba(59, 130, 246, 0.2) !important;
}

.glass-panel-dark {
  background: rgba(15, 23, 42, 0.88) !important;
  backdrop-filter: blur(25px) saturate(190%) !important;
  -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.glass-nav-active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(29, 78, 216, 0.9)) !important;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
}

/* افکت کارت‌های آماری و تعاملی */
.card-hover {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* Luxury Gold & Ambient Accents */
.gold-badge {
  background: linear-gradient(135deg, #FDE68A, #F59E0B);
  color: #78350F;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.25);
}

.gold-border {
  border-color: rgba(245, 158, 11, 0.4);
}

.glow-blue {
  box-shadow: 0 0 25px rgba(37, 99, 235, 0.25);
}

/* اسکرول بار مدرن و جذاب */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* استایل مودال‌ها */
.modal-backdrop {
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  background-color: rgba(11, 19, 41, 0.65) !important;
}

/* نوتیفیکیشن‌ها */
#toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* برچسب‌های وضعیت */
.badge-status-in-progress {
  background: rgba(219, 234, 254, 0.9);
  color: #1D4ED8;
  border: 1px solid rgba(191, 219, 254, 0.8);
}
.badge-status-completed {
  background: rgba(220, 252, 231, 0.9);
  color: #15803D;
  border: 1px solid rgba(187, 247, 208, 0.8);
}
.badge-status-stopped {
  background: rgba(254, 226, 226, 0.9);
  color: #B91C1C;
  border: 1px solid rgba(254, 202, 202, 0.8);
}

/* استایل پرینت و چاپ تمیز و خوانا */
@media print {
  body {
    background-color: #FFFFFF !important;
    color: #000000 !important;
  }
  aside, header, footer, #sidebar-toggle, .no-print, button, #toast-container, .modal-backdrop {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .glass-card, .bg-white {
    box-shadow: none !important;
    border: 1px solid #CBD5E1 !important;
    background: #FFFFFF !important;
  }
}
