/* ============================================
   DESIGN TOKENS - Saree ERP Design System
   ============================================

   Modern Minimalist with Soft UI (Instagram-inspired)
   Based on: VISUAL_DESIGN_SYSTEM.md
   Last Updated: January 20, 2026
   ============================================ */

:root {
  /* ==================== COLORS ==================== */

  /* Primary (Teal) */
  --primary-50:  #EBF5F5;
  --primary-100: #D7EAEA;
  --primary-200: #AFD6D6;
  --primary-300: #87C1C1;
  --primary-400: #6EB0B0;
  --primary-500: #5A9B9F;  /* Main brand color */
  --primary-600: #4A8084;
  --primary-700: #3A6569;
  --primary-800: #2A4A4E;
  --primary-900: #1A2F33;

  /* Secondary (Warm Peach) */
  --secondary-50:  #FEF6F4;
  --secondary-100: #FDEDE9;
  --secondary-200: #FBDBD3;
  --secondary-300: #F9C9BD;
  --secondary-400: #F4A896;  /* Main accent color */
  --secondary-500: #E9876F;
  --secondary-600: #D46548;
  --secondary-700: #B04D2F;
  --secondary-800: #8C3D25;
  --secondary-900: #682D1B;

  /* Success (Soft Green) */
  --success-50:  #EFF7F1;
  --success-100: #DFEFE3;
  --success-200: #BFDFC7;
  --success-300: #9FCFAB;
  --success-400: #7FB685;  /* Main success color */
  --success-500: #669D6E;
  --success-600: #4C8457;
  --success-700: #3A6A43;
  --success-800: #2A502F;
  --success-900: #1A361B;

  /* Warning (Mustard) */
  --warning-50:  #FDF9ED;
  --warning-100: #FBF3DB;
  --warning-200: #F7E7B7;
  --warning-300: #F3DB93;
  --warning-400: #E9B872;  /* Main warning color */
  --warning-500: #D99F51;
  --warning-600: #C98630;
  --warning-700: #A66D1F;
  --warning-800: #835418;
  --warning-900: #603B11;

  /* Error (Coral Red) */
  --error-50:  #FDECED;
  --error-100: #FBD9DB;
  --error-200: #F7B3B7;
  --error-300: #F38D93;
  --error-400: #E76F72;  /* Main error color */
  --error-500: #D95157;
  --error-600: #C9333C;
  --error-700: #A61F2A;
  --error-800: #831520;
  --error-900: #600B16;

  /* Info (Sky Blue) */
  --info-50:  #EEF5FB;
  --info-100: #DDEBF7;
  --info-200: #BBD7EF;
  --info-300: #99C3E7;
  --info-400: #89B0D9;  /* Main info color */
  --info-500: #6995C9;
  --info-600: #4979B9;
  --info-700: #395E99;
  --info-800: #2A4379;
  --info-900: #1B2859;

  /* Neutrals (Warm Grays) */
  --neutral-50:  #FAFAF9;  /* Page background */
  --neutral-100: #F5F5F4;  /* Card hover, secondary bg */
  --neutral-200: #E7E5E4;  /* Borders, dividers */
  --neutral-300: #D6D3D1;  /* Disabled states */
  --neutral-400: #A8A29E;  /* Placeholder text */
  --neutral-500: #78716C;  /* Secondary text */
  --neutral-600: #57534E;  /* Body text */
  --neutral-700: #44403C;  /* Headings */
  --neutral-800: #292524;  /* High emphasis */
  --neutral-900: #1C1917;  /* Maximum contrast */

  /* Special Colors */
  --white: #FFFFFF;
  --black: #000000;

  /* ==================== TYPOGRAPHY ==================== */

  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Courier New', monospace;

  /* Type Scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */

  /* Font Weights */
  --font-normal:    400;
  --font-medium:    500;
  --font-semibold:  600;
  --font-bold:      700;

  /* Line Heights */
  --leading-tight:   1.25;
  --leading-normal:  1.5;
  --leading-relaxed: 1.75;

  /* Letter Spacing */
  --tracking-tight:  -0.025em;
  --tracking-normal: 0;
  --tracking-wide:   0.025em;
  --tracking-wider:  0.05em;

  /* ==================== SPACING ==================== */

  /* Spacing Scale (4px base unit) */
  --space-0:  0;
  --space-1:  0.25rem;   /* 4px */
  --space-2:  0.5rem;    /* 8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */

  /* ==================== BORDER RADIUS ==================== */

  --radius-sm:   0.25rem;  /* 4px */
  --radius-md:   0.5rem;   /* 8px */
  --radius-lg:   0.75rem;  /* 12px - Buttons/Inputs */
  --radius-xl:   1rem;     /* 16px - Cards */
  --radius-2xl:  1.5rem;   /* 24px - Modals */
  --radius-full: 9999px;   /* Full rounded (pills, badges) */

  /* ==================== SHADOWS ==================== */

  /* Layered Soft Shadows */
  --shadow-xs:
    0 1px 2px 0 rgba(0, 0, 0, 0.03),
    0 1px 3px 0 rgba(0, 0, 0, 0.02);

  --shadow-sm:
    0 2px 4px -1px rgba(0, 0, 0, 0.04),
    0 4px 6px -1px rgba(0, 0, 0, 0.03);

  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 8px 12px -2px rgba(0, 0, 0, 0.03);

  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.06),
    0 4px 10px -2px rgba(0, 0, 0, 0.04);

  --shadow-xl:
    0 20px 25px -5px rgba(0, 0, 0, 0.08),
    0 10px 20px -5px rgba(0, 0, 0, 0.04);

  --shadow-2xl:
    0 25px 50px -12px rgba(0, 0, 0, 0.12),
    0 12px 30px -8px rgba(0, 0, 0, 0.06);

  /* ==================== BREAKPOINTS ==================== */

  --screen-sm:  640px;   /* Small devices (phones) */
  --screen-md:  768px;   /* Medium devices (tablets) */
  --screen-lg:  1024px;  /* Large devices (laptops) */
  --screen-xl:  1280px;  /* Extra large devices (desktops) */
  --screen-2xl: 1536px;  /* Extra extra large (large desktops) */

  /* ==================== Z-INDEX ==================== */

  --z-base:     0;
  --z-sticky:   100;       /* Sticky headers - below modals */
  --z-dropdown: 1000;
  --z-fixed:    1030;      /* Fixed sidebar/nav */
  --z-modal:    1040;
  --z-popover:  1050;
  --z-tooltip:  1060;

  /* ==================== TRANSITIONS ==================== */

  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
  --transition-slower: 500ms ease;

  /* ==================== SIDEBAR ==================== */

  --sidebar-width-expanded: 260px;   /* 18-20% of typical desktop screen */
  --sidebar-width-collapsed: 64px;   /* Icon-only mode */
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] {
  /* Neutrals inverted */
  --neutral-50:  #1C1917;
  --neutral-100: #292524;
  --neutral-200: #3D3835;
  --neutral-300: #57534E;
  --neutral-400: #78716C;
  --neutral-500: #A8A29E;
  --neutral-600: #D6D3D1;
  --neutral-700: #E7E5E4;
  --neutral-800: #F5F5F4;
  --neutral-900: #FAFAF9;

  --white: #1C1917;
  --black: #FAFAF9;

  /* Primary (slightly brighter for dark bg) */
  --primary-50:  #1A2F33;
  --primary-100: #2A4A4E;
  --primary-200: #3A6569;
  --primary-500: #6EB0B0;
  --primary-600: #87C1C1;
  --primary-700: #AFD6D6;

  /* Success */
  --success-50:  #1A361B;
  --success-100: #2A502F;
  --success-600: #7FB685;
  --success-700: #9FCFAB;

  /* Warning */
  --warning-50:  #603B11;
  --warning-100: #835418;
  --warning-600: #E9B872;
  --warning-700: #F3DB93;

  /* Error */
  --error-50:  #600B16;
  --error-100: #831520;
  --error-600: #E76F72;
  --error-700: #F38D93;

  /* Info */
  --info-50:  #1B2859;
  --info-100: #2A4379;

  /* Shadows (darker for dark mode) */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.5);
  --shadow-2xl: 0 25px 50px rgba(0,0,0,0.6);
}

/* Dark mode specific overrides for common elements */
[data-theme="dark"] body {
  background: #1C1917;
  color: #E7E5E4;
}

[data-theme="dark"] .card {
  background: #292524;
  border-color: #3D3835;
}

[data-theme="dark"] .form-input,
[data-theme="dark"] select.form-input {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

[data-theme="dark"] .form-input:focus {
  border-color: #6EB0B0;
}

[data-theme="dark"] .topbar {
  background: #292524;
  border-bottom-color: #3D3835;
}

[data-theme="dark"] .sidebar {
  background: #292524;
  border-right-color: #3D3835;
}

[data-theme="dark"] .modal {
  background: #292524;
}

[data-theme="dark"] .modal-overlay,
[data-theme="dark"] .gpom-backdrop {
  background: rgba(0,0,0,0.7);
}

[data-theme="dark"] .btn-primary {
  background: #5A9B9F;
  color: #FAFAF9;
}

[data-theme="dark"] .btn-ghost {
  color: #A8A29E;
}

[data-theme="dark"] .btn-ghost:hover {
  background: #3D3835;
  color: #E7E5E4;
}

[data-theme="dark"] table thead th {
  background: #292524;
  color: #A8A29E;
  border-bottom-color: #3D3835;
}

[data-theme="dark"] table tbody tr {
  border-bottom-color: #3D3835;
}

[data-theme="dark"] table tbody tr:hover {
  background: #292524;
}

[data-theme="dark"] .badge-neutral {
  background: #3D3835;
  color: #A8A29E;
}

/* Scrollbars */
[data-theme="dark"] ::-webkit-scrollbar { background: #1C1917; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3D3835; }

/* Links */
[data-theme="dark"] a { color: #87C1C1; }
[data-theme="dark"] a:hover { color: #AFD6D6; }

/* Navigation */
[data-theme="dark"] .sidebar-nav a,
[data-theme="dark"] .sidebar-nav button { color: #A8A29E; }
[data-theme="dark"] .sidebar-nav a:hover,
[data-theme="dark"] .sidebar-nav button:hover { background: #3D3835; color: #E7E5E4; }
[data-theme="dark"] .sidebar-nav a.active { color: #87C1C1; background: #1A2F33; }
[data-theme="dark"] .bottom-nav { background: #292524; border-top-color: #3D3835; }
[data-theme="dark"] .bottom-nav a { color: #A8A29E; }
[data-theme="dark"] .bottom-nav a.active { color: #87C1C1; }

/* Section nav tabs */
[data-theme="dark"] .section-tabs { background: #292524; border-bottom-color: #3D3835; }
[data-theme="dark"] .section-tab-item { color: #A8A29E; }
[data-theme="dark"] .section-tab-item:hover { color: #E7E5E4; }
[data-theme="dark"] .section-tab-item.active { color: #87C1C1; border-bottom-color: #6EB0B0; }

/* Breadcrumb */
[data-theme="dark"] .topbar-breadcrumb .breadcrumb-item { color: #78716C; }
[data-theme="dark"] .topbar-breadcrumb .breadcrumb-item:last-child { color: #E7E5E4; }

/* Topbar elements */
[data-theme="dark"] .topbar-org { color: #E7E5E4; }
[data-theme="dark"] .topbar-user { color: #E7E5E4; }
[data-theme="dark"] .topbar-datetime { color: #78716C; }
[data-theme="dark"] .company-selector-btn,
[data-theme="dark"] .fy-selector-btn { background: #3D3835; border-color: #57534E; color: #E7E5E4; }
[data-theme="dark"] .company-selector-btn:hover,
[data-theme="dark"] .fy-selector-btn:hover { background: #57534E; }
[data-theme="dark"] .company-dropdown,
[data-theme="dark"] .fy-dropdown { background: #292524; border-color: #3D3835; }
[data-theme="dark"] .company-dropdown-item,
[data-theme="dark"] .fy-dropdown-item { color: #E7E5E4; }
[data-theme="dark"] .company-dropdown-item:hover,
[data-theme="dark"] .fy-dropdown-item:hover { background: #3D3835; }
[data-theme="dark"] .dev-user-selector-btn { background: #3D3835; border-color: #835418; color: #E7E5E4; }
[data-theme="dark"] .dev-user-dropdown { background: #292524; border-color: #3D3835; }
[data-theme="dark"] .dev-user-dropdown-item { color: #E7E5E4; border-bottom-color: #3D3835; }
[data-theme="dark"] .dev-user-dropdown-item:hover { background: #3D3835; }
[data-theme="dark"] .profile-dropdown-menu { background: #292524; border-color: #3D3835; }
[data-theme="dark"] .profile-dropdown-item { color: #E7E5E4; }
[data-theme="dark"] .profile-dropdown-item:hover { background: #3D3835; }
[data-theme="dark"] .topbar-role-badge { background: #2A4A4E; color: #87C1C1; }

/* Inventory table specific */
[data-theme="dark"] .inv-page { color: #E7E5E4; }
[data-theme="dark"] .inv-table-wrap { background: #292524; }
[data-theme="dark"] .inv-table thead th { background: #1C1917; color: #A8A29E; border-bottom-color: #3D3835; }
[data-theme="dark"] .inv-table tbody tr { border-bottom-color: #3D3835; }
[data-theme="dark"] .inv-table tbody tr:hover { background: #3D3835; }
[data-theme="dark"] .inv-tree-L0 { background: #292524; }
[data-theme="dark"] .inv-tree-L1 { background: #252220; }
[data-theme="dark"] .inv-tree-L2 { background: #1C1917; }
[data-theme="dark"] .inv-tree-cat-name { color: #E7E5E4; }
[data-theme="dark"] .inv-tree-gn-name { color: #D6D3D1; }
[data-theme="dark"] .inv-tree-item-name { color: #D6D3D1; }
[data-theme="dark"] .inv-group-row { background: #292524; border-bottom-color: #3D3835; }
[data-theme="dark"] .inv-group-row:hover { background: #3D3835; }
[data-theme="dark"] .inv-group-name { color: #E7E5E4; }
[data-theme="dark"] .inv-table tfoot td { background: #1C1917; color: #A8A29E; border-top-color: #3D3835; }

/* Search inputs */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* Filter dropdowns and chips */
[data-theme="dark"] .filter-chip { background: #3D3835; color: #D6D3D1; border-color: #57534E; }
[data-theme="dark"] .filter-chip:hover { background: #57534E; }
[data-theme="dark"] .filter-chip.active { background: #2A4A4E; color: #87C1C1; border-color: #3A6569; }

/* Cards and containers */
[data-theme="dark"] .card-header { border-bottom-color: #3D3835; }
[data-theme="dark"] .card-body { color: #D6D3D1; }
[data-theme="dark"] .settings-page { color: #E7E5E4; }

/* Modals */
[data-theme="dark"] .modal-header { border-bottom-color: #3D3835; background: #292524; }
[data-theme="dark"] .modal-footer { border-top-color: #3D3835; background: #292524; }
[data-theme="dark"] .modal-body { background: #1C1917; }
[data-theme="dark"] .alp-modal { background: #292524; }
[data-theme="dark"] .alp-header { border-bottom-color: #3D3835; }
[data-theme="dark"] .alp-body { background: #1C1917; }
[data-theme="dark"] .alp-footer { background: #292524; border-top-color: #3D3835; }
[data-theme="dark"] .alp-table thead th { background: #292524; color: #A8A29E; }
[data-theme="dark"] .alp-table tbody tr { border-bottom-color: #3D3835; }
[data-theme="dark"] .alp-table tbody tr:hover { background: #3D3835; }

/* IDD (item/design detail) popup */
[data-theme="dark"] .idd-header { background: #292524; border-bottom-color: #3D3835; }
[data-theme="dark"] .idd-stat { background: #1C1917; }
[data-theme="dark"] .idd-info-card { background: #1C1917; border-color: #3D3835; }
[data-theme="dark"] .idd-tab.active { border-bottom-color: #6EB0B0; color: #87C1C1; }

/* Toggle switches */
[data-theme="dark"] .toggle-item { border-bottom-color: #3D3835; }
[data-theme="dark"] .toggle-label { color: #E7E5E4; }
[data-theme="dark"] .toggle-description { color: #78716C; }

/* Badges */
[data-theme="dark"] .badge-primary { background: #2A4A4E; color: #87C1C1; }
[data-theme="dark"] .badge-warning { background: #603B11; color: #F3DB93; }
[data-theme="dark"] .badge-owner { background: #603B11; color: #F3DB93; border-color: #835418; }
[data-theme="dark"] .gpom-status-open { background: #2A502F; color: #9FCFAB; }
[data-theme="dark"] .gpom-status-closed { background: #3D3835; color: #A8A29E; }

/* Borders general */
[data-theme="dark"] hr { border-color: #3D3835; }
[data-theme="dark"] .co-tab-body { border-top-color: #3D3835; }
[data-theme="dark"] .co-member-row { border-bottom-color: #3D3835; }
[data-theme="dark"] .co-member-form { background: #1C1917; border-color: #3D3835; }

/* Info grid */
[data-theme="dark"] .info-grid .info-item { color: #D6D3D1; }
[data-theme="dark"] .info-label { color: #78716C; }
[data-theme="dark"] .info-value { color: #E7E5E4; }

/* Alerts drawer */
[data-theme="dark"] .inv-alerts-drawer { background: #292524; border-left-color: #3D3835; }
[data-theme="dark"] .inv-alerts-drawer-header { border-bottom-color: #3D3835; }

/* Dropdown menus (multi-select) */
[data-theme="dark"] .filter-dropdown { background: #292524; border-color: #3D3835; }
[data-theme="dark"] .filter-dropdown-item:hover { background: #3D3835; }

/* CPW (change password) modal */
[data-theme="dark"] .cpw-modal { background: #292524; }
[data-theme="dark"] .cpw-modal-header { border-bottom-color: #3D3835; }
[data-theme="dark"] .cpw-modal-footer { border-top-color: #3D3835; }
[data-theme="dark"] .cpw-input { background: #1C1917; border-color: #3D3835; color: #E7E5E4; }
[data-theme="dark"] .cpw-label { color: #D6D3D1; }

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE — Comprehensive overrides (2026-03-21)
   Covers: form inputs, ledger, reports, voucher entry, inventory browse,
   client/supplier master, app settings, and base.css elements
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── 1. Global form inputs — catch ALL input types including untyped ─── */
[data-theme="dark"] input:not([type]),
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="url"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="month"],
[data-theme="dark"] input[type="week"],
[data-theme="dark"] input[type="color"] {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* Form inputs inside .form-group (base.css uses white) */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* Form card (base.css) */
[data-theme="dark"] .form-card {
  background: #292524;
}

/* Form footer */
[data-theme="dark"] .form-footer {
  background: #1C1917;
  border-top-color: #3D3835;
}

/* Modal content (base.css) */
[data-theme="dark"] .modal-content {
  background: #292524;
}

/* Toggle switch / toggle group (base.css) */
[data-theme="dark"] .toggle-switch button {
  background: #1C1917;
  color: #A8A29E;
}
[data-theme="dark"] .toggle-switch button.active {
  background: #5A9B9F;
  color: #FAFAF9;
}
[data-theme="dark"] .toggle-switch button:not(.active):hover {
  background: #3D3835;
}
[data-theme="dark"] .toggle-group-item {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .toggle-group-item.active {
  background: #1A2F33;
  border-color: #6EB0B0;
  color: #87C1C1;
}

/* Multi-select (base.css) */
[data-theme="dark"] .multi-select-input {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .multi-select-dropdown {
  background: #1C1917;
  border-color: #3D3835;
}

/* Collapsible section (base.css) */
[data-theme="dark"] .collapsible-section {
  background: #292524;
  border-color: #3D3835;
}

/* ─── 2. Ledger page — voucher table rows ─── */
[data-theme="dark"] .voucher-list-table tbody tr {
  background: #1C1917;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .voucher-list-table tbody tr:hover {
  background: #292524;
}
[data-theme="dark"] .voucher-list-table th {
  background: #292524;
  color: #A8A29E;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .voucher-list-table td {
  color: #D6D3D1;
}

/* ─── 3. Reports page — all report elements ─── */
[data-theme="dark"] .reports-page {
  background: #1C1917;
  color: #E7E5E4;
}
[data-theme="dark"] .reports-toolbar {
  background: #292524;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .reports-period-btn {
  background: #1C1917;
  border-color: #3D3835;
  color: #D6D3D1;
}
[data-theme="dark"] .reports-period-btn:hover {
  background: #292524;
  border-color: #57534E;
}
[data-theme="dark"] .reports-period-dropdown {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .reports-date-input {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .reports-register-link {
  background: #1C1917;
  border-color: #3D3835;
  color: #87C1C1;
}
[data-theme="dark"] .reports-register-link:hover {
  background: #1A2F33;
  border-color: #3A6569;
}
[data-theme="dark"] .reports-stat-card {
  background: #292524;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="dark"] .reports-stat-card .stat-value {
  color: #F5F5F4;
}
[data-theme="dark"] .reports-chart-wrap {
  background: #292524;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="dark"] .reports-table-wrap {
  background: #292524;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
[data-theme="dark"] .reports-table thead th {
  background: #1C1917;
  color: #A8A29E;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .reports-table tbody td {
  color: #D6D3D1;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .reports-extra-filters select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .reports-extra-filters .filter-pill {
  background: #1C1917;
  border-color: #3D3835;
  color: #D6D3D1;
}
[data-theme="dark"] .reports-extra-filters .filter-pill:hover:not(.active) {
  background: #3D3835;
}
[data-theme="dark"] .reports-sub-tab:hover {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .reports-icon-btn {
  background: #1C1917;
  border-color: #3D3835;
  color: #A8A29E;
}
[data-theme="dark"] .reports-icon-btn:hover {
  background: #292524;
}
[data-theme="dark"] .reports-search {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* T-format (Trading/P&L) */
[data-theme="dark"] .t-format {
  background: #292524;
}
[data-theme="dark"] .t-format-col:first-child {
  border-right-color: #3D3835;
}
[data-theme="dark"] .t-format-header {
  background: linear-gradient(135deg, #292524, #1C1917);
  color: #E7E5E4;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .t-format-item {
  color: #D6D3D1;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .t-format-item:hover {
  background: #292524;
}
[data-theme="dark"] .t-format-item.group-head {
  background: #1C1917;
}

/* Cash flow sections */
[data-theme="dark"] .cf-section {
  background: #292524;
}
[data-theme="dark"] .cf-item {
  color: #D6D3D1;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .cf-pipe-node {
  background: #292524;
  border-color: #3D3835;
}

/* Item analytics */
[data-theme="dark"] .ia-filter-bar {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .ia-filter-bar select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .ss-trigger {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .ss-dropdown {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .ia-mode-btn {
  background: #1C1917;
  border-color: #3D3835;
  color: #A8A29E;
}
[data-theme="dark"] .ia-mode-btn.active {
  background: #1A2F33;
  border-color: #3A6569;
  color: #87C1C1;
}
[data-theme="dark"] .ia-ltab.active {
  background: #292524;
  color: #F5F5F4;
}
[data-theme="dark"] .ia-alert-card.warning {
  background: #603B11;
  border-left-color: #E9B872;
  color: #F3DB93;
}
[data-theme="dark"] .ia-alert-card.healthy {
  background: #1A361B;
  border-left-color: #7FB685;
  color: #9FCFAB;
}

/* ─── 4. Voucher Entry form ─── */
[data-theme="dark"] .voucher-page input,
[data-theme="dark"] .voucher-page select,
[data-theme="dark"] .voucher-page textarea {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── 5. Inventory Browse view ─── */
[data-theme="dark"] .panel {
  background: #292524;
}
[data-theme="dark"] .panel-header {
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .inventory-stat {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .design-card {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .design-card:hover {
  border-color: #3A6569;
}
[data-theme="dark"] .design-row {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .design-row:hover {
  border-color: #3A6569;
}
[data-theme="dark"] .matching-row {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .matching-row:hover {
  border-color: #3A6569;
}
[data-theme="dark"] .smart-search-input {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .smart-search-dropdown {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .popup-content {
  background: #292524;
}
[data-theme="dark"] .date-filter-trigger {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .date-filter-dropdown {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .mobile-nav-dots {
  background: #292524;
}
[data-theme="dark"] .ledger-swipe-content {
  background: #1C1917;
}

/* Inventory summary toolbar / filter panel */
[data-theme="dark"] .sum-toolbar {
  background: #292524;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .sum-val-btn {
  background: #1C1917;
  color: #D6D3D1;
}
[data-theme="dark"] .sum-val-btn:hover {
  background: #3D3835;
}
[data-theme="dark"] .sum-filter-btn-badge {
  background: #1C1917;
}
[data-theme="dark"] .sum-filter-panel {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .sum-row.tree-level-2 {
  background: #1C1917;
}
[data-theme="dark"] .sum-row.tree-level-3 {
  background: #1C1917;
}

/* ─── 6. Client Master ─── */
[data-theme="dark"] .cm-page input,
[data-theme="dark"] .cm-page select,
[data-theme="dark"] .cm-page textarea {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── 7. Supplier Master ─── */
[data-theme="dark"] .sm-page input,
[data-theme="dark"] .sm-page select,
[data-theme="dark"] .sm-page textarea {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── 8. App Settings — danger zone ─── */
[data-theme="dark"] .danger-item {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .danger-label {
  color: #F5F5F4;
}
[data-theme="dark"] .danger-description {
  color: #A8A29E;
}

/* Toggle slider knob — keep white in both modes */
[data-theme="dark"] .toggle-slider::before {
  background: #FAFAF9;
}

/* ─── Global master form modals ─── */
[data-theme="dark"] .gmf-modal {
  background: #292524;
}
[data-theme="dark"] .gmf-modal input,
[data-theme="dark"] .gmf-modal select,
[data-theme="dark"] .gmf-modal textarea {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── Placeholder text in dark mode ─── */
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #57534E;
}

/* ─── Label overrides ─── */
[data-theme="dark"] .form-label,
[data-theme="dark"] label {
  color: #D6D3D1;
}

/* ─── Generic table row backgrounds ─── */
[data-theme="dark"] table tbody tr {
  background: transparent;
}
[data-theme="dark"] table tbody td {
  border-bottom-color: #3D3835;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE — Extended sweep (2026-03-21)
   Covers: style.css legacy, inventory browse, forms, modals, GST, settings,
   warning boxes, collapsible cards, badges, all remaining gaps
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── style.css legacy overrides (used by create_pr, processors) ─── */
[data-theme="dark"] .navbar,
[data-theme="dark"] .hero,
[data-theme="dark"] .page-header,
[data-theme="dark"] .form-card,
[data-theme="dark"] .table-card,
[data-theme="dark"] .info-section {
  background: #292524;
  color: #E7E5E4;
}
[data-theme="dark"] .dropdown-content {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .dropdown-content a {
  color: #E7E5E4;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .dropdown-content a:hover {
  background: #3D3835;
}
[data-theme="dark"] thead {
  background: #292524;
}
[data-theme="dark"] th {
  color: #E7E5E4;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] td {
  color: #D6D3D1;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] tbody tr:hover {
  background: #292524;
}
[data-theme="dark"] footer {
  background: #292524;
  color: #A8A29E;
}
[data-theme="dark"] .form-group label {
  color: #D6D3D1;
}
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .card h3,
[data-theme="dark"] .page-header h1,
[data-theme="dark"] .form-card h3,
[data-theme="dark"] .table-card h3 {
  color: #E7E5E4;
}
[data-theme="dark"] .card p,
[data-theme="dark"] .page-header p,
[data-theme="dark"] .info-section li {
  color: #A8A29E;
}
[data-theme="dark"] .empty-message {
  color: #78716C;
}

/* ─── Grey Name Detail popup ─── */
[data-theme="dark"] .gnd-stat {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .gnd-header {
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .gnd-header-name {
  color: #E7E5E4;
}
[data-theme="dark"] .gnd-stats-strip {
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .gnd-tab-bar {
  background: #1C1917;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .gnd-tab.active {
  color: #87C1C1;
  border-bottom-color: #6EB0B0;
}
[data-theme="dark"] .gnd-info-card {
  background: #1C1917;
}
[data-theme="dark"] .gnd-info-value {
  color: #E7E5E4;
}
[data-theme="dark"] .gnd-badge {
  background: #3D3835;
  color: #D6D3D1;
}
[data-theme="dark"] .gnd-badge-primary {
  background: #2A4A4E;
  color: #87C1C1;
}
[data-theme="dark"] .gnd-badge-primary:hover {
  background: #3A6569;
}
[data-theme="dark"] .gnd-badge-secondary {
  background: #603B11;
  color: #F3DB93;
}
[data-theme="dark"] .gnd-badge-count {
  background: rgba(255,255,255,0.08);
}
[data-theme="dark"] .gnd-item-row {
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .gnd-item-row:hover {
  background: #1A2F33;
}
[data-theme="dark"] .gnd-item-stock {
  color: #D6D3D1;
}
[data-theme="dark"] .gnd-inward-table thead th {
  color: #A8A29E;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .gnd-inward-table tbody td {
  border-bottom-color: #3D3835;
  color: #D6D3D1;
}
[data-theme="dark"] .gnd-stat-value {
  color: #E7E5E4;
}
[data-theme="dark"] .gnd-hsn-badge {
  background: #3D3835;
  color: #A8A29E;
}
[data-theme="dark"] .gnd-category-badge {
  background: #2A4A4E;
  color: #87C1C1;
}

/* ─── IDD subtab bar dark mode ─── */
[data-theme="dark"] .idd-subtab-bar {
  background: #1C1917;
}
[data-theme="dark"] .idd-subtab.active {
  background: #292524;
  color: #E7E5E4;
}
[data-theme="dark"] .idd-tab-bar {
  background: #1C1917;
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .idd-stats-strip {
  border-bottom-color: #3D3835;
}
[data-theme="dark"] .idd-header-photo {
  background: #3D3835;
}
[data-theme="dark"] .idd-info-value {
  color: #E7E5E4;
}

/* ─── Inventory browse view (inline <style> blocks use background:white) ─── */
[data-theme="dark"] .inv-browse-card,
[data-theme="dark"] .inv-browse-panel,
[data-theme="dark"] .inv-toolbar,
[data-theme="dark"] .summary-bar,
[data-theme="dark"] .inv-category-card,
[data-theme="dark"] .inv-search-wrapper,
[data-theme="dark"] .inv-sidebar,
[data-theme="dark"] .inv-main {
  background: #292524 !important;
  border-color: #3D3835 !important;
}

/* ─── Collapsible card/section expanded state ─── */
[data-theme="dark"] .collapsible-header {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .collapsible-body,
[data-theme="dark"] .collapsible-content {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Warning/info boxes (hardcoded inline — both lower & UPPER case hex) ─── */
/* Warning yellow: #fef3c7 / #FEF3C7 */
[data-theme="dark"] [style*="background:#fef3c7"],
[data-theme="dark"] [style*="background: #fef3c7"],
[data-theme="dark"] [style*="background:#FEF3C7"],
[data-theme="dark"] [style*="background: #FEF3C7"] {
  background: #603B11 !important;
  border-color: #835418 !important;
  color: #F3DB93 !important;
}
/* Error light: #fef2f2 / #FEF2F2 */
[data-theme="dark"] [style*="background:#fef2f2"],
[data-theme="dark"] [style*="background: #fef2f2"],
[data-theme="dark"] [style*="background:#FEF2F2"],
[data-theme="dark"] [style*="background: #FEF2F2"] {
  background: #600B16 !important;
  border-color: #831520 !important;
  color: #F38D93 !important;
}
/* Error pink: #fee2e2 / #FEE2E2 */
[data-theme="dark"] [style*="background:#fee2e2"],
[data-theme="dark"] [style*="background: #fee2e2"],
[data-theme="dark"] [style*="background:#FEE2E2"],
[data-theme="dark"] [style*="background: #FEE2E2"] {
  background: #600B16 !important;
  border-color: #831520 !important;
  color: #F38D93 !important;
}
/* Warning warm: #fffbeb / #FFFBEB */
[data-theme="dark"] [style*="background:#fffbeb"],
[data-theme="dark"] [style*="background: #fffbeb"],
[data-theme="dark"] [style*="background:#FFFBEB"],
[data-theme="dark"] [style*="background: #FFFBEB"] {
  background: #603B11 !important;
  border-color: #835418 !important;
  color: #F3DB93 !important;
}
/* Warning: #fff3cd */
[data-theme="dark"] [style*="background:#fff3cd"],
[data-theme="dark"] [style*="background: #fff3cd"] {
  background: #603B11 !important;
  border-color: #835418 !important;
  color: #F3DB93 !important;
}
/* Warning: #fff3e0 */
[data-theme="dark"] [style*="background:#fff3e0"],
[data-theme="dark"] [style*="background: #fff3e0"] {
  background: #603B11 !important;
  border-color: #835418 !important;
  color: #F3DB93 !important;
}
/* Error: #fff5f5 */
[data-theme="dark"] [style*="background:#fff5f5"],
[data-theme="dark"] [style*="background: #fff5f5"] {
  background: #600B16 !important;
  border-color: #831520 !important;
  color: #F38D93 !important;
}
/* Info blue: #dbeafe / #DBEAFE */
[data-theme="dark"] [style*="background:#dbeafe"],
[data-theme="dark"] [style*="background: #dbeafe"],
[data-theme="dark"] [style*="background:#DBEAFE"],
[data-theme="dark"] [style*="background: #DBEAFE"] {
  background: #1B2859 !important;
  color: #99C3E7 !important;
}
/* Purple: #f3e8ff */
[data-theme="dark"] [style*="background: #f3e8ff"],
[data-theme="dark"] [style*="background:#f3e8ff"] {
  background: #2A1B59 !important;
  color: #C4A8FF !important;
}
/* Gray: #f3f4f6 / #F3F4F6 */
[data-theme="dark"] [style*="background: #f3f4f6"],
[data-theme="dark"] [style*="background:#f3f4f6"],
[data-theme="dark"] [style*="background: #F3F4F6"],
[data-theme="dark"] [style*="background:#F3F4F6"] {
  background: #3D3835 !important;
  color: #D6D3D1 !important;
}
/* Success green: #f0fdf4 */
[data-theme="dark"] [style*="background: #f0fdf4"],
[data-theme="dark"] [style*="background:#f0fdf4"] {
  background: #1A361B !important;
  color: #9FCFAB !important;
}

/* ─── Inline background:white overrides ─── */
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:#fff;"],
[data-theme="dark"] [style*="background: #fff;"],
[data-theme="dark"] [style*="background-color:white"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: #fff"] {
  background: #292524 !important;
  border-color: #3D3835 !important;
  color: #E7E5E4 !important;
}

/* ─── Settings pages (roles, users, company, FY) ─── */
[data-theme="dark"] .role-card,
[data-theme="dark"] .user-card,
[data-theme="dark"] .fy-card {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .perm-group-header {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .perm-item {
  border-bottom-color: #3D3835;
}

/* ─── Fixed assets page ─── */
[data-theme="dark"] .fa-card,
[data-theme="dark"] .fa-modal {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Process flow page ─── */
[data-theme="dark"] .pf-card,
[data-theme="dark"] .pf-step,
[data-theme="dark"] .pf-lot-card {
  background: #292524;
  border-color: #3D3835;
}

/* ─── GST compliance page ─── */
[data-theme="dark"] .gst-tab-content,
[data-theme="dark"] .gst-card,
[data-theme="dark"] .gst-table-wrap {
  background: #292524;
  border-color: #3D3835;
}

/* ─── FY balances / opening balances badge fix ─── */
[data-theme="dark"] .wz-type-badge.lump,
[data-theme="dark"] .wz-type-badge {
  background: #603B11;
  color: #F3DB93;
}

/* ─── Bill settlement modal ─── */
[data-theme="dark"] .bs-modal,
[data-theme="dark"] .bs-bill-row {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .bs-bill-row:hover {
  background: #3D3835;
}

/* ─── Voucher preview modal ─── */
[data-theme="dark"] .vp-modal,
[data-theme="dark"] .vp-header,
[data-theme="dark"] .vp-section {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .vp-body {
  background: #1C1917;
}

/* ─── Expense bill modal ─── */
[data-theme="dark"] .eb-modal {
  background: #292524;
  border-color: #3D3835;
}

/* ─── SO/PO detail modal ─── */
[data-theme="dark"] .so-detail-modal,
[data-theme="dark"] .po-detail-modal {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Challan detail modal ─── */
[data-theme="dark"] .cd-modal,
[data-theme="dark"] .cd-header {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Account ledger preview ─── */
[data-theme="dark"] .alp-search-input {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── Journey drawer ─── */
[data-theme="dark"] .journey-drawer,
[data-theme="dark"] .journey-drawer-content {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .journey-step {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .journey-step:hover {
  background: #3D3835;
}

/* ─── Photo upload component ─── */
[data-theme="dark"] [style*="background: #f8f9fa"],
[data-theme="dark"] [style*="background:#f8f9fa"] {
  background: #1C1917 !important;
}

/* ─── Processor page ─── */
[data-theme="dark"] .processor-card,
[data-theme="dark"] .processor-detail {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Dashboard index cards ─── */
[data-theme="dark"] .dashboard-stat-card,
[data-theme="dark"] .quick-action-card {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Global: any remaining white backgrounds from base.css ─── */
[data-theme="dark"] .tips-section {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .search-box {
  background: #1C1917;
  border-color: #3D3835;
}
[data-theme="dark"] .combobox-dropdown {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .combobox-item:hover {
  background: #3D3835;
}
[data-theme="dark"] .filter-bar {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Section collapsible triggers ─── */
[data-theme="dark"] .section-collapse-trigger {
  background: #292524;
  border-color: #3D3835;
  color: #E7E5E4;
}
[data-theme="dark"] .section-collapse-trigger:hover {
  background: #3D3835;
}

/* ─── Add account modal ─── */
[data-theme="dark"] .add-account-modal,
[data-theme="dark"] .add-account-form {
  background: #292524;
}
[data-theme="dark"] .add-account-modal input,
[data-theme="dark"] .add-account-modal select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── Bank reconciliation ─── */
[data-theme="dark"] .br-card,
[data-theme="dark"] .br-match-card,
[data-theme="dark"] .br-entry-row {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .br-entry-row:hover {
  background: #3D3835;
}

/* ─── Master form global modals (gmf) — extra specificity for nested elements ─── */
[data-theme="dark"] .gmf-modal label {
  color: #D6D3D1;
}
[data-theme="dark"] .gmf-modal .gmf-header {
  border-bottom-color: #3D3835;
}

/* ─── Color overrides for conditional inline :style bindings (lower + UPPER) ─── */
[data-theme="dark"] [style*="color:#92400e"],
[data-theme="dark"] [style*="color: #92400e"],
[data-theme="dark"] [style*="color:#92400E"],
[data-theme="dark"] [style*="color: #92400E"] {
  color: #F3DB93 !important;
}
[data-theme="dark"] [style*="color:#991b1b"],
[data-theme="dark"] [style*="color: #991b1b"],
[data-theme="dark"] [style*="color:#991B1B"],
[data-theme="dark"] [style*="color: #991B1B"] {
  color: #F38D93 !important;
}
[data-theme="dark"] [style*="color:#1e40af"],
[data-theme="dark"] [style*="color: #1e40af"],
[data-theme="dark"] [style*="color:#1E40AF"],
[data-theme="dark"] [style*="color: #1E40AF"] {
  color: #99C3E7 !important;
}
[data-theme="dark"] [style*="color: #6b7280"],
[data-theme="dark"] [style*="color:#6b7280"] {
  color: #A8A29E !important;
}
[data-theme="dark"] [style*="color: #374151"],
[data-theme="dark"] [style*="color:#374151"] {
  color: #D6D3D1 !important;
}
[data-theme="dark"] [style*="color: #6b21a8"],
[data-theme="dark"] [style*="color:#6b21a8"] {
  color: #C4A8FF !important;
}
[data-theme="dark"] [style*="color:#9a3412"] {
  color: #E9B872 !important;
}
[data-theme="dark"] [style*="color: #9a3412"] {
  color: #E9B872 !important;
}
[data-theme="dark"] [style*="color: #5b21b6"] {
  color: #C4A8FF !important;
}

/* ─── Border overrides for warning/error inline styles (lower + UPPER) ─── */
[data-theme="dark"] [style*="border: 1px solid #f59e0b"],
[data-theme="dark"] [style*="border:1px solid #f59e0b"],
[data-theme="dark"] [style*="border-color:#F59E0B"],
[data-theme="dark"] [style*="border-color: #F59E0B"],
[data-theme="dark"] [style*="border-color:#f59e0b"],
[data-theme="dark"] [style*="border-color: #f59e0b"] {
  border-color: #835418 !important;
}
[data-theme="dark"] [style*="border: 1px solid #fecaca"],
[data-theme="dark"] [style*="border:1px solid #fecaca"] {
  border-color: #831520 !important;
}
[data-theme="dark"] [style*="border: 1px solid #fed7aa"],
[data-theme="dark"] [style*="border:1px solid #fed7aa"] {
  border-color: #835418 !important;
}
[data-theme="dark"] [style*="border: 2px solid #e74c3c"],
[data-theme="dark"] [style*="border:2px solid #e74c3c"] {
  border-color: #E76F72 !important;
}
[data-theme="dark"] [style*="border: 1px solid #d1d5db"],
[data-theme="dark"] [style*="border:1px solid #d1d5db"] {
  border-color: #3D3835 !important;
}
[data-theme="dark"] [style*="border-left: 4px solid #ffc107"],
[data-theme="dark"] [style*="border-left:4px solid #ffc107"] {
  border-left-color: #E9B872 !important;
}
[data-theme="dark"] [style*="border-left: 4px solid #ff9800"],
[data-theme="dark"] [style*="border-left:4px solid #ff9800"] {
  border-left-color: #E9B872 !important;
}

/* ─── Select dropdowns with inline white bg ─── */
[data-theme="dark"] select[style*="background:white"],
[data-theme="dark"] select[style*="background: white"] {
  background: #1C1917 !important;
  border-color: #3D3835 !important;
  color: #E7E5E4 !important;
}

/* ─── Bill nav component ─── */
[data-theme="dark"] .bill-nav {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .bill-nav-item:hover {
  background: #3D3835;
}
[data-theme="dark"] .bill-nav-item.active {
  background: #1A2F33;
  color: #87C1C1;
}

/* ─── Process action modals ─── */
[data-theme="dark"] .pa-modal,
[data-theme="dark"] .pa-modal-content {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .pa-modal input,
[data-theme="dark"] .pa-modal select {
  background: #1C1917;
  border-color: #3D3835;
  color: #E7E5E4;
}

/* ─── Users access page ─── */
[data-theme="dark"] .ua-card,
[data-theme="dark"] .ua-modal {
  background: #292524;
  border-color: #3D3835;
}

/* ─── Additional inline color overrides (green success, etc.) ─── */
[data-theme="dark"] [style*="background:#dcfce7"],
[data-theme="dark"] [style*="background: #dcfce7"] {
  background: #1A361B !important;
  color: #9FCFAB !important;
}
[data-theme="dark"] [style*="color:#166534"],
[data-theme="dark"] [style*="color: #166534"] {
  color: #9FCFAB !important;
}
[data-theme="dark"] [style*="border-bottom:1px solid #fecaca"],
[data-theme="dark"] [style*="border-bottom: 1px solid #fecaca"] {
  border-bottom-color: #831520 !important;
}

/* ─── Misc inline overrides: #f0f0f0, #e0e0e0 borders ─── */
[data-theme="dark"] [style*="border-bottom: 1px solid #f0f0f0"],
[data-theme="dark"] [style*="border-bottom:1px solid #f0f0f0"] {
  border-bottom-color: #3D3835 !important;
}

/* ─── Ensure all modals with inline white bg are dark ─── */
[data-theme="dark"] .ipl-po-modal {
  background: #292524;
  border-color: #3D3835;
}

/* ─── GST compliance page specific ─── */
[data-theme="dark"] .gst-link-result {
  background: #292524;
  border-color: #3D3835;
}
[data-theme="dark"] .gst-section-title {
  color: #E7E5E4;
}
