/* 
   MonthMart Premium Admin Theme 
   Based on Bootstrap 5 with SaaS visual enhancements
*/

:root {
    /* Refined Color Palette */
    --primary-color: #1e3a8a;
    /* Vibrant Navy-Blue Mix */
    --primary-hover: #152a6a;
    /* Darker Mix */
    --secondary-color: #64748b;
    /* Slate 500 */
    --success-color: #10b981;
    /* Emerald 500 */
    --warning-color: #f59e0b;
    /* Amber 500 */
    --danger-color: #ef4444;
    /* Red 500 */
    --info-color: #0ea5e9;
    /* Sky 500 */

    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */

    /* Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */

    /* Mesh Colors */
    --mesh-1: rgba(20, 24, 44, 0.15);
    --mesh-2: rgba(14, 165, 233, 0.15);
    --mesh-3: rgba(139, 92, 246, 0.1);

    /* Logo Glow */
    --logo-glow: drop-shadow(0 0 8px rgba(20, 24, 44, 0.3));
}

.brand-glow {
    filter: var(--logo-glow);
    transition: filter 0.3s ease;
}


[data-theme="dark"] {
    --bg-body: #0f1219;
    /* Deeper, less saturated navy */
    --bg-card: #161b28;
    /* Deeper card background */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.7);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.8);

    /* Dark Mesh Colors */
    --mesh-1: rgba(99, 102, 241, 0.3);
    --mesh-2: rgba(14, 165, 233, 0.2);
    --mesh-3: rgba(139, 92, 246, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

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

[data-theme="dark"] .text-secondary,
[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .bg-light {
    background-color: #1e293b !important;
}

[data-theme="dark"] .border-light {
    border-color: #334155 !important;
}

[data-theme="dark"] .card-header.bg-white,
[data-theme="dark"] .card-footer.bg-white {
    background-color: var(--bg-card) !important;
    border-color: #334155 !important;
}

[data-theme="dark"] .table thead.bg-light,
[data-theme="dark"] .bg-light {
    background-color: #0c1222 !important;
    /* Slightly darker than card for depth */
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.05) !important;
}

/* Dark Mode Image Blending */
[data-theme="dark"] img.opacity-20 {
    opacity: 0.1 !important;
    filter: brightness(0.7) contrast(1.2);
}

[data-theme="dark"] .alert-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color) !important;
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .sidebar-toggler.bg-white {
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .modal-content {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

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

[data-theme="dark"] .card {
    border-color: #334155 !important;
    box-shadow: var(--shadow-md) !important;
    background-color: var(--bg-card) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .dropdown-item {
    color: #f8fafc;
}

[data-theme="dark"] .dropdown-item:hover {
    background-color: #334155;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #1e293b;
    border-color: var(--primary-color);
    color: #f8fafc;
}

[data-theme="dark"] .form-control::placeholder {
    color: #64748b;
}

[data-theme="dark"] .list-group-item {
    background-color: var(--bg-card);
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .list-group-item-action:hover {
    background-color: #1e293b;
    color: #f8fafc;
}

/* 1. Global Reset & Typography */
body {
    background-color: var(--bg-body);
    font-family: 'Inter',
        system-ui,
        -apple-system,
        sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

/* 2. Card Styling Overrides - The "Glass" effect without opacity issues */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
    /* Subtle lift effect */
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* 3. Button Upgrades */
.btn {
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    /* Colored shadow glow */
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: #e2e8f0;
    color: var(--text-muted);
}

.btn-outline-secondary:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: var(--text-main);
}

/* 4. Form Controls */
.form-control,
.form-select {
    border-radius: var(--radius-md);
    border-color: #e2e8f0;
    padding: 0.625rem 0.875rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    /* Soft focus ring */
}

/* 5. Sidebar Polish */
#sidebar {
    background: #0f172a;
    /* Slate 900 - Darker than before */
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    padding-bottom: 4rem;
    /* Ensure last items are visible */
}

/* Sidebar Scrollbar Visibility */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

#sidebar.collapsed {
    width: 80px !important;
    min-width: 80px !important;
}

#sidebar.collapsed .nav-link span,
#sidebar.collapsed h3,
#sidebar.collapsed .tracking-wider,
#sidebar.collapsed .mt-auto span {
    display: none !important;
}

#sidebar.collapsed .nav-link {
    text-align: center;
    padding: 1rem;
    margin: 0.25rem 0.5rem;
}

#sidebar.collapsed .nav-link i {
    margin-right: 0 !important;
    font-size: 1.25rem;
}

#sidebar .nav-link {
    color: #94a3b8;
    /* Slate 400 */
    padding: 0.875rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

#sidebar .nav-link:hover {
    color: #f8fafc;
    background-color: rgba(255, 255, 255, 0.05);
}

#sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

#sidebar h3 {
    letter-spacing: -0.05em;
}

/* 6. Table Upgrades */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.table tbody td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.925rem;
}

.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* 7. Utilities & Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 600;
    letter-spacing: 0.025em;
    border-radius: 6px;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Stat Cards Gradients - Enhanced for Dark Mode */
.bg-gradient-primary {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%) !important;
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%) !important;
}

/* New Glow Effects */
.glow-primary {
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4) !important;
}

.glow-success {
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4) !important;
}

.glow-info {
    box-shadow: 0 5px 15px rgba(14, 165, 233, 0.4) !important;
}

.glow-warning {
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.4) !important;
}

.glow-danger {
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.4) !important;
}

/* Animations */
.anim-fade-down {
    animation: fadeDown 0.5s ease-out forwards;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ENHANCED DASHBOARD STYLES
   ============================================ */

/* Stat Card Enhancements */
.stat-card-enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-enhanced:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.stat-card-pattern {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 20px);
    }
}

.stat-content {
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: 2.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-icon {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.stat-card-enhanced:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-link {
    transition: all 0.2s ease;
}

.stat-link:hover {
    opacity: 0.9;
}

.stat-link .fa-arrow-right {
    transition: transform 0.2s ease;
}

.stat-link:hover .fa-arrow-right {
    transform: translateX(4px);
}

.stat-trend {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
}

.letter-spacing-1 {
    letter-spacing: 0.05em;
}

/* Chart Card Enhancements */
.chart-card-enhanced {
    transition: all 0.3s ease;
}

.chart-card-enhanced:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.chart-legend {
    display: flex;
    gap: 0.5rem;
}

/* Quick Actions Enhancements */
.quick-actions-card {
    transition: all 0.3s ease;
}

.quick-action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-width: 2px !important;
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    border-color: currentColor !important;
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

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

.hover-lift {
    transition: all 0.3s ease;
}

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

/* Table Enhancements */
.table-card-enhanced {
    transition: all 0.3s ease;
}

.table-card-enhanced:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.table-row-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.table-row-hover:hover {
    background-color: #f1f5f9 !important;
    transform: translateX(8px);
}

.table-row-hover:hover td {
    color: var(--primary-color);
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07) !important;
}

[data-theme="dark"] .glass-card {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Shiny Card Sweep Effect */
.shiny-card {
    position: relative;
    overflow: hidden;
}

.shiny-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.13);
    transform: rotate(30deg);
    transition: none;
}

.shiny-card:hover::after {
    left: 120%;
    transition: all 0.6s ease-in-out;
}

/* Magnetic Button Utility (Placeholder for JS) */
.magnetic-button {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Icon Rotate on Hover */
.icon-rotate-hover:hover i {
    transform: rotate(360deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animation Utilities */
.transition-transform {
    transition: transform 0.2s ease;
}

/* Profile Card Enhancements */
.profile-card-enhanced {
    transition: all 0.3s ease;
}

.profile-card-enhanced:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.profile-card-enhanced .fa-store {
    transition: all 0.3s ease;
}

.profile-card-enhanced:hover .fa-store {
    transform: scale(1.1) rotate(-5deg);
}

/* Additional Smooth Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.stat-card-enhanced:hover .stat-icon i {
    animation: pulse 2s ease-in-out infinite;
}

/* Enhanced Badge Styles */
.badge {
    transition: all 0.2s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* ============================================
   ADVANCED ANIMATIONS & VISUAL EFFECTS
   ============================================ */

/* Number Counting Animation */
.stat-number {
    position: relative;
    overflow: hidden;
}

.stat-number::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Stagger Animation for Cards */
.stat-card-enhanced {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stat-card-enhanced:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card-enhanced:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card-enhanced:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card-enhanced:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animation for Icons */
@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.stat-icon i {
    animation: iconPulse 3s ease-in-out infinite;
}

.stat-card-enhanced:hover .stat-icon i {
    animation: iconPulse 1s ease-in-out infinite;
}

/* Floating Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.stat-card-enhanced:hover {
    animation: float 3s ease-in-out infinite;
}

/* Gradient Overlay on Hover */
.stat-card-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.stat-card-enhanced:hover::before {
    opacity: 1;
}

/* Glow Effect */
.stat-card-enhanced {
    position: relative;
}

.stat-card-enhanced::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-card-enhanced:hover::after {
    opacity: 0.5;
}

/* Table Row Stagger Animation */
.table-row-hover {
    animation: slideInRight 0.5s ease-out backwards;
}

.table-row-hover:nth-child(1) {
    animation-delay: 0.1s;
}

.table-row-hover:nth-child(2) {
    animation-delay: 0.15s;
}

.table-row-hover:nth-child(3) {
    animation-delay: 0.2s;
}

.table-row-hover:nth-child(4) {
    animation-delay: 0.25s;
}

/* Security Dashboard Enhancements */
.card-danger-soft {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.card-danger-soft .card-header {
    background-color: rgba(239, 68, 68, 0.1);
    border-bottom: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.card-danger-soft .badge {
    background-color: var(--danger-color);
    color: white;
}

/* Fix table alignment in specific cards */
/* Fix table alignment in specific cards */
.table th {
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Search input polish */
#logSearch {
    box-shadow: none;
    transition: all 0.2s;
}

#logSearch:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.table-row-hover:nth-child(5) {
    animation-delay: 0.3s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Quick Action Button Ripple Effect */
.quick-action-btn {
    position: relative;
    overflow: hidden;
}

.quick-action-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.quick-action-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Chart Card Entrance Animation */
.chart-card-enhanced {
    animation: scaleIn 0.6s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Badge Pulse Animation */
.badge {
    position: relative;
    overflow: hidden;
}

.badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.badge:hover::before {
    left: 100%;
}

/* Loading Skeleton Animation */
@keyframes skeleton {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Progress Bar Animation */
.progress-bar {
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Card Tilt Effect */
.stat-card-enhanced {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.stat-card-enhanced:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

/* Icon Rotation on Hover */
.stat-icon {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.stat-card-enhanced:hover .stat-icon {
    transform: rotate(360deg) scale(1.15);
}

/* Text Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #6366f1);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s linear infinite;
}

/* Bounce Animation for Notifications */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.notification-badge {
    animation: bounce 2s infinite;
}

/* Smooth Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hover Glow Effect */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Card Flip Effect (for future use) */
.card-flip {
    perspective: 1000px;
}

.card-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-flip-inner {
    transform: rotateY(180deg);
}

/* Sparkle Effect */
@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: sparkle 2s infinite;
}

/* Enhanced Button Hover */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

.btn-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Particle Effects */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(calc(var(--random-x, 0) * 50px),
                calc(var(--random-y, 0) * 50px)) scale(0);
    }
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: rippleAnimation 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Floating Icon Animation */
.float-animation {
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

/* Enhanced Chart Container */
.chart-card-enhanced canvas {
    transition: all 0.3s ease;
}

.chart-card-enhanced:hover canvas {
    filter: brightness(1.05);
}

/* Loading Skeleton for Cards */
@keyframes skeletonPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.skeleton-loading {
    animation: skeletonPulse 1.5s ease-in-out infinite;
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

/* Enhanced Badge Hover */
.badge {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.badge:hover::after {
    width: 200px;
    height: 200px;
}

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

/* Avatar Pulse Animation */
.avatar-sm,
.avatar-circle-sm {
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

/* Table Row Enhanced Hover */
.table-row-hover {
    position: relative;
    overflow: hidden;
}

.table-row-hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.table-row-hover:hover::before {
    transform: scaleY(1);
}

/* Card Entrance Stagger */
.card {
    animation: cardEntrance 0.6s ease-out backwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

/* Glowing Border Effect */
.stat-card-enhanced {
    position: relative;
}

.stat-card-enhanced::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg,
            rgba(99, 102, 241, 0.5),
            rgba(139, 92, 246, 0.5),
            rgba(99, 102, 241, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-card-enhanced:hover::after {
    opacity: 1;
    animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Text Gradient Animation */
.gradient-text-animated {
    background: linear-gradient(90deg,
            #6366f1,
            #8b5cf6,
            #ec4899,
            #6366f1);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }

    .quick-action-btn {
        padding: 1rem !important;
    }

    .quick-action-icon {
        width: 40px;
        height: 40px;
    }

    .stat-card-enhanced:hover {
        transform: translateY(-4px) scale(1.01);
        animation: none;
    }

    .particle {
        display: none;
        /* Disable particles on mobile for performance */
    }
}

/* ============================================
   ADVANCED UI: MESH BACKGROUND & SKELETONS
   ============================================ */

/* Global Dark Mode Text Fix */
[data-theme="dark"] body,
[data-theme="dark"] .main-content,
[data-theme="dark"] .card,
[data-theme="dark"] .table,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] td,
[data-theme="dark"] th,
[data-theme="dark"] div {
    color: #f8fafc;
}

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

[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
    color: #94a3b8 !important;
}

[data-theme="dark"] .bg-white {
    background-color: #1e293b !important;
}

[data-theme="dark"] .bg-light {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .table {
    color: #f8fafc !important;
}

[data-theme="dark"] .table thead th {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-bottom: 2px solid #334155 !important;
    border-top: none !important;
}

[data-theme="dark"] .table td {
    background-color: transparent !important;
    border-bottom: 1px solid #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.1) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: #1e293b !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
}

[data-theme="dark"] .card {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

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

[data-theme="dark"] .dropdown-item:hover {
    background-color: #334155 !important;
    color: #ffffff !important;
}

[data-theme="dark"] .btn-light {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .btn-outline-secondary {
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

[data-theme="dark"] .modal-content {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Specific Style for Premium "POS-Like" Cards in Dark Mode */
[data-theme="dark"] .premium-list-card {
    border-left: 4px solid var(--primary-color) !important;
    background: linear-gradient(90deg, #1e293b 0%, #161e2e 100%) !important;
}

[data-theme="dark"] .premium-list-card:hover {
    background: linear-gradient(90deg, #242f42 0%, #1e293b 100%) !important;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.animated-mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9999 !important;
    background-color: var(--bg-body);
    overflow: hidden;
    transition: background-color 0.5s ease;
    pointer-events: none !important;
}

/* Ensure interactive elements are always on top */
header,
.navbar,
.auth-card,
.btn,
.form-control,
.form-select,
.dropdown-menu,
.nav-item {
    z-index: 10 !important;
}

header {
    z-index: 2000 !important;
}

.dropdown-menu.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 9999 !important;
    position: absolute !important;
}

/* Fix for Role Selection in Login */
.form-select {
    cursor: pointer !important;
}

.mesh-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: meshMove 20s infinite alternate;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: var(--mesh-1);
    top: -100px;
    left: -100px;
}

[data-theme="dark"] .blob-1 {
    background: rgba(99, 102, 241, 0.15);
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--mesh-2);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

[data-theme="dark"] .blob-2 {
    background: rgba(14, 165, 233, 0.1);
}

.blob-3 {
    width: 400px;
    height: 400px;
    background: var(--mesh-3);
    top: 40%;
    left: 30%;
    animation-delay: -10s;
}

[data-theme="dark"] .blob-3 {
    background: rgba(139, 92, 246, 0.1);
}

@keyframes meshMove {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(100px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Skeleton Loaders */
.skeleton-box {
    display: inline-block;
    height: 1em;
    position: relative;
    overflow: hidden;
    background-color: #e2e8f0;
    border-radius: 4px;
}

[data-theme="dark"] .skeleton-box {
    background-color: #334155;
}

.skeleton-box::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.2) 20%,
            rgba(255, 255, 255, 0.5) 60%,
            rgba(255, 255, 255, 0));
    animation: shimmer 1.5s infinite;
    content: '';
}

/* Theme Toggle Button */
.theme-toggle {
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

[data-theme="dark"] .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle:hover {
    transform: rotate(45deg);
    background: var(--primary-color);
    color: white;
}

/* Sidebar Hamburger */
.sidebar-toggler {
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-toggler:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ========================================
   PREMIUM DASHBOARD ENHANCEMENTS
   ======================================== */

/* Neon Glow on Primary Elements */
.glow-primary {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4), 0 0 40px rgba(99, 102, 241, 0.2);
}

.glow-success {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4), 0 0 40px rgba(16, 185, 129, 0.2);
}

.glow-warning {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.4), 0 0 40px rgba(245, 158, 11, 0.2);
}

.glow-danger {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 0 40px rgba(239, 68, 68, 0.2);
}

/* Enhanced Table Row Hover */
.table-hover tbody tr {
    transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05), transparent) !important;
    transform: translateX(4px);
}

[data-theme="dark"] .table-hover tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent) !important;
}

/* Animated Badge Pulse */
.badge-pulse {
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Premium Card Shine on Hover */
.card-shine {
    position: relative;
    overflow: hidden;
}

.card-shine::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transition: all 0.6s ease;
    pointer-events: none;
}

.card-shine:hover::before {
    top: 100%;
    left: 100%;
}

/* Status Indicator Dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.active {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
    animation: statusPulse 1.5s infinite;
}

.status-dot.pending {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

.status-dot.inactive {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Dashboard Quick Stats Mini Cards */
.mini-stat-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.mini-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Progress Bar Glow */
.progress-glow .progress-bar {
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6);
}

/* Enhanced Avatar Ring */
.avatar-ring {
    border: 3px solid transparent;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, var(--primary-color), #8b5cf6) border-box;
    border-radius: 50%;
}

/* Tooltip Enhancement */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: #1e293b;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* ========================================
   PWA INSTALL BANNER
   ======================================== */

.pwa-install-banner {
    position: fixed;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 480px;
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
}

.pwa-install-banner.show {
    bottom: 20px;
}

[data-theme="dark"] .pwa-install-banner {
    background: linear-gradient(135deg, #1e293b 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pwa-banner-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
}

.pwa-banner-text strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.pwa-banner-text span {
    font-size: 12px;
    color: var(--text-muted);
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-btn-install {
    background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pwa-btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.pwa-btn-dismiss {
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pwa-btn-dismiss:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

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

/* Mobile responsive */
@media (max-width: 480px) {
    .pwa-install-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .pwa-banner-content {
        flex-direction: column;
    }

    .pwa-banner-actions {
        width: 100%;
        justify-content: center;
    }

    .pwa-btn-install {
        flex: 1;
    }
}

/* ============================================
   Sync Hub White Theme Styles
   ============================================ */

.sync-hub-header {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.sync-hub-header .bg-primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

/* Align Sync Hub cards with provider theme */
.sync-hub-page .sync-hub-card {
    background-color: var(--bg-card) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.sync-hub-page .sync-hub-surface {
    background-color: var(--bg-card) !important;
}

.sync-hub-page .card.bg-white,
.sync-hub-page .modal-content.bg-white {
    background-color: var(--bg-card) !important;
}

.sync-hub-page .card-header.bg-white,
.sync-hub-page .modal-header.bg-white {
    background-color: transparent !important;
}

.sync-hub-page .bg-white {
    background-color: var(--bg-card) !important;
}

.sync-hub-page .bg-light {
    background-color: var(--bg-body) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.sync-hub-page .table thead.bg-light {
    background-color: var(--bg-body) !important;
}

.sync-hub-page .table thead th {
    background-color: var(--bg-body) !important;
    border-bottom-color: rgba(148, 163, 184, 0.2) !important;
}

.sync-hub-page .table tbody td {
    border-bottom-color: rgba(148, 163, 184, 0.12) !important;
}

.sync-hub-page .card,
.sync-hub-page .card-body,
.sync-hub-page .table,
.sync-hub-page .table tbody,
.sync-hub-page .table thead {
    background-color: var(--bg-card) !important;
}

.sync-hub-page .table td,
.sync-hub-page .table th {
    color: var(--text-main) !important;
}

.sync-hub-page .text-muted,
.sync-hub-page .text-secondary {
    color: var(--text-muted) !important;
}

.sync-hub-page .table-row-hover:hover {
    background-color: rgba(99, 102, 241, 0.08) !important;
}

/* Enhanced white card styling for sync hub */
.card.bg-white {
    transition: all 0.3s ease;
}

.card.bg-white:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* Task table row hover effect */
.table-row-hover {
    transition: all 0.2s ease;
}

.table-row-hover:hover {
    background-color: #f8fafc !important;
    transform: translateX(2px);
}

/* Badge enhancements for sync hub */
.badge.bg-opacity-10 {
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Search input styling */
.form-control.bg-light:focus {
    background-color: #ffffff !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.1) !important;
}

/* Status indicator pulse animation */
@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.bg-success.rounded-circle,
.bg-warning.rounded-circle,
.bg-danger.rounded-circle {
    animation: statusPulse 2s ease-in-out infinite;
}

/* Log table styling */
.table tbody tr.border-bottom {
    transition: background-color 0.2s ease;
}

.table tbody tr.border-bottom:hover {
    background-color: #ffffff;
}

/* Button hover effects for sync hub */
.btn.rounded-3 {
    transition: all 0.3s ease;
}

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

/* Info box styling */
.bg-light.rounded-3 {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Modal enhancements */
.modal-content.bg-white {
    border: none;
}

.modal-header.bg-white {
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Responsive adjustments for sync hub */
@media (max-width: 768px) {
    .sync-hub-header .card-body {
        padding: 1.5rem !important;
    }

    .sync-hub-header .bg-primary {
        padding: 1.5rem !important;
    }

    .sync-hub-header h2 {
        font-size: 1.5rem;
    }
}

/* ============================================
   SYNC HUB PREMIUM VISUAL ENHANCEMENTS
   ============================================ */

/* Main Sync Hub Container Animation */
.sync-hub-header {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sync-hub-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.sync-hub-header:hover {
    transform: translateY(-4px);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.1),
        0 0 50px rgba(99, 102, 241, 0.08) !important;
}

/* Animated Sync Icon */
.sync-hub-header .fa-sync-alt {
    position: relative;
    transition: all 0.4s ease;
}

.sync-hub-header:hover .fa-sync-alt {
    animation: syncRotate 2s linear infinite;
    color: var(--primary-color) !important;
}

@keyframes syncRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Premium Status Indicator with Glow */
.sync-hub-header .bg-success.rounded-circle {
    box-shadow:
        0 0 10px rgba(16, 185, 129, 0.6),
        0 0 20px rgba(16, 185, 129, 0.4),
        0 0 30px rgba(16, 185, 129, 0.2);
    animation: glowPulse 2s ease-in-out infinite;
}

.sync-hub-header .bg-warning.rounded-circle {
    box-shadow:
        0 0 10px rgba(245, 158, 11, 0.6),
        0 0 20px rgba(245, 158, 11, 0.4),
        0 0 30px rgba(245, 158, 11, 0.2);
    animation: glowPulseWarning 2s ease-in-out infinite;
}

.sync-hub-header .bg-danger.rounded-circle {
    box-shadow:
        0 0 10px rgba(239, 68, 68, 0.6),
        0 0 20px rgba(239, 68, 68, 0.4),
        0 0 30px rgba(239, 68, 68, 0.2);
    animation: glowPulseDanger 1.5s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 1;
        box-shadow:
            0 0 10px rgba(16, 185, 129, 0.6),
            0 0 20px rgba(16, 185, 129, 0.4),
            0 0 30px rgba(16, 185, 129, 0.2);
    }

    50% {
        opacity: 0.85;
        box-shadow:
            0 0 15px rgba(16, 185, 129, 0.8),
            0 0 30px rgba(16, 185, 129, 0.5),
            0 0 45px rgba(16, 185, 129, 0.3);
    }
}

@keyframes glowPulseWarning {

    0%,
    100% {
        opacity: 1;
        box-shadow:
            0 0 10px rgba(245, 158, 11, 0.6),
            0 0 20px rgba(245, 158, 11, 0.4);
    }

    50% {
        opacity: 0.85;
        box-shadow:
            0 0 18px rgba(245, 158, 11, 0.8),
            0 0 35px rgba(245, 158, 11, 0.5);
    }
}

@keyframes glowPulseDanger {

    0%,
    100% {
        opacity: 1;
        box-shadow:
            0 0 10px rgba(239, 68, 68, 0.6),
            0 0 20px rgba(239, 68, 68, 0.4);
    }

    50% {
        opacity: 0.7;
        box-shadow:
            0 0 20px rgba(239, 68, 68, 0.9),
            0 0 40px rgba(239, 68, 68, 0.6);
    }
}

/* Live Mode Toggle Enhancement */
#liveModeToggle {
    width: 44px;
    height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#liveModeToggle:checked {
    background-color: #10b981;
    border-color: #10b981;
    box-shadow:
        0 0 12px rgba(16, 185, 129, 0.5),
        inset 0 0 8px rgba(0, 0, 0, 0.1);
}

#liveModeToggle:checked::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: liveShine 2s linear infinite;
}

@keyframes liveShine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Quick Actions Cards Premium Styling */
.col-xl-4>.card.shadow-lg {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.col-xl-4>.card.shadow-lg:hover {
    border-color: rgba(99, 102, 241, 0.3) !important;
}

/* Action Buttons Premium Hover Effects */
.d-grid.gap-3 a.btn,
.d-grid.gap-3 button.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.d-grid.gap-3 a.btn::before,
.d-grid.gap-3 button.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            transparent);
    transition: left 0.6s ease;
}

.d-grid.gap-3 a.btn:hover::before,
.d-grid.gap-3 button.btn:hover::before {
    left: 100%;
}

.d-grid.gap-3 a.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    border-color: #4f46e5;
    box-shadow:
        0 10px 25px -5px rgba(99, 102, 241, 0.4),
        0 0 20px rgba(99, 102, 241, 0.2) !important;
    transform: translateY(-4px) scale(1.01);
}

.d-grid.gap-3 button.btn-outline-danger:hover {
    box-shadow:
        0 10px 25px -5px rgba(239, 68, 68, 0.3),
        0 0 15px rgba(239, 68, 68, 0.15) !important;
    transform: translateY(-4px) scale(1.01);
}

.d-grid.gap-3 a.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    border-color: #059669 !important;
    box-shadow:
        0 10px 25px -5px rgba(16, 185, 129, 0.4),
        0 0 20px rgba(16, 185, 129, 0.2) !important;
    transform: translateY(-4px) scale(1.01);
}

/* Task Queue Table Premium Styling */
#taskTable {
    position: relative;
}

#taskTable thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

#taskTable thead th {
    border-bottom: 2px solid rgba(99, 102, 241, 0.15) !important;
}

#taskTable tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#taskTable tbody tr::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), #818cf8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#taskTable tbody tr:hover::before {
    opacity: 1;
}

#taskTable tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.05) 0%, rgba(255, 255, 255, 0) 100%) !important;
    transform: translateX(6px);
}

/* Task Status Badge Animations */
.badge.task-status {
    position: relative;
    overflow: hidden;
}

.badge.task-status::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: badgeShine 3s linear infinite;
}

@keyframes badgeShine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Processing Status Enhanced Animation */
.badge .fa-spinner {
    animation: spinnerRotate 1s linear infinite;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.badge.text-warning {
    position: relative;
    animation: processingGlow 1.5s ease-in-out infinite;
}

@keyframes processingGlow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.5);
    }
}

/* System Logs Terminal Style Enhancement */
.card.shadow-lg:has(.font-monospace) {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.card-body.bg-light:has(.font-monospace) {
    background: #0f172a !important;
    border-radius: 0 0 1rem 1rem;
    position: relative;
    overflow: hidden;
}

.card-body.bg-light:has(.font-monospace)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.font-monospace tbody tr {
    transition: all 0.2s ease;
}

.font-monospace tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.font-monospace td.text-muted {
    color: #64748b !important;
}

.font-monospace td.text-dark {
    color: #e2e8f0 !important;
}

/* Log Level Badges in Terminal */
.font-monospace .badge.bg-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
    animation: errorFlash 2s ease-in-out infinite;
}

.font-monospace .badge.bg-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.font-monospace .badge.bg-success {
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

@keyframes errorFlash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Tail -f Badge Styling */
.badge.font-monospace {
    position: relative;
    overflow: hidden;
    background: rgba(99, 102, 241, 0.1) !important;
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-color) !important;
}

.badge.font-monospace::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    animation: terminalBlink 1s ease-in-out infinite;
}

@keyframes terminalBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Modal Premium Enhancement */
.modal-content.rounded-4 {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 50px rgba(99, 102, 241, 0.1) !important;
}

.modal-content.rounded-4 .modal-header {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.03) 0%, transparent 100%);
}

.modal-content.rounded-4 .bg-primary.bg-opacity-10 {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%) !important;
}

/* Search Input Premium Style */
#taskSearch {
    border: 2px solid transparent !important;
    background: linear-gradient(#f8fafc, #f8fafc) padding-box,
        linear-gradient(135deg, #e2e8f0, #f1f5f9) border-box !important;
    transition: all 0.3s ease;
}

#taskSearch:focus {
    background: linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(135deg, var(--primary-color), #818cf8) border-box !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15) !important;
    transform: scale(1.02);
}

#taskSearch::placeholder {
    color: #94a3b8;
    transition: opacity 0.3s ease;
}

#taskSearch:focus::placeholder {
    opacity: 0.5;
}

/* Fade In Animation for Sync Hub Page */
.animate-fade-in {
    animation: syncHubFadeIn 0.6s ease-out forwards;
}

@keyframes syncHubFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Stagger Animation */
.row.g-4>[class*="col-"]:nth-child(1) {
    animation-delay: 0.1s;
}

.row.g-4>[class*="col-"]:nth-child(2) {
    animation-delay: 0.2s;
}

.row.g-4>[class*="col-"]:nth-child(3) {
    animation-delay: 0.3s;
}

/* Info Box Premium Styling */
.bg-light.rounded-3:has(.fa-info-circle) {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.15) !important;
    position: relative;
    overflow: hidden;
}

.bg-light.rounded-3:has(.fa-info-circle)::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.05) 0%, transparent 70%);
    animation: infoGradientMove 8s linear infinite;
}

@keyframes infoGradientMove {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Empty State Enhancement */
#taskTableBody tr:only-child td[colspan="4"] {
    background: linear-gradient(180deg, transparent 0%, rgba(16, 185, 129, 0.03) 100%);
}

#taskTableBody tr:only-child .fa-check-double {
    animation: successBounce 2s ease-in-out infinite;
}

@keyframes successBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Dark Mode Sync Hub Adjustments */
[data-theme="dark"] .sync-hub-header::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(14, 165, 233, 0.1) 0%, transparent 50%);
}

[data-theme="dark"] #taskTable tbody tr:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, rgba(30, 41, 59, 0) 100%) !important;
}

[data-theme="dark"] .card-body.bg-light:has(.font-monospace) {
    background: #0a0f1a !important;
}

[data-theme="dark"] .font-monospace td.text-dark {
    color: #f1f5f9 !important;
}

[data-theme="dark"] #taskSearch {
    background: linear-gradient(#1e293b, #1e293b) padding-box,
        linear-gradient(135deg, #334155, #475569) border-box !important;
}

[data-theme="dark"] #taskSearch:focus {
    background: linear-gradient(#334155, #334155) padding-box,
        linear-gradient(135deg, var(--primary-color), #818cf8) border-box !important;
}

[data-theme="dark"] .bg-light.rounded-3:has(.fa-info-circle) {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%) !important;
    border-color: rgba(99, 102, 241, 0.2) !important;
}

/* Scrollbar for Logs Container */
.table-responsive::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.6);
}

/* Cursor Pointer Enhancement */
.cursor-pointer {
    cursor: pointer;
    position: relative;
}

.cursor-pointer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #818cf8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.cursor-pointer:hover::after {
    transform: scaleX(1);
}

/* Status Card in Header - Premium Glass Effect */
.sync-hub-header .bg-light.rounded-4 {
    background: rgba(248, 250, 252, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .sync-hub-header .bg-light.rounded-4 {
    background: rgba(15, 23, 42, 0.8) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Dark Mode Navigation Fixes */
[data-theme='dark'] .navbar {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
}

[data-theme='dark'] header.bg-white {
    background-color: #0f172a !important;
}

[data-theme='dark'] .navbar-brand {
    color: #f8fafc !important;
}

[data-theme='dark'] .nav-link {
    color: #94a3b8 !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

[data-theme='dark'] .nav-link:hover,
[data-theme='dark'] .nav-link:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

[data-theme='dark'] .nav-link.active {
    color: #6366f1 !important;
    background-color: rgba(99, 102, 241, 0.1);
}

[data-theme='dark'] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme='dark'] .navbar-toggler-icon {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* ============================================
   RESPONSIVE LAYOUT (MOBILE FIX)
   ============================================ */
@media (max-width: 991.98px) {
    #sidebar {
        position: fixed !important;
        left: -280px;
        width: 280px;
        z-index: 2000;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    }

    #sidebar.show {
        left: 0 !important;
    }

    .main-content {
        width: 100% !important;
        padding: 1.5rem !important;
        margin-left: 0 !important;
    }

    /* Adjust header for mobile */
    header.anim-fade-down {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1.5rem;
    }

    header > .d-flex:last-child {
        width: 100%;
        justify-content: space-between;
    }

    /* Responsive Stats Cards */
    .stat-number {
        font-size: 1.75rem;
    }

    /* Backdrop when sidebar is open */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}

@media (min-width: 992px) {
    #sidebar {
        width: 280px;
        min-width: 280px;
    }
}