/* ========================================
   ccdumps - Main Stylesheet
   Modern Clean Design
   ======================================== */

/* ---------- CSS Variables ---------- */
:root, [data-theme="dark"] {
    /* Modern Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Dark Theme - Deeper Blues */
    --bg-dark: #0c0f1a;
    --bg-darker: #070a12;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: rgba(17, 24, 39, 0.8);
    --bg-card-hover: rgba(31, 41, 55, 0.9);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Text Colors */
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-dark: linear-gradient(180deg, #111827 0%, #0c0f1a 100%);
    
    /* Border */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    
    /* Spacing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

/* ---------- Light Theme ---------- */
[data-theme="light"] {
    /* Light Theme Colors */
    --bg-dark: #f8fafc;
    --bg-darker: #f1f5f9;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-hover: rgba(248, 250, 252, 0.98);
    
    /* Glassmorphism Light */
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.08);
    
    /* Text Colors Light */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    /* Gradients Light */
    --gradient-dark: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    
    /* Border Light */
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    
    /* Shadows Light */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Light theme specific overrides */
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .nav-link:hover {
    background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .card,
[data-theme="light"] .stat-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .form-control {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}

[data-theme="light"] .form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
}

[data-theme="light"] .table th {
    background: rgba(0, 0, 0, 0.02);
    color: var(--text-secondary);
}

[data-theme="light"] .table td {
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .alert {
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .modal-content {
    background: #ffffff;
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gradient-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ---------- App Layout ---------- */
html, body {
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #0f172a 0%, #0c0f1a 100%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition-smooth);
    backdrop-filter: blur(20px);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-icon i {
    font-size: 20px;
    color: white;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-toggle {
    color: var(--text-secondary);
    font-size: 18px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.nav-link i {
    font-size: 17px;
    width: 22px;
    text-align: center;
    color: inherit;
    transition: var(--transition-fast);
}

.nav-link:hover i {
    transform: scale(1.1);
}

.nav-item.active .nav-link i {
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

/* Custom Icon Support (for Flaticon/Custom Images) */
.nav-link .custom-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.7);
    transition: var(--transition-fast);
}

.nav-link:hover .custom-icon {
    filter: brightness(1);
    transform: scale(1.1);
}

.nav-item.active .nav-link .custom-icon {
    filter: brightness(1) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.nav-item.active .nav-link {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-item.active .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: white;
    border-radius: 0 3px 3px 0;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 16px;
}

.nav-divider {
    padding: 20px 16px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar.collapsed .nav-divider {
    display: none;
}

/* Nav Badge for notification counts */
.nav-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse-nav-badge 2s infinite;
}

@keyframes pulse-nav-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    width: 100%;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .logout-btn {
    justify-content: center;
}

/* ---------- Main Content ---------- */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ---------- Top Header ---------- */
.top-header {
    height: var(--header-height);
    background: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

.search-box {
    position: relative;
    width: 300px;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 18px;
    transition: var(--transition-fast);
    position: relative;
}

.header-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.header-btn .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.header-btn .badge:empty {
    display: none;
}

/* Notification Dropdown */
.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    overflow: hidden;
    animation: notifSlideIn 0.2s ease;
}

.notification-dropdown.show {
    display: block;
}

@keyframes notifSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.notif-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.mark-all-read {
    font-size: 12px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mark-all-read:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notif-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.notif-list::-webkit-scrollbar {
    width: 5px;
}

.notif-list::-webkit-scrollbar-track {
    background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-card-hover);
}

.notif-item.unread {
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--primary);
}

.notif-item.unread:hover {
    background: rgba(99, 102, 241, 0.1);
}

.notif-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.notif-icon.notif-info {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.notif-icon.notif-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.notif-icon.notif-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.notif-icon.notif-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-message {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notif-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.4;
}

.notif-empty p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 480px) {
    .notification-dropdown {
        width: 320px;
        right: -60px;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

.theme-toggle i {
    transition: all 0.3s ease;
}

.theme-toggle .fa-sun {
    color: #f59e0b;
}

.theme-toggle .fa-moon {
    color: #818cf8;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    margin-left: 12px;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.user-btn:hover {
    background: var(--bg-card-hover);
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    overflow: hidden;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.user-btn i {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.user-dropdown.open .user-btn i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--bg-darker);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    box-shadow: var(--shadow-xl);
}

.user-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* ---------- Page Content ---------- */
.page-content {
    flex: 1;
    padding: 30px;
}

/* ---------- Page Header ---------- */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-muted);
}

/* ---------- Cards Grid ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-fast);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.stat-icon.primary {
    background: var(--gradient-primary);
    color: #fff;
}

.stat-icon.success {
    background: var(--gradient-success);
    color: #fff;
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    color: #fff;
}

.stat-icon.danger {
    background: var(--gradient-danger);
    color: #fff;
}

.stat-icon.info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ---------- Card Component ---------- */
.card {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: var(--transition-fast);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary-light);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

/* ---------- Credit Card Component ---------- */
.credit-card {
    width: 100%;
    max-width: 380px;
    aspect-ratio: 1.586;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.credit-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.credit-card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
}

.credit-card.visa {
    background: linear-gradient(135deg, #1a1f71, #252a8a);
}

.credit-card.mastercard {
    background: linear-gradient(135deg, #eb001b, #f79e1b);
}

.credit-card.amex {
    background: linear-gradient(135deg, #006fcf, #0080ff);
}

.credit-card.discover {
    background: linear-gradient(135deg, #ff6000, #ffa000);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.card-chip {
    width: 50px;
    height: 40px;
    background: linear-gradient(135deg, #d4af37, #f0d060);
    border-radius: 6px;
}

.card-type-logo {
    font-size: 32px;
    color: white;
}

.card-number {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: 3px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.card-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.card-holder {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-holder-label {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-holder-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.card-expires {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.card-expires-label {
    font-size: 10px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-expires-date {
    font-size: 16px;
    font-weight: 600;
    color: white;
}

/* ---------- Cards Gallery ---------- */
.cards-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.card-item {
    position: relative;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.card-action-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.card-action-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.card-action-btn.primary {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.card-action-btn.primary:hover {
    background: var(--primary-dark);
}

/* ---------- Table ---------- */
.table-container,
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.data-table th {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.data-table td {
    font-size: 14px;
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn i {
    font-size: 14px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-color: var(--primary-light);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.5);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    gap: 4px;
}

.btn-sm i {
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 14px;
}

.btn-lg i {
    font-size: 16px;
}

/* Icon-only buttons */
.btn-icon {
    padding: 8px;
    min-width: 36px;
    height: 36px;
}

.btn-icon.btn-sm {
    padding: 6px;
    min-width: 28px;
    height: 28px;
}

/* Button group spacing */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

/* ---------- Icon Utilities ---------- */
.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.icon-circle.sm {
    width: 32px;
    height: 32px;
}

.icon-circle.lg {
    width: 48px;
    height: 48px;
}

.icon-circle i {
    font-size: 16px;
}

.icon-circle.primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
}

.icon-circle.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.icon-circle.warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.icon-circle.danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.icon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.icon-badge i {
    font-size: 14px;
}

/* Custom Image Icons (for Flaticon PNG/SVG) */
.img-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.img-icon.xs {
    width: 14px;
    height: 14px;
}

.img-icon.sm {
    width: 18px;
    height: 18px;
}

.img-icon.md {
    width: 24px;
    height: 24px;
}

.img-icon.lg {
    width: 32px;
    height: 32px;
}

.img-icon.xl {
    width: 48px;
    height: 48px;
}

/* ---------- Form Elements ---------- */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 0 20px rgba(99, 102, 241, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ---------- Badge ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(6, 95, 70, 0.25) 100%);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(180, 83, 9, 0.25) 100%);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25) 0%, rgba(153, 27, 27, 0.25) 100%);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(67, 56, 202, 0.25) 100%);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ---------- Alerts ---------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 95, 70, 0.15) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.1);
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(153, 27, 27, 0.15) 100%);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.1);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(180, 83, 9, 0.15) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(67, 56, 202, 0.15) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    transform: scale(0.9);
    transition: var(--transition-fast);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 18px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ---------- Footer ---------- */
.main-footer {
    padding: 20px 30px;
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-right a {
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.footer-right a:hover {
    color: var(--primary);
}

/* ---------- Responsive ---------- */

/* Mobile Menu Toggle Button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--bg-card-hover);
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Tablet - 1024px */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }
    
    .sidebar, .sidebar.collapsed {
        transform: translateX(-100%);
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: var(--sidebar-width) !important;
        z-index: 1001;
    }

    .sidebar.open, .sidebar.collapsed.open {
        transform: translateX(0);
    }
    
    /* Ensure content is visible on mobile even if collapsed class is present */
    .sidebar.collapsed .logo-text,
    .sidebar.collapsed .nav-link span,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .sidebar-footer span {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
        width: auto !important;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
        z-index: 1000;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    .search-box {
        display: none;
    }

    .user-info span {
        display: none;
    }

    .top-header {
        padding: 0 15px;
        height: 60px;
    }

    .page-content {
        padding: 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .main-footer {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .cards-gallery {
        grid-template-columns: 1fr;
    }
    
    /* Tables Responsive */
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
    
    /* Cards */
    .card {
        padding: 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Page Header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
}

/* Small Mobile - 480px */
@media (max-width: 480px) {
    .top-header {
        padding: 0 10px;
    }
    
    .page-content {
        padding: 10px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    /* Hide less important table columns on small screens */
    .data-table .hide-mobile {
        display: none;
    }
    
    /* Stack action buttons */
    .action-btns {
        flex-direction: column;
        gap: 5px;
    }
    
    /* Stat cards compact */
    .stat-card {
        padding: 16px;
    }
    
    .stat-card .value {
        font-size: 24px;
    }
    
    /* Forms */
    .form-group label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Modals */
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    /* Store page mobile */
    .filter-grid {
        grid-template-columns: 1fr !important;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .bulk-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .bulk-actions .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    #selectedCount {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 10px !important;
        margin-right: 0 !important;
    }
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }
