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

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    --secondary: #10B981;
    --success: #10B981;
    --accent: #F59E0B;
    --danger: #EF4444;
    --background: #F3F4F6;
    --surface: #FFFFFF;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --border: #E5E7EB;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --background: #111827;
    --surface: #1F2937;
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --border: #374151;
    --primary-light: #4338CA;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Utilities */
.text-primary { color: var(--primary); }
.text-success { color: var(--secondary); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-surface { background-color: var(--surface); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1rem; }

.p-4 { padding: 0.75rem; }
.p-6 { padding: 0.75rem; }
.m-0 { margin: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* Typography */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text-main); letter-spacing: -0.015em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.0rem; }
h5 { font-size: 0.88rem; }
h6 { font-size: 0.8rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--background);
    border-color: var(--text-muted);
}

.btn-success {
    background: var(--secondary);
    color: white;
}
.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover {
    background: #DC2626;
}

/* Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-control {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-main);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Layout */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    color: white;
    border-right: none;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.25rem;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0.25rem;
}

.nav-item:last-child {
    border-bottom: none;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    transform: translateX(5px);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0.75rem 1rem;
    width: calc(100% - 260px);
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-bottom: 3px solid var(--primary);
}

.topbar h2, .topbar h3 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-main);
    margin: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 1rem 1.15rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.card h4 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    background: var(--primary);
    border-radius: 3px 0 0 3px;
}

.stat-card.stat-sales::before { background: #10B981; }
.stat-card.stat-expenses::before { background: #EF4444; }
.stat-card.stat-products::before { background: var(--primary); }
.stat-card.stat-low-stock::before { background: #F59E0B; }

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    border-color: rgba(var(--primary-rgb, 79, 70, 229), 0.25);
}

.stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    transition: transform 0.25s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-info h4,
.stat-info .stat-label {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-info h2,
.stat-info h3,
.stat-info .stat-value {
    color: var(--text-main);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table th {
    background: var(--background);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
}

.table td {
    font-size: 0.835rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: rgba(243, 244, 246, 0.5);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.25;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }

/* POS specific Layout */
.pos-container {
    display: grid;
    grid-template-columns: minmax(0, 5.5fr) minmax(0, 4.5fr); /* 55/45 Percentage Split */
    gap: 1.5rem;
    height: calc(100vh - 5rem);
}

.products-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Increased item size */
    gap: 1.25rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    align-items: start;
    align-content: start;
}

/* Product Cards styled specifically per page */

.cart-area {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Allow entire column to scroll if screen is very short */
    height: 100%;
}

[data-theme="dark"] .cart-area {
    background: rgba(31, 41, 55, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-header {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.cart-items {
    flex: none;
    overflow: visible;
    padding: 0.75rem;
    min-height: 250px; /* Guarantee space for items */
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.cart-item-info h5 {
    margin-bottom: 0.25rem;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.qty-btn:hover {
    background: var(--background);
}

.cart-totals {
    padding: 0.75rem;
    background: var(--background);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.total-row.grand-total {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px dashed var(--border);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Login Page specific */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background), #E0E7FF);
}

.login-card {
    background: var(--surface);
    padding: 3rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.login-card h2 {
    margin-bottom: 1.25rem;
    color: var(--primary);
}

/* Notification Toast - Highest Z-Index so it appears in front of all modals */
#toast-container {
    position: fixed;
    top: 25px;
    right: 25px;
    z-index: 999999 !important;
    pointer-events: none;
    max-width: 420px;
    width: calc(100% - 50px);
}

.toast {
    pointer-events: auto;
    background: var(--surface, #ffffff);
    color: var(--text-main, #0f172a);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md, 10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), 0 4px 8px rgba(0, 0, 0, 0.12);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border-left: 5px solid var(--primary);
    font-size: 0.92rem;
    font-weight: 600;
}

.toast.show {
    transform: translateX(0);
}

.toast.success { 
    border-left-color: #10b981; 
}
.toast.success i {
    color: #10b981;
    font-size: 1.15rem;
}

.toast.error { 
    border-left-color: #ef4444; 
}
.toast.error i {
    color: #ef4444;
    font-size: 1.15rem;
}

.toast.warning { 
    border-left-color: #f59e0b; 
}
.toast.warning i {
    color: #f59e0b;
    font-size: 1.15rem;
}

/* Ensure SweetAlert2 is also above all modals */
div:where(.swal2-container) {
    z-index: 999999 !important;
}

/* RESPONSIVE DESIGN & MOBILE UI */

/* Mobile Header - Sleek Minimal & App-like */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.85rem;
    height: 54px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 990;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .mobile-header {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-btn {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-main);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.mobile-menu-btn:active {
    transform: scale(0.92);
    background: rgba(var(--primary-rgb), 0.1);
}

/* Global & Mobile Language Dropdown */
.lang-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-dropdown-wrapper i.lang-globe-icon {
    position: absolute;
    left: 9px;
    font-size: 0.82rem;
    color: var(--primary);
    pointer-events: none;
    z-index: 2;
}

.lang-select-box {
    height: 34px;
    padding-left: 26px !important;
    padding-right: 20px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    border: 1px solid var(--border) !important;
    background: var(--surface) !important;
    color: var(--text-main) !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236B7280'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 5px center !important;
    background-size: 13px !important;
}

.lang-select-box:hover, .lang-select-box:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.15) !important;
}

/* Mobile Theme Button */
.mobile-theme-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.mobile-theme-btn:active {
    transform: scale(0.92);
}

/* Mobile Profile Avatar */
.mobile-profile-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--primary);
    transition: transform 0.2s ease;
}

.mobile-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-profile-avatar:active {
    transform: scale(0.92);
}

/* Sidebar Overlay - Soft Frosted Glass */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 1040 !important; /* Below drawer (1050) so drawer is clean and unobstructed */
    opacity: 0;
    transition: opacity 0.28s ease !important;
    pointer-events: none;
}
.sidebar-overlay.show {
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.drawer-open {
    overflow: hidden !important;
}

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 992px) {
    .dashboard-stats, .stats-grid, .settings-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .pos-grid {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }
    .pos-products {
        height: 60vh;
        overflow-y: auto;
    }
    .pos-cart {
        height: auto;
    }
}

@media (max-width: 768px) {
    /* Enable mobile header */
    .mobile-header {
        display: flex !important;
    }

    /* Adjust main content padding */
    .main-content {
        margin-left: 0;
        padding: 0.65rem 0.75rem;
        padding-top: 65px !important; /* Space for 54px sleek mobile header */
        width: 100%;
    }

    /* Remove all logos, business names, hamburgers, and text from topbar on mobile */
    .topbar-logo,
    .topbar-business-name,
    .topbar-hamburger,
    .mobile-header h2,
    .mobile-header .brand-text,
    .topbar img {
        display: none !important;
    }

    /* Hide redundant desktop profile widget from topbar on mobile */
    .topbar #globalProfileWidget {
        display: none !important;
    }

    .topbar {
        padding: 0.45rem 0.65rem !important;
        margin-bottom: 0.65rem !important;
    }

    .topbar h2, .topbar h3 {
        font-size: 1.05rem !important;
        margin: 0 !important;
    }

    /* Mobile Fixed Profile Menu */
    #profileMenu {
        position: fixed !important;
        top: 58px !important;
        right: 12px !important;
        z-index: 10000 !important;
    }

    /* Hide sidebar off-canvas */
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        height: 100vh;
        z-index: 1050 !important;
        transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .sidebar.open {
        transform: translateX(0) !important;
        z-index: 1050 !important;
    }

    .dashboard-stats, .stats-grid, .settings-grid {
        grid-template-columns: 1fr !important;
    }

    .header-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}


/* PREMIUM UI OVERRIDES */
body {
    font-family: 'Inter', sans-serif;
}

/* SweetAlert2 Premium Overrides */
div:where(.swal2-container) div:where(.swal2-popup) {
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-lg), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border);
}

div:where(.swal2-container) h2:where(.swal2-title) {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-main);
}

div:where(.swal2-container) .swal2-input, div:where(.swal2-container) .swal2-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    color: var(--text-main);
    background: var(--background);
}

div:where(.swal2-container) .swal2-input:focus, div:where(.swal2-container) .swal2-select:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    border-color: var(--primary);
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background-color: var(--primary);
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:hover {
    background-color: var(--primary-dark);
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:hover {
    background-color: var(--border);
    color: var(--text-main);
}

/* AG Grid Dark/Light Theme Integration */
.ag-theme-alpine, .ag-theme-alpine-dark {
    --ag-font-family: 'Inter', sans-serif;
    --ag-border-color: var(--border);
    --ag-header-background-color: var(--background);
    --ag-header-foreground-color: var(--text-muted);
    --ag-foreground-color: var(--text-main);
    --ag-background-color: var(--surface);
    --ag-odd-row-background-color: var(--surface);
    --ag-row-hover-color: rgba(79, 70, 229, 0.05);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: none;
}

/* Ensure AG Grid filter popups and menus have solid background across all pages */
.ag-popup,
.ag-popup-child,
.ag-menu,
.ag-filter,
.ag-filter-wrapper,
.ag-theme-alpine .ag-popup-child,
.ag-theme-alpine-dark .ag-popup-child {
    background-color: var(--surface) !important;
    background: var(--surface) !important;
    opacity: 1 !important;
}

.ag-theme-alpine .ag-root-wrapper {
    border: none !important;
}

.ag-theme-alpine-dark {
    --ag-row-hover-color: rgba(255, 255, 255, 0.05);
}

.ag-theme-alpine .ag-header-cell-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Sidebar Scrollbar */
.sidebar {
    overflow-y: auto;
}
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* ====================================================
   KPI Cards & Analytics
   ==================================================== */
.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.primary { background: rgba(79, 70, 229, 0.1); color: var(--primary); }
.kpi-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.kpi-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.kpi-icon.danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.kpi-details h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
}

.kpi-details p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ====================================================
   Segmented Controls & Tabs
   ==================================================== */
.segmented-control {
    display: inline-flex;
    background: var(--background);
    padding: 0.35rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.segmented-control .btn {
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    box-shadow: none;
}

.segmented-control .btn.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* ====================================================
   SweetAlert2 Beautiful Modern Customizations 
   ==================================================== */

.custom-swal-popup {
    border-radius: 1.5rem !important;
    background: var(--surface) !important;
    color: var(--text-main) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border) !important;
    padding: 1.25rem !important;
}

.custom-swal-title {
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 0.5rem !important;
}

.custom-swal-html {
    color: var(--text-muted) !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

.custom-swal-confirm, .custom-swal-cancel {
    border-radius: var(--radius-full) !important;
    padding: 0.75rem 1.25rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
    margin: 0 0.5rem !important;
}

.custom-swal-confirm:hover, .custom-swal-cancel:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* Animations */
@keyframes customSwalIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes customSwalOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}

.custom-swal-animate-in {
    animation: customSwalIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.custom-swal-animate-out {
    animation: customSwalOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

/* Blur Backdrop */
.swal2-backdrop-show {
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.swal2-backdrop-hide {
    background: transparent !important;
    backdrop-filter: blur(0px) !important;
    -webkit-backdrop-filter: blur(0px) !important;
    transition: all 0.4s ease !important;
}

/* SweetAlert Icons customization */
.swal2-icon {
    border-color: transparent !important;
}
.swal2-success {
    color: var(--success) !important;
}
.swal2-error {
    color: var(--danger) !important;
}
.swal2-warning {
    color: var(--warning) !important;
}
.swal2-info {
    color: var(--info) !important;
}



/* Modern Smooth Collapsible Sidebar */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    white-space: nowrap;
}
.sidebar .nav-text {
    transition: opacity 0.2s ease, visibility 0.2s;
    opacity: 1;
    visibility: visible;
    position: relative;
}
.sidebar.collapsed {
    width: 80px;
    padding: 1.5rem 0.5rem;
}
.sidebar.collapsed .nav-text {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute; /* Prevents invisible text from taking up flex space */
}
.sidebar.collapsed .nav-item i {
    margin-right: 0;
    font-size: 1.3rem;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.65rem 0;
}
/* Hover to expand while collapsed */
.sidebar.collapsed:hover {
    width: 260px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.sidebar.collapsed:hover .nav-text {
    opacity: 1;
    visibility: visible;
    position: relative;
    transition-delay: 0.1s;
}
.sidebar.collapsed:hover .nav-item {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
}
.sidebar.collapsed:hover .nav-item i {
    margin-right: 0.75rem;
}
.main-content {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
body.sidebar-collapsed .main-content {
    margin-left: 80px;
}
.mobile-close {
    display: none;
}



.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

/* Dashboard Tabs - Modern Pill Navigation */
.dashboard-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-bottom: 1.25rem;
    background: var(--surface);
    padding: 0.2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    overflow-x: auto;
    max-width: 100%;
}

.dashboard-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.dashboard-tab i {
    font-size: 0.85rem;
    opacity: 0.85;
}

.dashboard-tab:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .dashboard-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-tab.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb, 79, 70, 229), 0.35);
}

.dashboard-tab.active i {
    opacity: 1;
}

.dashboard-tab.active::after {
    display: none;
}

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

.tab-pane.active {
    display: block;
}

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

/* Quick Actions Bar */
.quick-actions-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.25rem;
}

.quick-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.quick-actions-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.65rem;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 9px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    background: var(--surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(var(--primary-rgb, 79, 70, 229), 0.35);
}

.qa-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.quick-action-btn:hover .qa-icon {
    transform: scale(1.1);
}

.qa-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}

.qa-en {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-bn {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Themed Icons */
.qa-pos .qa-icon { background: rgba(79, 70, 229, 0.12); color: var(--primary); }
.qa-product .qa-icon { background: rgba(16, 185, 129, 0.12); color: #10B981; }
.qa-expense .qa-icon { background: rgba(239, 68, 68, 0.12); color: #EF4444; }
.qa-return .qa-icon { background: rgba(245, 158, 11, 0.12); color: #F59E0B; }
.qa-customer .qa-icon { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.qa-report .qa-icon { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }

.bn-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.25rem;
    text-transform: none;
    letter-spacing: normal;
}

/* ==========================================================================
   Material Design Outlined Fields
   ========================================================================== */
.material-field {
    position: relative;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.material-field .form-control,
.material-field .form-select {
    width: 100%;
    padding: 0.75rem 0.85rem;
    font-size: 0.95rem;
    background-color: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    transition: var(--transition);
}
.material-field .form-control:focus,
.material-field .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}
.material-field label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0.75rem;
    font-size: 0.95rem;
    font-weight: 400;
    background-color: transparent;
    padding: 0 0.35rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
    transition: all 0.2s ease-in-out;
}
.material-field .form-control:focus ~ label,
.material-field .form-control:not(:placeholder-shown) ~ label,
.material-field .form-select ~ label {
    top: -0.65rem;
    transform: translateY(0);
    font-size: 0.8rem;
    font-weight: 500;
    background-color: var(--surface);
    color: var(--text-muted);
}
.material-field .form-control:focus ~ label,
.material-field .form-select:focus ~ label {
    color: var(--primary);
}

/* ==========================================================================
   Dashboard 2.0 Modern Enhancements
   ========================================================================== */
.dashboard-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.dashboard-header-bar .dashboard-tabs {
    margin-bottom: 0;
}

.period-filters {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    background: var(--surface);
    padding: 0.2rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.period-btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 7px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.period-btn:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .period-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.period-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

/* Modern Quick Action Cards */
.qa-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.qa-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.qa-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: rgba(var(--primary-rgb, 79, 70, 229), 0.4);
}

.qa-card .qa-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: transform 0.25s ease;
}

.qa-card:hover .qa-icon {
    transform: scale(1.12);
}

.qa-card .qa-info h5 {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
}

.qa-card .qa-info small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Themed Quick Actions */
.qa-card.qa-pos .qa-icon { background: rgba(16, 185, 129, 0.14); color: #10B981; }
.qa-card.qa-product .qa-icon { background: rgba(59, 130, 246, 0.14); color: #3B82F6; }
.qa-card.qa-expense .qa-icon { background: rgba(239, 68, 68, 0.14); color: #EF4444; }
.qa-card.qa-return .qa-icon { background: rgba(245, 158, 11, 0.14); color: #F59E0B; }
.qa-card.qa-customer .qa-icon { background: rgba(139, 92, 246, 0.14); color: #8B5CF6; }

/* Financial Summary Cards */
.fin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1200px) {
    .fin-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .fin-summary-grid {
        grid-template-columns: 1fr;
    }
}

.fin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.fin-card.profit-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.02) 100%);
    border-color: rgba(16, 185, 129, 0.35);
}

.fin-card.loss-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08) 0%, rgba(220, 38, 38, 0.02) 100%);
    border-color: rgba(239, 68, 68, 0.35);
}

.fin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.period-text {
    font-size: 80% !important;
    font-weight: 500 !important;
    opacity: 0.75 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.fin-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.fin-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.fin-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    margin-bottom: 0.4rem;
}

.fin-breakdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
    border-top: 1px dashed var(--border);
    padding-top: 0.45rem;
    margin-top: 0.45rem;
}

/* Monthly Target Card */
.target-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.target-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.target-bar-bg {
    height: 14px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.65rem;
}

[data-theme="dark"] .target-bar-bg {
    background: rgba(255, 255, 255, 0.08);
}

.target-bar-fill {
    height: 100%;
    border-radius: 20px;
    background: linear-gradient(90deg, #4F46E5 0%, #10B981 100%);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.target-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
}

/* Staff Leaderboard Ranking */
.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.leaderboard-item:last-child {
    border-bottom: none;
}

.rank-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    margin-right: 0.65rem;
}
.rank-1 { background: #FEF08A; color: #854D0E; }
.rank-2 { background: #E2E8F0; color: #475569; }
.rank-3 { background: #FFEDD5; color: #9A3412; }
.rank-other { background: rgba(0, 0, 0, 0.05); color: var(--text-muted); }

/* Dead Stock List Styling */
.stock-warning-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.stock-warning-item:last-child {
    border-bottom: none;
}

/* Prevent number input mouse scroll and spinner quirks */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}
/* Dashboard Card Details Table */
.details-popup .swal2-html-container { padding: 0 !important; margin: 1rem 0 0 0 !important; overflow: hidden; border-radius: 0 0 12px 12px; }
.details-table { width: 100%; border-collapse: collapse; margin-bottom: 0; font-size: 0.85rem; text-align: left; }
.details-table th, .details-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.details-table th { background: var(--surface); color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.05em; position: sticky; top: 0; z-index: 10; }
.details-table tbody tr:hover { background-color: rgba(0,0,0,0.015); }
[data-theme='dark'] .details-table tbody tr:hover { background-color: rgba(255,255,255,0.02); }
.details-table tfoot th, .details-table tfoot td { background: rgba(var(--primary-rgb, 79, 70, 229), 0.05); border-top: 2px solid var(--border); font-size: 0.95rem; }
.table-responsive { max-height: 500px; overflow-y: auto; }


/* Smaller SwicthAlert Title */
.custom-swal-title { font-size: 0.95rem !important; padding-top: 1rem !important; }
.details-popup .custom-swal-title { font-size: 0.85rem !important; padding-top: 0.5rem !important; }

