:root {
    --bg: #0f1115;
    --bg-2: #171a21;
    --card: #1e222b;
    --text: #e7e9ee;
    --muted: #8b91a1;
    --accent: #7c5cff;
    --accent-2: #a78bfa;
    --danger: #ef4444;
    --success: #10b981;
    --border: #2a2f3a;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
    line-height: 1.5;
    min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Landing */
.landing {
    display: grid;
    place-items: center;
    padding: 2rem;
    background: radial-gradient(circle at top, #221f3a 0%, var(--bg) 60%);
}
.landing-card {
    background: var(--card);
    padding: 3rem 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 480px;
    text-align: center;
}
.landing-card h1 {
    margin: 0 0 .5rem;
    font-size: 2rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tagline { color: var(--muted); margin-bottom: 2rem; }

/* Auth */
.auth {
    display: grid;
    place-items: center;
    padding: 2rem;
    background: radial-gradient(circle at top, #221f3a 0%, var(--bg) 60%);
}
.auth-card {
    background: var(--card);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
}
.auth-card h1 { margin-top: 0; }

label {
    display: block;
    margin-bottom: 1rem;
    font-size: .9rem;
    color: var(--muted);
}
input[type=text], input[type=password], input[type=email] {
    width: 100%;
    margin-top: .35rem;
    padding: .8rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
}
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .25);
}

.btn-primary {
    display: inline-block;
    width: 100%;
    padding: .9rem 1.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 92, 255, .4);
    text-decoration: none;
}

.alert {
    background: rgba(239, 68, 68, .15);
    border: 1px solid var(--danger);
    color: #fca5a5;
    padding: .8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.success {
    background: rgba(16, 185, 129, .15);
    border: 1px solid var(--success);
    color: #6ee7b7;
    padding: .8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: .9rem;
}
.muted { color: var(--muted); font-size: .9rem; }
.small { font-size: .8rem; }
.break { word-break: break-all; }

/* 2FA setup */
.secret-box {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 2px;
    color: var(--accent-2);
}

/* Backup codes */
.backup-codes {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin: 1rem 0;
}
.backup-codes li {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: .5rem;
    text-align: center;
    font-family: monospace;
}

/* Admin */
.admin { background: var(--bg); }
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.topbar .brand {
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 1.2rem;
}
.topbar nav {
    display: flex;
    gap: 1.5rem;
}
.topbar nav a { color: var(--muted); font-size: .9rem; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); }

.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}
.content.narrow { max-width: 700px; }

.content h1 { margin-top: 0; }
.content h2 { font-size: 1.1rem; margin-top: 0; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card p { margin: 0; color: var(--muted); }

form label { margin-bottom: 1rem; }
form button { width: auto; }

/* ============================================================
   SIDEBAR LAYOUT
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
}

.sidebar-brand {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-bottom: 1px solid var(--border);
}

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

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.sidebar-nav a:hover, 
.sidebar-nav a.active {
    background: var(--bg-2);
    color: var(--text);
    border-left: 3px solid var(--accent);
}

.sidebar-nav .section-title {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    font-weight: 700;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

.main-content {
    flex: 1;
    margin-left: 260px; /* Zelfde breedte als sidebar */
    padding: 2rem;
    min-height: 100vh;
}

/* Responsive voor mobiel */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* Badges voor project-info */
.badge {
    background: var(--bg-2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
