@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Prompt:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0d1321;
  --card-bg: rgba(17, 25, 40, 0.45);
  --card-border: rgba(255, 255, 255, 0.08);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #4b5563;
  
  --primary: #10b981;
  --primary-glow: rgba(16, 185, 129, 0.2);
  --secondary: #3b82f6;
  --secondary-glow: rgba(59, 130, 246, 0.2);
  --accent: #f59e0b;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.2);
  
  --sidebar-width: 260px;
  --border-radius: 16px;
  --transition: all 0.25s ease;
  --font-family: 'Outfit', 'Prompt', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Glassmorphism base */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* ----------------------------------------------------
   LOGIN SCREEN STYLES
   ---------------------------------------------------- */
.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: #050811;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 40%);
  animation: bgRotate 20s linear infinite;
}

@keyframes bgRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  position: relative;
  z-index: 10;
  text-align: center;
}

.login-logo {
  display: inline-flex;
  padding: 16px;
  border-radius: 50%;
  background: var(--primary-glow);
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: 0 0 20px var(--primary-glow);
}

.login-card h2 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 30px;
}

.form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  margin-bottom: 20px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i, .input-with-icon svg {
  position: absolute;
  left: 14px;
  color: var(--text-secondary);
  width: 18px;
  height: 18px;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: white;
  font-family: var(--font-family);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.input-with-icon input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px var(--primary-glow);
}

.login-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
  border: none;
  color: white;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.credentials-badge {
  margin-top: 24px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--card-border);
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ----------------------------------------------------
   MAIN APP LAYOUT
   ---------------------------------------------------- */
.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* Sidebar navigation */
aside {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  background: var(--bg-primary);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
}

aside .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding-left: 8px;
}

aside .logo svg {
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

aside .logo h1 {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, white, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

aside nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nav-item i, .nav-item svg {
  width: 18px;
  height: 18px;
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: var(--primary);
  background: var(--primary-glow);
  border-color: rgba(16, 185, 129, 0.15);
}

.nav-item.active svg {
  color: var(--primary);
}

.logout-section {
  padding-top: 14px;
  border-top: 1px solid var(--card-border);
}

/* Main Area */
main {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  min-height: 100vh;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background-image: 
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 16px;
}

header h2 {
  font-size: 24px;
  font-weight: 700;
}

header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.page {
  display: none;
  animation: pageFadeIn 0.3s ease-out;
}

.page.active {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------------------
   CARDS & GRIDS
   ---------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
  opacity: 0.12;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Dashboard Sections Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.card-panel {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card-panel h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

/* Lists and Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid var(--card-border);
}

td {
  padding: 14px 12px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.badge {
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.badge-income { background: rgba(16, 185, 129, 0.1); color: var(--primary); }
.badge-expense { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-secondary { background: rgba(59, 130, 246, 0.1); color: var(--secondary); }

/* Bank accounts card design */
.bank-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.acc-card {
  padding: 20px;
  color: white;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

.acc-card::before {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}

.acc-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.acc-card-balance {
  font-size: 22px;
  font-weight: 700;
  margin-top: 10px;
}

.acc-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: 0.8;
  margin-top: 14px;
}

/* Forms controls */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
}

.btn:hover { background: rgba(255,255,255,0.08); }
.btn-primary { background: var(--primary); color: white; border-color: transparent; }
.btn-primary:hover { background: #059669; }
.btn-secondary { background: var(--secondary); color: white; border-color: transparent; }
.btn-secondary:hover { background: #2563eb; }
.btn-danger { background: var(--danger); color: white; border-color: transparent; }
.btn-danger:hover { background: #dc2626; }

input, select, textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  color: white;
  font-family: var(--font-family);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.filters-group {
  display: flex;
  gap: 10px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s ease-out;
}

.modal-backdrop.active { display: flex; }

.modal-card {
  width: 100%;
  max-width: 520px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 22px;
  cursor: pointer;
}

.modal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-form-grid .full { grid-column: 1 / -1; }

/* Liabilities list bar */
.liab-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}
.liab-progress-fill {
  height: 100%;
  background: var(--purple);
}

/* Printable billing */
@media print {
  body * {
    visibility: hidden !important;
  }
  #modal-print-preview, #modal-print-preview * {
    visibility: visible !important;
  }
  #modal-print-preview {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: white !important;
    overflow: visible !important;
  }
  .print-banner {
    display: none !important;
  }
  .print-page-wrapper {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }
  #print-a4-page {
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
  }
}

/* Responsiveness & Mobile Friendly Enhancements */
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  aside {
    position: fixed !important;
    left: -280px !important;
    top: 0 !important;
    width: 280px !important;
    height: 100vh !important;
    z-index: 1000 !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 8px 0 25px rgba(0, 0, 0, 0.4) !important;
  }
  aside.open {
    left: 0 !important;
  }
  aside .logo h1, aside .nav-item span, aside .logout-section span {
    display: inline !important;
  }
  aside .logo {
    justify-content: flex-start !important;
    padding-left: 8px !important;
  }
  .nav-item {
    justify-content: flex-start !important;
  }
  main {
    margin-left: 0 !important;
    padding: 16px !important;
    width: 100% !important;
  }
  .stats-grid {
    grid-template-columns: 1fr !important;
  }
  #dash-accounts-two-columns {
    grid-template-columns: 1fr !important;
  }
  
  /* Auto-fold any flex row wrappers with gap to vertical stack on smaller screens */
  div[style*="display:flex"][style*="gap"] {
    flex-wrap: wrap !important;
  }
  
  /* Page title layout styling adjustments for mobile */
  header {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
  }
  header > div {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  /* Ensure all tables scroll horizontally on swipe instead of overflowing layout */
  .table-container {
    overflow-x: auto !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Form group responsive margins */
  .form-group {
    width: 100% !important;
  }
}

/* Sub-tabs Navigation for Customers/Billing */
.sub-tabs-container {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 24px;
  padding-bottom: 2px;
}

.sub-tab-link {
  color: #64748b;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sub-tab-link:hover {
  color: var(--primary-color, #3b82f6);
}

.sub-tab-link.active {
  color: #3b82f6 !important;
  border-bottom-color: #3b82f6 !important;
  font-weight: 600;
}

.sub-tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.sub-tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Color theme selector block */
.theme-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.theme-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-picker-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.theme-picker-item.active {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
}

.theme-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

/* Tax range slider styling */
.tax-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: rgba(255,255,255,0.1) !important;
  outline: none;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 0;
  border: none;
  cursor: pointer;
}
.tax-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  transition: transform 0.1s;
}
.tax-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}
.tax-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3b82f6;
  cursor: pointer;
  border: none;
  transition: transform 0.1s;
}
.tax-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
}

/* Premium Tax Pull Badges */
.tax-pull-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  margin-left: 4px;
  line-height: 1.2;
}
.tax-pull-badge.real {
  background: rgba(16, 185, 129, 0.08);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.15);
}
.tax-pull-badge.real:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.1);
}
.tax-pull-badge.pred {
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.15);
}
.tax-pull-badge.pred:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

/* Tax Form Styling Enhancements */
.tax-section-card {
  border-left-width: 4px !important;
  border-left-style: solid !important;
  transition: all 0.3s ease;
}
.tax-section-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border-color: var(--primary);
}
.tax-label-desc {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Light Theme Variables and Element Styles */
body.light-theme {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-border: rgba(0, 0, 0, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

body.light-theme input, 
body.light-theme select, 
body.light-theme textarea {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

body.light-theme input::placeholder {
  color: #94a3b8 !important;
}

body.light-theme .nav-item:hover,
body.light-theme .nav-item.active {
  background: rgba(16, 185, 129, 0.08) !important;
}

body.light-theme .card-panel {
  background: #ffffff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme .login-screen {
  background: #f1f5f9 !important;
}

body.light-theme .login-card {
  background: #ffffff !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid #e2e8f0 !important;
}

body.light-theme table.data-table th {
  background: #f8fafc !important;
  color: #334155 !important;
  border-bottom: 2px solid #e2e8f0 !important;
}

body.light-theme table.data-table td {
  border-bottom: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

body.light-theme table.data-table tr:hover {
  background: #f8fafc !important;
}

/* Theme Toggle Icon Display rules */
body:not(.light-theme) .dark-icon {
  display: flex !important;
}
body:not(.light-theme) .light-icon {
  display: none !important;
}
body.light-theme .dark-icon {
  display: none !important;
}
body.light-theme .light-icon {
  display: flex !important;
}

body.light-theme #login-theme-toggle,
body.light-theme #header-theme-toggle {
  background: rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #0f172a !important;
}/* Toggle Switch Styles */
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255,255,255,0.1);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
input:checked + .toggle-slider {
  background-color: var(--primary);
  border-color: var(--primary);
}
input:checked + .toggle-slider:before {
  transform: translateX(24px);
}

body.light-theme .toggle-slider {
  background-color: rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.1);
}
body.light-theme input:checked + .toggle-slider {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Light Theme Overrides for Hardcoded/Inline Colors */
body.light-theme select,
body.light-theme input,
body.light-theme textarea {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

body.light-theme aside .logo h1 {
  background: linear-gradient(135deg, #0f172a, var(--primary)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6 {
  color: #0f172a !important;
}

body.light-theme .stat-value {
  color: #0f172a !important;
}

body.light-theme table th {
  color: #334155 !important;
  background-color: #f1f5f9 !important;
  border-bottom: 2px solid #cbd5e1 !important;
}

body.light-theme table td {
  color: #0f172a !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

body.light-theme table tr:hover td {
  background: #f8fafc !important;
}

body.light-theme #lbl-fore-retire-wealth,
body.light-theme #lbl-fore-diagnosis-value,
body.light-theme #lbl-retire-year-header,
body.light-theme .forecast-summary h3,
body.light-theme .forecast-summary div {
  color: #0f172a !important;
}

body.light-theme .login-card,
body.light-theme .card-panel,
body.light-theme .glass,
body.light-theme .modal-card {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Fix inline styling with high-contrast rules */
body.light-theme :not(.btn):not(button)[style*="color:white"],
body.light-theme :not(.btn):not(button)[style*="color: white"],
body.light-theme :not(.btn):not(button)[style*="color:#fff"],
body.light-theme :not(.btn):not(button)[style*="color:#ffffff"],
body.light-theme :not(.btn):not(button)[style*="color: #fff"],
body.light-theme :not(.btn):not(button)[style*="color: #ffffff"] {
  color: #0f172a !important;
}

body.light-theme [style*="rgba(255,255,255,0.0"],
body.light-theme [style*="rgba(255, 255, 255, 0.0"],
body.light-theme [style*="rgba(255,255,255,0.1"],
body.light-theme [style*="rgba(255, 255, 255, 0.1"] {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

body.light-theme [style*="border:1px solid rgba(255,255,255"],
body.light-theme [style*="border: 1px solid rgba(255, 255, 255"],
body.light-theme [style*="border:1px dashed rgba(255,255,255"],
body.light-theme [style*="border: 1px dashed rgba(255, 255, 255"],
body.light-theme [style*="border-color:rgba(255,255,255"],
body.light-theme [style*="border-color: rgba(255, 255, 255"] {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

