/* ══════════════════════════════════════════════════════
   STOCKLENS — APEX THEME  [data-theme="apex"]
   Deep slate · indigo accent · premium spacing
   No backdrop-filter · no Google Fonts import
   All transitions specific (not `all`)
══════════════════════════════════════════════════════ */

html[data-theme="apex"] {
  --brand:        #4f46e5;
  --brand-dark:   #3730a3;
  --brand-light:  rgba(79,70,229,0.10);
  --brand-glow:   rgba(79,70,229,0.18);
  --bg:           #f1f5f9;
  --surface:      #f8fafc;
  --surface-2:    #f1f5f9;
  --surface-3:    #e2e8f0;
  --surface-4:    #cbd5e1;
  --surface-card: #ffffff;
  --border:       #e2e8f0;
  --border-2:     #cbd5e1;
  --border-3:     #94a3b8;
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-light:   #94a3b8;
  --success:      #0891b2;
  --success-bg:   #ecfeff;
  --warning:      #d97706;
  --warning-bg:   #fffbeb;
  --danger:       #e11d48;
  --danger-bg:    #fff1f2;
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.06),0 1px 3px rgba(0,0,0,0.1);
  --shadow-md:    0 4px 6px rgba(0,0,0,0.07),0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg:    0 20px 25px rgba(0,0,0,0.1),0 10px 10px rgba(0,0,0,0.04);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-xs:    6px;
}

html[data-theme="apex"] body,
html[data-theme="apex"] .main { background: #f1f5f9 !important; }
html[data-theme="apex"] * { transition-property: background-color, border-color, color, box-shadow !important; transition-duration: .15s !important; }

/* ════ TOPBAR ════════════════════════════════════════ */
html[data-theme="apex"] .topbar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="apex"] .topbar-title {
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -.3px !important;
  color: #0f172a !important;
}
html[data-theme="apex"] .topbar-menu-btn { color: #64748b !important; }
html[data-theme="apex"] .topbar-menu-btn:hover { background: #f1f5f9 !important; }
html[data-theme="apex"] .topbar-avatar {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(79,70,229,0.4) !important;
}
html[data-theme="apex"] .topbar-avatar-mobile {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #fff !important;
}
html[data-theme="apex"] .topbar-user { color: #0f172a !important; font-weight: 600 !important; }
html[data-theme="apex"] .topbar-user-pill { background: #f8fafc !important; border: 1px solid #e2e8f0 !important; }

/* ════ SIDEBAR ═══════════════════════════════════════ */
html[data-theme="apex"] .sidebar {
  background: #0f172a !important;
  border-right: none !important;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
}
html[data-theme="apex"] .sidebar-logo { border-bottom: 1px solid rgba(255,255,255,0.06) !important; }
html[data-theme="apex"] .sidebar-footer {
  background: #0f172a !important;
  border-top: 1px solid rgba(255,255,255,0.06) !important;
}
html[data-theme="apex"] .sidebar-version-text { color: #1e293b !important; }

/* Section labels */
html[data-theme="apex"] .nav-label {
  color: #334155 !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  padding: 16px 16px 5px !important;
  text-transform: uppercase !important;
}

/* Nav items */
html[data-theme="apex"] .nav-item {
  color: #64748b !important;
  background: transparent !important;
  margin: 1px 8px 1px 8px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border-radius: 8px !important;
}
html[data-theme="apex"] .nav-item:hover {
  background: rgba(255,255,255,0.06) !important;
  color: #cbd5e1 !important;
}
html[data-theme="apex"] .nav-item.active {
  background: #4f46e5 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(79,70,229,0.4) !important;
}
html[data-theme="apex"] .nav-item .nav-icon { opacity: .45 !important; }
html[data-theme="apex"] .nav-item:hover .nav-icon { opacity: .7 !important; }
html[data-theme="apex"] .nav-item.active .nav-icon { opacity: 1 !important; }
html[data-theme="apex"] .nav-badge { background: #4f46e5 !important; color: #fff !important; }
html[data-theme="apex"] .nav-item.active .nav-badge { background: rgba(255,255,255,0.25) !important; }

/* ════ BUTTONS ═══════════════════════════════════════ */
html[data-theme="apex"] .btn-primary {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
  box-shadow: 0 1px 3px rgba(79,70,229,0.3), 0 1px 2px rgba(0,0,0,0.06) !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
}
html[data-theme="apex"] .btn-primary:hover:not(:disabled) {
  background: #3730a3 !important;
  border-color: #3730a3 !important;
  box-shadow: 0 4px 12px rgba(79,70,229,0.45) !important;
  filter: none !important;
}
html[data-theme="apex"] .btn { border-radius: 8px !important; font-weight: 500 !important; }
html[data-theme="apex"] .btn-ghost { color: var(--text) !important; border-color: #e2e8f0 !important; }
html[data-theme="apex"] .btn-ghost:hover { background: #f1f5f9 !important; border-color: #cbd5e1 !important; }
html[data-theme="apex"] .btn-danger { background: #e11d48 !important; border-color: #e11d48 !important; border-radius: 8px !important; box-shadow: 0 1px 3px rgba(225,29,72,0.3) !important; }

/* ════ STAT CARDS — gradient accent bar ═════════════ */
html[data-theme="apex"] .dash-stat-card,
html[data-theme="apex"] .modern-stat {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 16px 18px !important;
  position: relative !important;
  overflow: hidden !important;
}
html[data-theme="apex"] .dash-stat-card::after,
html[data-theme="apex"] .modern-stat::after {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0; right: 0 !important;
  height: 3px !important;
  background: linear-gradient(90deg, #4f46e5, #7c3aed) !important;
}
html[data-theme="apex"] .dash-stat-card:nth-child(2)::after { background: linear-gradient(90deg, #0891b2, #06b6d4) !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(3)::after { background: linear-gradient(90deg, #d97706, #f59e0b) !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(4) {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-color: #1e293b !important;
}
html[data-theme="apex"] .dash-stat-card:nth-child(4)::after { background: linear-gradient(90deg, #4f46e5, #7c3aed) !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(5)::after { background: linear-gradient(90deg, #0891b2, #0ea5e9) !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(6) { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important; border-color: #1e293b !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(4) .dash-stat-val,
html[data-theme="apex"] .dash-stat-card:nth-child(4) .modern-stat-value,
html[data-theme="apex"] .dash-stat-card:nth-child(6) .dash-stat-val,
html[data-theme="apex"] .dash-stat-card:nth-child(6) .modern-stat-value { color: #a5b4fc !important; }
html[data-theme="apex"] .dash-stat-card:nth-child(4) .dash-stat-lbl,
html[data-theme="apex"] .dash-stat-card:nth-child(4) .modern-stat-label,
html[data-theme="apex"] .dash-stat-card:nth-child(6) .dash-stat-lbl,
html[data-theme="apex"] .dash-stat-card:nth-child(6) .modern-stat-label { color: #475569 !important; }
html[data-theme="apex"] .dash-stat-icon { display: none !important; }
html[data-theme="apex"] .modern-stat-label,
html[data-theme="apex"] .dash-stat-lbl {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  color: #94a3b8 !important;
  margin-bottom: 6px !important;
}
html[data-theme="apex"] .modern-stat-value,
html[data-theme="apex"] .dash-stat-val {
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -.6px !important;
  color: #0f172a !important;
  line-height: 1 !important;
}

/* ════ PANELS & CARDS ════════════════════════════════ */
html[data-theme="apex"] .dash-panel,
html[data-theme="apex"] .settings-card,
html[data-theme="apex"] .session-card,
html[data-theme="apex"] .location-card,
html[data-theme="apex"] .waybill-card,
html[data-theme="apex"] .catalogue-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}
html[data-theme="apex"] .dash-panel-head {
  background: transparent !important;
  border-bottom: 1px solid #f1f5f9 !important;
}
html[data-theme="apex"] .dash-panel-head h3 {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -.1px !important;
}
html[data-theme="apex"] .dash-list-row { border-bottom: 1px solid #f8fafc !important; }
html[data-theme="apex"] .dash-list-row:hover { background: #f8fafc !important; }
html[data-theme="apex"] .dash-list-time { color: #94a3b8 !important; font-size: 11px !important; }

/* ════ WAYBILL & SESSION CARDS ═══════════════════════ */
html[data-theme="apex"] .waybill-card:hover,
html[data-theme="apex"] .session-card:hover { box-shadow: 0 4px 16px rgba(79,70,229,0.10) !important; border-color: #c7d2fe !important; }

/* ════ MODALS ════════════════════════════════════════ */
html[data-theme="apex"] .modal {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16), 0 8px 16px rgba(0,0,0,0.08) !important;
}
html[data-theme="apex"] .modal-head { border-bottom: 1px solid #f1f5f9 !important; }
html[data-theme="apex"] .modal-head h3 { font-weight: 700 !important; font-size: 15px !important; color: #0f172a !important; letter-spacing: -.2px !important; }
html[data-theme="apex"] .modal-foot { border-top: 1px solid #f1f5f9 !important; background: #f8fafc !important; }
html[data-theme="apex"] .modal-backdrop { background: rgba(15,23,42,0.65) !important; }

/* ════ TABLES ════════════════════════════════════════ */
html[data-theme="apex"] table thead tr th {
  background: #f8fafc !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .07em !important;
  color: #94a3b8 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}
html[data-theme="apex"] table tbody td {
  border-bottom: 1px solid #f1f5f9 !important;
  color: #334155 !important;
}
html[data-theme="apex"] table tbody td strong { color: #0f172a !important; }
html[data-theme="apex"] table tbody tr:hover td { background: #f8fafc !important; }

/* ════ INPUTS ════════════════════════════════════════ */
html[data-theme="apex"] .input,
html[data-theme="apex"] input.input,
html[data-theme="apex"] select,
html[data-theme="apex"] .select-sm,
html[data-theme="apex"] textarea {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 8px !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}
html[data-theme="apex"] .input:focus,
html[data-theme="apex"] select:focus,
html[data-theme="apex"] textarea:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12), 0 1px 2px rgba(0,0,0,0.04) !important;
  outline: none !important;
}
html[data-theme="apex"] .search-wrap {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}
html[data-theme="apex"] .search-wrap:focus-within {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.10) !important;
}

/* ════ STATUS BADGES ═════════════════════════════════ */
html[data-theme="apex"] .status-received { background: #ecfeff !important; color: #164e63 !important; }
html[data-theme="apex"] .status-pending  { background: #fffbeb !important; color: #78350f !important; }
html[data-theme="apex"] .status-rejected { background: #fff1f2 !important; color: #881337 !important; }
html[data-theme="apex"] .nav-badge { background: #4f46e5 !important; }

/* ════ PROGRESS BARS ═════════════════════════════════ */
html[data-theme="apex"] .progress-bar-wrap { height: 4px !important; background: #e2e8f0 !important; border-radius: 4px !important; }
html[data-theme="apex"] .progress-bar-fill { border-radius: 4px !important; background: #4f46e5 !important; }

/* ════ VIEW HEADERS ══════════════════════════════════ */
html[data-theme="apex"] .view-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -.4px !important;
  color: #0f172a !important;
}
html[data-theme="apex"] .view-sub { color: #64748b !important; font-size: 13px !important; }

/* ════ LOGIN PAGE ════════════════════════════════════ */
html[data-theme="apex"] .screen-login { background: #0f172a !important; }
html[data-theme="apex"] .login-canvas,
html[data-theme="apex"] .login-orb,
html[data-theme="apex"] .login-grid-lines { display: none !important; }
html[data-theme="apex"] .login-left { background: #0f172a !important; border-right: 1px solid rgba(255,255,255,0.05) !important; }
html[data-theme="apex"] .login-hero-title { color: #f1f5f9 !important; font-size: 28px !important; font-weight: 700 !important; letter-spacing: -.6px !important; line-height: 1.25 !important; }
html[data-theme="apex"] .login-hero-sub { color: #475569 !important; }
html[data-theme="apex"] .login-brand-name { color: #f1f5f9 !important; font-weight: 700 !important; }
html[data-theme="apex"] .login-brand-icon { background: #4f46e5 !important; border-radius: 10px !important; }
html[data-theme="apex"] .lf-dot { background: #4f46e5 !important; }
html[data-theme="apex"] .login-feature { color: #475569 !important; }
html[data-theme="apex"] .login-divider { background: rgba(255,255,255,0.05) !important; }
html[data-theme="apex"] .login-right { background: #f1f5f9 !important; }
html[data-theme="apex"] .login-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 20px 40px rgba(0,0,0,0.08) !important;
  border: 1px solid #e2e8f0 !important;
}
html[data-theme="apex"] .login-card-title { color: #0f172a !important; font-weight: 700 !important; font-size: 22px !important; letter-spacing: -.4px !important; }
html[data-theme="apex"] .login-card-sub { color: #64748b !important; }
html[data-theme="apex"] .login-card-appname { color: #0f172a !important; font-weight: 700 !important; }
html[data-theme="apex"] .login-card-logo { background: linear-gradient(135deg, #4f46e5, #7c3aed) !important; border-radius: 10px !important; box-shadow: 0 4px 12px rgba(79,70,229,0.35) !important; }
html[data-theme="apex"] .login-field {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}
html[data-theme="apex"] .login-field:focus-within {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12) !important;
}
html[data-theme="apex"] .lf-input { color: #0f172a !important; }
html[data-theme="apex"] .lf-icon { color: #94a3b8 !important; }
html[data-theme="apex"] .lf-label-top { color: #475569 !important; font-weight: 600 !important; }
html[data-theme="apex"] .btn-login {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(79,70,229,0.4) !important;
  font-size: 14px !important;
  letter-spacing: -.1px !important;
}
html[data-theme="apex"] .btn-login:hover { box-shadow: 0 6px 20px rgba(79,70,229,0.55) !important; transform: translateY(-1px) !important; }
html[data-theme="apex"] .lf-powered { color: #1e293b !important; }
html[data-theme="apex"] .lf-company { color: #1e293b !important; }
html[data-theme="apex"] .lmh-name { color: #f1f5f9 !important; }
html[data-theme="apex"] .lmh-headline { color: #f1f5f9 !important; }
html[data-theme="apex"] .lmh-sub { color: #475569 !important; }
html[data-theme="apex"] .lmh-chip { background: rgba(255,255,255,0.06) !important; color: #94a3b8 !important; }
html[data-theme="apex"] .lmh-chip-dot { background: #4f46e5 !important; }
html[data-theme="apex"] .login-version-line { color: #1e293b !important; }

/* ════ CATALOGUE ═════════════════════════════════════ */
html[data-theme="apex"] .catalogue-card:hover { box-shadow: 0 8px 24px rgba(79,70,229,0.10) !important; border-color: #c7d2fe !important; }

/* ════ TOASTS ════════════════════════════════════════ */
html[data-theme="apex"] .toast { border-radius: 10px !important; box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important; border: 1px solid #e2e8f0 !important; }

/* ════ SCROLLBAR ═════════════════════════════════════ */
html[data-theme="apex"] ::-webkit-scrollbar { width: 6px; height: 6px; }
html[data-theme="apex"] ::-webkit-scrollbar-track { background: transparent; }
html[data-theme="apex"] ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
html[data-theme="apex"] ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
