@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/misc/Farsi-Digits/font-face.css');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-main: 'Vazirmatn FD', 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body, button, input, select, textarea {
  font-family: var(--font-main) !important;
  font-feature-settings: "ss01" on, "ss02" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* ========================================================= */
/* THEME OVERRIDES (Admin Light Mode & Client Dark Mode)     */
/* ========================================================= */

/* Admin Light Mode Overrides */
body.theme-light {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}
body.theme-light aside,
body.theme-light nav,
body.theme-light .bg-slate-900 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #0f172a !important;
}
body.theme-light .bg-slate-950,
body.theme-light .bg-slate-950\/60 {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}
body.theme-light .bg-slate-800,
body.theme-light .bg-slate-800\/40 {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}
body.theme-light .text-white {
  color: #0f172a !important;
}
body.theme-light .text-slate-300,
body.theme-light .text-slate-200 {
  color: #334155 !important;
}
body.theme-light .text-slate-400 {
  color: #475569 !important;
}
body.theme-light .border-slate-800,
body.theme-light .border-slate-800\/80,
body.theme-light .border-slate-700 {
  border-color: #cbd5e1 !important;
}
body.theme-light .divide-slate-800\/60 > * + * {
  border-color: #e2e8f0 !important;
}
body.theme-light input,
body.theme-light select,
body.theme-light textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

/* ========================================================= */
/* ADMIN TABLES & COLUMN HEADERS (LIGHT / DAY MODE FIX)      */
/* ========================================================= */
body.theme-light thead,
body.theme-light .admin-table-head,
body.theme-light thead.bg-slate-950\/60,
body.theme-light thead .bg-slate-950\/60,
body.theme-light table thead tr {
  background-color: #e2e8f0 !important; /* رنگ طوسی/نقره‌ای استاندارد اداری، متمایز و شیک */
  background-image: none !important;
  border-bottom: 2px solid #cbd5e1 !important;
  color: #0f172a !important;
}

body.theme-light thead th,
body.theme-light .admin-table-head th,
body.theme-light table th {
  color: #0f172a !important; /* کاملاً مشکی/سرمه‌ای با حداکثر کنتراست و خوانایی */
  font-weight: 800 !important;
  font-size: 12px !important;
  background-color: transparent !important;
}

body.theme-light thead th.text-amber-400,
body.theme-light .admin-table-head th.text-amber-400,
body.theme-light table th.text-amber-400 {
  color: #92400e !important; /* کهربایی پررنگ و رسمی برای ارزش کل (تومان) */
  font-weight: 900 !important;
}

body.theme-light table tbody tr {
  border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-light table tbody tr:hover,
body.theme-light tr.hover\:bg-slate-800\/40:hover {
  background-color: #f8fafc !important;
}

body.theme-light table td {
  color: #1e293b !important;
}

/* بهینه‌سازی رنگ‌های مالی و نشان‌ها در حالت روز پنل مدیریت */
body.theme-light .text-amber-400 {
  color: #b45309 !important; /* کهربایی تیره و خوانا */
}
body.theme-light .text-rose-400 {
  color: #dc2626 !important; /* قرمز پررنگ بدهکار */
}
body.theme-light .text-emerald-400 {
  color: #059669 !important; /* سبز پررنگ بستانکار */
}
body.theme-light .bg-rose-500\/20 {
  background-color: #fee2e2 !important;
  color: #dc2626 !important;
}
body.theme-light .bg-emerald-500\/20 {
  background-color: #d1fae5 !important;
  color: #059669 !important;
}
body.theme-light .bg-slate-500\/20 {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}
body.theme-light .bg-amber-500\/10 {
  background-color: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
}
body.theme-light .bg-amber-500\/10:hover {
  background-color: #fde68a !important;
  color: #78350f !important;
}

/* ADMIN TABLES & HEADERS (DARK / NIGHT MODE) */
body:not(.theme-light) thead,
body:not(.theme-light) .admin-table-head,
body:not(.theme-light) thead.bg-slate-950\/60 {
  background-color: rgba(2, 6, 23, 0.75) !important;
  border-bottom: 1px solid #1e293b !important;
}

body:not(.theme-light) thead th,
body:not(.theme-light) .admin-table-head th,
body:not(.theme-light) table th {
  color: #94a3b8 !important;
  font-weight: 700 !important;
}

body:not(.theme-light) thead th.text-amber-400,
body:not(.theme-light) .admin-table-head th.text-amber-400,
body:not(.theme-light) table th.text-amber-400 {
  color: #fbbf24 !important;
}

/* Client Dark Mode Overrides */
body.theme-dark {
  background-color: #090d16 !important;
  color: #f1f5f9 !important;
}
body.theme-dark #trading-screen {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #1e293b !important;
}
body.theme-dark .bg-white {
  background-color: #1e293b !important;
  color: #f1f5f9 !important;
}
body.theme-dark .bg-slate-50 {
  background-color: #0f172a !important;
  border-color: #334155 !important;
}
body.theme-dark .bg-slate-100 {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
}
body.theme-dark .text-slate-900,
body.theme-dark .text-slate-800,
body.theme-dark .text-slate-700 {
  color: #f8fafc !important;
}
body.theme-dark .text-slate-600,
body.theme-dark .text-slate-500 {
  color: #94a3b8 !important;
}
body.theme-dark .border-slate-200,
body.theme-dark .border-slate-200\/90,
body.theme-dark .border-slate-100 {
  border-color: #334155 !important;
}
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #334155 !important;
}
body.theme-dark #sidebar {
  background-color: #0f172a !important;
}
body.theme-dark #sidebar nav button {
  color: #e2e8f0 !important;
}
body.theme-dark #sidebar nav button:hover {
  background-color: #1e293b !important;
}

/* Admin Message & Special Cards in Dark Mode */
body.theme-dark #admin-message-box,
body.theme-dark .bg-sky-50 {
  background-color: #0c233c !important;
  border-color: #1e4976 !important;
}
body.theme-dark #admin-message-box .text-sky-900,
body.theme-dark .text-sky-900,
body.theme-dark .text-sky-800 {
  color: #38bdf8 !important;
}
body.theme-dark #admin-message-content {
  color: #e2e8f0 !important;
}

body.theme-dark .bg-amber-50 {
  background-color: #2e1d08 !important;
  border-color: #78350f !important;
}
body.theme-dark .bg-amber-50 * {
  color: #fde68a !important;
}

body.theme-dark .bg-rose-50 {
  background-color: #310c14 !important;
  border-color: #881337 !important;
  color: #fca5a5 !important;
}
body.theme-dark .bg-rose-100 {
  background-color: #4c1120 !important;
  color: #fda4af !important;
}
body.theme-dark #market-closed-modal .bg-white {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

/* ========================================================= */
/* LANDING PAGE (CLEAN, MINIMAL & PROFESSIONAL)              */
/* ========================================================= */
#landing-screen {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.06) !important;
}

#landing-screen header {
  border-color: #f1f5f9 !important;
}

#landing-screen h1,
#landing-screen h2,
#landing-screen h3 {
  color: #0f172a !important;
}

#landing-screen p {
  color: #475569 !important;
}

/* --- Modern Login Screen Theme Overrides --- */
body.theme-dark #login-screen {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #1e293b !important;
}

body.theme-dark #login-screen h1 {
  color: #ffffff !important;
}

body.theme-dark #login-screen p {
  color: #94a3b8 !important;
}

body.theme-dark #login-screen label {
  color: #cbd5e1 !important;
}

body.theme-dark #login-screen input {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #ffffff !important;
}

body.theme-dark #login-screen .bg-slate-50 {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

body.theme-dark #login-screen .bg-amber-50 {
  background-color: #2e1d08 !important;
  border-color: #78350f !important;
}

/* ========================================================= */
/* CALENDAR & LIVE CLOCK WIDGET (PROFESSIONAL DAY & NIGHT)  */
/* ========================================================= */
.calendar-widget {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* DAY MODE (حالت روز / LIGHT MODE) */
body.theme-light .calendar-widget,
html:not(.dark) body .calendar-widget,
body:not(.theme-dark) .calendar-widget {
  background: linear-gradient(135deg, #ffffff 0%, #fffdf8 45%, #fef8eb 100%) !important;
  border: 1px solid rgba(217, 119, 6, 0.3) !important;
  box-shadow: 0 4px 16px -2px rgba(217, 119, 6, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03) !important;
  color: #0f172a !important;
}

body.theme-light .calendar-widget #calendar-shamsi,
html:not(.dark) body .calendar-widget #calendar-shamsi,
body:not(.theme-dark) .calendar-widget #calendar-shamsi {
  color: #0f172a !important; /* کاملاً تیره، خوانا و واضح در نور روز */
  text-shadow: none !important;
}

body.theme-light .calendar-widget #calendar-gregorian,
html:not(.dark) body .calendar-widget #calendar-gregorian,
body:not(.theme-dark) .calendar-widget #calendar-gregorian {
  color: #475569 !important; /* خاکستری متالیک شیک و خوانا */
}

body.theme-light .calendar-widget #live-clock-time,
html:not(.dark) body .calendar-widget #live-clock-time,
body:not(.theme-dark) .calendar-widget #live-clock-time {
  color: #047857 !important; /* سبز زمردی پررنگ و کنتراست بالا */
}

body.theme-light .calendar-widget .clock-label,
html:not(.dark) body .calendar-widget .clock-label,
body:not(.theme-dark) .calendar-widget .clock-label {
  color: #64748b !important;
}

body.theme-light .calendar-widget .calendar-divider,
html:not(.dark) body .calendar-widget .calendar-divider,
body:not(.theme-dark) .calendar-widget .calendar-divider {
  border-color: rgba(217, 119, 6, 0.25) !important;
}

/* NIGHT MODE (حالت شب / DARK MODE) */
body.theme-dark .calendar-widget,
html.dark body .calendar-widget {
  background: linear-gradient(135deg, #090d16 0%, #0f172a 50%, #1e293b 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.6) !important;
  color: #f8fafc !important;
}

body.theme-dark .calendar-widget #calendar-shamsi,
html.dark body .calendar-widget #calendar-shamsi {
  color: #fcd34d !important; /* طلایی درخشان */
  text-shadow: 0 0 12px rgba(252, 211, 77, 0.25) !important;
}

body.theme-dark .calendar-widget #calendar-gregorian,
html.dark body .calendar-widget #calendar-gregorian {
  color: #94a3b8 !important; /* خاکستری ملایم */
}

body.theme-dark .calendar-widget #live-clock-time,
html.dark body .calendar-widget #live-clock-time {
  color: #34d399 !important; /* سبز زمردی نئونی */
}

body.theme-dark .calendar-widget .clock-label,
html.dark body .calendar-widget .clock-label {
  color: #94a3b8 !important;
}

body.theme-dark .calendar-widget .calendar-divider,
html.dark body .calendar-widget .calendar-divider {
  border-color: rgba(51, 65, 85, 0.8) !important;
}



