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

/* ═══════════════════════════════════════════
   DESIGN SYSTEM - Premium Aurora Dark Theme
   ═══════════════════════════════════════════ */
:root {
    /* Core Palette */
    --accent-1: #7c3aed;
    --accent-2: #a855f7;
    --accent-3: #c084fc;
    --accent-cyan: #22d3ee;
    --accent-teal: #2dd4bf;
    --accent-rose: #fb7185;
    --accent-amber: #fbbf24;
    --accent-emerald: #34d399;

    /* Glow Effects */
    --glow-purple: rgba(124, 58, 237, 0.35);
    --glow-cyan: rgba(34, 211, 238, 0.3);
    --glow-rose: rgba(251, 113, 133, 0.3);

    /* Backgrounds */
    --bg-base: #0a0a1a;
    --bg-surface: rgba(18, 18, 38, 0.85);
    --bg-surface-2: rgba(25, 25, 50, 0.6);
    --bg-elevated: rgba(35, 35, 65, 0.5);
    --bg-hover: rgba(124, 58, 237, 0.08);
    --bg-input: rgba(15, 15, 35, 0.9);

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.07);
    --glass-border-hover: rgba(124, 58, 237, 0.3);

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-accent: #c084fc;

    /* Functional */
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #fb7185;
    --info: #22d3ee;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 72px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Motion */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: 0.2s var(--ease-out);
    --transition: 0.35s var(--ease-out);
    --transition-slow: 0.5s var(--ease-out);
}

/* ═══════════════════════════════
   RESET & BASE
   ═══════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

::selection {
    background: rgba(124, 58, 237, 0.4);
    color: #fff;
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: rgba(124, 58, 237, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 58, 237, 0.5);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Cairo', 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Animated aurora background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(124, 58, 237, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(34, 211, 238, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(251, 113, 133, 0.04) 0%, transparent 70%);
    animation: auroraShift 15s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* ═══════════════════════════════
   SIDEBAR
   ═══════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--glass-border);
    z-index: 1000;
    transition: width var(--transition);
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent-1), var(--accent-cyan), transparent);
    opacity: 0.3;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

.logo-text {
    font-family: 'Inter', 'Cairo', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    background: linear-gradient(135deg, var(--accent-2), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.menu-toggle {
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.menu-toggle:hover {
    background: var(--accent-1);
    color: #fff;
    border-color: var(--accent-1);
    box-shadow: 0 0 20px var(--glow-purple);
    transform: scale(1.05);
}

/* Navigation */
.nav-links {
    flex: 1;
    list-style: none;
    padding: 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    position: relative;
    font-size: 0.92rem;
    font-weight: 500;
    gap: 12px;
    white-space: nowrap;
}

.nav-link i:first-child {
    font-size: 1.15rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(-3px);
}

.nav-link:hover i:first-child {
    color: var(--accent-2);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(34, 211, 238, 0.1));
    color: #fff;
    border: 1px solid rgba(124, 58, 237, 0.25);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.15);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: linear-gradient(to bottom, var(--accent-1), var(--accent-cyan));
    border-radius: 3px;
}

.nav-link.active i:first-child {
    color: var(--accent-cyan);
}

/* Collapsed sidebar states */
.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .nav-link i:first-child {
    margin: 0;
}

.sidebar.collapsed .nav-link span,
.sidebar.collapsed .submenu-arrow {
    display: none;
}

/* Submenu */
.sub-nav {
    list-style: none;
    padding-right: 22px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition), padding var(--transition);
}

.nav-item.open .sub-nav {
    max-height: 500px;
    padding-top: 4px;
    padding-bottom: 8px;
}

.sub-nav li a {
    display: flex;
    align-items: center;
    padding: 9px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    position: relative;
    gap: 8px;
}

.sub-nav li a::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--glass-border);
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sub-nav li a:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    padding-right: 18px;
}

.sub-nav li a:hover::before {
    background: var(--accent-2);
    box-shadow: 0 0 8px var(--glow-purple);
}

.sub-nav li a.active {
    color: var(--accent-3);
    background: rgba(124, 58, 237, 0.08);
}

.sub-nav li a.active::before {
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--glow-cyan);
}

.submenu-arrow {
    margin-right: auto !important;
    margin-left: 0 !important;
    font-size: 0.7rem !important;
    transition: transform var(--transition);
    color: var(--text-muted);
}

.nav-item.open .submenu-arrow {
    transform: rotate(180deg);
    color: var(--accent-2);
}

.nav-item.open > .nav-link {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}

/* Logout */
.logout-btn {
    color: var(--danger) !important;
    font-family: 'Cairo', sans-serif !important;
    font-size: 0.92rem !important;
}

.logout-btn:hover {
    background: rgba(251, 113, 133, 0.1) !important;
}

/* ═══════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════ */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 32px 40px;
    transition: margin var(--transition);
    min-height: 100vh;
    position: relative;
}

.sidebar.collapsed + .main-content {
    margin-right: var(--sidebar-collapsed);
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════
   GLASS CARDS
   ═══════════════════════════════ */
.card {
    background: var(--bg-surface-2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 28px;
    border: 1px solid var(--glass-border);
    margin-bottom: 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.3), rgba(34, 211, 238, 0.2), transparent);
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.08);
}

.card-header {
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent-2);
    font-size: 1rem;
}

/* ═══════════════════════════════
   STAT CARDS (Dashboard)
   ═══════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--glass-border);
    padding: 24px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    cursor: default;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-cyan));
    opacity: 0;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.12);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    position: relative;
}

.stat-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    background: inherit;
    opacity: 0.2;
    filter: blur(10px);
}

.stat-info .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.stat-info .stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

/* ═══════════════════════════════
   BUTTONS
   ═══════════════════════════════ */
.btn {
    padding: 10px 22px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    box-shadow: 0 4px 15px var(--glow-purple);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-purple);
}

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

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--accent-1);
    color: var(--accent-3);
    background: rgba(124, 58, 237, 0.1);
}

.btn-danger {
    background: rgba(251, 113, 133, 0.1);
    color: var(--danger);
    border: 1px solid rgba(251, 113, 133, 0.15);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 15px var(--glow-rose);
}

.btn-success {
    background: rgba(52, 211, 153, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.15);
}

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

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ═══════════════════════════════
   FORMS
   ═══════════════════════════════ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    margin-right: 4px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    transition: var(--transition-fast);
    outline: none;
}

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

.form-control:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 0 20px rgba(124, 58, 237, 0.08);
    background: rgba(18, 18, 38, 1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 16px;
    padding-left: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ═══════════════════════════════
   UPLOAD / DROPZONE
   ═══════════════════════════════ */
.upload-container {
    margin-bottom: 2rem;
}

.upload-label-wrapper {
    margin-bottom: 1.2rem;
    text-align: right;
}

.upload-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.upload-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.dropzone-area {
    background: var(--bg-surface-2);
    border: 2px dashed var(--glass-border);
    border-radius: var(--radius-xl);
    height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    gap: 12px;
}

.dropzone-area:hover,
.dropzone-area.dragover {
    border-color: var(--accent-1);
    background: rgba(124, 58, 237, 0.05);
    box-shadow: inset 0 0 30px rgba(124, 58, 237, 0.08);
}

.dropzone-area i {
    font-size: 2.2rem;
    color: var(--accent-2);
    transition: var(--transition);
}

.dropzone-area:hover i {
    transform: translateY(-4px) scale(1.1);
    color: var(--accent-cyan);
}

.dropzone-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    pointer-events: none;
}

.ipa-dropzone {
    height: 240px;
}

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

/* ═══════════════════════════════
   TABLES
   ═══════════════════════════════ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

th {
    padding: 12px 18px;
    text-align: right;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.015);
    transition: var(--transition-fast);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(124, 58, 237, 0.04);
}

td:first-child {
    border-right: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-top-right-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

td:last-child {
    border-left: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
}

td:not(:first-child):not(:last-child) {
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* ═══════════════════════════════
   STATUS BADGES
   ═══════════════════════════════ */
.badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-success {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.badge-danger {
    background: rgba(251, 113, 133, 0.12);
    color: var(--danger);
    border: 1px solid rgba(251, 113, 133, 0.2);
}

.badge-info {
    background: rgba(34, 211, 238, 0.12);
    color: var(--info);
    border: 1px solid rgba(34, 211, 238, 0.2);
}

/* ═══════════════════════════════
   ALERTS
   ═══════════════════════════════ */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    animation: slideDown 0.3s var(--ease-out);
}

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

.alert-success {
    background: rgba(52, 211, 153, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.18);
    color: var(--success);
}

.alert-danger {
    background: rgba(251, 113, 133, 0.08);
    border: 1px solid rgba(251, 113, 133, 0.18);
    color: var(--danger);
}

.alert-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.18);
    color: var(--warning);
}

/* ═══════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════ */
.text-muted { color: var(--text-secondary); }
.text-accent { color: var(--accent-2); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-sm { margin-top: 8px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mb-sm { margin-bottom: 8px; }
.mb-md { margin-bottom: 16px; }
.mb-lg { margin-bottom: 24px; }

/* ═══════════════════════════════
   LOADING PULSE ANIMATION
   ═══════════════════════════════ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Fade in animation for page content */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.main-content {
    animation: fadeInUp 0.5s var(--ease-out);
}

/* ═══════════════════════════════
   MODAL / POPUP (SweetAlert overrides)
   ═══════════════════════════════ */
.swal2-popup {
    background: var(--bg-surface) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--radius-xl) !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(20px) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-family: 'Cairo', sans-serif !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-family: 'Cairo', sans-serif !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2)) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Cairo', sans-serif !important;
}

/* ═══════════════════════════════
   RESPONSIVE
   ═══════════════════════════════ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 1024px) {
    .main-content {
        padding: 24px;
        margin-right: 0 !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 0;
        border: none;
    }

    .sidebar.active {
        width: 280px;
        right: 0;
        border-left: 1px solid var(--glass-border);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    }

    .main-content {
        margin-right: 0 !important;
        width: 100% !important;
        padding: 16px;
    }

    .sidebar.collapsed + .main-content {
        margin-right: 0;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .card {
        padding: 20px;
        border-radius: var(--radius-lg);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════
   SIDEBAR COLLAPSED on mobile fix
   ═══════════════════════════════ */
.sidebar.collapsed .sub-nav {
    display: none;
}

/* ═══════════════════════════════
   MISC: code tags, links, etc.
   ═══════════════════════════════ */
code {
    background: rgba(124, 58, 237, 0.1);
    color: var(--accent-3);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: 'SF Mono', 'Consolas', monospace;
}

a {
    color: var(--accent-2);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-cyan);
}

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

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    white-space: nowrap;
    border: 1px solid var(--glass-border);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
    z-index: 999;
}

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

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

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
    display: block;
}

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

/* ═══════════════════════════════
   PAGINATION
   ═══════════════════════════════ */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 500;
}

.pagination-info b {
    color: var(--accent-2);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Cairo', 'Inter', sans-serif;
    color: var(--text-secondary);
    background: var(--bg-surface-2);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer;
    user-select: none;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: var(--bg-elevated);
    border-color: rgba(168, 85, 247, 0.4);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px var(--glow-purple);
    cursor: default;
}

.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: not-allowed;
}

.page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 38px;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

