/* ============================================================
   RESET CRM — UI THEME LAYER  (v201 "Aurora Lite" — performance safe)
   • Ոչ մի բարձր backdrop-filter կրկնվող տարրերի վրա
   • Ոչ մի background-attachment:fixed
   • Ոչ մի անվերջ անիմացիա
   ============================================================ */

:root{
  --rc-bg:#f6f7fb;
  --rc-ink:#0f172a;
  --rc-line:#e8ebf2;
  --rc-brand:#4f46e5;
  --rc-brand-2:#7c3aed;
  --rc-brand-3:#06b6d4;
  --rc-shadow-1:0 1px 2px rgba(15,23,42,.05), 0 2px 8px rgba(15,23,42,.05);
  --rc-shadow-2:0 10px 24px -14px rgba(15,23,42,.35);
  --rc-ease:cubic-bezier(.22,.75,.3,1);
}

/* ---------- Typography ---------- */
body{
  font-family:"Inter","Segoe UI",-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,"Noto Sans Armenian",sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  letter-spacing:-.006em;
}
h1,h2,h3,h4{ letter-spacing:-.02em; }

/* ---------- Background (static, cheap) ---------- */
body{ background-color:#f4f6fb !important; background-image:none !important; }
body.dark{ background-color:#0b1120 !important; background-image:none !important; }

/* ---------- Panels / cards (no blur) ---------- */
.glass-panel{
  background:#ffffff !important;
  border:1px solid var(--rc-line) !important;
  border-radius:16px;
  box-shadow:var(--rc-shadow-1) !important;
  transition:box-shadow .2s var(--rc-ease), border-color .2s var(--rc-ease);
}
.glass-panel:hover{
  box-shadow:var(--rc-shadow-2) !important;
  border-color:#c7d2fe !important;
}
.glass-col{
  background:#f1f4f9 !important;
  border:1px solid #e2e8f0 !important;
  border-radius:18px;
  box-shadow:var(--rc-shadow-1) !important;
}
body.dark .glass-panel{ background:#1e293b !important; border-color:#334155 !important; }
body.dark .glass-panel:hover{ border-color:#4c51bf !important; }
body.dark .glass-col{ background:#151f33 !important; border-color:#334155 !important; }

/* ---------- Header ---------- */
header{
  background:#ffffff !important;
  border-bottom:1px solid var(--rc-line) !important;
  box-shadow:0 1px 0 rgba(15,23,42,.03) !important;
}
body.dark header{ background:#0f172a !important; border-bottom-color:#334155 !important; }

.crm-logo-icon{
  background:linear-gradient(135deg,var(--rc-brand),var(--rc-brand-2)) !important;
  box-shadow:0 4px 12px -6px rgba(79,70,229,.8) !important;
}
.crm-logo-title{
  background:linear-gradient(100deg,#1e293b,#4f46e5 65%,#7c3aed);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
body.dark .crm-logo-title{
  background:linear-gradient(100deg,#e2e8f0,#a5b4fc 65%,#c4b5fd);
  -webkit-background-clip:text; background-clip:text; color:transparent;
}

/* ---------- Nav tabs ---------- */
.crm-tab-btn{ border-radius:12px !important; transition:color .15s, background-color .15s; }
.tab-active{
  background:#eef2ff !important;
  color:#4338ca !important;
  box-shadow:inset 0 0 0 1px rgba(99,102,241,.3), inset 0 -2px 0 #4f46e5 !important;
}
body.dark .tab-active{ background:#312e81 !important; color:#c7d2fe !important; box-shadow:inset 0 -2px 0 #818cf8 !important; }

/* ---------- Buttons ---------- */
button{ -webkit-tap-highlight-color:transparent; transition:background-color .15s, box-shadow .15s, filter .15s; }
button:not(:disabled):active{ filter:brightness(.95); }
button:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(99,102,241,.35) !important; }

.bg-indigo-600{ background-image:linear-gradient(135deg,#4f46e5,#6d28d9) !important; }
.bg-emerald-600,.bg-emerald-500{ background-image:linear-gradient(135deg,#059669,#10b981) !important; }
.bg-violet-600{ background-image:linear-gradient(135deg,#7c3aed,#a855f7) !important; }
.bg-purple-600{ background-image:linear-gradient(135deg,#9333ea,#c026d3) !important; }
.bg-teal-600{ background-image:linear-gradient(135deg,#0d9488,#14b8a6) !important; }
.bg-cyan-700{ background-image:linear-gradient(135deg,#0e7490,#0891b2) !important; }
.bg-slate-700,.bg-slate-800{ background-image:linear-gradient(135deg,#1f2937,#334155) !important; }

/* ---------- Inputs ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
textarea, select{ border-radius:12px !important; transition:border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):focus, textarea:focus, select:focus{
  border-color:#818cf8 !important;
  box-shadow:0 0 0 3px rgba(99,102,241,.14) !important;
  outline:none !important;
}

/* ---------- Tables ---------- */
table thead th{
  text-transform:uppercase; letter-spacing:.04em; font-size:10.5px !important;
  color:#64748b !important;
}
table tbody tr:hover{ background:#f5f6fd !important; }
body.dark table tbody tr:hover{ background:#243149 !important; }

/* ---------- Task cards ---------- */
.task-card{ border-radius:14px !important; box-shadow:var(--rc-shadow-1); }
.task-card:hover{ box-shadow:var(--rc-shadow-2) !important; }

/* ---------- Login screen (Pristine High Contrast Card) ---------- */
#loginWrapper, body.dark #loginWrapper {
  background: radial-gradient(circle at 50% 25%, #1e1b4b 0%, #0f172a 55%, #020617 100%) !important;
}
#loginWrapper .login-card, body.dark #loginWrapper .login-card {
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5) !important;
  border-radius: 28px !important;
}
#loginWrapper h2, body.dark #loginWrapper h2 { color: #0f172a !important; }
#loginWrapper p, body.dark #loginWrapper p { color: #64748b !important; }
#loginWrapper label, body.dark #loginWrapper label { color: #475569 !important; }
#loginWrapper .login-field input, body.dark #loginWrapper .login-field input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
  padding-left: 2.5rem !important;
}
#loginWrapper .login-field input:focus, body.dark #loginWrapper .login-field input:focus {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}
#loginWrapper .login-field i, body.dark #loginWrapper .login-field i {
  color: #64748b !important;
}
#loginWrapper .login-btn-primary, body.dark #loginWrapper .login-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.4) !important;
}
#loginWrapper .login-btn-google, body.dark #loginWrapper .login-btn-google {
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
}

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-thumb{ background:rgba(100,116,139,.35); border-radius:99px; }
::-webkit-scrollbar-thumb:hover{ background:rgba(79,70,229,.5); }
::-webkit-scrollbar-track{ background:transparent; }

/* ---------- Radius polish ---------- */
.rounded-lg{ border-radius:12px !important; }
.rounded-xl{ border-radius:14px !important; }
.rounded-2xl{ border-radius:18px !important; }
hr{ border-color:var(--rc-line); }

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

/* ============================================================
   RESET CRM — EQUIPMENT & TECH ICON SYSTEM (Light & Dark Mode)
   ============================================================ */

.tech-icon-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border-radius: 14px !important;
  font-size: 15px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease !important;
}

/* Size Variants */
.tech-icon-sm { width: 32px !important; height: 32px !important; font-size: 13px !important; border-radius: 10px !important; }
.tech-icon-md { width: 40px !important; height: 40px !important; font-size: 16px !important; border-radius: 12px !important; }
.tech-icon-lg { width: 48px !important; height: 48px !important; font-size: 20px !important; border-radius: 16px !important; }

/* 1. Desktop Computers / All-in-One / Thin Clients */
.tech-icon-pc {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%) !important;
  color: #4338ca !important;
  border: 1px solid #c7d2fe !important;
  box-shadow: 0 4px 10px -2px rgba(79, 70, 229, 0.15) !important;
}
body.dark .tech-icon-pc {
  background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%) !important;
  color: #a5b4fc !important;
  border: 1px solid #4338ca !important;
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.35) !important;
}

/* 2. Laptops & Mobile Tech */
.tech-icon-laptop {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.15) !important;
}
body.dark .tech-icon-laptop {
  background: linear-gradient(135deg, #064e3b 0%, #022c22 100%) !important;
  color: #6ee7b7 !important;
  border: 1px solid #047857 !important;
  box-shadow: 0 4px 12px -2px rgba(52, 211, 153, 0.35) !important;
}

/* 3. Servers & Rack Infrastructure */
.tech-icon-server {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%) !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
  box-shadow: 0 4px 10px -2px rgba(124, 58, 237, 0.15) !important;
}
body.dark .tech-icon-server {
  background: linear-gradient(135deg, #4c1d95 0%, #2e1065 100%) !important;
  color: #c4b5fd !important;
  border: 1px solid #6d28d9 !important;
  box-shadow: 0 4px 12px -2px rgba(167, 139, 250, 0.35) !important;
}

/* 4. Network Devices (Routers, Switches, Wi-Fi) */
.tech-icon-network {
  background: linear-gradient(135deg, #ecfeff 0%, #cffaff 100%) !important;
  color: #0e7490 !important;
  border: 1px solid #a5f3fc !important;
  box-shadow: 0 4px 10px -2px rgba(6, 182, 212, 0.15) !important;
}
body.dark .tech-icon-network {
  background: linear-gradient(135deg, #164e63 0%, #083344 100%) !important;
  color: #67e8f9 !important;
  border: 1px solid #155e75 !important;
  box-shadow: 0 4px 12px -2px rgba(34, 211, 238, 0.35) !important;
}

/* 5. Printers & Office Peripherals */
.tech-icon-printer {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%) !important;
  color: #c2410c !important;
  border: 1px solid #fed7aa !important;
  box-shadow: 0 4px 10px -2px rgba(234, 88, 12, 0.15) !important;
}
body.dark .tech-icon-printer {
  background: linear-gradient(135deg, #7c2d12 0%, #431407 100%) !important;
  color: #fdba74 !important;
  border: 1px solid #9a3412 !important;
  box-shadow: 0 4px 12px -2px rgba(251, 146, 60, 0.35) !important;
}

/* 6. Security / Cameras / Firewalls */
.tech-icon-security {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%) !important;
  color: #be123c !important;
  border: 1px solid #fecdd3 !important;
  box-shadow: 0 4px 10px -2px rgba(225, 29, 72, 0.15) !important;
}
body.dark .tech-icon-security {
  background: linear-gradient(135deg, #881337 0%, #4c0519 100%) !important;
  color: #fda4af !important;
  border: 1px solid #9f1239 !important;
  box-shadow: 0 4px 12px -2px rgba(244, 63, 94, 0.35) !important;
}

/* ---------- Registry Modal Header Adaptations ---------- */
body.dark .reg-modal-header {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}
body.dark .reg-modal-title {
  color: #f8fafc !important;
}
body.dark .reg-modal-sub {
  color: #94a3b8 !important;
}
body.dark .reg-modal-close {
  color: #94a3b8 !important;
}
body.dark .reg-modal-close:hover {
  background: #1e293b !important;
  color: #ffffff !important;
}

/* ---------- Stats & Dashboard Dark Mode Polish ---------- */
body.dark .crm-stat-card h3 {
  color: #f8fafc !important;
}
/* Scoped to the KPI label only. As `.crm-stat-card p` this also caught the red
   missed-call line under "Զանգեր այսօր" and greyed it out in dark mode. */
body.dark .crm-stat-card .rc-kpi-label {
  color: #9aa8bf !important;
}
body.dark .crm-chart-title {
  color: #f1f5f9 !important;
  border-bottom-color: #334155 !important;
}
body.dark #todayCallsTotal b {
  color: #f8fafc !important;
}
body.dark #todayCallsTotal span {
  color: #94a3b8 !important;
}


/* ---------- KPI Stat Cards Layout & Glow Badges ---------- */
.crm-stat-grid > div,
.crm-stat-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 96px !important;
  padding: 1.15rem 1.35rem !important;
  border-radius: 20px !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.crm-stat-grid > div:hover,
.crm-stat-card:hover {
  transform: translateY(-2px) !important;
}

.stat-icon-glow {
  width: 48px !important;
  height: 48px !important;
  border-radius: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.25rem !important;
  flex-shrink: 0 !important;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.3) !important;
}

body.dark .crm-stat-card {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%) !important;
  border-color: rgba(51, 65, 85, 0.7) !important;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5) !important;
}

body.dark .crm-stat-card:hover {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.7) !important;
}

/* ---------- Select Optgroup & Option Polish ---------- */
select option,
select optgroup {
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-weight: 600 !important;
  padding: 6px 8px !important;
}

body.dark select option,
body.dark select optgroup {
  background-color: #1e293b !important;
  color: #f8fafc !important;
  font-weight: 600 !important;
}


/* ---------- Warehouse Row Polish ---------- */
#warehouseTableBody tr {
  transition: background-color 0.15s ease, box-shadow 0.15s ease !important;
}

body.dark #warehouseTableBody td b {
  color: #f8fafc !important;
}

body.dark #warehouseTableBody .warehouse-category-badge {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #a5b4fc !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Keep the completed/empty-stock indicator readable in dark mode. */
body.dark #whLowCard {
  background: #1b2540 !important;
  border-color: #3b4a6b !important;
  color: #f8fafc !important;
}
body.dark #whLowCard:hover {
  border-color: #fb7185 !important;
}
body.dark #whLowCard .bg-red-100 {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #fda4af !important;
}
body.dark #whLowCard .text-slate-400 {
  color: #cbd5e1 !important;
}
body.dark #whLowCard #whStatLow {
  color: #fda4af !important;
}
body.dark #btnWhLowStock.bg-white {
  background: #1b2540 !important;
  border-color: #fda4af !important;
  color: #fecdd3 !important;
}
body.dark #btnWhLowStock.bg-red-600 {
  background: #dc2626 !important;
  color: #ffffff !important;
}
body.dark #whLowCount.bg-white {
  background: #ffe4e6 !important;
  color: #9f1239 !important;
}
body.dark #whLowCount.bg-red-600 {
  background: #ef4444 !important;
  color: #ffffff !important;
}


/* ---------- Warehouse Item Modal Header Adaptations ---------- */

body.dark .wh-modal-header {
  background: #0f172a !important;
  border-bottom-color: #334155 !important;
}
body.dark .wh-modal-title {
  color: #f8fafc !important;
}
body.dark .wh-modal-sub {
  color: #94a3b8 !important;
}


/* ---------- Flatpickr High Z-Index & Bounds Safeguard ---------- */
.flatpickr-calendar {
  z-index: 999999 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45) !important;
  max-width: calc(100vw - 20px) !important;
}

body.dark .flatpickr-calendar {
  background: #1e293b !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75) !important;
  border-color: #334155 !important;
}

/* ---------- Layout & Transform Helpers ---------- */
.top-1\/2 { top: 50% !important; }
.left-1\/2 { left: 50% !important; }
.right-1\/2 { right: 50% !important; }
.-translate-y-1\/2 { transform: translateY(-50%) !important; }
.translate-y-1\/2 { transform: translateY(50%) !important; }
.-translate-x-1\/2 { transform: translateX(-50%) !important; }
.translate-x-1\/2 { transform: translateX(50%) !important; }
.right-1\.5 { right: 0.375rem !important; }
.right-2 { right: 0.5rem !important; }
.right-2\.5 { right: 0.625rem !important; }
.right-3 { right: 0.75rem !important; }
.right-4 { right: 1rem !important; }


/* Explicit Warehouse low-stock toolbar state; scoped to the upper/right filter button. */
body.dark #btnWhLowStock[data-low-filter-active="true"],
body.dark #btnWhLowStock[data-low-filter-active="true"]:hover {
  background-color: #1b2540 !important;
  color: #fda4af !important;
  border: 1px solid #fb7185 !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.78) !important;
}
body.dark #btnWhLowStock[data-low-filter-active="true"] > i,
body.dark #btnWhLowStock[data-low-filter-active="true"] > span:not(#whLowCount) {
  color: #fda4af !important;
}
body.dark #btnWhLowStock[data-low-filter-active="false"] {
  background-color: #1b2540 !important;
  color: #fcd34d !important;
  border-color: #2a3654 !important;
  box-shadow: none !important;
}
body.dark #btnWhLowStock[data-low-filter-active="false"] > i,
body.dark #btnWhLowStock[data-low-filter-active="false"] > span:not(#whLowCount) {
  color: #fcd34d !important;
}


/* Final state classes for the upper/right low-stock filter button only. */
#btnWhLowStock.wh-low-filter-active {
  background-color: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.45) !important;
}
#btnWhLowStock.wh-low-filter-active:hover {
  background-color: #b91c1c !important;
}
#btnWhLowStock.wh-low-filter-inactive {
  background-color: #ffffff !important;
  color: #b45309 !important;
  border: 1px solid #fcd34d !important;
  box-shadow: none !important;
}
body.dark #btnWhLowStock.wh-low-filter-active,
body.dark #btnWhLowStock.wh-low-filter-active:hover {
  background-color: #1b2540 !important;
  color: #fda4af !important;
  border: 1px solid #fb7185 !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.78) !important;
  outline: 2px solid #fb7185 !important;
}
body.dark #btnWhLowStock.wh-low-filter-inactive {
  background-color: #1b2540 !important;
  color: #fcd34d !important;
  border: 1px solid #2a3654 !important;
  box-shadow: none !important;
  outline: none !important;
}


/* The large Warehouse low-stock statistic card: active state only. */
body.dark #whLowCard.wh-low-card-active,
body.dark #whLowCard.wh-low-card-active:hover {
  background: #1b2540 !important;
  border: 2px solid #fb7185 !important;
  color: #f8fafc !important;
  box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.92), 0 0 16px rgba(251, 113, 133, 0.28) !important;
  outline: none !important;
}
body.dark #whLowCard.wh-low-card-inactive {
  background: #1b2540 !important;
  border: 1px solid #3b4a6b !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Разделитель «или» прячется вместе с кнопкой Google (19.09.2026) */
.login-divider.hidden, .login-google-wrap.hidden { display: none !important; }
