@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #1a3352;
    --primary-light: #243f63;
    --primary-hover: #2d5078;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --light: #f8f9fc;
    --white: #ffffff;
    --text: #0f1724;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --border: #e8edf5;
    --border-light: #f1f5f9;
    --card-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.04);
    --card-shadow-hover: 0 4px 6px rgba(0,0,0,0.05), 0 10px 30px rgba(0,0,0,0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--light);
    color: var(--text);
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Sidebar ── */
.sidebar {
    background: var(--primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
}

.sidebar-section-label {
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar nav {
    flex: 1;
    padding: 0.5rem 0;
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.55);
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s ease;
    text-decoration: none;
    margin: 0.1rem 0.75rem;
    border-radius: 10px;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.sidebar .nav-link i {
    font-size: 0.95rem;
    width: 18px;
    min-width: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.07);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
    font-weight: 600;
}

.sidebar .nav-link.active i {
    color: var(--accent);
    opacity: 1;
}

.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 0.75rem;
}

.sidebar-footer .nav-link,
.sidebar-footer button {
    color: rgba(255,255,255,0.35) !important;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}

.sidebar-footer .nav-link:hover,
.sidebar-footer button:hover {
    color: rgba(255,255,255,0.7) !important;
    background: rgba(255,255,255,0.05);
}

/* ── Main content ── */
.main-content {
    padding: 2rem 2.5rem;
    max-width: 1400px;
}

/* ── Page header ── */
.page-header {
    margin-bottom: 1.75rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.page-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.page-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0;
    font-weight: 400;
}

/* ── Cards ── */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    background: var(--white);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-body {
    padding: 1.75rem;
}

/* ── Tabel ── */
.table {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.table thead th {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    font-size: 0.875rem;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-hover tbody tr {
    transition: background 0.1s ease;
}

.table-hover tbody tr:hover {
    background: #fafbfd;
}

/* ── Knoppen ── */
.btn, .btn-sm {
    padding: 0.35rem 0.9rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
}

.btn.btn-primary,
.btn-primary {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.35rem 0.9rem !important;
    font-size: 0.8rem;
    letter-spacing: -0.01em;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26, 51, 82, 0.25);
    color: white;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn.btn-outline-secondary,
.btn-outline-secondary {
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: white;
    border-radius: 8px;
    padding: 0.35rem 0.9rem !important;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline-secondary:hover {
    border-color: #c8d4e3;
    color: var(--text);
    background: #f8f9fc;
}

.btn-view {
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    border-radius: 8px;
    padding: 0.3rem 0.85rem;
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-view:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(245, 158, 11, 0.04);
}

/* ── Badges ── */
.badge-days {
    background: rgba(26, 51, 82, 0.07);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.3em 0.8em;
    border-radius: 20px;
    letter-spacing: 0.01em;
}

/* ── Form controls ── */
.form-control {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: var(--text);
    background: white;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 51, 82, 0.07);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-light);
}

.form-label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

/* ── Login ── */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(145deg, #eef2f9 0%, #e2e8f4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26,51,82,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.login-card {
    border-radius: 20px !important;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.8) !important;
    box-shadow: 0 8px 32px rgba(26,51,82,0.1) !important;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95) !important;
}

.login-card .card-body {
    padding: 2.5rem;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.3rem;
    letter-spacing: -0.03em;
}

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.75rem;
    font-weight: 400;
}

.forgot-link {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
    font-weight: 500;
}

.forgot-link:hover {
    color: var(--primary);
}

.btn-login {
    background: var(--primary);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.8rem;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
    transition: all 0.15s ease;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 51, 82, 0.3);
}

.btn-login:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

/* ── Spinner ── */
.spinner-border {
    color: var(--primary) !important;
}

/* ── Alerts ── */
.alert-info {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    padding: 0.65rem 1rem;
}

/* ── Impersonation banner ── */
.impersonation-banner {
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    padding: 0.6rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
}