

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

:root {
    
    --gold: #e9c46a;
    --gold-2: #d4af37;
    --gold-3: #b18a1f;
    --gold-soft: rgba(233, 196, 106, .15);

    
    --aurora-1: #6366f1;
    --aurora-2: #8b5cf6;
    --aurora-3: #ec4899;
    --aurora-4: #06b6d4;
    --aurora-5: #10b981;

    
    --bg: #07091a;
    --bg-elev: #0d1226;
    --bg-elev-2: #131836;
    --card: rgba(20, 26, 56, .55);
    --card-solid: #141a38;
    --card-strong: #1a2042;

    --text: #f0f4ff;
    --text-2: #a1aac9;
    --text-3: #6b7494;
    --border: rgba(255, 255, 255, .08);
    --border-strong: rgba(255, 255, 255, .14);

    
    --ok: #10d9a3;
    --warn: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
    --purple: #a78bfa;

    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .3);
    --shadow: 0 16px 40px -12px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04);
    --shadow-lg: 0 30px 60px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
    --glow-gold: 0 0 30px rgba(233, 196, 106, .35), 0 8px 24px rgba(233, 196, 106, .2);
    --r: 18px;
    --r-sm: 12px;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

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

html, body {
    font-family: 'Tajawal', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background .4s var(--ease), color .4s var(--ease);
}


body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 700px at 85% 0%, rgba(139, 92, 246, .25), transparent 55%),
        radial-gradient(700px 600px at 15% 95%, rgba(6, 182, 212, .22), transparent 55%),
        radial-gradient(800px 600px at 95% 60%, rgba(233, 196, 106, .14), transparent 60%),
        radial-gradient(600px 500px at 5% 20%, rgba(236, 72, 153, .12), transparent 60%);
    pointer-events: none;
}


body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, transparent, transparent),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><circle cx='1' cy='1' r='.6' fill='%23ffffff' opacity='.04'/></svg>");
    pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--gold), var(--gold-3));
    border-radius: 10px;
    box-shadow: 0 0 8px rgba(233, 196, 106, .3);
}


.app { display: flex; min-height: 100vh; }


.sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 280px;
    height: 100vh;
    background:
        linear-gradient(180deg, rgba(20, 26, 56, .85) 0%, rgba(13, 18, 38, .88) 100%);
    backdrop-filter: blur(28px) saturate(140%);
    -webkit-backdrop-filter: blur(28px) saturate(140%);
    color: var(--text-2);
    overflow-y: auto;
    z-index: 100;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .35);
    transition: transform .4s var(--ease);
    border-left: 1px solid var(--border);
}
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 350px at 100% 0%, rgba(233, 196, 106, .18), transparent 70%);
    pointer-events: none;
}

.sidebar-header {
    padding: 30px 22px 22px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    position: relative;
}
.sidebar-header h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: .5px;
    text-shadow: 0 0 30px rgba(233, 196, 106, .35);
}
.sidebar-header h2 span {
    background: linear-gradient(135deg, #ffe491, var(--gold), #b18a1f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 6px rgba(233, 196, 106, .5));
}
.sidebar-header p {
    font-size: .76rem;
    color: rgba(255, 255, 255, .35);
    margin-top: 5px;
    letter-spacing: 3px;
    text-transform: uppercase;
}


.user-card {
    margin: 18px 16px;
    padding: 14px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(233, 196, 106, .14), rgba(139, 92, 246, .08));
    border: 1px solid rgba(233, 196, 106, .2);
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
    position: relative;
    overflow: hidden;
}
.user-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 0%, rgba(233, 196, 106, .15), transparent 60%);
    pointer-events: none;
}
.user-avatar {
    width: 46px; height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffe491, var(--gold), var(--gold-3));
    display: flex; align-items: center; justify-content: center;
    color: #1a1a2e;
    font-weight: 900;
    font-size: 1.15rem;
    flex-shrink: 0;
    box-shadow:
        0 8px 20px rgba(233, 196, 106, .4),
        inset 0 2px 0 rgba(255, 255, 255, .5),
        inset 0 -2px 0 rgba(0, 0, 0, .15);
}
.user-info { flex: 1; min-width: 0; position: relative; }
.user-info .name {
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-info .role {
    font-size: .73rem;
    color: var(--gold);
    font-weight: 700;
    margin-top: 2px;
}

.nav-section-title {
    font-size: .68rem;
    color: rgba(255, 255, 255, .28);
    padding: 22px 25px 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

.sidebar nav ul { list-style: none; padding: 0 12px; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-2);
    border-radius: 12px;
    margin-bottom: 5px;
    font-size: .94rem;
    font-weight: 500;
    transition: all .3s var(--ease);
    position: relative;
    overflow: hidden;
}
.sidebar nav a i {
    width: 22px;
    font-size: 1rem;
    text-align: center;
    transition: transform .3s var(--ease);
    color: var(--text-3);
}
.sidebar nav a:hover {
    background: rgba(255, 255, 255, .04);
    color: #fff;
    transform: translateX(-4px);
}
.sidebar nav a:hover i { color: var(--gold); transform: scale(1.15); }

.sidebar nav a.active {
    background:
        linear-gradient(135deg, rgba(233, 196, 106, .25), rgba(139, 92, 246, .08));
    color: #fff;
    font-weight: 700;
    border: 1px solid rgba(233, 196, 106, .35);
    box-shadow:
        0 8px 24px rgba(233, 196, 106, .15),
        inset 0 1px 0 rgba(255, 255, 255, .08);
}
.sidebar nav a.active::before {
    content: '';
    position: absolute;
    right: 0; top: 25%; bottom: 25%;
    width: 3px;
    background: linear-gradient(var(--gold), var(--gold-3));
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--gold);
}
.sidebar nav a.active i { color: var(--gold); }

.sidebar nav a .badge {
    margin-right: auto;
    background: linear-gradient(135deg, #f87171, #dc2626);
    color: #fff;
    font-size: .7rem;
    padding: 2px 9px;
    border-radius: 50px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(248, 113, 113, .5);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(248, 113, 113, .5); }
    50% { box-shadow: 0 4px 22px rgba(248, 113, 113, .85); }
}

.sidebar-footer {
    padding: 16px 12px 22px;
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .06);
}


.main {
    flex: 1;
    margin-right: 280px;
    min-width: 0;
    transition: margin .4s var(--ease);
}


.topbar {
    background: rgba(13, 18, 38, .65);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title h1 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.3px;
}
.topbar-title p {
    font-size: .85rem;
    color: var(--text-2);
    margin-top: 2px;
}

.topbar-actions { display: flex; gap: 10px; align-items: center; }

.icon-btn {
    width: 42px; height: 42px;
    border-radius: 12px;
    background: var(--card-strong);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .3s var(--ease);
    border: 1px solid var(--border);
}
.icon-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-3));
    color: #1a1a2e;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}

.menu-toggle {
    display: none;
    width: 42px; height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), var(--gold-3));
    color: #1a1a2e;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--glow-gold);
}

.content { padding: 30px; }
.content > * { animation: fadeUp .6s var(--ease) backwards; }
.content > *:nth-child(1) { animation-delay: .05s; }
.content > *:nth-child(2) { animation-delay: .12s; }
.content > *:nth-child(3) { animation-delay: .19s; }
.content > *:nth-child(4) { animation-delay: .26s; }
.content > *:nth-child(5) { animation-delay: .33s; }
.content > *:nth-child(6) { animation-delay: .4s; }
.content > *:nth-child(7) { animation-delay: .47s; }

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


.card {
    background: var(--card);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-radius: var(--r);
    padding: 26px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    border: 1px solid var(--border);
    position: relative;
    transition: all .4s var(--ease);
}
.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(233, 196, 106, .15);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}
.card-header h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}
.card-header h3 i {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--gold), var(--gold-3));
    color: #1a1a2e !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    box-shadow: var(--glow-gold);
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 26px;
}

.stat-card {
    background: var(--card);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border-radius: var(--r);
    padding: 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .4s var(--ease);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(300px 200px at 100% 0%, var(--c-glow, rgba(233, 196, 106, .15)), transparent 70%);
    pointer-events: none;
    transition: opacity .4s var(--ease);
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--c-line, var(--gold)), transparent);
    opacity: .6;
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--c-line, var(--gold));
    border-color: transparent;
}

.stat-icon {
    width: 64px; height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    flex-shrink: 0;
    color: #fff;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), inset 0 -2px 0 rgba(0, 0, 0, .15);
    z-index: 1;
}

.stat-card.primary { --c-line: var(--gold); --c-glow: rgba(233, 196, 106, .2); }
.stat-card.primary .stat-icon {
    background: linear-gradient(135deg, #ffe491, var(--gold), var(--gold-3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 12px 30px rgba(233, 196, 106, .35);
    color: #1a1a2e;
}
.stat-card.success { --c-line: var(--ok); --c-glow: rgba(16, 217, 163, .2); }
.stat-card.success .stat-icon { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 12px 30px rgba(16, 185, 129, .35); }
.stat-card.warning { --c-line: var(--warn); --c-glow: rgba(251, 191, 36, .2); }
.stat-card.warning .stat-icon { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 12px 30px rgba(245, 158, 11, .35); }
.stat-card.danger { --c-line: var(--danger); --c-glow: rgba(248, 113, 113, .2); }
.stat-card.danger .stat-icon { background: linear-gradient(135deg, #fb7185, #dc2626); box-shadow: 0 12px 30px rgba(239, 68, 68, .4); }
.stat-card.info { --c-line: var(--info); --c-glow: rgba(96, 165, 250, .2); }
.stat-card.info .stat-icon { background: linear-gradient(135deg, #60a5fa, #2563eb); box-shadow: 0 12px 30px rgba(59, 130, 246, .35); }

.stat-info { flex: 1; min-width: 0; }
.stat-info h3 {
    font-family: 'Cairo', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #fff, var(--c-line, var(--gold)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -1.5px;
    margin-bottom: 5px;
}
.stat-info span {
    font-size: .9rem;
    color: var(--text-2);
    font-weight: 500;
    display: block;
}


.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text);
    font-size: .9rem;
}
.form-group label .req { color: var(--danger); }
.form-group .help { font-size: .78rem; color: var(--text-3); margin-top: 5px; }

.form-control,
input[type="text"], input[type="number"], input[type="email"], input[type="password"],
input[type="tel"], input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: 12px;
    font-family: inherit;
    font-size: .95rem;
    background: var(--card-strong);
    color: var(--text);
    transition: all .3s var(--ease);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(233, 196, 106, .15);
    outline: 0;
    background: var(--card-strong);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
input[type="file"] {
    padding: 12px;
    background: var(--bg-elev);
    border: 2px dashed var(--border-strong);
    cursor: pointer;
}
input[type="file"]:hover { border-color: var(--gold); background: rgba(233, 196, 106, .05); }

select option { background: var(--card-strong); color: var(--text); }


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: .95rem;
    transition: all .3s var(--ease);
    border: 1.5px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn::after {
    content: '';
    position: absolute;
    top: 0; right: -120%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
    transition: right .6s var(--ease);
    pointer-events: none;
}
.btn:hover::after { right: 120%; }

.btn-primary {
    background: linear-gradient(135deg, #ffe491 0%, var(--gold) 50%, var(--gold-3) 100%);
    color: #1a1a2e;
    box-shadow: var(--glow-gold);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { box-shadow: 0 0 40px rgba(233, 196, 106, .55), 0 16px 30px rgba(233, 196, 106, .35); }
.btn-success { background: linear-gradient(135deg, #34d399, #059669); color: #fff; box-shadow: 0 8px 24px rgba(16, 185, 129, .35); }
.btn-danger { background: linear-gradient(135deg, #fb7185, #dc2626); color: #fff; box-shadow: 0 8px 24px rgba(239, 68, 68, .35); }
.btn-info { background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff; box-shadow: 0 8px 24px rgba(59, 130, 246, .35); }
.btn-warning { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; box-shadow: 0 8px 24px rgba(245, 158, 11, .35); }
.btn-light {
    background: var(--card-strong);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-light:hover { background: var(--bg-elev-2); border-color: var(--gold); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: #1a1a2e; }

.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 9px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }


.table-wrap {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card-strong);
}
.table { width: 100%; border-collapse: collapse; }
.table th {
    background: linear-gradient(180deg, var(--bg-elev-2), var(--card-strong));
    padding: 15px 16px;
    text-align: right;
    font-weight: 800;
    color: var(--text);
    font-size: .88rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: .92rem;
    color: var(--text);
    vertical-align: middle;
}
.table tbody tr { transition: background .25s var(--ease); }
.table tbody tr:hover { background: rgba(233, 196, 106, .04); }
.table tbody tr:last-child td { border-bottom: 0; }


.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 14px;
    font-size: .76rem;
    font-weight: 800;
    border-radius: 50px;
    color: #fff;
    line-height: 1.6;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .15);
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}
.badge-status { padding: 6px 16px; font-size: .78rem; min-width: 90px; }
.badge-soft-gold {
    background: rgba(233, 196, 106, .15);
    color: var(--gold);
    text-shadow: none;
    border: 1px solid rgba(233, 196, 106, .25);
    box-shadow: none;
}


.alert {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1.5px solid transparent;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .95rem;
    backdrop-filter: blur(10px);
}
.alert i { font-size: 1.3rem; flex-shrink: 0; }
.alert-success { background: rgba(16, 217, 163, .12); color: #6ee7b7; border-color: rgba(16, 217, 163, .35); }
.alert-danger { background: rgba(248, 113, 113, .12); color: #fca5a5; border-color: rgba(248, 113, 113, .35); }
.alert-warning { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .35); }
.alert-info { background: rgba(96, 165, 250, .12); color: #93c5fd; border-color: rgba(96, 165, 250, .35); }


.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 18px;
    border-radius: var(--r);
    border: 1px solid var(--border);
}
.search-bar { position: relative; }
.search-bar input { padding-right: 42px; }
.search-bar i {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
}


.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 9px 15px;
    border-radius: 11px;
    background: var(--card-strong);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 700;
    transition: all .3s var(--ease);
    min-width: 42px;
    text-align: center;
}
.pagination a:hover, .pagination a.active {
    background: linear-gradient(135deg, var(--gold), var(--gold-3));
    color: #1a1a2e;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--glow-gold);
}


.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow-y: auto;
    padding: 30px 15px;
    align-items: flex-start;
    justify-content: center;
}
.modal.active { display: flex; }

.modal-content {
    background: var(--card-strong);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 30px;
    width: 100%;
    max-width: 720px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
    position: relative;
    animation: modalIn .4s var(--ease);
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-30px) scale(.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
    position: absolute;
    top: 16px; left: 16px;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-elev);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s var(--ease);
    border: 0;
    font-size: 1.1rem;
}
.modal-close:hover { background: var(--danger); color: #fff; transform: rotate(90deg); }


.timeline { position: relative; padding-right: 32px; }
.timeline::before {
    content: '';
    position: absolute;
    right: 14px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(var(--gold), transparent);
}
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-item::before {
    content: '';
    position: absolute;
    right: -23px;
    top: 6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffe491, var(--gold-3));
    border: 3px solid var(--card-strong);
    box-shadow: 0 0 0 2px var(--gold), 0 0 20px var(--gold);
}
.timeline-item .meta { font-size: .8rem; color: var(--text-2); margin-bottom: 5px; }
.timeline-item .body {
    background: var(--bg-elev);
    padding: 13px 16px;
    border-radius: 12px;
    border-right: 3px solid var(--gold);
}


.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.detail-row {
    background: linear-gradient(135deg, var(--bg-elev), transparent);
    padding: 14px 18px;
    border-radius: 12px;
    border-right: 3px solid var(--gold);
    transition: all .3s var(--ease);
    border: 1px solid var(--border);
}
.detail-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.detail-row .label {
    font-size: .76rem;
    color: var(--text-2);
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.detail-row .value { font-weight: 700; color: var(--text); }


.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 22px;
}
.chart-container { position: relative; height: 300px; }


.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
}
.empty i {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--gold), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: .5;
    margin-bottom: 14px;
    display: block;
}
.empty p { font-size: 1.1rem; }


.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.file-item {
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: all .3s var(--ease);
}
.file-item:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.file-item i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ffe491, var(--gold-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 8px;
}
.file-item .fname { font-size: .85rem; word-break: break-all; color: var(--text); }


.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(6px);
    z-index: 99;
}
.sidebar-overlay.active { display: block; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


[data-tip] { position: relative; }
[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    right: 50%;
    transform: translateX(50%);
    background: var(--bg-elev-2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: .78rem;
    white-space: nowrap;
    z-index: 100;
    box-shadow: var(--shadow);
    pointer-events: none;
    border: 1px solid var(--border);
}


.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(900px 700px at 85% 0%, rgba(139, 92, 246, .35), transparent 55%),
        radial-gradient(700px 600px at 15% 95%, rgba(6, 182, 212, .3), transparent 55%),
        radial-gradient(800px 600px at 95% 60%, rgba(233, 196, 106, .18), transparent 60%),
        linear-gradient(135deg, #050813 0%, #07091a 50%, #050813 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.login-wrap::before, .login-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .55;
    z-index: 0;
    animation: float 9s ease-in-out infinite;
}
.login-wrap::before {
    width: 480px; height: 480px;
    background: radial-gradient(circle, var(--gold), transparent);
    top: -120px; right: -120px;
}
.login-wrap::after {
    width: 540px; height: 540px;
    background: radial-gradient(circle, var(--aurora-2), transparent);
    bottom: -180px; left: -180px;
    animation-delay: -4.5s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(25px, -25px); }
}

.login-card {
    background: rgba(20, 26, 56, .55);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, .1);
    padding: 50px 42px;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    color: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08);
    position: relative;
    z-index: 1;
}
.login-card .logo { text-align: center; margin-bottom: 32px; }
.login-card .logo i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, #ffe491, var(--gold), var(--gold-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 14px;
    filter: drop-shadow(0 4px 24px rgba(233, 196, 106, .55));
    display: inline-block;
}
.login-card .logo h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: .5px;
}
.login-card .logo h2 span {
    background: linear-gradient(135deg, #ffe491, var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-card .logo p {
    font-size: .82rem;
    color: rgba(255, 255, 255, .55);
    margin-top: 6px;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.login-card .form-group label {
    color: rgba(255, 255, 255, .85);
    display: flex;
    align-items: center;
    gap: 8px;
}
.login-card input {
    background: rgba(255, 255, 255, .05);
    border-color: rgba(255, 255, 255, .12);
    color: #fff;
}
.login-card input:focus {
    background: rgba(255, 255, 255, .1);
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(233, 196, 106, .15);
}
.login-card .btn-primary { width: 100%; padding: 14px; font-size: 1.05rem; margin-top: 8px; }


.welcome-banner {
    background:
        linear-gradient(135deg, rgba(233, 196, 106, .18), rgba(139, 92, 246, .15)),
        linear-gradient(135deg, var(--bg-elev), var(--bg-elev-2));
    border: 1px solid rgba(233, 196, 106, .25);
    border-radius: var(--r);
    padding: 30px 32px;
    color: #fff;
    margin-bottom: 26px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.welcome-banner::before {
    content: '';
    position: absolute;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(233, 196, 106, .35), transparent 65%);
    top: -180px; right: -100px;
    border-radius: 50%;
    pointer-events: none;
}
.welcome-banner::after {
    content: '';
    position: absolute;
    width: 280px; height: 280px;
    background: radial-gradient(circle, rgba(139, 92, 246, .35), transparent 65%);
    bottom: -160px; left: -60px;
    border-radius: 50%;
    pointer-events: none;
}
.welcome-banner h2 {
    font-family: 'Cairo', sans-serif;
    font-size: 1.65rem;
    font-weight: 900;
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
    position: relative;
    background: linear-gradient(135deg, #fff, #ffe491);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.welcome-banner p {
    font-size: 1rem;
    color: var(--text-2);
    position: relative;
    max-width: 600px;
}
.welcome-banner .crown {
    position: absolute;
    top: 22px;
    left: 30px;
    font-size: 5.5rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-3));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: .25;
    transform: rotate(-12deg);
    filter: drop-shadow(0 4px 20px rgba(233, 196, 106, .4));
}
@media (max-width: 768px) {
    .welcome-banner { padding: 22px 20px; }
    .welcome-banner h2 { font-size: 1.25rem; }
    .welcome-banner p { font-size: .92rem; }
    .welcome-banner .crown { font-size: 3rem; top: 10px; left: 15px; }
}


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

@media (max-width: 1024px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.active { transform: translateX(0); }
    .main { margin-right: 0; }
    .menu-toggle { display: inline-flex; }
}

@media (max-width: 768px) {
    .topbar { padding: 14px 16px; }
    .topbar-title h1 { font-size: 1.2rem; }
    .topbar-title p { font-size: .78rem; }
    .icon-btn { width: 38px; height: 38px; }
    .content { padding: 18px 14px; }
    .card { padding: 18px; border-radius: 16px; }
    .card-header { margin-bottom: 16px; padding-bottom: 14px; }
    .card-header h3 { font-size: 1rem; }

    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; gap: 12px; }
    .stat-icon { width: 50px; height: 50px; font-size: 1.25rem; border-radius: 14px; }
    .stat-info h3 { font-size: 1.65rem; }
    .stat-info span { font-size: .8rem; }

    .chart-container { height: 340px; }

    .table-mobile thead { display: none; }
    .table-mobile, .table-mobile tbody, .table-mobile tr, .table-mobile td { display: block; }
    .table-mobile tbody tr {
        background: var(--card-strong);
        margin-bottom: 12px;
        border-radius: 14px;
        border: 1px solid var(--border);
        padding: 12px 14px;
    }
    .table-mobile td {
        border: 0;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .table-mobile td::before {
        content: attr(data-label);
        font-weight: 800;
        color: var(--text-2);
        font-size: .8rem;
        flex-shrink: 0;
    }
    .table-mobile td:not(:last-child) { border-bottom: 1px solid var(--border); padding-bottom: 10px; }

    .form-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
    .modal-content { padding: 22px; border-radius: 16px; }
    .login-card { padding: 36px 26px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .filters { grid-template-columns: 1fr; }
    .topbar-title p { display: none; }
    .stat-info h3 { font-size: 1.95rem; }
    .stat-card { padding: 18px; }
    .stat-icon { width: 56px; height: 56px; font-size: 1.4rem; }
}
