/* assets/css/style.css - Corporate Dashboard Design System */

:root {
    /* Color Palette - Vibrant Indigo & Pink Gradients */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    --bg-dark: #eef2f6;                 /* Clean Light Corporate background */
    --card-dark: #ffffff;               /* Clean white cards */
    --border-dark: #e2e8f0;             /* Soft light borders */
    --text-white: #1e293b;              /* Dark text */
    --text-muted: #64748b;              /* Muted text */
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* Font styles */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-premium: 0 4px 18px 0 rgba(0, 0, 0, 0.04);
}

/* Dark Mode support overrides */
body.dark-mode {
    --bg-dark: #0b0f19;
    --card-dark: rgba(17, 24, 39, 0.7);
    --border-dark: rgba(255, 255, 255, 0.08);
    --text-white: #f3f4f6;
    --text-muted: #9ca3af;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Glassmorphism/Flat cards utility styles */
.glass {
    background: var(--card-dark);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-premium);
    border-radius: var(--radius-lg);
    transition: background 0.3s, border 0.3s;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout Wrappers */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Collapsible Sidebar styles */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #ffffff;                /* Clean white sidebar in default theme */
    border-right: 1px solid var(--border-dark);
    display: flex;
    flex-direction: column;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s;
    z-index: 100;
}

body.dark-mode .sidebar {
    background: rgba(17, 24, 39, 0.9);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
}

.sidebar-header h2 {
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
    transition: opacity 0.2s ease;
    color: #0f172a;                     /* Dark header logo */
}

body.dark-mode .sidebar-header h2 {
    color: var(--text-white);
}

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: var(--radius-md);
    transition: background 0.3s, color 0.3s;
}

.toggle-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .toggle-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-dark);
    transition: all 0.3s;
}

.sidebar.collapsed .sidebar-user {
    padding: 15px 10px;
    justify-content: center;
}

.sidebar-user .avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.sidebar-user .user-details {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-user .user-details {
    opacity: 0;
    display: none;
}

.sidebar-user .user-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
}

.sidebar-user .user-details span {
    font-size: 11px;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 15px 10px;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-link:hover, .nav-link.active {
    background: #f1f5f9;               /* Soft light blue hover */
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

body.dark-mode .nav-link:hover, body.dark-mode .nav-link.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.05) 100%);
    color: var(--text-white);
}

.sidebar.collapsed .nav-link span {
    opacity: 0;
    display: none;
}

/* Main Layout content styles */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: #ffffff;                /* Corporate Pure White Topbar (like the screenshot!) */
    border-bottom: 1px solid var(--border-dark);
    box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.02);
}

body.dark-mode .topbar {
    background: rgba(17, 24, 39, 0.95);
}

.topbar-left h3 {
    color: var(--text-white);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--primary);
}

body.dark-mode .btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* General premium card elements styling */
.card {
    margin-bottom: 25px;
    border-radius: var(--radius-lg);
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    font-weight: 600;
    background: #f8fafc;               /* Clean card headers background */
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

body.dark-mode .card-header {
    background: rgba(255, 255, 255, 0.02);
}

.card-body {
    padding: 20px;
}

.justify-between {
    justify-content: space-between;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

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

.btn-pink {
    background-color: var(--secondary);
    color: white;
}

.btn-orange {
    background-color: var(--warning);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-dark);
    color: var(--text-white);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Forms components */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: #ffffff;               /* Standard clean input in default theme */
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-family: var(--font-sans);
    transition: border-color 0.3s, background 0.3s;
}

body.dark-mode .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
}

body.dark-mode .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Dashboard Statistics components - Aligning precisely to corporate colors in picture */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: #ffffff !important;
    border: 1px solid var(--border-dark) !important;
    border-radius: var(--radius-lg) !important;
    padding: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    position: relative !important;
    overflow: hidden !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s !important;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.03) !important;
}

body.dark-mode .stat-card {
    background: rgba(17, 24, 39, 0.8) !important;
}

.stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.06) !important;
}

.stat-icon {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    transition: transform 0.3s ease !important;
}

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

.stat-card h3 {
    color: var(--text-white) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    margin-bottom: 2px !important;
}

.stat-card p {
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

/* Elegant Bottom Wave Lines styling for each card type */
.stat-card::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: transparent !important;
    transition: height 0.3s ease !important;
}

.stat-card:hover::after {
    height: 6px !important;
}

/* Specific Corporate Color Badges & Bottom Wave Gradients */
.stat-teal .stat-icon { background: rgba(59, 130, 246, 0.1) !important; color: #3b82f6 !important; }
.stat-teal::after { background: linear-gradient(90deg, #3b82f6 0%, rgba(59, 130, 246, 0.2) 100%) !important; }

.stat-cyan .stat-icon { background: rgba(6, 182, 212, 0.1) !important; color: #06b6d4 !important; }
.stat-cyan::after { background: linear-gradient(90deg, #06b6d4 0%, rgba(6, 182, 212, 0.2) 100%) !important; }

.stat-green .stat-icon { background: rgba(16, 185, 129, 0.1) !important; color: #10b981 !important; }
.stat-green::after { background: linear-gradient(90deg, #10b981 0%, rgba(16, 185, 129, 0.2) 100%) !important; }

.stat-pink .stat-icon { background: rgba(236, 72, 153, 0.1) !important; color: #ec4899 !important; }
.stat-pink::after { background: linear-gradient(90deg, #ec4899 0%, rgba(236, 72, 153, 0.2) 100%) !important; }

.stat-orange .stat-icon { background: rgba(245, 158, 11, 0.1) !important; color: #f59e0b !important; }
.stat-orange::after { background: linear-gradient(90deg, #f59e0b 0%, rgba(245, 158, 11, 0.2) 100%) !important; }

.stat-purple .stat-icon { background: rgba(139, 92, 246, 0.1) !important; color: #8b5cf6 !important; }
.stat-purple::after { background: linear-gradient(90deg, #8b5cf6 0%, rgba(139, 92, 246, 0.2) 100%) !important; }

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

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

.table th, .table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-dark);
}

.table th {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.table td {
    font-size: 14px;
    color: var(--text-white);
}

.table tr:hover {
    background: #f8fafc;
}

body.dark-mode .table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}


/* Badge component */
.badge {
    display: inline-flex;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-indigo { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.badge-cyan { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }
.badge-pink { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

/* Micro-Animations & transitions system */
.animate-fade-in { animation: fadeIn 0.4s ease forwards; }
.animate-scale-up { animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.animate-slide-down { animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Auth Cards Glass UI */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, rgba(236, 72, 153, 0.05) 90%);
}

.login-card, .register-card {
    width: 100%;
    max-width: 440px;
    padding: 35px;
}

.register-card {
    max-width: 640px;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 15px;
}

.login-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin: 15px 0 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.forgot-link, .register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover, .register-link:hover {
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* Modals overlays glass styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-white);
}

.modal-body {
    padding: 20px;
}

/* Toast alert elements styling */
.toast-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid var(--border-dark);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    min-width: 250px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }
.toast-info { border-left: 4px solid var(--info); }

/* Support Tickets Dialogue box layout spacing */
.ticket-summary-widget {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.summary-item {
    padding: 15px 5px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}

.summary-item .val { font-size: 20px; font-weight: 700; }
.summary-item .lbl { font-size: 9px; color: #d1d5db; text-transform: uppercase; margin-top: 3px; }

.bg-indigo-900 { background-color: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); color: #818cf8; }
.bg-red-900 { background-color: rgba(239, 68, 68, 0.15); border: 1px solid rgba(239, 68, 68, 0.3); color: #f87171; }
.bg-yellow-900 { background-color: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); color: #fbbf24; }
.bg-green-900 { background-color: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); color: #34d399; }

/* Hidden utility class */
.hidden { display: none !important; }

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Printing styles for payment receipts */
@media print {
    body * {
        visibility: hidden;
    }
    .print-section, .print-section * {
        visibility: visible;
    }
    .print-section {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        color: black !important;
        background: white !important;
    }
    .modal-overlay {
        background: transparent !important;
        backdrop-filter: none !important;
    }
}

/* ==========================================================================
   Vibrant Responsive Layout overrides (SoftifyBD Standard)
   ========================================================================== */
@media (max-width: 992px) {
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 260px !important;
        height: 100vh !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: var(--shadow-premium) !important;
        z-index: 9999 !important;
        background: rgba(17, 24, 39, 0.98) !important;
        backdrop-filter: blur(10px) !important;
    }
    
    .sidebar.open {
        left: 0 !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    #mobile-toggle-sidebar {
        display: inline-block !important;
    }
    
    .topbar {
        padding: 10px 15px !important;
        gap: 10px !important;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .topbar-right {
        gap: 10px !important;
    }
    
    .topbar-right a span {
        display: none !important; /* Keep icons, hide texts on small screens */
    }
    
    .ticket-summary-widget {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .modal-content {
        width: 95% !important;
        margin: 10px auto !important;
    }
    
    .stats-card {
        padding: 15px !important;
    }
}

/* ==========================================================================
   MISSING UTILITY CLASSES - Full Set
   ========================================================================== */
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 !important; }
.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.gap-1 { gap: 8px !important; }
.gap-2 { gap: 12px !important; }
.gap-3 { gap: 16px !important; }
.gap-4 { gap: 20px !important; }
.grid { display: grid !important; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.p-3 { padding: 16px !important; }
.p-4 { padding: 20px !important; }
.mt-2 { margin-top: 8px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mb-4 { margin-bottom: 16px !important; }
.py-4 { padding-top: 20px !important; padding-bottom: 20px !important; }
.py-5 { padding-top: 30px !important; padding-bottom: 30px !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-sm { font-size: 13px !important; }
.text-xs { font-size: 11px !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.text-muted { color: var(--text-muted) !important; }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-indigo-400 { color: #818cf8 !important; }
.text-pink-400 { color: #f472b6 !important; }
.bg-gray-900 { background: rgba(0,0,0,0.06) !important; border-radius: var(--radius-md) !important; }
body.dark-mode .bg-gray-900 { background: rgba(255,255,255,0.04) !important; }
.rounded { border-radius: var(--radius-md) !important; }
.table-container { overflow-x: auto; width: 100%; -webkit-overflow-scrolling: touch; }
.form-label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--text-muted); font-weight: 500; }
.badge-info { background: rgba(6,182,212,0.15); color: #22d3ee; }
.btn-indigo { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.25); }
.btn-indigo:hover, .btn-indigo.active { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.ripple { position: relative; overflow: hidden; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1.2s linear infinite !important; }

/* Dashboard panels row */
.dashboard-panels-row { display: flex; gap: 20px; margin-top: 25px; }
.stats-grid.second-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.canvas-wrapper { height: 220px; position: relative; }

/* Promised payments */
.promised-list { list-style: none; padding: 0; margin: 0; }
.promised-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-dark); font-size: 13px; gap: 8px; }
.promised-item:last-child { border-bottom: none; }
.no-promised { color: var(--text-muted); font-size: 13px; text-align: center; padding: 15px 0; }

/* ==========================================================================
   IMPROVED RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1100px) {
    .dashboard-panels-row { flex-direction: column; }
    .widgets-column { flex-direction: row !important; flex-wrap: wrap; }
    .widgets-column > .card { flex: 1; min-width: 280px; }
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        top: 0 !important; bottom: 0 !important;
        width: 260px !important;
        height: 100vh !important;
        transition: left 0.3s cubic-bezier(0.4,0,0.2,1) !important;
        z-index: 9999 !important;
        background: rgba(17,24,39,0.98) !important;
        backdrop-filter: blur(10px) !important;
    }
    .sidebar.open { left: 0 !important; }
    .main-content { margin-left: 0 !important; width: 100% !important; }
    #mobile-toggle-sidebar { display: inline-flex !important; }
    .content-area { padding: 15px !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
    .grid-cols-2 { grid-template-columns: 1fr !important; }
    .form-grid { grid-template-columns: 1fr !important; }
    .topbar { padding: 10px 15px !important; }
    .topbar-right a span { display: none !important; }
    .dashboard-stats-grid { grid-template-columns: repeat(2,1fr) !important; }
}

@media (max-width: 768px) {
    .content-area { padding: 10px !important; }
    .stats-grid { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; }
    .stat-card { padding: 14px !important; }
    .stat-card h3 { font-size: 20px !important; }
    .dashboard-panels-row { flex-direction: column; gap: 12px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .table th, .table td { padding: 9px 8px !important; font-size: 12px !important; }
    .modal-content { max-width: 96vw !important; max-height: 92vh !important; overflow-y: auto !important; }
    .topbar { height: auto !important; flex-wrap: wrap !important; padding: 10px 12px !important; gap: 8px !important; }
    .filter-card .card-body { flex-direction: column !important; align-items: flex-start !important; }
    .ticket-summary-widget { grid-template-columns: repeat(2,1fr) !important; }
    .modal-content { width: 95% !important; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .toast-container { right: 10px !important; left: 10px !important; bottom: 15px !important; }
    .toast { min-width: unset !important; width: 100% !important; }
    .profile-tabs { flex-wrap: wrap !important; }
    .profile-tabs .btn { font-size: 11px !important; padding: 5px 8px !important; }
    .marquee-section { display: none !important; }
}
