/* ============================================================================
   StartPortaal.nl — Dedicated Member/Client Portal & Admin Control Center CSS
   ============================================================================ */

:root {
    --dash-bg: #F1F5F9;
    --dash-surface: #FFFFFF;
    --dash-border: #E2E8F0;
    --dash-text: #0F172A;
    --dash-muted: #64748B;
    --member-sidebar: #0B4F8A;
    --member-accent: #0077C8;
    --admin-sidebar: #0F172A;
    --admin-accent: #4F46E5;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--dash-text);
    background: var(--dash-bg);
}
a { color: #0066B3; text-decoration: none; }
a:hover { text-decoration: underline; }

.dash-shell {
    display: flex;
    min-height: 100vh;
}
.dash-sidebar {
    width: 252px;
    flex-shrink: 0;
    color: #E2E8F0;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
}
.dash-shell.theme-member .dash-sidebar { background: var(--member-sidebar); }
.dash-shell.theme-admin .dash-sidebar  { background: var(--admin-sidebar); }

.dash-brand {
    padding: 0 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 16px;
}
.dash-brand-title {
    font-size: 18px;
    font-weight: 800;
    color: #FFFFFF;
    display: block;
}
.dash-brand-role {
    display: inline-block;
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 2px 8px;
    border-radius: 99px;
}
.theme-member .dash-brand-role { background: rgba(255,255,255,0.18); color: #E0F2FE; }
.theme-admin  .dash-brand-role { background: #F59E0B; color: #0F172A; }

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.dash-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 7px;
    color: #CBD5E1;
    font-weight: 500;
    text-decoration: none !important;
}
.dash-nav a:hover { background: rgba(255,255,255,0.1); color: #FFFFFF; }
.dash-nav a.active { background: rgba(255,255,255,0.18); color: #FFFFFF; font-weight: 700; }

.dash-pill-count {
    background: #EF4444;
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
}

.dash-sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 14px;
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}
.dash-sidebar-footer a { color: #93C5FD; padding: 6px 10px; border-radius: 6px; }
.dash-sidebar-footer a:hover { background: rgba(255,255,255,0.1); color: #FFFFFF; text-decoration: none; }

.dash-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.dash-topbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--dash-border);
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-topbar h1 { margin: 0; font-size: 20px; }
.dash-content { padding: 24px; max-width: 1240px; width: 100%; }

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.kpi-card {
    background: #FFFFFF;
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    padding: 16px 18px;
}
.kpi-label { font-size: 12.5px; color: var(--dash-muted); font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 800; margin-top: 4px; color: var(--dash-text); }
.kpi-card.kpi-warning { border-left: 4px solid #F59E0B; }
.kpi-card.kpi-success { border-left: 4px solid #10B981; }
.kpi-card.kpi-info    { border-left: 4px solid #0077C8; }
.kpi-card.kpi-danger  { border-left: 4px solid #EF4444; }

/* Panels & Tables */
.panel {
    background: #FFFFFF;
    border: 1px solid var(--dash-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.panel-header h2 { margin: 0; font-size: 16.5px; }

.table-wrap { overflow-x: auto; }
table.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.dash-table th, .dash-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #EEF2F7;
    text-align: left;
    vertical-align: top;
}
.dash-table th {
    background: #F8FAFC;
    font-weight: 700;
    color: #475569;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 11.5px;
    font-weight: 700;
}
.badge-success { background: #DCFCE7; color: #166534; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-muted   { background: #E2E8F0; color: #475569; }

/* Buttons & Forms */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
}
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn-primary { background: #0077C8; color: #FFFFFF !important; }
.btn-primary:hover { background: #005A9C; }
.btn-indigo  { background: #4F46E5; color: #FFFFFF !important; }
.btn-indigo:hover  { background: #4338CA; }
.btn-success { background: #16A34A; color: #FFFFFF !important; }
.btn-success:hover { background: #15803D; }
.btn-danger  { background: #DC2626; color: #FFFFFF !important; }
.btn-danger:hover  { background: #B91C1C; }
.btn-outline { background: #FFFFFF; color: #334155 !important; border: 1px solid #CBD5E1; }
.btn-outline:hover { background: #F8FAFC; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.form-group { margin-bottom: 14px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: #334155;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    font: inherit;
    background: #FFFFFF;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #0077C8;
    box-shadow: 0 0 0 3px rgba(0, 119, 200, 0.12);
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-weight: 500;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }
.alert-info    { background: #E0F2FE; color: #075985; border: 1px solid #7DD3FC; }

/* Admin Separate Login Screen */
.admin-login-body {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.admin-login-card {
    background: #FFFFFF;
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.35);
}

@media (max-width: 860px) {
    .dash-shell { flex-direction: column; }
    .dash-sidebar { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
}
