* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617; /* donker blauw/zwart */
    color: #111827;
}

/* -------- Shell ---------- */

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

/* Topbar */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.75rem;
    background: #020617;
    color: #e5e7eb;
    box-shadow: 0 2px 8px rgba(15,23,42,.7);
    position: sticky;
    top: 0;
    z-index: 40;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.brand-sub {
    font-size: .72rem;
    text-transform: lowercase;
    color: #9ca3af;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: .85rem;
}

.topbar-user {
    color: #e5e7eb;
}

.topbar-link {
    text-decoration: none;
    color: #e5e7eb;
    padding: .3rem .85rem;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.6);
    background: transparent;
    transition: background .15s, color .15s, border-color .15s;
}

.topbar-link:hover {
    background: #111827;
    border-color: rgba(148,163,184,.9);
}

/* Layout */

.app-main {
    display: flex;
    min-height: calc(100vh - 52px);
    background: radial-gradient(circle at top left, #0f172a, #020617 55%);
}

/* -------- Sidebar ---------- */

.sidebar {
    width: 260px;
    background: #020617;
    color: #e2e8f0;
    border-right: 1px solid rgba(15,23,42,0.8);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.1rem 1.5rem;
}

.sidebar-nav {
    padding: 0;
    margin: 0;
}

/* secties */

.nav-section {
    margin-top: 1.7rem;
}

.nav-section:first-child {
    margin-top: 0.25rem;
}

.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    margin-bottom: .7rem;
    color: #64748b; /* slate-500 */
}

/* lists */

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item + .nav-item {
    margin-top: 0.3rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.6rem;
    text-decoration: none;
    font-size: 0.9rem;
    color: #cbd5e1; /* slate-300 */
    background: transparent;
    opacity: .95;
    transition: background .15s, color .15s, opacity .15s;
}

.nav-link:hover {
    background: rgba(148,163,184,0.18);
    color: #f9fafb;
    opacity: 1;
}

.nav-link.active {
    background: rgba(59,130,246,0.3);
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,0.4);
}

/* icoontje (optioneel) */

.nav-icon {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    margin-right: 0;
    flex-shrink: 0;
    opacity: .8;
}

.nav-link.active .nav-icon {
    opacity: 1;
}

/* -------- Content ---------- */

.content {
    flex: 1;
    padding: 1.7rem 2rem 2rem;
    background: #f3f4f6;
}

/* Page header */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.35rem;
}

.page-header h1 {
    margin: 0;
    font-size: 1.65rem;
}

.page-subtitle {
    margin: .18rem 0 0 0;
    font-size: .9rem;
    color: #6b7280;
}

/* Cards */

.card {
    background: #ffffff;
    border-radius: .95rem;
    padding: 1.3rem 1.55rem;
    box-shadow: 0 18px 35px rgba(15,23,42,.12);
    border: 1px solid #e5e7eb;
}

.flash-card {
    border-left: 3px solid #2563eb;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(210px,1fr));
    gap: 1.25rem;
}

.stat-card h3 {
    margin: 0 0 .25rem 0;
    font-size: .9rem;
    color: #4b5563;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: .1rem;
}

.stat-label {
    margin: 0;
    font-size: .8rem;
    color: #6b7280;
}

/* Table */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table th,
.table td {
    padding: .5rem .5rem;
    text-align: left;
}

.table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.table-striped tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* Filters */

.filter-bar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
}

.filter-group label {
    display: block;
    font-size: .78rem;
    color: #4b5563;
    margin-bottom: .2rem;
}

.filter-group select {
    min-width: 180px;
}

/* Forms */

.card-form {
    max-width: 780px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 1rem 1.25rem;
}

.form-group label {
    display: block;
    font-size: .85rem;
    margin-bottom: .25rem;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    font-size: .9rem;
    border-radius: .6rem;
    border: 1px solid #d1d5db;
    padding: .45rem .6rem;
    background: #f9fafb;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,.4);
    background: #ffffff;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    margin-top: 1.2rem;
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .38rem .9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .85rem;
    cursor: pointer;
    text-decoration: none;
    background: #e5e7eb;
    color: #111827;
    transition: background .15s, border-color .15s, transform .05s;
}

.btn:hover {
    background: #d1d5db;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #2563eb;
    color: #f9fafb;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-sm {
    padding: .25rem .6rem;
    font-size: .78rem;
}

/* Text helpers */

.text-muted {
    color: #6b7280;
}

.small-text {
    font-size: .8rem;
}

.text-right {
    text-align: right;
}

/* ---------- Login layout ----------- */

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #1d4ed8, #020617 60%);
    color: #e5e7eb;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: rgba(15,23,42,.96);
    border-radius: 1rem;
    padding: 1.8rem 1.8rem 1.5rem;
    box-shadow: 0 16px 40px rgba(15,23,42,.8);
    color: #e5e7eb;
}

.login-card h1 {
    margin: 0 0 .3rem 0;
    font-size: 1.45rem;
}

.login-card p {
    margin: 0 0 1.2rem 0;
    font-size: .86rem;
    color: #9ca3af;
}

.login-card label {
    display: block;
    font-size: .8rem;
    margin-bottom: .2rem;
}

.login-card input {
    width: 100%;
    margin-bottom: .8rem;
    padding: .5rem .6rem;
    border-radius: .55rem;
    border: 1px solid #4b5563;
    background: #020617;
    color: #e5e7eb;
}

.login-card input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,.5);
}

.login-card button {
    width: 100%;
    margin-top: .2rem;
}

.login-error {
    background: rgba(239,68,68,.1);
    border-radius: .6rem;
    padding: .4rem .6rem;
    border: 1px solid rgba(239,68,68,.8);
    color: #fecaca;
    font-size: .8rem;
    margin-bottom: .7rem;
}

/* Language switch */

.lang-switch {
    display: flex;
    gap: .35rem;
    font-size: .78rem;
}

.lang-switch a {
    color: #9ca3af;
    text-decoration: none;
    padding: 0 .25rem;
}

.lang-switch a.active {
    color: #f9fafb;
    border-bottom: 1px solid #f9fafb;
}

/* Responsive */

@media (max-width: 900px) {
    .sidebar {
        display: none;
    }
    .content {
        padding: 1rem;
    }
}
