/* AVAIL INVESTMENTS - HPMS Custom CSS Styling System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --primary-emerald: #059669;
  --emerald-dark: #047857;
  --emerald-light: #10b981;
  --accent-gold: #f59e0b;
  --bg-slate: #0f172a;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #030712;
  color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.12) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Outfit', sans-serif;
}

/* Purge Browser Autofill & Saved Info Dropdowns & Yellow Backgrounds */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #030712 inset !important;
  -webkit-text-fill-color: #f8fafc !important;
  transition: background-color 5000s ease-in-out 0s;
}

input::-webkit-contacts-auto-fill-button,
input::-webkit-credentials-auto-fill-button {
  visibility: hidden !important;
  display: none !important;
  pointer-events: none !important;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
}

/* Glassmorphism & Card Utilities */
.glass-panel {
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-dark {
  background: rgba(3, 7, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ERP v2.6 Glassmorphism Dark Theme Utilities */
.glass-panel-dark {
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.glass-input {
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}

.glass-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #030712;
}
::-webkit-scrollbar-thumb {
  background: #1f2937;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-active { background-color: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-pending { background-color: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-blacklisted { background-color: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-closed { background-color: rgba(148, 163, 184, 0.15); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-overdue { background-color: rgba(220, 38, 38, 0.2); color: #fca5a5; border: 1px solid rgba(220, 38, 38, 0.4); }

/* Credit Grades */
.grade-aplus { background: linear-gradient(135deg, #10b981, #059669); color: white; }
.grade-a { background-color: #059669; color: white; }
.grade-b { background-color: #0284c7; color: white; }
.grade-c { background-color: #d97706; color: white; }
.grade-d { background-color: #dc2626; color: white; }
.grade-blacklisted { background-color: #7f1d1d; color: white; }

/* Micro-animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.25s ease-out forwards;
}

.hover-lift {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

/* Waterfall visual highlight */
.waterfall-step {
  border-left: 4px solid #cbd5e1;
  transition: all 0.2s ease;
}
.waterfall-step.active {
  border-left-color: #10b981;
  background-color: #f0fdf4;
}

/* Print Formatting for PDF & Thermal/Standard Receipts */
@media print {
  body * {
    visibility: hidden;
  }
  #printableArea, #printableArea * {
    visibility: visible;
  }
  #printableArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: white;
    color: black;
    padding: 20px;
  }
  .no-print {
    display: none !important;
  }
}

/* ====================================================
 * THEME ENGINE VARIABLE SYSTEM (v7.0 COMPLETE OVERHAUL)
 * Enables Instant 1-Click Theme Switching Across All Windows, Cards, & Components!
 * ==================================================== */

:root {
  --theme-bg-color: #0c0507;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(225, 29, 72, 0.3) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.2) 0px, transparent 55%);
  --theme-sidebar-bg: #14070a;
  --theme-header-bg: rgba(18, 7, 10, 0.92);
  --theme-card-bg: rgba(22, 9, 13, 0.88);
  --theme-card-border: rgba(225, 29, 72, 0.35);
  --theme-primary-btn: linear-gradient(135deg, #e11d48, #be123c);
  --theme-primary-btn-hover: linear-gradient(135deg, #f43f5e, #e11d48);
  --theme-primary-glow: rgba(225, 29, 72, 0.4);
  --theme-accent-text: #fb7185;
  --theme-accent-border: rgba(225, 29, 72, 0.45);
}

/* 1. AVAIL CORPORATE CRIMSON */
[data-theme="avail-crimson"] {
  --theme-bg-color: #0c0507 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(225, 29, 72, 0.35) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.25) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(190, 18, 60, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #14070a !important;
  --theme-header-bg: rgba(18, 7, 10, 0.92) !important;
  --theme-card-bg: rgba(22, 9, 13, 0.88) !important;
  --theme-card-border: rgba(225, 29, 72, 0.35) !important;
  --theme-primary-btn: linear-gradient(135deg, #e11d48, #be123c) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #f43f5e, #e11d48) !important;
  --theme-primary-glow: rgba(225, 29, 72, 0.4) !important;
  --theme-accent-text: #fb7185 !important;
  --theme-accent-border: rgba(225, 29, 72, 0.45) !important;
}

/* 2. EMERALD LUXURY */
[data-theme="emerald-luxury"] {
  --theme-bg-color: #021a12 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.35) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(5, 150, 105, 0.28) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(20, 184, 166, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #032419 !important;
  --theme-header-bg: rgba(3, 30, 21, 0.92) !important;
  --theme-card-bg: rgba(4, 38, 26, 0.88) !important;
  --theme-card-border: rgba(16, 185, 129, 0.35) !important;
  --theme-primary-btn: linear-gradient(135deg, #059669, #047857) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #10b981, #059669) !important;
  --theme-primary-glow: rgba(16, 185, 129, 0.4) !important;
  --theme-accent-text: #34d399 !important;
  --theme-accent-border: rgba(16, 185, 129, 0.45) !important;
}

/* 3. MIDNIGHT SAPPHIRE */
[data-theme="midnight-sapphire"] {
  --theme-bg-color: #030a1c !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.35) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.28) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(2, 132, 199, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #06112e !important;
  --theme-header-bg: rgba(5, 14, 38, 0.92) !important;
  --theme-card-bg: rgba(7, 20, 52, 0.88) !important;
  --theme-card-border: rgba(37, 99, 235, 0.35) !important;
  --theme-primary-btn: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #3b82f6, #2563eb) !important;
  --theme-primary-glow: rgba(37, 99, 235, 0.4) !important;
  --theme-accent-text: #60a5fa !important;
  --theme-accent-border: rgba(37, 99, 235, 0.45) !important;
}

/* 4. TITANIUM GOLD */
[data-theme="titanium-gold"] {
  --theme-bg-color: #1a1205 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(217, 119, 6, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(180, 83, 9, 0.3) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #241807 !important;
  --theme-header-bg: rgba(28, 19, 6, 0.92) !important;
  --theme-card-bg: rgba(38, 26, 8, 0.88) !important;
  --theme-card-border: rgba(217, 119, 6, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #d97706, #b45309) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #f59e0b, #d97706) !important;
  --theme-primary-glow: rgba(217, 119, 6, 0.45) !important;
  --theme-accent-text: #fbbf24 !important;
  --theme-accent-border: rgba(217, 119, 6, 0.5) !important;
}

/* 5. CYBERPUNK NEON VIOLET */
[data-theme="cyber-violet"] {
  --theme-bg-color: #0d051e !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(139, 92, 246, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(217, 70, 239, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(99, 102, 241, 0.3) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #14082e !important;
  --theme-header-bg: rgba(16, 7, 36, 0.92) !important;
  --theme-card-bg: rgba(24, 11, 52, 0.88) !important;
  --theme-card-border: rgba(139, 92, 246, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #7c3aed, #c026d3) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #8b5cf6, #d946ef) !important;
  --theme-primary-glow: rgba(139, 92, 246, 0.45) !important;
  --theme-accent-text: #c084fc !important;
  --theme-accent-border: rgba(139, 92, 246, 0.5) !important;
}

/* 6. SUNSET COPPER AMBER */
[data-theme="sunset-amber"] {
  --theme-bg-color: #1a0803 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(234, 88, 12, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(225, 29, 72, 0.3) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #260c05 !important;
  --theme-header-bg: rgba(30, 10, 4, 0.92) !important;
  --theme-card-bg: rgba(40, 14, 6, 0.88) !important;
  --theme-card-border: rgba(234, 88, 12, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #ea580c, #be123c) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #f97316, #e11d48) !important;
  --theme-primary-glow: rgba(234, 88, 12, 0.45) !important;
  --theme-accent-text: #fb923c !important;
  --theme-accent-border: rgba(234, 88, 12, 0.5) !important;
}

/* 7. STORMY DUSK & ROSE SUNSET (User Image Palette 1) */
[data-theme="stormy-evening"] {
  --theme-bg-color: #192231 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(73, 78, 107, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(152, 94, 109, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(152, 135, 143, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #111722 !important;
  --theme-header-bg: rgba(25, 34, 49, 0.92) !important;
  --theme-card-bg: rgba(33, 44, 64, 0.88) !important;
  --theme-card-border: rgba(152, 94, 109, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #985e6d, #494e6b) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #b06e7e, #5a6082) !important;
  --theme-primary-glow: rgba(152, 94, 109, 0.4) !important;
  --theme-accent-text: #d4a5b0 !important;
  --theme-accent-border: rgba(152, 94, 109, 0.5) !important;
}

/* 8. EXECUTIVE ESPRESSO & CARAMEL (User Image Palette 2) */
[data-theme="espresso-executive"] {
  --theme-bg-color: #0f0a07 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(198, 146, 85, 0.38) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(40, 27, 18, 0.45) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(184, 134, 78, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #150e0a !important;
  --theme-header-bg: rgba(22, 15, 10, 0.92) !important;
  --theme-card-bg: rgba(28, 19, 13, 0.88) !important;
  --theme-card-border: rgba(198, 146, 85, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #c69255, #8a5f2e) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #d8a567, #c69255) !important;
  --theme-primary-glow: rgba(198, 146, 85, 0.45) !important;
  --theme-accent-text: #e6b882 !important;
  --theme-accent-border: rgba(198, 146, 85, 0.5) !important;
}

/* 9. OBSIDIAN SLATE MONOCHROME (User Image Palette 3) */
[data-theme="slate-monochrome"] {
  --theme-bg-color: #0a0e15 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(55, 63, 78, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(78, 87, 106, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(33, 38, 49, 0.3) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #121722 !important;
  --theme-header-bg: rgba(15, 21, 31, 0.92) !important;
  --theme-card-bg: rgba(21, 28, 40, 0.88) !important;
  --theme-card-border: rgba(78, 87, 106, 0.45) !important;
  --theme-primary-btn: linear-gradient(135deg, #4e576a, #212631) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #606b80, #373f4e) !important;
  --theme-primary-glow: rgba(78, 87, 106, 0.4) !important;
  --theme-accent-text: #e0e4eb !important;
  --theme-accent-border: rgba(110, 122, 146, 0.5) !important;
}

/* 10. ROYAL AMETHYST & DEEP INDIGO */
[data-theme="royal-amethyst"] {
  --theme-bg-color: #140b24 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(168, 85, 247, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(192, 132, 252, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #0e071a !important;
  --theme-header-bg: rgba(20, 11, 36, 0.92) !important;
  --theme-card-bg: rgba(28, 15, 51, 0.88) !important;
  --theme-card-border: rgba(168, 85, 247, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #a855f7, #6366f1) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #c084fc, #818cf8) !important;
  --theme-primary-glow: rgba(168, 85, 247, 0.45) !important;
  --theme-accent-text: #c084fc !important;
  --theme-accent-border: rgba(168, 85, 247, 0.5) !important;
}

/* 11. OCEANIC CYAN & DEEP TURQUOISE */
[data-theme="ocean-cyan"] {
  --theme-bg-color: #061a24 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(20, 184, 166, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(56, 189, 248, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #041219 !important;
  --theme-header-bg: rgba(6, 26, 36, 0.92) !important;
  --theme-card-bg: rgba(9, 38, 54, 0.88) !important;
  --theme-card-border: rgba(6, 182, 212, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #06b6d4, #0d9488) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #22d3ee, #14b8a6) !important;
  --theme-primary-glow: rgba(6, 182, 212, 0.45) !important;
  --theme-accent-text: #22d3ee !important;
  --theme-accent-border: rgba(6, 182, 212, 0.5) !important;
}

/* 12. ROYAL RUBY & IMPERIAL MAROON */
[data-theme="ruby-maroon"] {
  --theme-bg-color: #1a070a !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(244, 63, 94, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(190, 18, 60, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(225, 29, 72, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #120407 !important;
  --theme-header-bg: rgba(26, 7, 10, 0.92) !important;
  --theme-card-bg: rgba(38, 10, 15, 0.88) !important;
  --theme-card-border: rgba(244, 63, 94, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #f43f5e, #be123c) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #fb7185, #e11d48) !important;
  --theme-primary-glow: rgba(244, 63, 94, 0.45) !important;
  --theme-accent-text: #fb7185 !important;
  --theme-accent-border: rgba(244, 63, 94, 0.5) !important;
}

/* 13. ANTIQUE BRONZE & BRUSHED COPPER */
[data-theme="bronze-copper"] {
  --theme-bg-color: #181109 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(217, 119, 6, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(180, 83, 9, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #100b05 !important;
  --theme-header-bg: rgba(24, 17, 9, 0.92) !important;
  --theme-card-bg: rgba(36, 25, 13, 0.88) !important;
  --theme-card-border: rgba(217, 119, 6, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #d97706, #b45309) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #f59e0b, #d97706) !important;
  --theme-primary-glow: rgba(217, 119, 6, 0.45) !important;
  --theme-accent-text: #fbbf24 !important;
  --theme-accent-border: rgba(217, 119, 6, 0.5) !important;
}

/* 14. MATRIX NEON GREEN & CYBER BLACK */
[data-theme="matrix-emerald"] {
  --theme-bg-color: #051408 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(34, 197, 94, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(132, 204, 22, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #030e05 !important;
  --theme-header-bg: rgba(5, 20, 8, 0.92) !important;
  --theme-card-bg: rgba(8, 31, 13, 0.88) !important;
  --theme-card-border: rgba(34, 197, 94, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #22c55e, #15803d) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #4ade80, #16a34a) !important;
  --theme-primary-glow: rgba(34, 197, 94, 0.45) !important;
  --theme-accent-text: #4ade80 !important;
  --theme-accent-border: rgba(34, 197, 94, 0.5) !important;
}

/* 15. MIDNIGHT ROSE & SMOKED QUARTZ */
[data-theme="midnight-rose"] {
  --theme-bg-color: #1c1219 !important;
  --theme-bg-gradient: radial-gradient(at 0% 0%, rgba(251, 113, 133, 0.45) 0px, transparent 55%), radial-gradient(at 100% 0%, rgba(225, 29, 72, 0.35) 0px, transparent 55%), radial-gradient(at 50% 100%, rgba(244, 114, 182, 0.25) 0px, transparent 55%) !important;
  --theme-sidebar-bg: #140c12 !important;
  --theme-header-bg: rgba(28, 18, 25, 0.92) !important;
  --theme-card-bg: rgba(41, 26, 37, 0.88) !important;
  --theme-card-border: rgba(251, 113, 133, 0.4) !important;
  --theme-primary-btn: linear-gradient(135deg, #fb7185, #be123c) !important;
  --theme-primary-btn-hover: linear-gradient(135deg, #fda4af, #e11d48) !important;
  --theme-primary-glow: rgba(251, 113, 133, 0.45) !important;
  --theme-accent-text: #fda4af !important;
  --theme-accent-border: rgba(251, 113, 133, 0.5) !important;
}

/* APPLY THEME VARIABLES TO ALL APPLICATION LAYOUT COMPONENTS */
body {
  background-color: var(--theme-bg-color) !important;
  background-image: var(--theme-bg-gradient) !important;
  transition: background-color 0.3s ease, background-image 0.3s ease !important;
}

aside#appSidebar {
  background-color: var(--theme-sidebar-bg) !important;
  border-right-color: var(--theme-card-border) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease !important;
}

header {
  background-color: var(--theme-header-bg) !important;
  border-bottom-color: var(--theme-card-border) !important;
  transition: background-color 0.3s ease, border-color 0.3s ease !important;
}

.glass-panel,
.glass-dark,
.glass-panel-dark,
.from-slate-950 {
  background: var(--theme-card-bg) !important;
  border-color: var(--theme-card-border) !important;
  transition: background 0.3s ease, border-color 0.3s ease !important;
}

/* Modal Header Top Ribbon & Toast Container Overrides - 100% Theme Synchronized */
#toastContainer > div {
  background: var(--theme-card-bg) !important;
  border-color: var(--theme-card-border) !important;
  box-shadow: 0 10px 30px var(--theme-primary-glow) !important;
  transition: background 0.3s ease, border-color 0.3s ease !important;
}

#modalContainer div[class*="border-b"],
#modalContainer div[class*="from-"],
#modalContainer div[class*="to-"],
#modalContainer div[class*="bg-gradient-to-r"],
#modalContainer div[class*="bg-slate-900"],
#modalContainer div[class*="bg-slate-950"],
.modal-header {
  background-image: none !important;
  background: var(--theme-header-bg) !important;
  background-color: var(--theme-header-bg) !important;
  border-bottom-color: var(--theme-card-border) !important;
  transition: background 0.3s ease, border-color 0.3s ease !important;
}

#modalContainer div[class*="border-b"] h3,
#modalContainer div[class*="border-b"] h4,
#modalContainer div[class*="border-b"] button {
  color: #ffffff !important;
}

/* Primary Action Buttons across all views & modals */
button[class*="bg-emerald-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-blue-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-purple-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-amber-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-teal-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-indigo-"]:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-gradient-to-r"]:not([class*="from-rose-"]):not([class*="from-red-"]),
a[class*="bg-emerald-"],
a[class*="bg-blue-"],
a[class*="bg-purple-"] {
  background: var(--theme-primary-btn) !important;
  background-image: var(--theme-primary-btn) !important;
  border-color: var(--theme-accent-border) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px var(--theme-primary-glow) !important;
  transition: all 0.3s ease !important;
}

button[class*="bg-emerald-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-blue-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-purple-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-amber-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-teal-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-indigo-"]:hover:not([class*="bg-rose-"]):not([class*="bg-red-"]),
button[class*="bg-gradient-to-r"]:hover:not([class*="from-rose-"]):not([class*="from-red-"]),
a[class*="bg-emerald-"]:hover {
  background: var(--theme-primary-btn-hover) !important;
  background-image: var(--theme-primary-btn-hover) !important;
}

/* ALL Pill Badges, Banners & Decorative Frames */
span[class*="bg-purple-500/20"],
span[class*="bg-emerald-500/20"],
span[class*="bg-blue-500/20"],
span[class*="bg-amber-500/20"],
div[class*="bg-amber-500/10"],
div[class*="bg-emerald-500/10"],
div[class*="bg-blue-500/10"],
div[class*="bg-purple-500/10"],
div[class*="bg-slate-950"][class*="border-t"],
div[class*="bg-emerald-950"],
div[id="webcamNoPhotoContainer"] {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--theme-accent-border) !important;
  color: var(--theme-accent-text) !important;
}

/* ALL Text & Border Color Accent Tokens */
.text-blue-500,
.text-blue-600,
.text-blue-400,
.text-emerald-400,
.text-emerald-300,
.text-emerald-500,
.text-purple-300,
.text-purple-400,
.text-amber-300,
.text-amber-400,
.text-teal-300,
.text-teal-400,
.text-indigo-400 {
  color: var(--theme-accent-text) !important;
  transition: color 0.3s ease !important;
}

.border-emerald-500,
.border-emerald-500\/40,
.border-emerald-500\/30,
.border-purple-500\/40,
.border-purple-500,
.border-amber-500,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--theme-accent-border) !important;
  transition: border-color 0.3s ease !important;
}
body[data-theme="nordic-light"] input:not([type="checkbox"]):not([type="radio"]),
body[data-theme="nordic-light"] select,
body[data-theme="nordic-light"] textarea,
body[data-theme="nordic-light"] .glass-input {
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
body[data-theme="nordic-light"] table {
  color: #0f172a !important;
}
body[data-theme="nordic-light"] table thead,
body[data-theme="nordic-light"] table thead tr {
  background-color: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom-color: #cbd5e1 !important;
}
body[data-theme="nordic-light"] table th {
  color: #1e293b !important;
}
body[data-theme="nordic-light"] table tbody td {
  color: #0f172a !important;
  border-color: #f1f5f9 !important;
}
body[data-theme="nordic-light"] table tbody tr:hover {
  background-color: #f8fafc !important;
}
body[data-theme="nordic-light"] .fixed.inset-0 .glass-panel,
body[data-theme="nordic-light"] .fixed.inset-0 .glass-dark {
  background-color: #ffffff !important;
  color: #0f172a !important;
}
body[data-theme="nordic-light"] button.bg-slate-800,
body[data-theme="nordic-light"] button.bg-slate-900 {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}
body[data-theme="nordic-light"] button.bg-slate-800:hover,
body[data-theme="nordic-light"] button.bg-slate-900:hover {
  background-color: #cbd5e1 !important;
}

/* Hide Number Input Spinners (Up/Down Arrows) Across All Amount Inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}
