/* ============================================
   INDOHAIR INVENTORY UI SKIN
   Dark theme with violet accent, glass morphism,
   gradient backgrounds, and glow effects.
   Reference: indohair-inventory-ui design system
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --navy-900: #0a0f1a;
  --navy-800: #131a2e;
  --navy-700: #1e2742;
  --navy-600: #2a3556;
  --brand-500: #7c3aed;
  --brand-400: #8B5CF6;
  --brand-300: #a78bfa;
  --brand-linear: linear-gradient(135deg, #8B5CF6, #6366F1);
  --green-500: #10b981;
  --green-400: #34d399;
  --green-bg: rgba(16, 185, 129, 0.15);
  --red-500: #f43f5e;
  --red-400: #fb7185;
  --red-bg: rgba(244, 63, 94, 0.15);
  --amber-500: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.15);
  --text-primary: #f0f0f5;
  --text-secondary: #c4ccdf;
  --text-muted: #7c8ab5;
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 32px -4px rgba(139, 92, 246, 0.2);
  --glass-bg: rgba(19, 26, 46, 0.8);
  --glass-border: rgba(255, 255, 255, 0.08);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.2px;
  background: #0a0f1a !important;
}

body { background: #0a0f1a !important; }

::selection { background: rgba(139, 92, 246, 0.3); color: #fff; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #1e2742; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2a3556; }

/* ============================================
   HERO STAT CARDS — Gradient like IndoHair
   ============================================ */
.hero-stat {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 20px;
  color: #fff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none !important;
  backdrop-filter: none;
}
.hero-stat:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.hero-stat:active { transform: scale(0.98); }
.hero-stat::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='36' cy='36' r='18' stroke='%23fff' stroke-opacity='0.08' stroke-width='4'/%3E%3Ccircle cx='36' cy='36' r='14' stroke='%23fff' stroke-opacity='0.04' stroke-width='4'/%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-stat { padding: 16px; border-radius: 16px; }
  .hero-stat .text-2xl, .hero-stat .text-3xl { font-size: 1.5rem; }
}

/* ============================================
   GLASS STAT CARDS — Like IndoHair GlassStatCard
   ============================================ */
.glass-stat {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 16px;
  background: rgba(19, 26, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.glass-stat:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CARDS — Glass morphism with frost border
   ============================================ */
.card {
  background: rgba(19, 26, 46, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: var(--radius-xl) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
}
.card-gold {
  border-color: rgba(139, 92, 246, 0.15) !important;
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(19, 26, 46, 0.85) 70%
  ) !important;
}
.card-gold::before {
  background: linear-gradient(135deg, #8B5CF6, #6366F1) !important;
  opacity: 0.6;
}

/* ============================================
   NAV — Active indicator with violet glow
   ============================================ */
.nav-link { color: #7c8ab5; }
.nav-link:hover { background: rgba(139, 92, 246, 0.06); color: #e0e0f0; }
.nav-link.active {
  background: rgba(139, 92, 246, 0.1) !important;
  color: #fff !important;
}
.nav-link.active::after {
  background: #8B5CF6 !important;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5) !important;
}

/* ============================================
   SIDEBAR — Elevated glass panel
   ============================================ */
#sidebar {
  background: rgba(13, 18, 32, 0.97) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2) !important;
}
#sidebar .w-10.h-10.rounded-xl {
  background: linear-gradient(135deg, #8B5CF6, #6366F1) !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
#sidebar h1 { color: #f0f0f5 !important; }
#sidebar .mx-7.mb-5.h-px { background: rgba(255, 255, 255, 0.06) !important; }

/* Section groups — color-coded like IndoHair nav */
.nav-section {
  background: rgba(139, 92, 246, 0.05) !important;
  border: 1px solid rgba(139, 92, 246, 0.08) !important;
  color: #8b9bc5 !important;
}
.nav-section-icon { opacity: 0.9; }

/* Sidebar user card at bottom */
#sidebar .mt-auto { border-top: 1px solid rgba(255, 255, 255, 0.06) !important; }

/* ============================================
   BADGES — Refined with subtle glow
   ============================================ */
.badge { border-radius: 8px; font-weight: 600; letter-spacing: 0.03em; }
.badge-draft { background: rgba(124, 138, 181, 0.1); color: #7c8ab5; }
.badge-confirmed { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.badge-received { background: rgba(99, 102, 241, 0.12); color: #818cf8; }
.badge-done { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.badge-aktif { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.badge-selesai { background: rgba(139, 92, 246, 0.1); color: #c4b5fd; }
.badge-ready { background: rgba(16, 185, 129, 0.1); color: #34d399; }
.badge-shipped { background: rgba(124, 138, 181, 0.08); color: #7c8ab5; }
.badge-reserved { background: rgba(124, 138, 181, 0.08); color: #7c8ab5; }
.badge-unpaid { background: rgba(244, 63, 94, 0.12); color: #fb7185; }
.badge-paid { background: rgba(16, 185, 129, 0.12); color: #34d399; }

/* ============================================
   TABLE — Clean with subtle violet hover
   ============================================ */
.data-table th {
  color: #7c8ab5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}
.data-table td {
  color: #c4ccdf;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.data-table tbody tr:hover td { background: rgba(139, 92, 246, 0.04); }

/* ============================================
   BUTTONS — Gradient with violet glow
   ============================================ */
.btn { border-radius: var(--radius-md); font-weight: 600; }
.btn-gold {
  background: linear-gradient(135deg, #8B5CF6, #6366F1) !important;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}
.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.4),
              0 0 40px -10px rgba(139, 92, 246, 0.3);
}
.btn-gold:active { transform: translateY(0); }
.btn-outline {
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #7c8ab5;
}
.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.35);
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.06);
}
.btn-outline.active, .po-filter.active {
  border-color: #8B5CF6 !important;
  color: #a78bfa !important;
  background: rgba(139, 92, 246, 0.1) !important;
}
.btn-danger {
  background: rgba(255, 255, 255, 0.02);
  color: #7c8ab5;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-danger:hover {
  background: rgba(244, 63, 94, 0.08);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.2);
}

/* ============================================
   FORMS — Frosted glass input
   ============================================ */
.form-input {
  background: rgba(10, 15, 26, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f0f0f5;
  border-radius: var(--radius-md);
}
.form-input:focus {
  border-color: #8B5CF6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15),
              0 0 20px rgba(139, 92, 246, 0.08) !important;
  background: rgba(19, 26, 46, 0.9) !important;
}
.form-input::placeholder { color: #4a5580; }
select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238B5CF6' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
}

/* ============================================
   MODAL — Elevated glass panel
   ============================================ */
#modal-backdrop {
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(4px);
}
#modal-content {
  background: #131a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(139, 92, 246, 0.06) !important;
}

/* ============================================
   SPINNER — Violet accent
   ============================================ */
.spinner { border-color: rgba(255, 255, 255, 0.04); border-top-color: #8B5CF6; }

/* ============================================
   TYPOGRAPHY — Clean hierarchy
   ============================================ */
.page-header h2 { color: #f0f0f5; }
.page-header p { color: #7c8ab5; }
.kpi-value { color: #f0f0f5; }
.kpi-label { color: #7c8ab5; }
.text-gradient {
  background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar { background: #1e2742; }
.progress-fill { background: linear-gradient(135deg, #8B5CF6, #6366F1); }

/* ============================================
   TOAST — Status colors
   ============================================ */
.toast-enter.bg-green-600 { background: #10b981 !important; }
.toast-enter.bg-red-600 { background: #f43f5e !important; }
.toast-enter.bg-blue-600 { background: #8B5CF6 !important; }

/* ============================================
   INLINE STYLE OVERRIDES
   Map old dark theme colors → new palette
   ============================================ */

/* Backgrounds */
[style*="background: #0b1437"], [style*="background:#0b1437"],
[style*="background: #0f1729"], [style*="background:#0f1729"] {
  background: #0a0f1a !important;
}
[style*="background: #162040"], [style*="background:#162040"] {
  background: #131a2e !important;
}
[style*="background: rgba(11,20,55"], [style*="background:rgba(11,20,55"] {
  background: rgba(19, 26, 46, 0.85) !important;
}
[style*="background: rgba(255,255,255,0.02)"], [style*="background:rgba(255,255,255,0.02)"] {
  background: rgba(255, 255, 255, 0.02) !important;
}
[style*="background: rgba(255,255,255,0.03)"], [style*="background:rgba(255,255,255,0.03)"] {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Old purple accent → new violet */
[style*="background:rgba(117,81,255"], [style*="background: rgba(117,81,255"] {
  background: rgba(139, 92, 246, 0.1) !important;
}
[style*="background: linear-gradient(135deg, #868CFF, #422AFB)"] {
  background: linear-gradient(135deg, #8B5CF6, #6366F1) !important;
}
[style*="color:#7551FF"], [style*="color: #7551FF"] { color: #8B5CF6 !important; }
[style*="color:#422AFB"], [style*="color: #422AFB"] { color: #7c3aed !important; }
.text-\[\#7551FF\] { color: #8B5CF6 !important; }

/* Status colors — keep functional meaning */
[style*="color:#01B574"], [style*="color: #01B574"] { color: #34d399 !important; }
[style*="color:#EE5D50"], [style*="color: #EE5D50"] { color: #fb7185 !important; }
[style*="color:#FFB547"], [style*="color: #FFB547"] { color: #fbbf24 !important; }
[style*="color:#60a5fa"], [style*="color: #60a5fa"] { color: #818cf8 !important; }

/* Icon backgrounds — shift to match new palette */
[style*="background:var(--green-bg)"] { background: rgba(16, 185, 129, 0.12) !important; }
[style*="background:var(--amber-bg)"] { background: rgba(245, 158, 11, 0.12) !important; }
[style*="background:var(--red-bg)"] { background: rgba(244, 63, 94, 0.12) !important; }

/* Muted text */
[style*="color:#8b9bc5"], [style*="color: #8b9bc5"] { color: #7c8ab5 !important; }
.text-\[#8b9bc5\] { color: #7c8ab5 !important; }

/* ============================================
   MOBILE HEADER — Glass frosted nav
   ============================================ */
#app > .lg\:hidden:first-child,
#app > div:first-child {
  background: rgba(13, 18, 32, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
}

/* ============================================
   CONTENT AREA — Subtle background pattern
   ============================================ */
body.bg-\[\#0f1729\] { background: #0a0f1a !important; }
#content { color: #f0f0f5; }

/* ============================================
   KEUANGAN — Premium glass cards
   ============================================ */
.keu-kpi {
  background: rgba(19, 26, 46, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.keu-kpi:hover {
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}
.keu-kpi-icon { background: #1e2742 !important; }
.keu-section {
  background: rgba(19, 26, 46, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(16px);
}
.keu-section:hover { border-color: rgba(255, 255, 255, 0.12) !important; }
.keu-section-header { border-color: rgba(255, 255, 255, 0.04) !important; }
.keu-section-badge { background: #1e2742 !important; }
.keu-wallet-item {
  background: #1e2742 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}
.keu-wallet-item:hover {
  border-color: rgba(139, 92, 246, 0.25) !important;
  background: rgba(139, 92, 246, 0.06) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.keu-hpp-avg {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.02) 100%) !important;
  border-color: rgba(139, 92, 246, 0.12) !important;
}
.keu-hpp-avg-value { color: #a78bfa !important; }
.keu-hpp-kode { color: #a78bfa !important; }
.keu-bar { background: #1e2742 !important; }
.keu-hpp-row { border-color: rgba(255, 255, 255, 0.03) !important; }
.keu-payroll-row { border-color: rgba(255, 255, 255, 0.03) !important; }

/* ============================================
   LOGIN PAGE — Keep red theme, shift base
   ============================================ */
#login-page .form-input {
  background: rgba(10, 15, 26, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   MOBILE SIDEBAR OVERLAY
   ============================================ */
#sidebar-overlay { background: rgba(0, 0, 0, 0.45) !important; }

/* ============================================
   MOBILE WEIGHT INPUT — Green accent
   ============================================ */
.mob-weight-input {
  background: rgba(10, 15, 26, 0.8) !important;
  border-color: rgba(16, 185, 129, 0.25);
  color: #34d399;
}
.mob-weight-input:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12), 0 0 30px rgba(16, 185, 129, 0.08) !important;
}

.mob-item-card {
  background: rgba(19, 26, 46, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.mob-kondisi-pill {
  border-color: rgba(255, 255, 255, 0.08);
}
.mob-kondisi-pill.selected {
  border-color: #10b981;
  color: #34d399;
  background: rgba(16, 185, 129, 0.08);
}
.mob-bottom-bar {
  background: linear-gradient(to top, #0a0f1a 70%, transparent) !important;
}

/* ============================================
   LOGIN CARDS — Shift to new base
   ============================================ */
.login-card {
  background: rgba(19, 26, 46, 0.8);
  border-color: rgba(255, 255, 255, 0.06);
}
.login-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12);
}
.login-group-header {
  background: rgba(139, 92, 246, 0.05);
  border-color: rgba(139, 92, 246, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .form-input { border-radius: 14px; }
  #modal-content { background: #0a0f1a !important; }
  #sidebar { box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4) !important; }
}

/* ============================================
   LIGHT MODE — IndoHair light palette
   Background: #f9fafb, Cards: white, Accent: #7c3aed
   Border: #e5e7eb, Muted text: #6b7280
   ============================================ */

body.light {
  background: #f9fafb !important;
  color: #1c1c1e !important;
}
body.light html, body.light { background: #f9fafb !important; }

body.light ::selection { background: rgba(124, 58, 237, 0.2); color: #1c1c1e; }
body.light ::-webkit-scrollbar-thumb { background: #d1d5db; }
body.light ::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Cards */
body.light .card {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  backdrop-filter: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
body.light .card:hover {
  border-color: #d1d5db !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
body.light .card-gold {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, #fff 70%) !important;
  border-color: #e5e7eb !important;
}

/* Hero stat cards — keep gradients, adjust text shadow */
body.light .hero-stat { color: #fff; }

/* Glass stat cards */
body.light .glass-stat {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  backdrop-filter: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
body.light .glass-stat:hover {
  border-color: #d1d5db !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* Sidebar */
body.light #sidebar {
  background: #fff !important;
  border-right: 1px solid #e5e7eb !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 1px 0 4px rgba(0, 0, 0, 0.04) !important;
}
body.light #sidebar h1 { color: #1c1c1e !important; }
body.light #sidebar .mx-7.mb-5.h-px { background: #e5e7eb !important; }
body.light #sidebar .mt-auto { border-top: 1px solid #e5e7eb !important; }

/* Nav section */
body.light .nav-section {
  background: rgba(124, 58, 237, 0.03) !important;
  border: 1px solid rgba(124, 58, 237, 0.08) !important;
  color: #6b7280 !important;
}
body.light .nav-link { color: #6b7280 !important; }
body.light .nav-link:hover { background: rgba(124, 58, 237, 0.04) !important; color: #1c1c1e !important; }
body.light .nav-link.active {
  background: rgba(124, 58, 237, 0.06) !important;
  color: #1c1c1e !important;
}

/* Mobile header */
body.light #app > .lg\:hidden:first-child,
body.light #app > div:first-child {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #e5e7eb !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
}

/* Typography */
body.light .page-header h2 { color: #1c1c1e !important; }
body.light .page-header p { color: #6b7280 !important; }
body.light .kpi-value { color: #1c1c1e !important; }
body.light .kpi-label { color: #6b7280 !important; }
body.light #content { color: #1c1c1e !important; }

/* Table */
body.light .data-table th {
  color: #6b7280 !important;
  border-bottom: 1px solid #e5e7eb !important;
  background: #f9fafb !important;
}
body.light .data-table td {
  color: #374151 !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
body.light .data-table tbody tr:hover td { background: #f9fafb !important; }

/* Forms */
body.light .form-input {
  background: #f9fafb !important;
  border: 1px solid #e5e7eb !important;
  color: #1c1c1e !important;
}
body.light .form-input:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1) !important;
  background: #fff !important;
}
body.light .form-input::placeholder { color: #9ca3af !important; }
body.light select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%237c3aed' viewBox='0 0 16 16'%3E%3Cpath d='M8 12L2 6h12z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
}

/* Buttons */
body.light .btn-gold {
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2) !important;
}
body.light .btn-outline {
  border: 1px solid #e5e7eb !important;
  color: #6b7280 !important;
  background: transparent !important;
}
body.light .btn-outline:hover {
  border-color: #7c3aed !important;
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.04) !important;
}
body.light .btn-outline.active, body.light .po-filter.active {
  border-color: #7c3aed !important;
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.06) !important;
}
body.light .btn-danger {
  background: #fff5f5 !important;
  color: #e53e3e !important;
  border: 1px solid #fed7d7 !important;
}

/* Badges */
body.light .badge-draft { background: #f3f4f6 !important; color: #9ca3af !important; }
body.light .badge-confirmed { background: #fef3c7 !important; color: #d97706 !important; }
body.light .badge-received { background: #ede9fe !important; color: #7c3aed !important; }
body.light .badge-done { background: #d1fae5 !important; color: #059669 !important; }
body.light .badge-aktif { background: #ede9fe !important; color: #7c3aed !important; }
body.light .badge-selesai { background: #f3f4f6 !important; color: #6b7280 !important; }
body.light .badge-ready { background: #d1fae5 !important; color: #059669 !important; }
body.light .badge-shipped { background: #f3f4f6 !important; color: #6b7280 !important; }
body.light .badge-reserved { background: #f3f4f6 !important; color: #6b7280 !important; }
body.light .badge-unpaid { background: #ffe4e6 !important; color: #e11d48 !important; }
body.light .badge-paid { background: #d1fae5 !important; color: #059669 !important; }

/* Modal */
body.light #modal-backdrop {
  background: rgba(0, 0, 0, 0.25) !important;
  backdrop-filter: blur(2px) !important;
}
body.light #modal-content {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.15) !important;
}

/* Progress bar */
body.light .progress-bar { background: #e5e7eb !important; }

/* Spinner */
body.light .spinner { border-color: #e5e7eb !important; border-top-color: #7c3aed !important; }

/* Keuangan */
body.light .keu-kpi {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  backdrop-filter: none !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
}
body.light .keu-kpi:hover {
  border-color: #d1d5db !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}
body.light .keu-kpi-icon { background: #f3f4f6 !important; }
body.light .keu-section {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  backdrop-filter: none !important;
}
body.light .keu-section:hover { border-color: #d1d5db !important; }
body.light .keu-section-header { border-color: #f3f4f6 !important; }
body.light .keu-section-badge { background: #f3f4f6 !important; }
body.light .keu-wallet-item {
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
}
body.light .keu-wallet-item:hover {
  border-color: #7c3aed !important;
  background: #ede9fe !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}
body.light .keu-hpp-avg {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06) 0%, rgba(124, 58, 237, 0.01) 100%) !important;
  border-color: #e5e7eb !important;
}
body.light .keu-hpp-avg-value { color: #7c3aed !important; }
body.light .keu-hpp-kode { color: #7c3aed !important; }
body.light .keu-bar { background: #e5e7eb !important; }
body.light .keu-hpp-row { border-color: #f3f4f6 !important; }
body.light .keu-payroll-row { border-color: #f3f4f6 !important; }

/* Sidebar overlay (mobile) */
body.light #sidebar-overlay { background: rgba(0, 0, 0, 0.2) !important; }

/* Mobile components */
body.light .mob-weight-input {
  background: #f9fafb !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #059669 !important;
}
body.light .mob-item-card {
  background: #fff !important;
  border-color: #e5e7eb !important;
}
body.light .mob-kondisi-pill { border-color: #e5e7eb !important; }
body.light .mob-kondisi-pill.selected {
  border-color: #059669 !important;
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.06) !important;
}
body.light .mob-bottom-bar {
  background: linear-gradient(to top, #f9fafb 70%, transparent) !important;
}

/* Login */
body.light .login-card {
  background: #fff !important;
  border-color: #e5e7eb !important;
}
body.light .login-card:hover {
  border-color: #7c3aed !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1) !important;
}
body.light .login-group-header {
  background: rgba(124, 58, 237, 0.04) !important;
  border-color: #e5e7eb !important;
}
body.light #login-page .form-input {
  background: #f9fafb !important;
  border-color: #e5e7eb !important;
}

/* Toast */
body.light .toast-enter.bg-green-600 { background: #059669 !important; }
body.light .toast-enter.bg-red-600 { background: #e11d48 !important; }
body.light .toast-enter.bg-blue-600 { background: #7c3aed !important; }

/* Inline style color overrides for light mode */
body.light [style*="color:#f0f0f5"], body.light [style*="color: #f0f0f5"] { color: #1c1c1e !important; }
body.light [style*="color:#c4ccdf"], body.light [style*="color: #c4ccdf"] { color: #374151 !important; }
body.light [style*="color:#7c8ab5"], body.light [style*="color: #7c8ab5"],
body.light [style*="color:#8b9bc5"], body.light [style*="color: #8b9bc5"] { color: #6b7280 !important; }
body.light .text-\[#8b9bc5\] { color: #6b7280 !important; }

/* Inline background overrides */
body.light [style*="background: #0a0f1a"], body.light [style*="background:#0a0f1a"],
body.light [style*="background: #0f1729"], body.light [style*="background:#0f1729"] {
  background: #f9fafb !important;
}
body.light [style*="background: #131a2e"], body.light [style*="background:#131a2e"],
body.light [style*="background: #162040"], body.light [style*="background:#162040"] {
  background: #fff !important;
}
body.light [style*="background: #1e2742"], body.light [style*="background:#1e2742"] {
  background: #f3f4f6 !important;
}
body.light [style*="background: rgba(19, 26, 46"], body.light [style*="background:rgba(19, 26, 46"],
body.light [style*="background: rgba(19,26,46"], body.light [style*="background:rgba(19,26,46"] {
  background: #fff !important;
}
body.light [style*="background: rgba(10, 15, 26"], body.light [style*="background:rgba(10, 15, 26"],
body.light [style*="background: rgba(10,15,26"], body.light [style*="background:rgba(10,15,26"] {
  background: #f9fafb !important;
}
body.light [style*="background: rgba(13, 18, 32"], body.light [style*="background:rgba(13, 18, 32"],
body.light [style*="background: rgba(13,18,32"], body.light [style*="background:rgba(13,18,32"] {
  background: #fff !important;
}

/* Inline border overrides */
body.light [style*="border-color: rgba(255,255,255,0.0"],
body.light [style*="border-color:rgba(255,255,255,0.0"],
body.light [style*="border-color: rgba(255, 255, 255, 0.0"],
body.light [style*="border-color:rgba(255, 255, 255, 0.0"] {
  border-color: #e5e7eb !important;
}

/* Tailwind text color overrides */
body.light .text-slate-200 { color: #374151 !important; }
body.light .text-slate-300 { color: #4b5563 !important; }
body.light .text-slate-400, body.light .text-slate-500 { color: #6b7280 !important; }
body.light .text-slate-600 { color: #4b5563 !important; }
body.light .text-gray-300 { color: #4b5563 !important; }
body.light .text-gray-400, body.light .text-gray-500 { color: #6b7280 !important; }

/* General text-white → dark (but NOT on gradient/colored backgrounds) */
body.light .text-white { color: #1c1c1e !important; }
body.light .hero-stat .text-white,
body.light .hero-stat [class*="text-"],
body.light .hero-stat * { color: #fff !important; }
body.light .btn-gold .text-white,
body.light .btn-gold { color: #fff !important; }
body.light [style*="background:linear-gradient"] .text-white,
body.light [style*="background: linear-gradient"] .text-white { color: #fff !important; }
body.light .toast-enter .text-white { color: #fff !important; }

/* Tailwind bg overrides — dark backgrounds → light */
body.light .bg-\[\#0a0f1a\] { background: #f9fafb !important; }
body.light .bg-\[\#131a2e\] { background: #fff !important; }
body.light .bg-\[\#1e2742\] { background: #f3f4f6 !important; }
body.light .bg-slate-800, body.light .bg-slate-900 { background: #f3f4f6 !important; }
body.light .bg-slate-800\/50 { background: rgba(243, 244, 246, 0.5) !important; }

/* Tailwind border overrides */
body.light .border-slate-700, body.light .border-slate-800 { border-color: #e5e7eb !important; }
body.light .border-white\/5, body.light .border-white\/10, body.light .border-white\/8 { border-color: #e5e7eb !important; }
body.light [class*="border-white\\/"] { border-color: #e5e7eb !important; }

/* Violet accent classes — keep violet but slightly deeper for light bg */
body.light .text-violet-400 { color: #7c3aed !important; }
body.light .text-violet-300 { color: #8b5cf6 !important; }
body.light .bg-violet-500\/20 { background: rgba(124, 58, 237, 0.1) !important; }
body.light .text-emerald-400 { color: #059669 !important; }
body.light .text-emerald-300 { color: #10b981 !important; }
body.light .text-rose-400 { color: #e11d48 !important; }
body.light .text-amber-400 { color: #d97706 !important; }
body.light .text-cyan-400 { color: #0891b2 !important; }
body.light .text-blue-400 { color: #2563eb !important; }

/* Inline style bg overrides — rgba transparents on dark are fine on light too */
body.light [style*="background:rgba(139,92,246,0."] { /* violet tints — keep */ }
body.light [style*="background:rgba(16,185,129,0."] { /* green tints — keep */ }
body.light [style*="background:rgba(59,130,246,0."] { /* blue tints — keep */ }

/* Font color inline overrides — ensure readability on light */
body.light [style*="color:#34d399"] { color: #059669 !important; }
body.light [style*="color: #34d399"] { color: #059669 !important; }
body.light [style*="color:#a78bfa"] { color: #7c3aed !important; }
body.light [style*="color: #a78bfa"] { color: #7c3aed !important; }
body.light [style*="color:#fbbf24"] { color: #d97706 !important; }
body.light [style*="color: #fbbf24"] { color: #d97706 !important; }
body.light [style*="color:#fb7185"] { color: #e11d48 !important; }
body.light [style*="color: #fb7185"] { color: #e11d48 !important; }
body.light [style*="color:#818cf8"] { color: #6366f1 !important; }
body.light [style*="color: #818cf8"] { color: #6366f1 !important; }
body.light [style*="color:#8B5CF6"] { color: #7c3aed !important; }
body.light [style*="color: #8B5CF6"] { color: #7c3aed !important; }
body.light [style*="color:#c4b5fd"] { color: #7c3aed !important; }
body.light [style*="color: #c4b5fd"] { color: #7c3aed !important; }

/* Dividers and separators */
body.light .h-px.bg-white\/5, body.light .h-px[style*="background:rgba(255,255,255"] {
  background: #e5e7eb !important;
}
body.light [style*="border-color:rgba(255,255,255"] { border-color: #e5e7eb !important; }
body.light [style*="border-color: rgba(255,255,255"] { border-color: #e5e7eb !important; }
body.light [style*="border:1px solid rgba(255,255,255"] { border-color: #e5e7eb !important; }

/* Card inner sections with dark bg */
body.light [style*="background:rgba(255,255,255,0.02)"],
body.light [style*="background: rgba(255,255,255,0.02)"],
body.light [style*="background:rgba(255,255,255,0.03)"],
body.light [style*="background: rgba(255,255,255,0.03)"],
body.light [style*="background:rgba(255,255,255,0.015)"],
body.light [style*="background: rgba(255,255,255,0.015)"] {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* Chart.js canvas — no override needed, handled by JS */

/* Modal form labels */
body.light label.text-sm.text-slate-400,
body.light label.text-xs.text-slate-500,
body.light .text-sm.text-slate-400,
body.light .text-xs.text-slate-500 { color: #6b7280 !important; }

/* Mobile responsive light */
@media (max-width: 768px) {
  body.light #modal-content { background: #fff !important; }
  body.light #sidebar { box-shadow: 1px 0 8px rgba(0, 0, 0, 0.08) !important; }
  body.light .bg-\[\#0a0f1a\] { background: #f9fafb !important; }
}
