/*
=====================================================
  EPICPOS Dashboard - Original Theme Stylesheet
=====================================================
  
  This stylesheet supports both Light Mode and Dark Mode.
  All styles are designed to be reusable across the application.
  
  Theme switching is controlled by:
  - body.light-mode class
  - body.dark-mode class
  
  JavaScript (script.js) manages theme toggle and persistence
  via localStorage.
  
  Key Features:
  - CSS Variables for easy customization
  - Dark/Light mode support for all components
  - Reusable utility classes
  - Responsive design patterns
  
=====================================================
*/

/* ========================================
   CSS VARIABLES (ROOT)
   ======================================== */
:root {
    --body-bg: #f1f3f7; /* Default background color */
    --sidebar-color: #FFF; /* Sidebar color */
    --primary-color: #d3240b; /* Primary red color */
    --primary-color-light: #f6f5ff; /* Light primary color */
    --toggle-color: #DDD; /* Toggle color */
    --text-color: #707070; /* Default text color */
    --secondary-color: #a51b08; /* Secondary color */
    --light-color: #f6f5ff; /* Light color */
    --input-bg-color: #ffffff; /* Input background color */
    --input-border-color: var(--primary-color); /* Input border color */
    --bt-secondary-color: #6c757d; /* Secondary button color */
    --bt-secondary-color-hover: #626a70; /* Secondary button hover color */
}

/* ========================================
   THEME MODES - Light & Dark
   ======================================== */
body.light-mode {
    --body-bg: #f3f4f6;
    --text-color: #000000;
    --sidebar-color: #f8f9fa;
}

body.dark-mode {
    --body-bg: #121212;
    --text-color: #ffffff;
    --sidebar-color: #1c1e21;
}

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}


/* Sidebar menu links */
.nav-link {
    color: var(--text-color) !important;
    padding: 10px 15px;
    border-radius: 5px;
    margin: 5px 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

.nav-link:hover {
    background-color: var(--primary-color-light);
    color: var(--primary-color);
}

.nav-link i {
    font-size: 1.5rem;
    flex-shrink: 0;
    padding-left: 10px; /* Add left padding for icons */
}

/* Logo text styling */
.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    gap: 5px;
    align-items: center;
}

.logo-text .zaad {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.logo-text .dashboard {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: normal;
    transition: color 0.3s ease;
}

body.dark-mode .logo-text .zaad {
    color: #ffffff;
}

body.dark-mode .logo-text .dashboard {
    color: #cccccc;
}

/* Light and dark mode icons */
.mode-icon-wrapper {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: transparent;
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.mode-icon {
    position: absolute;
    font-size: 1.5rem;
    color: var(--text-color);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mode-icon-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.mode-icon-wrapper:active {
    transform: scale(0.95);
}

/* Input fields */
.input-group .form-control {
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border: 1px solid var(--input-border-color);
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Light mode form controls */
body.light-mode .form-control,
body.light-mode .form-select {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #ced4da;
}

body.light-mode .form-control:focus,
body.light-mode .form-select:focus {
    background-color: #ffffff;
    color: #000000;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(211, 36, 11, 0.25);
}

/* Dark mode form controls */
body.dark-mode .form-control,
body.dark-mode .form-select {
    background-color: #2c2f33;
    color: #ffffff;
    border: 1px solid #444;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background-color: #2c2f33;
    color: #ffffff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(211, 36, 11, 0.25);
}

body.dark-mode .form-control::placeholder,
body.dark-mode .form-select::placeholder {
    color: #aaa;
}

/* ========================================
   INPUT-GROUP-TEXT - Dark Mode Support
   ======================================== */
body.dark-mode .input-group-text {
    background-color: #1e293b !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
}

body.dark-mode .input-group .form-control {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: #334155;
}

/* ========================================
   CARDS - Light & Dark Mode Support
   ======================================== */
body.light-mode .card {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

body.dark-mode .card {
    background-color: #1e293b;
    color: #ffffff;
    border: 1px solid #334155;
}

body.dark-mode .card-header,
body.dark-mode .card-footer {
    background-color: #0f172a;
    border-color: #334155;
}

body.dark-mode .card-body {
    background-color: #1e293b;
}

body.dark-mode .card-title {
    color: #f1f5f9;
}

body.dark-mode .list-group-item {
    background-color: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
}

/* ========================================
   ALERTS - Light & Dark Mode Support
   ======================================== */
body.light-mode .alert {
    border: 1px solid transparent;
}

body.dark-mode .alert {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode .alert-warning {
    background-color: #78350f;
    color: #fef3c7;
    border-color: #92400e;
}

body.dark-mode .alert-info {
    background-color: #164e63;
    color: #cffafe;
    border-color: #155e75;
}

body.dark-mode .alert-danger {
    background-color: #7f1d1d;
    color: #fecaca;
    border-color: #991b1b;
}

body.dark-mode .alert-success {
    background-color: #14532d;
    color: #d1fae5;
    border-color: #166534;
}

/* ========================================
   BACKGROUNDS - Light & Dark Mode
   ======================================== */
body.light-mode .bg-light {
    background-color: #f8f9fa !important;
}

body.dark-mode .bg-light {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
}

/* ========================================
   TEXT COLORS - Dark Mode
   ======================================== */
body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode small.text-muted {
    color: #94a3b8 !important;
}

/* ========================================
   BADGES - Dark Mode
   ======================================== */
body.dark-mode .badge {
    color: #ffffff;
}

body.dark-mode .badge.bg-secondary {
    background-color: #475569 !important;
}

/* Statistics cards */
.total-sales {
    background-color: #ffe6e8 !important;
    border-radius: 10px;
    color: #000000 !important;
}
.total-sales-icon {
    color: #f9597a !important;
}
body.dark-mode .total-sales {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
}
body.dark-mode .total-sales-icon {
    color: #fca5a5 !important;
}

.total-orders {
    background-color: #eaffea !important;
    border-radius: 10px;
    color: #000000 !important;
}
.total-orders-icon {
    color: #2ecc71 !important;
}
body.dark-mode .total-orders {
    background-color: #14532d !important;
    color: #d1fae5 !important;
}
body.dark-mode .total-orders-icon {
    color: #86efac !important;
}

.new-customers {
    background-color: #f3e6ff !important;
    border-radius: 10px;
    color: #000000 !important;
}
.new-customers-icon {
    color: #9b59b6 !important;
}
body.dark-mode .new-customers {
    background-color: #581c87 !important;
    color: #f3e8ff !important;
}
body.dark-mode .new-customers-icon {
    color: #d8b4fe !important;
}

.total-customers {
    background-color: #fff8e5 !important;
    border-radius: 10px;
    color: #000000 !important;
}
.total-customers-icon {
    color: #ffab40 !important;
}
body.dark-mode .total-customers {
    background-color: #78350f !important;
    color: #fef3c7 !important;
}
body.dark-mode .total-customers-icon {
    color: #fbbf24 !important;
}

.total-staff {
    background-color: #fbeee0 !important;
    border-radius: 10px;
    color: #000000 !important;
}
.total-staff-icon {
    color: #e67e22 !important;
}
body.dark-mode .total-staff {
    background-color: #7c2d12 !important;
    color: #fed7aa !important;
}
body.dark-mode .total-staff-icon {
    color: #fb923c !important;
}



body.dark-mode .dropdown #userMenu {
    color: #ffffff !important;
}

body.light-mode .dropdown #userMenu {
    color: var(--text-color) !important;
}

#userMenu:hover {
    color: var(--primary-color);
}

/* Search button - light mode */
#search-addon {
    background-color: var(--primary-color); /* Red color for identity */
    color: #ffffff; /* Text or icon in white */
    border: 1px solid var(--primary-color); /* Border same as button color */
    transition: background-color 0.3s ease, color 0.3s ease; /* Transition effect */
}

#search-addon:hover {
    background-color: var(--secondary-color); /* Change color on hover */
    border-color: var(--secondary-color);
}

/* Search button - dark mode */
body.dark-mode #search-addon {
    background-color: var(--primary-color); /* Same red color */
    color: #ffffff; /* Text or icon in white */
    border: 1px solid var(--primary-color); /* Same border color */
}

body.dark-mode #search-addon:hover {
    background-color: var(--secondary-color); /* Change color on hover */
    border-color: var(--secondary-color);
}

::after,
::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
}


.wrapper {
    display: flex;
}

.main {
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    background-color: #fafbfe;
    margin-left: 70px; /* Leaves space for the sidebar */
    width: calc(100% - 70px); /* Content width after the sidebar */
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Sidebar */
#sidebar {
    width: 75px;
    min-width: 75px;
    z-index: 1000;
    transition: all 0.25s ease-in-out;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: box-shadow 0.3s ease;
}

#sidebar.expand {
    width: 260px;
    min-width: 260px;
}

/* Main content */
.main {
    min-height: 100vh;
    width: calc(100% - 70px); /* Starts after default sidebar width */
    margin-left: 70px; /* Leaves space for the sidebar */
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    background-color: #fafbfe;
}

/* When sidebar is expanded */
#sidebar.expand ~ .main {
    margin-left: 260px; /* Starts after expanded sidebar width */
    width: calc(100% - 260px); /* Adjusts content width to fit the sidebar */
}

/* Keep tablet content usable while an expanded sidebar overlays the page. */
@media (max-width: 991.98px) {
    .main,
    #sidebar.expand ~ .main {
        margin-left: 75px;
        width: calc(100% - 75px);
    }

    #sidebar.expand {
        box-shadow: 8px 0 24px rgba(15, 23, 42, 0.22);
    }
}

/* ===============
   Unified toolbars
   Used by themes/original/partials/filter_toolbar.html and others
   Keep toolbar items on one row on desktop; allow wrap on small screens
================ */
.toolbar-inline {
    flex-wrap: wrap; /* default: wrap on narrow screens */
}
.toolbar-inline .search-group {
    flex: 1 1 420px; /* grows but may shrink; base width for desktop */
    min-width: 260px; /* reasonable minimum so buttons can fit */
    width: auto; /* override input-group default width:100% */
}
.toolbar-inline .toolbar-status {
    min-width: 220px;
    width: auto;
    flex: 0 0 auto; /* don't grow */
}
@media (min-width: 992px) { /* lg and up: force single row */
    .toolbar-inline { flex-wrap: nowrap; }
}

/* Avatar initial badge (white text on brand background) */
.avatar-initial {
    width: 40px; height: 40px; min-width: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background-color: var(--bs-primary); /* Bootstrap primary */
    color: #fff; font-weight: 600;
}

.merchant-table {
    min-width: 1050px;
}

.table-responsive[role="region"] {
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.table-responsive[role="region"]:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* =====================
   Dark-mode table tweaks
   Improve readability of muted/monospace text in dark tables
===================== */
body.dark-mode .table-dark .text-muted,
body.dark-mode .table.table-dark .text-muted {
    color: rgba(255,255,255,0.7) !important;
}
body.dark-mode .table-dark .font-monospace,
body.dark-mode .table.table-dark .font-monospace {
    color: #e9ecef; /* light gray for code-like values */
}
/* Optional: ensure input-group-text contrast in dark mode when used on dark backgrounds */
body.dark-mode .input-group .input-group-text.bg-white {
    background-color: #2c2f33 !important;
    color: #adb5bd !important;
    border-color: #444 !important;
}

.toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: 0;
    padding: 1rem 1.5rem;
}

.toggle-btn i {
    font-size: 1.5rem;
    color: #FFF;
}

.sidebar-logo {
    margin: auto 0;
}

.sidebar-logo a {
    color: #FFF;
    font-size: 1.15rem;
    font-weight: 600;
}

#sidebar:not(.expand) .sidebar-logo,
#sidebar:not(.expand) a.sidebar-link span {
    display: none;
}

.sidebar-nav {
    padding: 2rem 0;
    flex: 1 1 auto;
}

a.sidebar-link {
    padding: 0.625rem 1.625rem;
    color: #FFF;
    display: block;
    font-size: 0.9rem;
    white-space: nowrap;
    border-left: 3px solid transparent;
}

.sidebar-link i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
}


/* Enhancing submenu display */
.sidebar-item {
    position: relative; /* To adjust the position of submenus */
}

#sidebar:not(.expand) .sidebar-item .sidebar-dropdown {
    position: absolute;
    top: 0;
    left: 70px;
    background-color: #0e2238;
    padding: 0;
    min-width: 15rem;
    display: none;
}

#sidebar:not(.expand) .sidebar-item:hover .has-dropdown + .sidebar-dropdown {
    display: block;
    max-height: 15em;
    width: 100%;
    opacity: 1;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"]::after {
    border: solid;
    border-width: 0 0.075rem 0.075rem 0;
    content: "";
    display: inline-block;
    padding: 2px;
    position: absolute;
    right: 1.5rem;
    top: 1.4rem;
    transform: rotate(-135deg);
    transition: all 0.2s ease-out;
}

#sidebar.expand .sidebar-link[data-bs-toggle="collapse"].collapsed::after {
    transform: rotate(45deg);
    transition: all 0.2s ease-out;
}

/* Disable transition for no-transition class */
#sidebar.no-transition {
    transition: none !important;
}

/* Improving search button appearance when sidebar is collapsed */
#sidebar:not(.expand) #search-addon {
    width: 40px;
    height: 40px;
    margin: 0 auto; /* Center alignment */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5%; /* Circular button */
    background-color: var(--primary-color);
    color: #fff;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Improved search button shape when sidebar is expanded */
#sidebar.expand #search-addon {
    width: 40px;
    height: 40px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    background-color: var(--primary-color);
    margin: 0;
}

/* Hover effect on search button */
#search-addon:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

/* Hide input field only when sidebar is collapsed */
#sidebar:not(.expand) .form-control {
    display: none;
}

.sidebar-footer {
    display: flex;
    flex-direction: column; /* Default to stack items vertically */
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: var(--sidebar-color);
    position: sticky; /* Stick footer at the bottom */
    bottom: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Top border */
    transition: all 0.3s ease;
}

#sidebar.expand .sidebar-footer {
    flex-direction: row; /* Arrange items horizontally when sidebar expands */
    justify-content: space-between; /* Distribute items */
}

.sidebar-footer a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer a:hover {
    color: var(--primary-color);
}

.sidebar-footer .mode-icon-wrapper {
    display: flex;
    gap: 10px;
}

.sidebar-footer .mode-icon {
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.sidebar-footer .mode-icon:hover {
    transform: scale(1.2);
    color: var(--primary-color);
}

/* Hide text when sidebar is collapsed */
#sidebar:not(.expand) .sidebar-footer a .user-name {
    display: none;
}



/* Apply variables */

/* Toggle icons between modes */
body.light-mode .dark-icon {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.light-mode .light-icon {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

body.dark-mode .light-icon {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

body.dark-mode .dark-icon {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* Sidebar */
.bg-dark {
    background-color: var(--sidebar-color) !important;
    padding: 15px;
    height: 100vh; /* Makes sidebar full height */
    overflow-y: auto; /* Adds scrollbar when needed */
    position: sticky; /* Keeps sidebar fixed during scroll */
    top: 0; /* Sidebar starting point */
}

/* Sidebar links text */
body.light-mode a.sidebar-link {
    color: #000; /* Text in black */
    background-color: transparent;
    border-left: 3px solid transparent;
}

body.dark-mode a.sidebar-link {
    color: #FFF; /* Text in white */
    background-color: transparent;
    border-left: 3px solid transparent;
}

/* Hover effect on links */
body.light-mode a.sidebar-link:hover {
    background-color: #f6f5ff; /* Light background */
    color: var(--primary-color); /* Active text color */
    border-left: 3px solid var(--secondary-color); /* Border color */
}

body.dark-mode a.sidebar-link:hover {
    background-color: #333333; /* Light dark background */
    color: var(--primary-color); /* Active text color */
    border-left: 3px solid var(--secondary-color); /* Border color */
}


/* Active link styling */
body.light-mode a.sidebar-link.active {
    background-color: var(--primary-color); /* Active background color */
    color: #FFF; /* Text color */
}

body.dark-mode a.sidebar-link.active {
    background-color: var(--primary-color); /* Active background color */
    color: #FFF; /* Text color */
}

a.sidebar-link {
    transition: color 0.3s ease, background-color 0.3s ease, border-left-color 0.3s ease;
}

/* Toggle button in light mode */
body.light-mode .toggle-btn i {
    color: #000; /* Black color */
}

/* Toggle button in dark mode */
body.dark-mode .toggle-btn i {
    color: #FFF; /* White color */
}

/* Smooth transitions */
.toggle-btn i {
    transition: color 0.3s ease;
}

/* Logo styling in light mode */
body.light-mode .sidebar-logo a {
    color: #000; /* Black text */
}

/* Logo styling in dark mode */
body.dark-mode .sidebar-logo a {
    color: #FFF; /* White text */
}

.sidebar-logo a {
    transition: color 0.3s ease;
}

.toggle-btn, .sidebar-logo a {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Sidebar light and dark mode styling */
body.light-mode #sidebar {
    background-color: #ffffff; /* White background in light mode */
    color: #000000; /* Black text */
    box-shadow: 5px 0 10px rgba(0, 0, 0, 0.3); /* Light shadow */
}

body.dark-mode #sidebar {
    background-color: #1c1e21; /* Dark background in dark mode */
    color: #ffffff; /* White text */
    box-shadow: 5px 0 10px rgba(255, 255, 255, 0.1); /* Light white shadow */
}

body.light-mode #sidebar, body.dark-mode #sidebar {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.wrapper, .main {
    background-color: transparent;
}

/* Dark mode table styling */
body.dark-mode .table-dark {
    background-color: #1c1e21; /* Table background in dark mode */
    color: #ffffff; /* White text */
    border-color: #2c2f33; /* Table borders */
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode .table-dark thead {
    background-color: #f1f1f1; /* Header background */
    color: #000000; /* Black text */
    transition: background-color 0.3s ease;
}

body.dark-mode .table-dark thead {
    background-color: #2c2f33; /* Header background */
    transition: background-color 0.3s ease;
}

/* Light mode table styling */
body.light-mode .table-dark {
    background-color: #ffffff; /* White background */
    color: #000000; /* Black text */
    border-color: #ddd; /* Borders */
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.light-mode .table-dark th {
    background-color: #f1f1f1; /* Header background */
    color: #000000; /* Black text */
    text-transform: uppercase; /* Uppercase text */
    font-weight: bold; /* Bold font */
    font-size: 14px; /* Header font size */
    padding: 10px; /* Padding */
    border-bottom: 2px solid #ddd; /* Header bottom border */
}

body.light-mode .table-dark td {
    background-color: transparent; /* Transparent cells */
    color: #000000; /* Black text */
    font-size: 13px; /* Cell font size */
    padding: 8px; /* Padding */
    border-color: #ddd; /* Border color */
}

body.light-mode .table-dark tbody tr:hover {
    --bs-table-hover-bg: #e9e9e9; /* Hover background */
    transition: background-color 0.3s ease;
}

body.dark-mode .table-dark th {
    background-color: #2c2f33; /* Header background */
    color: #ffffff; /* White text */
    text-transform: uppercase;
    font-weight: bold;
    font-size: 14px;
    padding: 10px;

    border-bottom: 2px solid #444;
}

body.dark-mode .table-dark td {
    background-color: transparent;
    color: #ffffff;
    font-size: 13px;
    padding: 8px;

    border-color: #2c2f33;
}

body.dark-mode .table-dark tbody tr:hover {
    --bs-table-hover-bg: #33363b;
    transition: background-color 0.3s ease;
}

/* Button improvements */
body.light-mode .btn-primary, body.dark-mode .btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    font-size: 16px;
    padding: 5px 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-mode .btn-primary:hover, body.dark-mode .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

body.light-mode .btn-secondary, body.dark-mode .btn-secondary {
    background-color: var(--bt-secondary-color);
    color: #ffffff;
    border-color: var(--bt-secondary-color);
    font-size: 16px;
    padding: 5px 10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-mode .btn-secondary:hover, body.dark-mode .btn-secondary:hover {
    background-color: var(--bt-secondary-color-hover);
    border-color: var(--bt-secondary-color-hover);
}

/* Modal styling */
body.light-mode .modal-content {
    background-color: var(--body-bg);
    color: var(--text-color);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-content {
    background-color: var(--sidebar-color);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

body.light-mode .modal-body .form-control, body.dark-mode .modal-body .form-control {
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border: 1px solid #292221;
    border-radius: 5px;
    box-shadow: none;
}

body.light-mode .modal-body .form-control:focus, body.dark-mode .modal-body .form-control:focus {
    outline: none;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.5);
    border-color: var(--primary-color);
}

body.light-mode .modal-footer .btn-primary, body.dark-mode .modal-footer .btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-mode .modal-footer .btn-primary:hover, body.dark-mode .modal-footer .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

body.light-mode .btn-close {
    filter: invert(0);
}

body.dark-mode .btn-close {
    filter: invert(1);
}

/* Logo improvements */
.co_zaad {
    height: 90px;
}

.dashboard_logo img {
    height: 60px;
    object-fit: contain;
}
input[type="text"],
/* Unified modal styles (app-modal) */
.modal-compact { --bs-modal-width: 680px; }
.app-modal {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(16,24,40,.18);
    overflow: hidden;
}
.app-modal-header {
    background: linear-gradient(135deg, #0d6efd, #2b75ff);
    color: #fff;
}
.app-modal-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.15);
    color: #fff;
}
.app-modal .input-group-text { background: #f4f6fb; border-color: #e6eaf3; color: #5b6475; }
.app-modal .form-control { border-color: #e6eaf3; }
.app-modal .form-control:focus { box-shadow: 0 0 0 .2rem rgba(13,110,253,.15); border-color: #b6ccff; }
.app-modal .btn-primary { background: linear-gradient(135deg, #0d6efd, #2b75ff); border: 0; }
.app-modal .btn-outline-secondary { border-color: #cfd6e4; color: #4b5563; }
.app-modal .form-label { text-align: start; display: block; }
/* Keep header/footer visible and body scrollable */
:root {
    --app-modal-header-h: 60px;
    --app-modal-footer-h: 64px;
    --app-control-height: 44px;          /* input/select height inside modals */
    --app-control-radius: 10px;          /* rounded corners for inputs */
    --app-control-font-size: 1rem;       /* input font size */
    --app-label-size: .95rem;            /* label font size */
}
.modal-dialog-scrollable .app-modal { max-height: calc(100vh - 2rem); }
.app-modal .modal-body {
    max-height: calc(100vh - 2rem - var(--app-modal-header-h) - var(--app-modal-footer-h));
    overflow-y: auto;
}
.app-modal .modal-footer {
    background: var(--bs-body-bg, #fff);
    border-top: 1px solid #e6eaf3;
}

/* Modern, clearer controls inside app-modal */
.app-modal .form-label {
    text-align: start;
    display: block;
    font-weight: 600;
    font-size: var(--app-label-size);
    color: #374151;
}
.app-modal .form-control,
.app-modal .form-select {
    min-height: var(--app-control-height);
    padding: .5rem .75rem;
    font-size: var(--app-control-font-size);
    border-radius: var(--app-control-radius);
}
.app-modal .input-group-text {
    padding: .5rem .65rem;
    font-size: var(--app-control-font-size);
    border-top-left-radius: var(--app-control-radius);
    border-bottom-left-radius: var(--app-control-radius);
}
.app-modal .btn-sm {
    padding: .5rem .9rem;
    font-size: .95rem;
    border-radius: .6rem;
}
.app-modal .form-control::placeholder { color: #9aa4b2; }
.app-modal .form-check-input { width: 2.25rem; height: 1.25rem; }
.app-modal .form-text, .app-modal small { display: block; text-align: start; }
.app-modal .text-center { text-align: start !important; }
.app-modal .form-check { text-align: left; }
.app-modal .form-check.form-switch {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    padding-left: 0; /* override bootstrap default 2.5em */
    width: 100%;
}
.app-modal .form-check.form-switch .form-check-input { margin-left: 0; }
.app-modal .form-check.form-switch .form-check-label { margin: 0; }

/* ========================================
   APP-MODAL - Dark Mode Support
   ======================================== */
body.dark-mode .app-modal { 
    background: #0b1220; 
    box-shadow: 0 10px 30px rgba(0,0,0,.5); 
}

body.dark-mode .app-modal-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: #ffffff;
}

body.dark-mode .app-modal .modal-body {
    background: #0b1220;
    color: #e5e7eb;
}

body.dark-mode .app-modal .modal-footer {
    background: #0f172a;
    border-color: #334155;
}

body.dark-mode .app-modal .input-group-text { 
    background: #1e293b; 
    border-color: #334155; 
    color: #e5e7eb; 
}

body.dark-mode .app-modal .form-control,
body.dark-mode .app-modal .form-select { 
    background: #1e293b; 
    color: #e5e7eb; 
    border-color: #334155; 
}

body.dark-mode .app-modal .form-control:focus,
body.dark-mode .app-modal .form-select:focus { 
    background: #1e293b; 
    color: #ffffff;
    border-color: #4b5563; 
    box-shadow: 0 0 0 .2rem rgba(59,130,246,.25); 
}

body.dark-mode .app-modal .form-control::placeholder { 
    color: #6b7280; 
}

body.dark-mode .app-modal .form-label {
    color: #f1f5f9;
}

body.dark-mode .app-modal .text-muted,
body.dark-mode .app-modal small.text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .app-modal .btn-outline-secondary {
    border-color: #475569;
    color: #e2e8f0;
    background: transparent;
}

body.dark-mode .app-modal .btn-outline-secondary:hover {
    background: #334155;
    border-color: #64748b;
    color: #ffffff;
}

/* Legacy media query support - keeping for browser default dark mode */
@media (prefers-color-scheme: dark) {
    .app-modal { box-shadow: 0 10px 30px rgba(0,0,0,.5); }
    .app-modal .input-group-text { background: #1f2937; border-color: #374151; color: #e5e7eb; }
    .app-modal .form-control { background: #0b1220; color: #e5e7eb; border-color: #374151; }
    .app-modal .form-control::placeholder { color: #9ca3af; }
}

/* Project dark-mode class overrides */
body.dark-mode .app-modal { background: #0b1220; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
body.dark-mode .app-modal-header { color: #fff; }
body.dark-mode .app-modal .input-group-text { background: #1f2937 !important; border-color: #374151 !important; color: #e5e7eb !important; }
body.dark-mode .app-modal .form-control { background: #0b1220 !important; color: #e5e7eb !important; border-color: #374151 !important; }
body.dark-mode .app-modal .form-control:focus { border-color: #4b5563; box-shadow: 0 0 0 .2rem rgba(59,130,246,.25); }
body.dark-mode .app-modal .form-control::placeholder { color: #9ca3af; }
body.dark-mode .app-modal .form-select { background-color: #0b1220; color: #e5e7eb; border-color: #374151; }
body.dark-mode .app-modal .modal-footer { background: #0b1220; border-top-color: #374151; }
body.dark-mode .app-modal .btn-outline-secondary { border-color: #4b5563; color: #e5e7eb; }

/* Global dark-mode support for email inputs anywhere (not only in modals) */
body.dark-mode input[type="email"],
body.dark-mode .form-control[type="email"] {
    background-color: #0b1220;
    color: #e5e7eb;
    border-color: #374151;
    color-scheme: dark;
}
body.dark-mode input[type="email"]::placeholder,
body.dark-mode .form-control[type="email"]::placeholder { color: #9ca3af; }
body.dark-mode input[type="email"]:focus,
body.dark-mode .form-control[type="email"]:focus {
    border-color: #4b5563;
    box-shadow: 0 0 0 .2rem rgba(59,130,246,.25);
}
/* Input group icon background with dark mode */
body.dark-mode .input-group-text { background: #1f2937; border-color: #374151; color: #e5e7eb; }
/* Autofill fix for dark background */
body.dark-mode input[type="email"]:-webkit-autofill {
    -webkit-text-fill-color: #e5e7eb;
    -webkit-box-shadow: 0 0 0 1000px #0b1220 inset;
    caret-color: #e5e7eb;
}
/* Stronger autofill override inside modal for any form-control */
body.dark-mode .app-modal .form-control:-webkit-autofill {
    -webkit-text-fill-color: #e5e7eb !important;
    -webkit-box-shadow: 0 0 0 1000px #0b1220 inset !important;
    caret-color: #e5e7eb !important;
}
/* Ensure autofill keeps same style in all interaction states */
body.dark-mode input[type="email"]:-webkit-autofill:hover,
body.dark-mode input[type="email"]:-webkit-autofill:focus,
body.dark-mode input[type="email"]:-webkit-autofill:active {
    -webkit-text-fill-color: #e5e7eb;
    -webkit-box-shadow: 0 0 0 1000px #0b1220 inset;
}
/* Modal-scoped autofill fix */
.app-modal .form-control:-webkit-autofill {
    -webkit-text-fill-color: inherit;
    -webkit-box-shadow: 0 0 0 1000px inherit inset;
}
input[type="password"],
input[type="email"],
input[type="number"],
textarea {
  color: black !important; /* اجعل النص دائمًا باللون الأسود */
}

/* Scrollbar styling for WebKit browsers (Chrome, Edge, Safari) */
::-webkit-scrollbar {
    width: 10px; /* Scrollbar width */
    height: 10px; /* Scrollbar height (for horizontal scrollbars) */
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary-color); /* Primary color for the scrollbar thumb */
    border-radius: 4px; /* Rounded corners for the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color); /* Darker color on hover */
}

::-webkit-scrollbar-track {
    background-color: var(--body-color); /* Background color for the scrollbar track */
    border-radius: 4px; /* Rounded corners for the track */
}

/* For Firefox and other browsers */
body {
    scrollbar-color: var(--primary-color) var(--body-color); /* Thumb color and track color */
    scrollbar-width: thin; /* Use a thinner scrollbar */
}


.search-container {
    position: relative;
  }
  
  #tagsInputContainer {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap; /* Wrap horizontally, then go to next line */
    gap: 0.5rem;
    align-items: center;
  }
  
  #tagsInputContainer .badge {
    margin: 0;
  }
  
  .search-input {
    border: none;
    outline: none;
    flex: 1 1 150px; /* Flexible with minimum width */
    min-width: 150px;
  }
  
  .search-input:focus {
    outline: none;
    border: none;
  }
  
  .dropdown-menu {
    max-height: 200px;
    overflow-y: auto;
  }
  

  /* Filter badge styling */
  #tagsInputContainer .badge {
    background-color: var(--primary-color) !important; /* Use primary color */
    color: #fff; /* White text color */
    font-size: 0.875rem; /* Slightly smaller font */
    font-weight: bold;
    padding: 0.5rem 0.75rem; /* Better padding */
    border-radius: 0.375rem; /* Rounded corners */
    display: inline-flex; /* Align close button */
    align-items: center;
    gap: 0.5rem; /* Space between text and close button */
    border: 1px solid var(--secondary-color); /* Border with secondary color */
}

/* Date Range Display with Edit Button */
[id$="_display"] {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

[id$="_edit_btn"] {
    transition: all 0.2s ease;
    opacity: 0.7;
}

[id$="_edit_btn"]:hover {
    opacity: 1;
    transform: scale(1.1);
}

[id$="_edit_btn"]:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color), 0.25);
}

/* Nav Tabs Global Styles - Works for all tabs in the project */
.nav-tabs {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    color: #6c757d;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-color: transparent transparent var(--primary-color);
    border-bottom-width: 3px;
    font-weight: 500;
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Dark mode support for nav-tabs */
body.dark-mode .nav-tabs {
    border-bottom-color: #444;
}

body.dark-mode .nav-tabs .nav-link {
    color: #adb5bd;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: var(--primary-color);
}

body.dark-mode .nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Responsive tabs - equal width distribution */
.nav-tabs.responsive .nav-item {
    flex-grow: 1;
    display: flex;
}

.nav-tabs.responsive .nav-link {
    text-align: center;
    width: 100%;
    justify-content: center;
}




/* Timeline container */
.timeline-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin: 20px 0;
    padding: 10px;

    border-radius: 10px;
}

/* Connecting background line */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #ddd; /* Default inactive line */
    z-index: 1;
    transform: translateY(-50%);
}

/* Individual steps */
.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    z-index: 2;
    text-align: center;
}

/* Icon container */
.timeline-step .icon-container {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #d0d1d3;
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

/* Active step styling */
.timeline-step.active .icon-container {
    background-color: var(--primary-color);
    color: #fff;
}

/* Step labels */
.timeline-step span {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-color);
}

/* Progress bar between steps */
.timeline-step .progress-bar {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 0px);
    height: 5px;
    background-color: #ddd; /* Default inactive color */
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* Filled progress bar for active steps */
.timeline-step.active + .timeline-step .progress-bar {
    background-color: var(--primary-color);
}

/* Extend progress bar for active steps */
.timeline-step.active .progress-bar.filled {
    background-color: var(--primary-color);
    z-index: 0;
}

.d-none {
    display: none !important;
}

.user-pic {
    object-fit: cover;
    display: inline-block;
    margin-right: 10px;
  }

.dropdown-item {
    cursor: pointer;
} 


.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    }
    .form-control:disabled {
    background-color: #f8f9fa;
    }
    .card-title {
    font-weight: 600;
    color: #2c3e50;
    }



    .store-image-preview {
        width: 150px;
        height: 150px;
        object-fit: cover;
        cursor: pointer;
        transition: transform 0.3s ease;
      }
    
      .store-image-preview:hover {
        transform: scale(1.05);
      }
    
      .image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    
      .image-overlay:hover {
        opacity: 1;
      }
    
      .form-check-input:checked {
        background-color:var(--primary-color);
        border-color: var(--primary-color);
      }
    
      .card-title {
        font-size: 1rem;
        font-weight: 600;
        letter-spacing: 0.5px;
      }
    


    .custom-table-header-merchant th,
      body.light-mode .table-dark .custom-table-header th {
          background-color: var(--primary-color) !important;
          color: #fff !important;
      }
      .main-client-row {
        cursor: pointer;
      }

/* ========================================
   MERCHANT ACTION BUTTONS - Consistent sizing
   ======================================== */
#merchantSaveBtn,
#merchantCancelBtn {
  min-width: 85px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* ========================================
   STORE NOTES - Alternating Colors (Sticky Notes Style)
   ======================================== */

/* Light Mode - Yellow and Blue alternating */
.note-item {
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 8px;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-left: 4px solid rgba(0, 0, 0, 0.1);
}

.note-yellow {
  background-color: #fff9e6 !important; /* Light yellow */
  border-left-color: #f59e0b !important;
}

.note-blue {
  background-color: #e6f3ff !important; /* Light blue */
  border-left-color: #3b82f6 !important;
}

/* Dark Mode - Darker yellow and blue */
body.dark-mode .note-yellow {
  background-color: #3d3416 !important; /* Dark yellow-brown */
  border-left-color: #f59e0b !important;
  color: #e5e7eb !important;
}

body.dark-mode .note-blue {
  background-color: #1a2838 !important; /* Dark blue */
  border-left-color: #3b82f6 !important;
  color: #e5e7eb !important;
}

/* Notes container styling */
#notesContainer {
  padding: 8px;
}

body.dark-mode #notesContainer {
  border-color: #374151 !important;
  background-color: #111827;
}

/* ========================================
   COLLAPSE ICONS - Smooth transitions for all sections
   ======================================== */
#merchantCollapseIcon,
#featureCollapseIcon,
#terminalCollapseIcon,
#paymentDevicesCollapseIcon,
#devicesCollapseIcon,
#manageUsersCollapseIcon,
#agentCollapseIcon,
#storeNotesCollapseIcon {
  transition: transform 0.3s ease;
}

.card-title .btn-link:hover {
  text-decoration: none !important;
}

body.dark-mode .card-title .btn-link {
  color: #e5e7eb !important;
}

/* ========================================
   SEARCH TAGS - Tag-based search styling
   ======================================== */
.search-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 4px;
  font-size: 13px;
  color: #1976d2;
  white-space: nowrap;
}

body.dark-mode .search-tag {
  background-color: #1e3a5f;
  border-color: #2563eb;
  color: #60a5fa;
}

.search-tag .tag-label {
  font-weight: 600;
  color: #0d47a1;
}

body.dark-mode .search-tag .tag-label {
  color: #93c5fd;
}

.search-tag .tag-value {
  color: #424242;
}

body.dark-mode .search-tag .tag-value {
  color: #e5e7eb;
}

.search-tag .tag-remove {
  cursor: pointer;
  color: #d32f2f;
  font-weight: bold;
  padding: 0 2px;
  margin-left: 2px;
}

body.dark-mode .search-tag .tag-remove {
  color: #ef5350;
}

.search-tag .tag-remove:hover {
  color: #b71c1c;
}

body.dark-mode .search-tag .tag-remove:hover {
  color: #e53935;
}

.search-input {
  min-width: 150px !important;
}

/* Date Filter Wrapper - Makes select and display swap cleanly */
.date-filter-wrapper {
  position: relative;
  min-height: 38px;
}

/* Date Range Display - Replaces select when visible */
.date-range-display {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: #495057;
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  cursor: pointer;
  min-height: 38px;
}

.date-range-display:hover {
  background-color: #f8f9fa;
}

.date-range-display i.bi-calendar-range {
  font-size: 0.875rem;
  color: #6c757d;
  margin-right: 0.4rem;
  flex-shrink: 0;
}

.date-range-display .date-text {
  flex: 1;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  position: relative;
  min-width: 0;
}

/* Container for the scrolling content */
.date-range-display .date-text .date-content {
  display: inline-block;
  white-space: nowrap;
  animation: none;
}

/* Marquee animation for long content */
.date-range-display .date-text.overflow .date-content {
  animation: marquee 15s ease-in-out infinite;
  animation-delay: 1s;
  padding-right: 20px;
}

/* Pause animation on hover */
.date-range-display:hover .date-text.overflow .date-content {
  animation-play-state: paused;
}

@keyframes marquee {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(calc(-100% + 150px));
  }
}

.date-range-display .date-text span:first-of-type {
  white-space: nowrap;
}

.date-range-display .edit-link {
  color: #0d6efd;
  text-decoration: none;
  margin-left: 0.5rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.date-range-display .edit-link:hover {
  color: #0a58ca;
}

.date-range-display .edit-link i {
  font-size: 0.875rem;
}

/* Clear date button styles */
.date-range-display .clear-date-btn {
  color: #dc3545;
  text-decoration: none;
  margin-left: 0.5rem;
  flex-shrink: 0;
  padding-top: 0.1rem;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
}

.date-range-display .clear-date-btn:hover {
  color: #bb2d3b;
  transform: scale(1.15);
  opacity: 1;
}

.date-range-display .clear-date-btn i {
  font-size: 0.9rem;
}

/* Hide select when display is shown */
.date-filter-wrapper:has(.date-range-display:not(.d-none)) select {
  display: none;
}

/* Dark mode support */
body.dark-mode .date-range-display {
  color: #e9ecef;
  background-color: #2b3035;
  border-color: #495057;
}

body.dark-mode .date-range-display:hover {
  background-color: #343a40;
}

body.dark-mode .date-range-display i {
  color: #9ca3af;
}

/* Filter Card - Use existing card styles with dark mode support */
body.dark-mode .card.shadow-sm {
  background-color: #1f2937 !important;
  border-color: #374151 !important;
}

body.dark-mode .card .form-label {
  color: #e5e7eb !important;
}

body.dark-mode .card .form-select,
body.dark-mode .card .form-control {
  background-color: #111827 !important;
  border-color: #374151 !important;
  color: #e5e7eb !important;
}

/* ========================================
   STATISTICS CARDS - Reusable Component
   ======================================== */
.stats-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 160px;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.dark-mode .stats-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stats-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

/* ========================================
   USER AVATARS - Reusable Component
   ======================================== */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
    text-transform: uppercase;
    transition: transform 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
}

.user-avatar.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.user-avatar.inactive {
    background: linear-gradient(135deg, #868686 0%, #434343 100%);
    color: white;
}

body.dark-mode .user-avatar.active {
    background: linear-gradient(135deg, #818cf8 0%, #9333ea 100%);
}

body.dark-mode .user-avatar.inactive {
    background: linear-gradient(135deg, #6b7280 0%, #374151 100%);
}

/* ========================================
   STATUS BADGES - Reusable Component
   ======================================== */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge.status-active {
    background-color: #198754;
    color: white;
}

.status-badge.status-inactive {
    background-color: #dc3545;
    color: white;
}

body.dark-mode .status-badge.status-active {
    background-color: #22c55e;
}

body.dark-mode .status-badge.status-inactive {
    background-color: #ef4444;
}

/* Status Icon with Pulse Animation */
.status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-icon.active {
    background-color: #fff;
    animation: pulse 2s infinite;
}

.status-icon.inactive {
    background-color: #fff;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   INACTIVE USER ROWS - Reusable Component
   ======================================== */
.user-inactive {
    opacity: 0.6;
    background-color: rgba(220, 53, 69, 0.1) !important;
}

.user-inactive:hover {
    opacity: 0.8;
}

.user-inactive td {
    color: #dc3545 !important;
}

body.dark-mode .user-inactive {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

body.dark-mode .user-inactive td {
    color: #f87171 !important;
}

/* ========================================
   FILTER CONTAINER - Reusable Component
   ======================================== */
.status-filter-container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e3e8f0 100%);
    border-radius: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

body.dark-mode .status-filter-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.filter-btn {
    border-radius: 20px;
    padding: 0.5rem 1.2rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
    background-color: #0d6efd !important;
    color: white !important;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

body.dark-mode .filter-btn.active {
    background-color: #3b82f6 !important;
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ========================================
   SUPERUSER BADGE - Reusable Component
   ======================================== */
.superuser-badge {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

body.dark-mode .superuser-badge {
    background: linear-gradient(135deg, #ec4899 0%, #ef4444 100%);
}

/* ========================================
   USER NAME CELL - Reusable Component
   ======================================== */
.user-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
