/* ==========================================================================
   Electronics Inventory Management System (EIMS) - Orange, White & Black Theme
   Colors: Orange (#f97316 / #ea580c), White (#ffffff), Black (#000000 / #0a0a0a)
   ========================================================================== */

:root {
    --bs-primary: #f97316;
    --bs-primary-rgb: 249, 115, 22;
    --bs-link-color: #f97316;
    --bs-link-hover-color: #ea580c;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fff7ed;
    --primary-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --orange-primary: #f97316;
    --orange-dark: #ea580c;
    --orange-hover: #c2410c;
    --orange-light: #fff7ed;
    --orange-border: #fed7aa;
}

:root,
[data-bs-theme="light"] {
    --bg-content: #ffffff;
    --bg-sidebar: #ea580c;
    --bg-sidebar-header: #c2410c;
    --bg-navbar: #ffffff;
    --bg-card: #ffffff;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fff7ed;
    --primary-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    --text-main: #000000;
    --text-secondary: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-subtle: #f3f4f6;
    color-scheme: light;
}

[data-bs-theme="dark"] {
    --bg-content: #000000;
    --bg-sidebar: #c2410c;
    --bg-sidebar-header: #9a3412;
    --bg-navbar: #0a0a0a;
    --bg-card: #121212;
    --primary: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #271406;
    --primary-gradient: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
    --text-main: #ffffff;
    --text-secondary: #e4e4e7;
    --text-muted: #a1a1aa;
    --border-color: #27272a;
    --border-subtle: #18181b;
    color-scheme: dark;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-content);
    color: var(--text-main);
    overflow-x: hidden;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--primary-dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #f97316;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Utility */
.bg-content { background-color: var(--bg-content) !important; }
.bg-sidebar { background-color: var(--bg-sidebar) !important; }
.bg-navbar { background-color: var(--bg-navbar) !important; }
.bg-card { background-color: var(--bg-card) !important; }
.text-muted { color: var(--text-muted) !important; }
.border-secondary-subtle { border-color: var(--border-color) !important; }

.text-primary { color: #f97316 !important; }
.bg-primary { background-color: #f97316 !important; }
.border-primary { border-color: #f97316 !important; }

/* Main Layout Wrapper */
.wrapper {
    width: 100%;
}
#content {
    width: calc(100% - 260px);
    transition: all 0.3s;
    background-color: var(--bg-content);
}

/* Modern Cards */
.card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.03);
    border-radius: 0.75rem;
    color: var(--text-main);
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    font-weight: 600;
}

/* ==========================================================================
   Table Styling (Light Mode: White Areas, Black Fonts, Orange Accents)
   ========================================================================== */
.table,
.table-dark {
    --bs-table-bg: #ffffff !important;
    --bs-table-striped-bg: #fafafa !important;
    --bs-table-striped-color: #000000 !important;
    --bs-table-active-bg: #fff7ed !important;
    --bs-table-active-color: #ea580c !important;
    --bs-table-hover-bg: #fff7ed !important;
    --bs-table-hover-color: #ea580c !important;
    --bs-table-color: #000000 !important;
    --bs-table-border-color: #e5e7eb !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #e5e7eb !important;
}

.table > :not(caption) > * > *,
.table-dark > :not(caption) > * > * {
    background-color: var(--bs-table-bg, #ffffff) !important;
    color: #000000 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.table-dark.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #fafafa !important;
    color: #000000 !important;
}

.table-striped > tbody > tr:nth-of-type(even) > *,
.table-dark.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.table-hover > tbody > tr:hover > *,
.table-dark.table-hover > tbody > tr:hover > * {
    background-color: #fff7ed !important;
    color: #ea580c !important;
}

thead th,
.table-dark thead th {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f97316 !important;
}

.table td,
.table th,
.table-dark td,
.table-dark th {
    color: #000000 !important;
}

/* ==========================================================================
   Table Styling (Dark Mode: Jet Black, White Fonts, Orange Accents)
   ========================================================================== */
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .table-dark {
    --bs-table-bg: #121212 !important;
    --bs-table-striped-bg: #18181b !important;
    --bs-table-striped-color: #ffffff !important;
    --bs-table-active-bg: #271406 !important;
    --bs-table-active-color: #fb923c !important;
    --bs-table-hover-bg: #271406 !important;
    --bs-table-hover-color: #fb923c !important;
    --bs-table-color: #ffffff !important;
    --bs-table-border-color: #27272a !important;
    background-color: #121212 !important;
    color: #ffffff !important;
    border-color: #27272a !important;
}

[data-bs-theme="dark"] .table > :not(caption) > * > *,
[data-bs-theme="dark"] .table-dark > :not(caption) > * > * {
    background-color: var(--bs-table-bg, #121212) !important;
    color: #ffffff !important;
    border-bottom: 1px solid #27272a !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > *,
[data-bs-theme="dark"] .table-dark.table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #18181b !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > *,
[data-bs-theme="dark"] .table-dark.table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #121212 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > *,
[data-bs-theme="dark"] .table-dark.table-hover > tbody > tr:hover > * {
    background-color: #271406 !important;
    color: #fb923c !important;
}

[data-bs-theme="dark"] thead th,
[data-bs-theme="dark"] .table-dark thead th {
    background-color: #0a0a0a !important;
    color: #f97316 !important;
    border-bottom: 2px solid #f97316 !important;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th,
[data-bs-theme="dark"] .table-dark td,
[data-bs-theme="dark"] .table-dark th {
    color: #ffffff !important;
}

/* ==========================================================================
   Forms & Inputs (Orange Focus)
   ========================================================================== */
.form-control, .form-select {
    background-color: var(--bg-card) !important;
    border: 1px solid #d1d5db !important;
    color: var(--text-main) !important;
    border-radius: 0.5rem;
}
.form-control:focus, .form-select:focus {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25) !important;
}
.form-control::placeholder {
    color: #9ca3af !important;
}
.input-group-text {
    background-color: #f9fafb !important;
    border: 1px solid #d1d5db !important;
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #0a0a0a !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}
[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.3) !important;
}
[data-bs-theme="dark"] .input-group-text {
    background-color: #121212 !important;
    border-color: #27272a !important;
    color: #d1d5db !important;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */
.btn-theme-toggle {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}
.btn-theme-toggle:hover {
    border-color: #f97316 !important;
    color: #f97316 !important;
    background-color: #fff7ed !important;
}
[data-bs-theme="dark"] .btn-theme-toggle {
    background-color: #121212 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}
[data-bs-theme="dark"] .btn-theme-toggle:hover {
    border-color: #f97316 !important;
    color: #f97316 !important;
    background-color: #271406 !important;
}
.theme-icon-light, .theme-icon-dark {
    color: #f97316 !important;
}

/* Navbar */
.navbar-title {
    color: var(--text-main) !important;
}
.user-name {
    color: var(--text-main) !important;
}
.navbar {
    background-color: var(--bg-navbar) !important;
    border-bottom: 1px solid var(--border-color) !important;
}
[data-bs-theme="dark"] .navbar {
    background-color: var(--bg-navbar) !important;
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) !important;
}
[data-bs-theme="dark"] .navbar .nav-link {
    color: var(--text-secondary) !important;
}
[data-bs-theme="dark"] .navbar .nav-link:hover {
    color: #f97316 !important;
}

/* Footer */
.footer {
    background-color: var(--bg-navbar) !important;
    border-top: 1px solid var(--border-color) !important;
}

/* ==========================================================================
   Buttons (Orange, Black, White)
   ========================================================================== */
.btn-primary {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border: none !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35) !important;
    color: #ffffff !important;
    font-weight: 500;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%) !important;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.45) !important;
    color: #ffffff !important;
}
.btn-outline-primary {
    color: #f97316 !important;
    border-color: #f97316 !important;
    background: transparent !important;
    font-weight: 500;
}
.btn-outline-primary:hover {
    background: #f97316 !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
}
.btn-dark {
    background-color: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
    font-weight: 500;
}
.btn-dark:hover {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
}
.btn-outline-dark {
    color: var(--text-main) !important;
    border-color: #000000 !important;
}
.btn-outline-dark:hover {
    background-color: #000000 !important;
    color: #ffffff !important;
}
.btn-outline-secondary {
    color: var(--text-main) !important;
    border-color: #d1d5db !important;
    background-color: var(--bg-card) !important;
}
.btn-outline-secondary:hover {
    background-color: #fff7ed !important;
    border-color: #f97316 !important;
    color: #ea580c !important;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    border-color: #374151 !important;
    color: #e5e7eb !important;
    background-color: #121212 !important;
}
[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #271406 !important;
    border-color: #f97316 !important;
    color: #fb923c !important;
}

/* ==========================================================================
   Dropdowns
   ========================================================================== */
.dropdown-menu {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15) !important;
    color: var(--text-main) !important;
    border-radius: 0.65rem;
}
.dropdown-menu-dark {
    background-color: #121212 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}
.dropdown-item {
    color: var(--text-main) !important;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
}
.dropdown-item:hover {
    background-color: #fff7ed !important;
    color: #ea580c !important;
}
[data-bs-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}
[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: #271406 !important;
    color: #f97316 !important;
}
.dropdown-item.active {
    background-color: #f97316 !important;
    color: #ffffff !important;
}
.dropdown-divider {
    border-top: 1px solid var(--border-color) !important;
}

/* Stats Cards */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.15) !important;
    border-color: #fed7aa !important;
}
.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination {
    margin-bottom: 0;
}
.page-link {
    background-color: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
    font-weight: 500;
}
.page-link:hover {
    background-color: #fff7ed !important;
    color: #ea580c !important;
    border-color: #fed7aa !important;
}
[data-bs-theme="dark"] .page-link:hover {
    background-color: #271406 !important;
    color: #fb923c !important;
    border-color: #f97316 !important;
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35);
}

/* ==========================================================================
   Badges (Orange & Black Palette)
   ========================================================================== */
.badge {
    font-weight: 600;
    padding: 0.4em 0.75em;
    border-radius: 6px;
}
.badge.bg-primary { 
    background-color: #fff7ed !important; 
    color: #ea580c !important; 
    border: 1px solid #fed7aa !important; 
}
.badge.bg-dark, .badge.bg-black { 
    background-color: #000000 !important; 
    color: #ffffff !important; 
    border: 1px solid #000000 !important; 
}
.badge.bg-light { 
    background-color: #ffffff !important; 
    color: #000000 !important; 
    border: 1px solid #e5e7eb !important; 
}
.badge.bg-secondary { 
    background-color: #f3f4f6 !important; 
    color: #1f2937 !important; 
    border: 1px solid #e5e7eb !important; 
}
.badge.bg-success { background-color: #ecfdf5 !important; color: #047857 !important; border: 1px solid #a7f3d0; }
.badge.bg-danger  { background-color: #fef2f2 !important; color: #b91c1c !important; border: 1px solid #fecaca; }
.badge.bg-warning { background-color: #fffbeb !important; color: #b45309 !important; border: 1px solid #fde68a; }
.badge.bg-info    { background-color: #fff7ed !important; color: #ea580c !important; border: 1px solid #fed7aa; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
        position: fixed;
    }
    .sidebar.active {
        margin-left: 0;
    }
    #content {
        width: 100%;
    }
}

/* ==========================================================================
   Modern Vibrant Orange Sidebar Design
   ========================================================================== */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #f97316 0%, #ea580c 45%, #c2410c 100%) !important;
    border: none !important;
    border-right: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 4px 0 25px rgba(234, 88, 12, 0.28) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1040;
    position: relative;
}

.sidebar .sidebar-header {
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22) !important;
    padding: 1.35rem 1.25rem 1.15rem;
    background: rgba(0, 0, 0, 0.12) !important;
    backdrop-filter: blur(10px);
}

.sidebar .brand-icon {
    width: 44px;
    height: 44px;
    background: #ffffff !important;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sidebar .brand-icon:hover {
    transform: scale(1.08) rotate(5deg);
}
.sidebar .brand-icon i {
    color: #ea580c !important;
    font-size: 1.45rem !important;
}

.sidebar .brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff !important;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar .brand-subtitle {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.9) !important;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 600;
}

.sidebar #sidebarClose {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    padding: 4px 8px;
    transition: background 0.2s ease;
}
.sidebar #sidebarClose:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

/* Category Section Headings */
.sidebar .sidebar-heading {
    padding: 1.25rem 1rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8) !important;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar .sidebar-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* Primary Sidebar Links */
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 0.68rem 0.95rem;
    border-radius: 10px;
    border: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    margin: 3px 6px;
    gap: 10px;
}

.sidebar .nav-link i,
.sidebar .nav-group-btn i {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.sidebar .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(4px);
    backdrop-filter: blur(4px);
}

.sidebar .nav-link:hover i {
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Active Main Link (Crisp White Pill with Deep Orange Text) */
.sidebar .nav-link.active {
    background: #ffffff !important;
    color: #ea580c !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18) !important;
    border-radius: 10px !important;
    transform: none !important;
}

.sidebar .nav-link.active i,
.sidebar .nav-link.active span {
    color: #ea580c !important;
}

/* Accordion Group Buttons */
.sidebar .nav-group-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: rgba(255, 255, 255, 0.95) !important;
    padding: 0.68rem 0.95rem;
    border: none !important;
    background: transparent;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: left;
    cursor: pointer;
    margin: 3px 6px;
}

.sidebar .nav-group-btn:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(2px);
}

.sidebar .nav-group-btn:hover i {
    transform: scale(1.1);
}

.sidebar .nav-group-btn.group-active,
.sidebar .nav-group-btn[aria-expanded="true"] {
    color: #ffffff !important;
    background-color: rgba(0, 0, 0, 0.2) !important;
    font-weight: 600;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar .nav-group-btn .nav-chevron {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85) !important;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .nav-group-btn[aria-expanded="true"] .nav-chevron {
    transform: rotate(180deg);
    color: #ffffff !important;
}

/* Submenus */
.sidebar .nav-submenu {
    padding-left: 0.75rem;
    margin-top: 0.3rem;
    margin-bottom: 0.45rem;
    margin-left: 1.25rem;
    margin-right: 0.5rem;
    border: none !important;
    border-left: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.sidebar .nav-submenu .nav-link {
    font-size: 0.88rem;
    padding: 0.48rem 0.8rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.92) !important;
    margin: 2px 0;
}

.sidebar .nav-submenu .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(4px);
}

.sidebar .nav-submenu .nav-link.active {
    background: #ffffff !important;
    color: #ea580c !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16) !important;
    transform: none;
    border-radius: 8px !important;
    border-left: none !important;
}

.sidebar .nav-submenu .nav-link.active span {
    color: #ea580c !important;
}

.sidebar .nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    display: inline-block;
    transition: all 0.2s ease;
}

.sidebar .nav-submenu .nav-link:hover .nav-dot {
    background-color: #ffffff !important;
    box-shadow: 0 0 6px #ffffff;
    transform: scale(1.3);
}

.sidebar .nav-submenu .nav-link.active .nav-dot {
    background-color: #ea580c !important;
    box-shadow: 0 0 6px rgba(234, 88, 12, 0.8);
    transform: scale(1.3);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 5px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Dark Mode Sidebar Specifics */
[data-bs-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #ea580c 0%, #c2410c 60%, #9a3412 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}
[data-bs-theme="dark"] .sidebar .sidebar-header {
    background: rgba(0, 0, 0, 0.25) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ==========================================================================
   Sales & Operational Cards
   ========================================================================== */
.sales-kpi-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sales-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.15) !important;
    border-color: #fed7aa !important;
}
.sales-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.kpi-purple, .kpi-orange { background: #fff7ed !important; color: #ea580c !important; }
.kpi-green  { background: #ecfdf5 !important; color: #047857 !important; }
.kpi-red    { background: #fef2f2 !important; color: #b91c1c !important; }
.kpi-amber  { background: #fffbeb !important; color: #b45309 !important; }

.sales-filter-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
    padding: 1.2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}
.status-pill-filter {
    display: inline-flex;
    gap: 6px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
[data-bs-theme="dark"] .status-pill-filter {
    background: #000000 !important;
    border-color: #27272a !important;
}
.status-pill-item {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}
[data-bs-theme="dark"] .status-pill-item {
    color: #9ca3af !important;
}
.status-pill-item:hover {
    color: #ea580c;
    background: #ffffff;
}
[data-bs-theme="dark"] .status-pill-item:hover {
    color: #f97316 !important;
    background: #18181b !important;
}
.status-pill-item.active {
    color: #ffffff !important;
    background: #f97316 !important;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.35);
}

.sales-table-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.sales-table-card thead th {
    background-color: #ffffff !important;
    padding: 1rem 1.2rem;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #000000 !important;
    border: none !important;
    border-bottom: 2px solid #f97316 !important;
}
[data-bs-theme="dark"] .sales-table-card thead th {
    background-color: #0a0a0a !important;
    color: #f97316 !important;
    border-bottom: 2px solid #f97316 !important;
}
.sales-table-card tbody td {
    padding: 0.95rem 1.2rem;
    border-color: var(--border-color) !important;
    vertical-align: middle;
    color: var(--text-main);
}
.sales-table-card tbody tr:hover td {
    background-color: #fff7ed !important;
}
[data-bs-theme="dark"] .sales-table-card tbody tr:hover td {
    background-color: #271406 !important;
}

.customer-avatar-chip {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #c2410c;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.invoice-code-badge {
    font-family: 'JetBrains Mono', 'SFMono-Regular', monospace;
    font-size: 0.83rem;
    font-weight: 600;
    color: #c2410c;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 3px 8px;
    border-radius: 6px;
}
.pulse-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
.pulse-status-dot.dot-paid { background-color: #10b981; box-shadow: 0 0 6px #10b981; }
.pulse-status-dot.dot-partial { background-color: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.pulse-status-dot.dot-unpaid { background-color: #ef4444; box-shadow: 0 0 6px #ef4444; }

.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #4b5563;
    text-decoration: none;
}
.btn-action-icon:hover {
    color: #f97316;
    background: #fff7ed;
    border-color: #f97316;
    transform: translateY(-1px);
}
[data-bs-theme="dark"] .btn-action-icon {
    border-color: #27272a !important;
    background: #121212 !important;
    color: #d1d5db !important;
}
[data-bs-theme="dark"] .btn-action-icon:hover {
    color: #f97316 !important;
    background: #271406 !important;
    border-color: #f97316 !important;
}

/* ==========================================================================
   Universal High-Contrast Light Mode Rules (White Backgrounds, Black Fonts)
   ========================================================================== */
:root:not([data-bs-theme="dark"]),
[data-bs-theme="light"] {
    --bg-content: #ffffff;
    --bg-navbar: #ffffff;
    --bg-card: #ffffff;
    --text-main: #000000;
    --text-secondary: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-subtle: #f3f4f6;
}

[data-bs-theme="light"] h1, [data-bs-theme="light"] h2, [data-bs-theme="light"] h3, 
[data-bs-theme="light"] h4, [data-bs-theme="light"] h5, [data-bs-theme="light"] h6,
:root:not([data-bs-theme="dark"]) h1, :root:not([data-bs-theme="dark"]) h2, :root:not([data-bs-theme="dark"]) h3, 
:root:not([data-bs-theme="dark"]) h4, :root:not([data-bs-theme="dark"]) h5, :root:not([data-bs-theme="dark"]) h6 {
    color: #000000 !important;
    font-weight: 700;
}

[data-bs-theme="light"] .navbar-title,
:root:not([data-bs-theme="dark"]) .navbar-title {
    color: #000000 !important;
}

[data-bs-theme="light"] label,
:root:not([data-bs-theme="dark"]) label,
[data-bs-theme="light"] .form-label,
:root:not([data-bs-theme="dark"]) .form-label {
    color: #111827 !important;
    font-weight: 600;
}

/* Text white overrides in light mode */
[data-bs-theme="light"] .text-white:not(.btn *):not(.btn):not(.badge):not(.badge *):not(.avatar):not(.dropdown-menu-dark *):not(.alert *):not(.bg-primary *):not(.bg-success *):not(.bg-danger *):not(.bg-dark *):not(.sidebar *),
:root:not([data-bs-theme="dark"]) .text-white:not(.btn *):not(.btn):not(.badge):not(.badge *):not(.avatar):not(.dropdown-menu-dark *):not(.alert *):not(.bg-primary *):not(.bg-success *):not(.bg-danger *):not(.bg-dark *):not(.sidebar *) {
    color: #000000 !important;
}

[data-bs-theme="light"] strong.text-white:not(.sidebar *),
:root:not([data-bs-theme="dark"]) strong.text-white:not(.sidebar *),
[data-bs-theme="light"] span.text-white:not(.badge):not(.btn *):not(.sidebar *),
:root:not([data-bs-theme="dark"]) span.text-white:not(.badge):not(.btn *):not(.sidebar *),
[data-bs-theme="light"] div.text-white:not(.sidebar *):not(.avatar),
:root:not([data-bs-theme="dark"]) div.text-white:not(.sidebar *):not(.avatar) {
    color: #000000 !important;
}

/* Dark containers in light mode become white */
[data-bs-theme="light"] .bg-dark:not(.btn):not(.badge):not(.sidebar *):not(#sidebar):not(#sidebar *),
:root:not([data-bs-theme="dark"]) .bg-dark:not(.btn):not(.badge):not(.sidebar *):not(#sidebar):not(#sidebar *) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #e5e7eb !important;
}

/* Modals */
.modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
}
.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
}
.modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

/* ==========================================================================
   Dark Mode Typography & Surfaces
   ========================================================================== */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
    color: #ffffff !important;
}
[data-bs-theme="dark"] .navbar-title {
    color: #ffffff !important;
}
[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .form-label {
    color: #d1d5db !important;
}
[data-bs-theme="dark"] .text-white,
[data-bs-theme="dark"] strong.text-white {
    color: #ffffff !important;
}
[data-bs-theme="dark"] .text-white-50 {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .bg-dark {
    background-color: #121212 !important;
    color: #ffffff !important;
    border-color: #27272a !important;
}
[data-bs-theme="dark"] .border-secondary-subtle {
    border-color: #27272a !important;
}

/* ==========================================================================
   Print Stylesheet
   ========================================================================== */
@media print {
    @page {
        margin: 10mm 12mm;
        size: auto;
    }
    html, body {
        background-color: #ffffff !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #sidebar,
    .sidebar,
    .navbar,
    .footer,
    .flash-container,
    .d-print-none,
    .no-print,
    .btn,
    .pagination,
    .modal,
    .dropdown-menu,
    #sidebarCollapse,
    #sidebarClose {
        display: none !important;
    }
    .wrapper,
    #content,
    main {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    .card,
    .print-container {
        background: #ffffff !important;
        border: none !important;
        box-shadow: none !important;
        color: #000000 !important;
        margin-bottom: 0 !important;
    }
    .card-body {
        padding: 0 !important;
    }
    .card-header {
        background: transparent !important;
        border-bottom: 2px solid #000000 !important;
        color: #000000 !important;
        padding: 0 0 8px 0 !important;
    }
    .card-header h5,
    .card-header h6,
    h1, h2, h3, h4, h5, h6 {
        color: #000000 !important;
    }
    .text-white,
    .text-white-50,
    .text-muted,
    .text-secondary {
        color: #000000 !important;
    }
    .table,
    .table-dark,
    .table-striped,
    .table-hover {
        --bs-table-bg: transparent !important;
        --bs-table-striped-bg: #fafafa !important;
        --bs-table-color: #000000 !important;
        color: #000000 !important;
        border-collapse: collapse !important;
        width: 100% !important;
    }
    .table th,
    .table td {
        color: #000000 !important;
        border: 1px solid #d1d5db !important;
        padding: 6px 8px !important;
        background-color: transparent !important;
    }
    .table thead th {
        background-color: #f3f4f6 !important;
        color: #000000 !important;
        font-weight: 700 !important;
        border-bottom: 2px solid #000000 !important;
    }
    .table-borderless td,
    .table-borderless th {
        border: none !important;
    }
    .badge {
        border: 1px solid #000000 !important;
        color: #000000 !important;
        background: #ffffff !important;
        font-weight: 600 !important;
        padding: 2px 6px !important;
    }
    tr, .row, .card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    a {
        text-decoration: none !important;
        color: #000000 !important;
    }
    a[href^="http"]:after {
        content: "" !important;
    }
}

/* ==========================================================================
   Mobile & Tablet Responsive Sidebar Drawer & Touch Optimizations
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 280px !important;
        max-width: 85vw !important;
        z-index: 1060 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease !important;
        margin-left: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.55) !important;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.65);
        z-index: 1055;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .sidebar-backdrop.active {
        display: block;
        opacity: 1;
    }

    #content {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Mobile Header adjustments */
    .navbar {
        padding: 0.5rem 0.75rem !important;
    }

    .navbar-title {
        font-size: 1rem !important;
    }

    /* Notification dropdown mobile sizing */
    .notification-menu {
        position: fixed !important;
        top: 60px !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 80vh !important;
    }
}

/* ==========================================================================
   Top Navbar Notification Styles
   ========================================================================== */
.notification-dropdown .nav-link {
    transition: all 0.2s ease;
}

.notification-dropdown .nav-link:hover {
    background-color: rgba(249, 115, 22, 0.1);
}

.notification-menu {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.notif-item {
    transition: background-color 0.15s ease;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.notif-item:hover, .notif-item:focus {
    background-color: rgba(249, 115, 22, 0.06);
}

.notif-icon {
    transition: transform 0.2s ease;
}

.notif-item:hover .notif-icon {
    transform: scale(1.1);
}

.notif-tabs .btn {
    white-space: nowrap;
    transition: all 0.2s ease;
}

.notification-list::-webkit-scrollbar {
    width: 5px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.3);
    border-radius: 4px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(150, 150, 150, 0.5);
}

/* ==========================================================================
   Comprehensive Dark & Light Theme System Overrides
   ========================================================================== */

/* --------------------------------------------------------------------------
   DARK MODE ENFORCEMENTS (Deep Obsidian Surfaces, Pure White Typography & Orange Accents)
   -------------------------------------------------------------------------- */

[data-bs-theme="dark"] {
    background-color: #09090b !important;
    color: #f4f4f5 !important;
}

[data-bs-theme="dark"] body {
    background-color: #09090b !important;
    color: #f4f4f5 !important;
}

[data-bs-theme="dark"] #content {
    background-color: #09090b !important;
}

/* 1. Eliminate White Backgrounds & Bright Glare Surfaces */
[data-bs-theme="dark"] .bg-white,
[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .bg-light-subtle,
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="dark"] .bg-body-secondary,
[data-bs-theme="dark"] .bg-body-tertiary,
[data-bs-theme="dark"] .bg-secondary-subtle {
    background-color: #121215 !important;
    color: #ffffff !important;
    border-color: #27272a !important;
}

/* 2. Headings, Titles & Text (Pure Crisp White) */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4,
[data-bs-theme="dark"] .h5,
[data-bs-theme="dark"] .h6,
[data-bs-theme="dark"] .card-title,
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .modal-title,
[data-bs-theme="dark"] .offcanvas-title,
[data-bs-theme="dark"] .page-title,
[data-bs-theme="dark"] .navbar-title,
[data-bs-theme="dark"] .user-name,
[data-bs-theme="dark"] strong,
[data-bs-theme="dark"] b {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-dark,
[data-bs-theme="dark"] .text-black,
[data-bs-theme="dark"] .text-body,
[data-bs-theme="dark"] .text-body-emphasis {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] small.text-muted,
[data-bs-theme="dark"] .form-text {
    color: #a1a1aa !important;
}

[data-bs-theme="dark"] .text-secondary {
    color: #d4d4d8 !important;
}

[data-bs-theme="dark"] label,
[data-bs-theme="dark"] .form-label,
[data-bs-theme="dark"] .col-form-label {
    color: #f4f4f5 !important;
    font-weight: 500;
}

/* 3. Cards & Panels */
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card.bg-white,
[data-bs-theme="dark"] .card.bg-light {
    background-color: #121215 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: #0d0d10 !important;
    border-bottom: 1px solid #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .card-footer {
    background-color: #0d0d10 !important;
    border-top: 1px solid #27272a !important;
    color: #d4d4d8 !important;
}

[data-bs-theme="dark"] .card-body {
    color: #f4f4f5 !important;
}

/* 4. Tables (Pitch Dark Backgrounds, High-Contrast Headers & White Rows) */
[data-bs-theme="dark"] .table {
    --bs-table-bg: #121215 !important;
    --bs-table-striped-bg: #16161a !important;
    --bs-table-striped-color: #ffffff !important;
    --bs-table-hover-bg: #1f1b16 !important;
    --bs-table-hover-color: #ffffff !important;
    --bs-table-color: #ffffff !important;
    --bs-table-border-color: #27272a !important;
    background-color: #121215 !important;
    color: #ffffff !important;
    border-color: #27272a !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] thead.table-light,
[data-bs-theme="dark"] thead.table-light th,
[data-bs-theme="dark"] thead th,
[data-bs-theme="dark"] .table-light th,
[data-bs-theme="dark"] .table-light td {
    background-color: #09090b !important;
    color: #f97316 !important;
    border-bottom: 2px solid #f97316 !important;
}

[data-bs-theme="dark"] .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #ffffff !important;
    border-bottom: 1px solid #27272a !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #16161a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #121215 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table tbody tr:hover > * {
    background-color: #1f1b16 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    color: #ffffff !important;
    border-color: #27272a !important;
}

/* 5. Modals & Offcanvas Dialogs */
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .offcanvas {
    background-color: #121215 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
}

[data-bs-theme="dark"] .modal-header,
[data-bs-theme="dark"] .offcanvas-header {
    background-color: #09090b !important;
    border-bottom: 1px solid #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .modal-footer {
    background-color: #09090b !important;
    border-top: 1px solid #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .modal-body,
[data-bs-theme="dark"] .offcanvas-body {
    background-color: #121215 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
    opacity: 0.85;
}

[data-bs-theme="dark"] .btn-close:hover {
    opacity: 1;
}

/* 6. Form Inputs & Selects */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #09090b !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: #09090b !important;
    border-color: #f97316 !important;
    box-shadow: 0 0 0 0.25rem rgba(249, 115, 22, 0.25) !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: #71717a !important;
}

[data-bs-theme="dark"] .input-group-text {
    background-color: #18181b !important;
    border-color: #27272a !important;
    color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .form-check-input {
    background-color: #18181b !important;
    border-color: #3f3f46 !important;
}

[data-bs-theme="dark"] .form-check-input:checked {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
}

/* 7. Dropdown Menus */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #121215 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7) !important;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e4e4e7 !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: #1f1b16 !important;
    color: #f97316 !important;
}

[data-bs-theme="dark"] .dropdown-header {
    color: #a1a1aa !important;
}

[data-bs-theme="dark"] .dropdown-divider {
    border-color: #27272a !important;
}

/* 8. Badges (Dark Mode Contrast) */
[data-bs-theme="dark"] .badge.bg-light,
[data-bs-theme="dark"] .badge.bg-white {
    background-color: #27272a !important;
    color: #ffffff !important;
    border: 1px solid #3f3f46 !important;
}

[data-bs-theme="dark"] .badge.bg-secondary,
[data-bs-theme="dark"] .badge.bg-secondary-subtle {
    background-color: #18181b !important;
    color: #e4e4e7 !important;
    border: 1px solid #27272a !important;
}

[data-bs-theme="dark"] .badge.bg-primary {
    background-color: rgba(249, 115, 22, 0.2) !important;
    color: #fb923c !important;
    border: 1px solid rgba(249, 115, 22, 0.4) !important;
}

[data-bs-theme="dark"] .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

[data-bs-theme="dark"] .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

[data-bs-theme="dark"] .badge.bg-info {
    background-color: rgba(14, 165, 233, 0.2) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
}

/* 9. List Groups & Accordions */
[data-bs-theme="dark"] .list-group-item {
    background-color: #121215 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .accordion-item {
    background-color: #121215 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .accordion-button {
    background-color: #0d0d10 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
    background-color: #1f1b16 !important;
    color: #f97316 !important;
}

[data-bs-theme="dark"] .accordion-button::after {
    filter: invert(1) !important;
}

[data-bs-theme="dark"] .accordion-body {
    background-color: #121215 !important;
    color: #ffffff !important;
}

/* 10. Borders, Dividers & Outlines */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end,
[data-bs-theme="dark"] .border-secondary-subtle,
[data-bs-theme="dark"] hr {
    border-color: #27272a !important;
    opacity: 1 !important;
}

/* 11. Alerts */
[data-bs-theme="dark"] .alert {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .alert-info {
    background-color: #0c1c2e !important;
    border-color: #1e3a5f !important;
    color: #93c5fd !important;
}

[data-bs-theme="dark"] .alert-success {
    background-color: #082119 !important;
    border-color: #134e3a !important;
    color: #6ee7b7 !important;
}

[data-bs-theme="dark"] .alert-warning {
    background-color: #241706 !important;
    border-color: #593e10 !important;
    color: #fde68a !important;
}

[data-bs-theme="dark"] .alert-danger {
    background-color: #240c0f !important;
    border-color: #5c181f !important;
    color: #fca5a5 !important;
}

[data-bs-theme="dark"] .alert-light,
[data-bs-theme="dark"] .alert-secondary {
    background-color: #16161a !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

/* 12. Buttons in Dark Mode */
[data-bs-theme="dark"] .btn-light {
    background-color: #27272a !important;
    border-color: #3f3f46 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-light:hover {
    background-color: #3f3f46 !important;
    border-color: #52525b !important;
    color: #ffffff !important;
}

/* 13. Nav Tabs & Pills */
[data-bs-theme="dark"] .nav-tabs {
    border-bottom-color: #27272a !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    color: #a1a1aa !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    color: #f97316 !important;
    border-color: transparent !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background-color: #121215 !important;
    color: #f97316 !important;
    border-color: #27272a #27272a #121215 !important;
}

/* 14. Pagination */
[data-bs-theme="dark"] .page-link {
    background-color: #121215 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .page-item.disabled .page-link {
    background-color: #0d0d10 !important;
    border-color: #27272a !important;
    color: #52525b !important;
}

[data-bs-theme="dark"] .page-item.active .page-link {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    border-color: #ea580c !important;
    color: #ffffff !important;
}

/* 15. Notification Dropdown in Dark Mode */
[data-bs-theme="dark"] .notification-menu {
    background-color: #121215 !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .notif-item {
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .notif-item:hover {
    background-color: rgba(249, 115, 22, 0.1) !important;
}

[data-bs-theme="dark"] .notif-item .text-dark {
    color: #ffffff !important;
}

/* 16. Scrollbars in Dark Mode */
[data-bs-theme="dark"] ::-webkit-scrollbar-track {
    background: #09090b !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #27272a !important;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #f97316 !important;
}

/* 17. Reports Hub Dark Mode Enforcements */
[data-bs-theme="dark"] .report-hub {
    --hub-ink: #f4f4f5 !important;
    --hub-muted: #a1a1aa !important;
    --hub-line: #27272a !important;
    color: #f4f4f5 !important;
}

[data-bs-theme="dark"] .report-hub__intro {
    background: linear-gradient(115deg, #16161a 0%, #121215 58%, #1f1b16 100%) !important;
    border-color: #27272a !important;
}

[data-bs-theme="dark"] .report-hub__title {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .report-hub__search .form-control,
[data-bs-theme="dark"] .report-hub__search .input-group-text {
    background-color: #09090b !important;
    border-color: #27272a !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .report-hub__section {
    border-bottom-color: #27272a !important;
}

[data-bs-theme="dark"] .report-hub__section-head h3 {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .report-hub__section-head small {
    color: #a1a1aa !important;
}

[data-bs-theme="dark"] .report-hub__section-icon {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid #27272a !important;
    color: #f97316 !important;
}

[data-bs-theme="dark"] .report-hub__link {
    background-color: #121215 !important;
    background: #121215 !important;
    border: 1px solid #27272a !important;
    color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

[data-bs-theme="dark"] .report-hub__link:hover {
    background-color: #1f1b16 !important;
    background: #1f1b16 !important;
    border-color: #f97316 !important;
    color: #ffffff !important;
}

[data-bs-theme="dark"] .report-hub__link span {
    color: #ffffff !important;
}

[data-bs-theme="dark"] .report-hub__link:hover span {
    color: #fb923c !important;
}

[data-bs-theme="dark"] .report-hub__link i:first-child {
    color: #f97316 !important;
}

[data-bs-theme="dark"] .report-hub__link .bi-chevron-right {
    color: #71717a !important;
}

[data-bs-theme="dark"] .report-hub__link:hover .bi-chevron-right {
    color: #f97316 !important;
}

/* ==========================================================================
   Global Delete Confirmation Modal
   ========================================================================== */
.delete-icon-wrapper {
    position: relative;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-icon-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.18);
    animation: deletePulse 2s infinite ease-in-out;
}

.delete-icon-inner {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.12);
    border: 2px solid rgba(239, 68, 68, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.delete-icon-wrapper:hover .delete-icon-inner {
    transform: scale(1.08);
}

@keyframes deletePulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.22); opacity: 0.15; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.delete-item-preview {
    background-color: #f8fafc;
    border-color: #e2e8f0 !important;
    transition: all 0.2s ease;
}

[data-bs-theme="dark"] .delete-item-preview {
    background-color: #18181b !important;
    border-color: #27272a !important;
}

.delete-item-type-icon {
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.delete-warning-badge {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px dashed rgba(239, 68, 68, 0.25);
}

[data-bs-theme="dark"] .delete-warning-badge {
    background-color: rgba(239, 68, 68, 0.14);
    color: #f87171;
    border: 1px dashed rgba(239, 68, 68, 0.35);
}

#globalDeleteModal .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    transition: all 0.2s ease;
}

#globalDeleteModal .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35) !important;
}

/* ==========================================================================
   Modern Floating Toast Notifications System (EIMS)
   ========================================================================== */
.eims-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 14px;
    pointer-events: none;
    max-width: 460px;
    width: calc(100vw - 36px);
}

@media (max-width: 576px) {
    .eims-toast-container {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
    }
}

.eims-toast {
    position: relative;
    pointer-events: auto;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.16), 0 6px 16px -2px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    padding: 16px 16px 18px 18px;
    gap: 14px;
    overflow: hidden;
    transform-origin: top right;
    animation: eimsToastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

[data-bs-theme="dark"] .eims-toast {
    background-color: #161618 !important;
    border-color: #27272a !important;
    box-shadow: 0 20px 42px -4px rgba(0, 0, 0, 0.5), 0 8px 18px -2px rgba(0, 0, 0, 0.3) !important;
}

.eims-toast:hover {
    box-shadow: 0 20px 42px -4px rgba(0, 0, 0, 0.22), 0 8px 18px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.eims-toast.hiding {
    animation: eimsToastSlideOut 0.3s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

@keyframes eimsToastSlideIn {
    0% {
        opacity: 0;
        transform: translateX(110%) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes eimsToastSlideOut {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 14px;
    }
    100% {
        opacity: 0;
        transform: translateX(115%) scale(0.9);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Left Accent Indicator */
.eims-toast-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 16px 0 0 16px;
}

.eims-toast-success .eims-toast-indicator {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}
.eims-toast-danger .eims-toast-indicator {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}
.eims-toast-warning .eims-toast-indicator {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}
.eims-toast-info .eims-toast-indicator {
    background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}

/* Icon Wrapper */
.eims-toast-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.eims-toast-success .eims-toast-icon-wrap {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.eims-toast-danger .eims-toast-icon-wrap {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.eims-toast-warning .eims-toast-icon-wrap {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.eims-toast-info .eims-toast-icon-wrap {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Content */
.eims-toast-content {
    flex-grow: 1;
    min-width: 0;
}

.eims-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.eims-toast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
    letter-spacing: -0.2px;
}

[data-bs-theme="dark"] .eims-toast-title {
    color: #ffffff !important;
}

.eims-toast-time {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.eims-toast-message {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.45;
    word-break: break-word;
}

[data-bs-theme="dark"] .eims-toast-message {
    color: #d4d4d8 !important;
}

.eims-toast-message a.btn {
    margin-top: 4px;
}

/* Close Button */
.eims-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.85rem;
    padding: 4px 6px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.eims-toast-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

[data-bs-theme="dark"] .eims-toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Countdown Progress Bar */
.eims-toast-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .eims-toast-progress-track {
    background: rgba(255, 255, 255, 0.06);
}

.eims-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: eimsToastProgress 5s linear forwards;
}

.eims-toast:hover .eims-toast-progress-bar {
    animation-play-state: paused;
}

.eims-toast-success .eims-toast-progress-bar {
    background: #10b981;
}
.eims-toast-danger .eims-toast-progress-bar {
    background: #ef4444;
}
.eims-toast-warning .eims-toast-progress-bar {
    background: #f59e0b;
}
.eims-toast-info .eims-toast-progress-bar {
    background: #3b82f6;
}

@keyframes eimsToastProgress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}




