@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
    --bg-0:        #06070f;
    --bg-1:        #0d0f1e;
    --bg-2:        #131526;
    --bg-3:        #1a1d30;
    --bg-card:     rgba(19,21,38,0.85);
    --border:      rgba(99,102,241,0.15);
    --border-soft: rgba(255,255,255,0.06);

    --violet:      #7c3aed;
    --violet-light:#a78bfa;
    --violet-glow: rgba(124,58,237,0.35);
    --indigo:      #6366f1;
    --indigo-light:#818cf8;
    --pink:        #ec4899;
    --pink-light:  #f9a8d4;
    --cyan:        #22d3ee;
    --green:       #10b981;
    --red:         #ef4444;

    --txt-1:       #f1f0ff;
    --txt-2:       #a8a4c8;
    --txt-3:       #5c5a7a;

    --sidebar-w:   260px;
    --radius:      14px;
    --radius-sm:   9px;

    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg-0);
    color: var(--txt-1);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Aurora background ─────────────────────────────────────────────────────── */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse 80vw 60vh at 10% 0%,   rgba(124,58,237,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60vw 50vh at 90% 100%, rgba(99,102,241,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40vw 30vh at 50% 50%,  rgba(236,72,153,0.04) 0%, transparent 70%);
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: rgba(124,58,237,0.4); border-radius: 3px; }

/* ══════════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
}

/* Decoratieve elementen achtergrond login */
.login-page::after {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(124,58,237,0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(99,102,241,0.12) 0%, transparent 40%);
}

.login-wrap {
    position: relative; z-index: 1;
    width: 100%; max-width: 440px;
}

/* Floating orb decoraties */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: float 8s ease-in-out infinite;
}
.orb-1 {
    width: 400px; height: 400px;
    background: rgba(124,58,237,0.12);
    top: -100px; left: -100px;
    animation-delay: 0s;
}
.orb-2 {
    width: 300px; height: 300px;
    background: rgba(99,102,241,0.1);
    bottom: -80px; right: -80px;
    animation-delay: -3s;
}
.orb-3 {
    width: 200px; height: 200px;
    background: rgba(236,72,153,0.07);
    top: 40%; right: 10%;
    animation-delay: -5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-20px) scale(1.05); }
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 44px 40px;
    box-shadow:
        0 32px 80px rgba(0,0,0,0.5),
        0 0 0 1px rgba(124,58,237,0.08),
        inset 0 1px 0 rgba(255,255,255,0.06);
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.login-brand {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo {
    width: 72px; height: 72px;
    border-radius: 18px;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}

.login-brand h1 {
    font-size: 26px;
    background: linear-gradient(135deg, var(--txt-1), var(--violet-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.login-brand p {
    font-size: 14px;
    color: var(--txt-2);
}

/* Alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}
.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
}
.alert-success {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    color: #6ee7b7;
}
.alert-info {
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(124,58,237,0.25);
    color: var(--violet-light);
}

/* Login knop */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, var(--violet), var(--indigo));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s;
    box-shadow: 0 4px 20px rgba(124,58,237,0.4);
    letter-spacing: 0.01em;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(124,58,237,0.55);
    background: linear-gradient(135deg, #6d28d9, #4f46e5);
}
.btn-login:active { transform: translateY(0); }

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--txt-3);
    line-height: 1.6;
}
.login-footer a {
    color: var(--violet-light);
    text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--txt-3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

/* Voordelen lijst op login */
.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}
.login-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--txt-2);
}
.feat-dot {
    width: 20px; height: 20px; flex-shrink: 0;
    border-radius: 6px;
    background: rgba(124,58,237,0.2);
    border: 1px solid rgba(124,58,237,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-1);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 50;
    transition: transform 0.3s;
}

.sidebar-top {
    padding: 28px 24px 20px;
    border-bottom: 1px solid var(--border-soft);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(124,58,237,0.35);
}

.sidebar-brand-text h2 {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--txt-1);
}
.sidebar-brand-text span {
    font-size: 11px;
    color: var(--txt-3);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-label {
    padding: 0 24px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--txt-3);
    margin-bottom: 6px;
    margin-top: 20px;
}
.nav-label:first-child { margin-top: 0; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--txt-2);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.18s;
    border-left: 3px solid transparent;
    position: relative;
}
.nav-link svg { flex-shrink: 0; opacity: 0.7; transition: opacity 0.18s; }
.nav-link:hover {
    color: var(--txt-1);
    background: rgba(124,58,237,0.07);
}
.nav-link:hover svg { opacity: 1; }
.nav-link.active {
    color: var(--violet-light);
    background: rgba(124,58,237,0.12);
    border-left-color: var(--violet);
}
.nav-link.active svg { opacity: 1; }

.nav-badge {
    margin-left: auto;
    background: var(--violet);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

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

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    transition: all 0.18s;
}
.user-chip:hover { border-color: var(--border); }

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--indigo));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
}

.user-chip-info { flex: 1; min-width: 0; }
.user-chip-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-chip-role {
    font-size: 11px;
    color: var(--txt-3);
}

.logout-btn {
    background: none;
    border: none;
    color: var(--txt-3);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.18s;
    display: flex;
}
.logout-btn:hover { color: var(--red); background: rgba(239,68,68,0.1); }

/* ── Main content ────────────────────────────────────────────────────────── */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    padding: 20px 36px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(13,15,30,0.6);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-left h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--txt-1);
}
.topbar-left p {
    font-size: 13px;
    color: var(--txt-3);
    margin-top: 2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-content {
    padding: 36px;
    flex: 1;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    backdrop-filter: blur(12px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h2 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--txt-1);
}
.card-body { padding: 24px; }

/* ── Stat cards ──────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--accent-line, linear-gradient(90deg, var(--violet), var(--indigo)));
}

.stat-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}
.stat-icon.violet { background: rgba(124,58,237,0.15); color: var(--violet-light); }
.stat-icon.indigo { background: rgba(99,102,241,0.15); color: var(--indigo-light); }
.stat-icon.pink   { background: rgba(236,72,153,0.15); color: var(--pink-light); }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: var(--green); }

.stat-info { flex: 1; }
.stat-label {
    font-size: 11px;
    color: var(--txt-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}
.stat-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--txt-1);
    line-height: 1;
}
.stat-sub {
    font-size: 12px;
    color: var(--txt-3);
    margin-top: 4px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s;
    text-decoration: none;
    font-family: var(--font-body);
}
.btn-primary {
    background: linear-gradient(135deg, var(--violet), var(--indigo));
    color: #fff;
    border-color: rgba(124,58,237,0.5);
    box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124,58,237,0.45);
}
.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: var(--txt-2);
    border-color: var(--border-soft);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); color: var(--txt-1); }
.btn-danger {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border-color: rgba(239,68,68,0.25);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── Role badges ─────────────────────────────────────────────────────────── */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.role-admin     { background: rgba(239,68,68,.15);  color:#fca5a5; border: 1px solid rgba(239,68,68,.25); }
.role-moderator { background: rgba(236,72,153,.15); color:var(--pink-light); border: 1px solid rgba(236,72,153,.25); }
.role-dj        { background: rgba(124,58,237,.15); color:var(--violet-light); border: 1px solid rgba(124,58,237,.25); }
.role-default   { background: rgba(99,102,241,.12); color:var(--indigo-light); border: 1px solid rgba(99,102,241,.2); }

/* ── Profile card ────────────────────────────────────────────────────────── */
.profile-avatar-xl {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--indigo));
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 28px; right: 28px;
    z-index: 9999;
    padding: 13px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    opacity: 0;
    transform: translateY(12px);
    transition: all .3s;
    pointer-events: none;
    max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.4); color: #6ee7b7; }
.toast-error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main {
        margin-left: 0;
    }
    .topbar, .page-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   DATA TABLE
══════════════════════════════════════════════════════════════════════════════ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--txt-3);
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(255,255,255,.02);
}
.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,.025); }

/* ── Alert ──────────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 1.5;
}
.alert-success { background: rgba(16,185,129,.12); border:1px solid rgba(16,185,129,.25); color: #6ee7b7; }
.alert-error   { background: rgba(239,68,68,.12);  border:1px solid rgba(239,68,68,.25);  color: #fca5a5; }
