/* ===== Cairgiver Admin Panel — Premium Light Theme ===== */
/* Google Font: Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    /* Primary Palette */
    --primary: #4F7DF3;
    --primary-hover: #3A65D4;
    --primary-light: #EEF2FF;
    --primary-gradient: linear-gradient(135deg, #4F7DF3 0%, #6C5CE7 100%);

    /* Accent Colors */
    --accent-purple: #6C5CE7;
    --accent-teal: #00B894;
    --accent-coral: #FF6B6B;
    --accent-amber: #FDCB6E;
    --accent-pink: #E84393;

    /* Neutrals */
    --bg-body: #F0F4F8;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-sidebar-hover: #F0F4F8;
    --text-primary: #1A202C;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 1px 3px rgba(79, 125, 243, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 8px 25px rgba(79, 125, 243, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Base Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Page Load Animation ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Sidebar ===== */
.sidebar {
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    animation: slideInLeft var(--transition-slow) ease-out;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar .logo-container {
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar .logo-container:hover {
    background: transparent;
}

.sidebar .logo-img {
    height: 50px;
    max-width: 180px;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.sidebar .logo-container:hover .logo-img {
    transform: scale(1.05);
}

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

.sidebar .nav-item {
    margin-bottom: 2px;
    list-style: none;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    border-radius: 0 3px 3px 0;
    background: var(--primary-gradient);
    transition: transform var(--transition-base);
}

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

.sidebar .nav-link:hover::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar .nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    font-weight: 600;
}

.sidebar .nav-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
}

.sidebar .nav-link.logout-link {
    color: var(--accent-coral);
}

.sidebar .nav-link.logout-link:hover {
    background: #FFF5F5;
    color: #E53E3E;
}

.sidebar .nav-link.logout-link::before {
    background: var(--accent-coral);
}

/* Sidebar divider */
.sidebar-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 16px;
}

/* ===== Main Content Area ===== */
.main-content {
    margin-left: 16.666667%;
    min-height: 100vh;
    animation: fadeIn var(--transition-slow) ease-out;
}

.main-content .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.main-content .page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-content .page-header h2 i {
    color: var(--primary);
}

.page-body {
    padding: 28px 32px;
    animation: fadeInUp var(--transition-slow) ease-out;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    animation: fadeInUp var(--transition-slow) ease-out;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card.stat-users::before { background: var(--primary-gradient); }
.stat-card.stat-devices::before { background: linear-gradient(135deg, #00B894, #00CEC9); }
.stat-card.stat-admins::before { background: linear-gradient(135deg, #6C5CE7, #A29BFE); }
.stat-card.stat-subscriptions::before { background: linear-gradient(135deg, #FDCB6E, #F39C12); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

.stat-card.stat-users .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-card.stat-devices .stat-icon { background: #E6FFF9; color: #00B894; }
.stat-card.stat-admins .stat-icon { background: #F0EDFF; color: #6C5CE7; }
.stat-card.stat-subscriptions .stat-icon { background: #FFF8E6; color: #F39C12; }

.stat-card .stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

/* Animation delays for stat cards */
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ===== Tables ===== */
.premium-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    overflow: hidden;
    animation: fadeInUp var(--transition-slow) ease-out;
}

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

.premium-table thead th {
    background: var(--bg-body);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border: 1px solid var(--border-color);
    white-space: nowrap;
}

.premium-table tbody td {
    padding: 14px 18px;
    border: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-primary);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

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

.premium-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.premium-table tbody tr:nth-child(even) {
    background-color: #F8FAFC;
}

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

/* ===== Buttons ===== */
.btn-primary-custom {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(79, 125, 243, 0.25);
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 125, 243, 0.35);
    background: linear-gradient(135deg, #3A65D4 0%, #5B4BD5 100%);
    color: white;
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline-custom:hover {
    background: var(--primary-light);
    border-color: var(--primary-hover);
    color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-danger-custom {
    background: linear-gradient(135deg, #FF6B6B, #E84393);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.25);
}

.btn-danger-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.35);
    color: white;
}

.btn-success-custom {
    background: linear-gradient(135deg, #00B894, #00CEC9);
    color: white;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-success-custom:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 184, 148, 0.35);
    color: white;
}

.btn-sm-custom {
    padding: 6px 14px;
    font-size: 0.75rem;
}

/* ===== Badges ===== */
.badge-custom {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success { background: #E6FFF9; color: #00875A; }
.badge-danger { background: #FFF5F5; color: #C53030; }
.badge-warning { background: #FFF8E6; color: #C05621; }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: #F1F5F9; color: #64748B; }
.badge-purple { background: #F0EDFF; color: #6C5CE7; }

/* ===== Form Controls ===== */
.form-control-custom {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-base);
    width: 100%;
}

.form-select-custom {
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 36px 10px 14px;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-card);
    transition: all var(--transition-base);
    width: 100%;
    
    /* Custom Arrow Styling */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2364748B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 10px;
}

.form-control-custom:focus,
.form-select-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.12);
}

.form-control-custom::placeholder {
    color: var(--text-muted);
}

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

/* ===== Search & Filter Bar ===== */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp var(--transition-slow) ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: backwards;
}

.filter-bar .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===== Pagination ===== */
.pagination-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 24px 0;
    justify-content: center;
}

.pagination-custom .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    background: var(--bg-card);
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
}

.pagination-custom .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.pagination-custom .active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: 0 2px 8px rgba(79, 125, 243, 0.3);
}

.pagination-custom .disabled .page-link {
    opacity: 0.4;
    pointer-events: none;
}

.pagination-info {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== Toggle Switch (Free Access) ===== */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #CBD5E1;
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #00B894, #00CEC9);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Subscribed / Status indicators ===== */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active { background: var(--accent-teal); box-shadow: 0 0 6px rgba(0, 184, 148, 0.4); }
.status-dot.inactive { background: var(--text-muted); }

.subscribed-check {
    color: var(--accent-teal);
    font-size: 1.2rem;
    font-weight: bold;
}

.subscribed-dash {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ===== Child / Parent badges ===== */
.child-count-badge {
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 3px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
}

.child-count-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(79, 125, 243, 0.3);
}

.parent-dot {
    height: 14px;
    width: 14px;
    background: linear-gradient(135deg, #00B894, #00CEC9);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 0 0 1px #00B894, 0 2px 4px rgba(0, 184, 148, 0.3);
    margin-left: 6px;
    transition: all var(--transition-base);
}

.parent-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 1px #00B894, 0 3px 8px rgba(0, 184, 148, 0.4);
}

/* ===== Modals (enhanced Bootstrap modals) ===== */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: scaleIn var(--transition-base) ease-out;
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 24px;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
}

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 125, 243, 0.08) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.06) 0%, transparent 70%);
    animation: pulse 5s ease-in-out infinite 1s;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    padding: 40px 36px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.login-logo img {
    height: 56px;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.login-logo img:hover {
    transform: scale(1.05);
}

.login-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .btn-login {
    width: 100%;
    padding: 13px;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 15px rgba(79, 125, 243, 0.3);
}

.login-card .btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 125, 243, 0.4);
}

.login-card .btn-login:active {
    transform: translateY(0);
}

.login-error {
    background: #FFF5F5;
    border: 1px solid #FED7D7;
    color: #C53030;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn var(--transition-fast);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        height: auto;
        width: 100%;
    }
    .main-content {
        margin-left: 0;
    }
    .page-body {
        padding: 16px;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ===== Utility ===== */
.text-muted-custom {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Row animation stagger for table rows */
.premium-table tbody tr {
    animation: fadeInUp var(--transition-base) ease-out;
    animation-fill-mode: backwards;
}
.premium-table tbody tr:nth-child(1) { animation-delay: 0.02s; }
.premium-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.premium-table tbody tr:nth-child(3) { animation-delay: 0.06s; }
.premium-table tbody tr:nth-child(4) { animation-delay: 0.08s; }
.premium-table tbody tr:nth-child(5) { animation-delay: 0.1s; }
.premium-table tbody tr:nth-child(6) { animation-delay: 0.12s; }
.premium-table tbody tr:nth-child(7) { animation-delay: 0.14s; }
.premium-table tbody tr:nth-child(8) { animation-delay: 0.16s; }
.premium-table tbody tr:nth-child(9) { animation-delay: 0.18s; }
.premium-table tbody tr:nth-child(10) { animation-delay: 0.2s; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== Profile Dropdown Styles ===== */
.profile-trigger:hover {
    background: var(--border-light);
}
.dropdown-menu .dropdown-item:hover {
    background-color: var(--primary-light);
}
.dropdown-menu .logout-dropdown-link:hover {
    background-color: #FFF5F5 !important;
    color: #E53E3E !important;
}

/* ===== Illustration Animations ===== */
@keyframes illustFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes illustFloatDelayed {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes illustFloatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes illustPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes illustPulseDelayed {
    0%, 100% { opacity: 0.35; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.02); opacity: 1; }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 125, 243, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(79, 125, 243, 0.08); }
}

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

@keyframes borderGlow {
    0%, 100% { border-color: var(--border-light); }
    50% { border-color: rgba(79, 125, 243, 0.2); }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes ripple {
    0% { box-shadow: 0 0 0 0 rgba(79, 125, 243, 0.15); }
    100% { box-shadow: 0 0 0 12px rgba(79, 125, 243, 0); }
}

/* SVG Illustration element classes */
.illust-float { animation: illustFloat 4s ease-in-out infinite; }
.illust-float-delayed { animation: illustFloatDelayed 5s ease-in-out infinite 0.5s; }
.illust-float-slow { animation: illustFloatSlow 6s ease-in-out infinite 1s; }
.illust-pulse { animation: illustPulse 3s ease-in-out infinite; }
.illust-pulse-delayed { animation: illustPulseDelayed 3.5s ease-in-out infinite 0.8s; }

.illustration-svg {
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

/* ===== Login Split Layout ===== */
.login-wrapper {
    display: flex;
    flex-direction: row;
}

.login-illustration-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(145deg, #F8FAFF 0%, #EEF2FF 50%, #F0EDFF 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.login-illustration-panel::before {
    content: '';
    position: absolute;
    top: 10%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 125, 243, 0.06) 0%, transparent 70%);
    animation: breathe 6s ease-in-out infinite;
}

.login-illustration-panel::after {
    content: '';
    position: absolute;
    bottom: 5%;
    left: -10%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 231, 0.05) 0%, transparent 70%);
    animation: breathe 8s ease-in-out infinite 2s;
}

.login-illustration-content {
    max-width: 420px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.login-illustration-content h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 20px;
    margin-bottom: 8px;
}

.login-illustration-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .login-wrapper {
        flex-direction: column;
    }
    .login-illustration-panel {
        display: none;
    }
    .login-form-panel {
        min-height: 100vh;
    }
}

/* ===== Dashboard Welcome Banner ===== */
.welcome-banner {
    background: linear-gradient(135deg, #F8FAFF 0%, #EEF2FF 60%, #F0EDFF 100%);
    border: 1px solid rgba(79, 125, 243, 0.1);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    animation: cardEnter 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.welcome-banner .welcome-text {
    flex: 1;
}

.welcome-banner .welcome-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.welcome-banner .welcome-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.welcome-banner .welcome-illustration {
    flex: 0 0 280px;
    max-width: 280px;
}

@media (max-width: 768px) {
    .welcome-banner .welcome-illustration {
        display: none;
    }
}

/* ===== Enhanced Stat Cards with Animations ===== */
.stat-card {
    animation: cardEnter 0.5s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.08s; }
.stat-card:nth-child(2) { animation-delay: 0.16s; }
.stat-card:nth-child(3) { animation-delay: 0.24s; }
.stat-card:nth-child(4) { animation-delay: 0.32s; }

.stat-card .stat-icon {
    animation: glowPulse 3s ease-in-out infinite;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.stat-card .stat-value {
    animation: numberCount 0.6s ease-out backwards;
    animation-delay: 0.3s;
}

/* Stat card shimmer on hover */
.stat-card::after {
    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;
    pointer-events: none;
}

.stat-card:hover::after {
    left: 100%;
}

/* ===== Quick Action Cards Enhancement ===== */
.quick-action-card {
    animation: cardEnter 0.5s ease-out backwards;
    position: relative;
    overflow: hidden;
}

.quick-action-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform var(--transition-base);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.quick-action-card:hover::after {
    transform: scaleX(1);
}

.quick-action-card .quick-action-icon {
    transition: transform var(--transition-spring), box-shadow var(--transition-base);
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1) translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===== Enhanced Empty States ===== */
.empty-state {
    animation: fadeInUp var(--transition-slow) ease-out;
}

.empty-state .illustration-svg {
    margin-bottom: 16px;
}

.empty-state p {
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

/* ===== Table Container Entrance ===== */
.premium-table-container {
    animation: cardEnter 0.5s ease-out 0.15s backwards;
}

/* ===== Filter Bar Entrance ===== */
.filter-bar {
    animation: cardEnter 0.45s ease-out 0.08s backwards;
}

/* ===== Sidebar Active Indicator Glow ===== */
.sidebar .nav-link.active {
    animation: borderGlow 3s ease-in-out infinite;
}

/* ===== Page Title Entrance ===== */
.page-header h2 {
    animation: slideUpFade 0.4s ease-out;
}

.page-header h2 i {
    animation: ripple 2s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

/* ===== Smooth Hover Lift for All Cards ===== */
.card, .stat-card, .filter-bar, .premium-table-container {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

