:root {
    --navy: #0b1f5e;
    --blue: #2478ff;
    --blue-soft: #eaf2ff;
    --text: #17233f;
    --muted: #6d7890;
    --border: #dfe6f1;
    --surface: #ffffff;
    --background: #f4f7fc;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--background);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

/* Blazor focust de paginatitel na navigatie voor schermlezers. Verberg alleen de standaard browserrand. */
h1[tabindex="-1"]:focus { outline: none; box-shadow: none; }

.portal-shell { min-height: 100vh; padding-bottom: 72px; }
.portal-header {
    height: 76px; padding: 0 max(24px, calc((100% - 1120px) / 2)); background: #fff;
    border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between;
}
.portal-brand img { display: block; width: 190px; height: 54px; object-fit: contain; }
.profile-menu { position: relative; color: var(--text); }
.profile-menu > summary {
    min-width: 220px; padding: 7px 10px 7px 7px; border: 1px solid transparent; border-radius: 14px;
    display: flex; align-items: center; gap: 11px; cursor: pointer; list-style: none; transition: background .15s, border-color .15s;
}
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover, .profile-menu[open] > summary { background: var(--blue-soft); border-color: #cfe0ff; }
.profile-menu > summary:focus-visible { outline: 3px solid #cfe0ff; border-color: var(--blue); }
.profile-avatar {
    width: 40px; height: 40px; flex: 0 0 40px; color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--blue)); border-radius: 50%;
    box-shadow: 0 5px 14px rgba(36, 120, 255, .22); display: grid; place-items: center;
    font-size: .8rem; font-weight: 800; letter-spacing: .03em;
}
.profile-trigger-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.profile-trigger-copy strong { overflow: hidden; color: var(--navy); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-trigger-copy small { color: var(--muted); font-size: .72rem; }
.profile-chevron { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--muted); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; transition: transform .15s; }
.profile-menu[open] .profile-chevron { transform: rotate(180deg); }
.profile-menu-panel {
    position: absolute; z-index: 30; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 28px));
    background: #fff; border: 1px solid var(--border); border-radius: 17px; box-shadow: 0 20px 55px rgba(11, 31, 94, .16); overflow: hidden;
}
.profile-menu-header { padding: 18px; background: linear-gradient(145deg, #f7faff, var(--blue-soft)); display: flex; align-items: center; gap: 13px; }
.profile-avatar-large { width: 48px; height: 48px; flex-basis: 48px; font-size: .9rem; }
.profile-menu-header > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.profile-menu-header strong, .profile-menu-header small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-header strong { color: var(--navy); }
.profile-menu-header small { color: var(--muted); font-size: .78rem; }
.profile-menu-links { padding: 8px; border-top: 1px solid #edf1f7; border-bottom: 1px solid #edf1f7; display: grid; gap: 2px; }
.profile-menu-links a { padding: 11px; border-radius: 10px; display: flex; align-items: center; gap: 12px; }
.profile-menu-links a:hover { background: var(--blue-soft); }
.profile-menu-links svg, .profile-logout svg { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.profile-menu-links a > span { display: flex; flex-direction: column; gap: 2px; }
.profile-menu-links strong { color: var(--navy); font-size: .88rem; }
.profile-menu-links small { color: var(--muted); font-size: .75rem; }
.profile-logout { padding: 8px; }
.profile-logout button { width: 100%; padding: 11px; color: #a52738; background: transparent; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.profile-logout button:hover { background: #fff0f2; }
.portal-content { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 48px 0; }
.mobile-navigation {
    position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; height: 66px; padding: 0 20px;
    background: #fff; border-top: 1px solid var(--border); display: flex; justify-content: center; gap: 8px;
}
.mobile-navigation a { min-width: 130px; padding: 21px 18px; color: var(--muted); text-align: center; font-size: .88rem; font-weight: 700; }
.mobile-navigation a.active { color: var(--blue); border-top: 3px solid var(--blue); padding-top: 18px; }

.welcome-heading, .page-heading { margin-bottom: 30px; }
.welcome-heading h1, .page-heading h1 { margin: 4px 0 7px; color: var(--navy); font-size: clamp(2rem, 5vw, 3rem); }
.welcome-heading p, .page-heading p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.feature-card {
    min-height: 190px; padding: 26px; background: #fff; border: 1px solid var(--border); border-radius: 20px;
    box-shadow: 0 10px 35px rgba(11, 31, 94, .05); display: flex; flex-direction: column; justify-content: flex-end;
}
.feature-card:hover { border-color: #a9c8ff; transform: translateY(-2px); }
.feature-card strong { margin: 12px 0 4px; color: var(--navy); font-size: 1.7rem; }
.feature-card span:last-child { color: var(--muted); font-size: .9rem; }
.primary-card { color: #fff; background: linear-gradient(135deg, var(--navy), #1257cd); border: 0; }
.primary-card strong, .primary-card span:last-child { color: #fff; }
.card-label { color: var(--blue); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.primary-card .card-label { color: #9fc4ff; }

.document-list { display: grid; gap: 13px; }
.document-card { padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 15px; display: flex; align-items: center; gap: 18px; }
.document-card:hover { border-color: #9fc4ff; box-shadow: 0 8px 25px rgba(11, 31, 94, .06); }
.document-period { width: 56px; height: 56px; color: #fff; background: var(--navy); border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.document-period strong { font-size: 1.15rem; }
.document-period span { font-size: .68rem; }
.document-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.document-info strong { color: var(--navy); }
.document-info span { color: var(--muted); font-size: .88rem; }
.document-action, .back-link { color: var(--blue); font-weight: 700; }

.actions-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.payslip-document { padding: 36px; background: #fff; border: 1px solid var(--border); border-radius: 18px; }
.payslip-header { padding-bottom: 24px; border-bottom: 2px solid var(--navy); display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.payslip-header div { display: flex; flex-direction: column; gap: 5px; }
.payslip-header span, .payslip-header small { color: var(--muted); }
.payslip-header strong { color: var(--navy); font-size: 1.15rem; }
.payslip-meta { margin: 0; padding: 24px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.payslip-meta div { display: flex; flex-direction: column; gap: 5px; }
.payslip-meta dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.payslip-meta dd { margin: 0; font-weight: 700; }
.payslip-lines { padding-top: 18px; }
.payslip-lines > div { padding: 10px 0; display: flex; justify-content: space-between; }
.payslip-total { margin-top: 12px; padding: 20px !important; color: #fff; background: var(--navy); border-radius: 12px; font-size: 1.12rem; }
.payslip-section { padding-top: 24px; }
.payslip-section h2, .payslip-summary-card h2 { margin: 0 0 14px; color: var(--navy); font-size: 1rem; }
.payslip-table-wrap { overflow-x: auto; }
.payslip-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.payslip-table th { padding: 10px; color: var(--muted); background: #f3f6fb; text-align: left; }
.payslip-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.payslip-table th:nth-child(n+3), .payslip-table td:nth-child(n+3) { text-align: right; }
.payslip-summary-grid { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.payslip-summary-card { padding: 20px; border: 1px solid var(--border); border-radius: 12px; }
.payslip-summary-card > div { padding: 5px 0; display: flex; justify-content: space-between; gap: 20px; }
.payslip-footer { margin-top: 28px; padding-top: 18px; color: var(--muted); border-top: 1px solid var(--border); font-size: .8rem; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 42%) 1fr; }
.auth-brand { padding: 54px; color: #fff; background: linear-gradient(145deg, #071a4e, #0b2d7a 65%, #176dff 140%); display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand img { width: min(100%, 390px); padding: 18px; background: #fff; border-radius: 16px; }
.auth-brand h1 { max-width: 450px; margin-bottom: 12px; font-size: clamp(2rem, 4vw, 3.2rem); }
.auth-brand p { max-width: 450px; color: #d8e5ff; }
.auth-content { padding: 36px; display: flex; align-items: center; justify-content: center; }
.auth-card { width: min(100%, 460px); padding: 38px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 18px 55px rgba(7, 26, 78, .09); }
.auth-icon { width: 58px; height: 58px; border-radius: 14px; }
.auth-card h2 { margin: 20px 0 8px; color: var(--navy); }
.auth-card > p { margin: 0 0 26px; color: var(--muted); line-height: 1.55; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--navy); font-weight: 700; }
.form-field input, .form-field select { width: 100%; padding: 12px 13px; border: 1px solid #cbd5e4; border-radius: 9px; }
.form-field input:focus, .form-field select:focus { outline: 3px solid #d7e6ff; border-color: var(--blue); }
.form-field small { display: block; margin-top: 6px; color: var(--muted); }
.checkbox-field { margin-bottom: 22px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.primary-button, .secondary-button { padding: 12px 18px; border-radius: 9px; font-weight: 800; cursor: pointer; }
.primary-button { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.secondary-button { color: var(--blue); background: #fff; border: 1px solid #a9c8ff; }
.full-width { width: 100%; }
.onboarding-card { padding: 32px; background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 35px rgba(11, 31, 94, .05); }
.onboarding-section { margin-bottom: 32px; }
.onboarding-section h2 { margin: 0 0 20px; color: var(--navy); font-size: 1.2rem; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.form-field-wide { grid-column: span 2; }
.validation-summary { margin-bottom: 24px; color: #8f1d2c; }
.alert, .empty-card, .loading-card { margin: 20px 0; padding: 20px; border-radius: 12px; }
.alert.error { color: #8f1d2c; background: #fff0f2; border: 1px solid #f3c8cf; }
.alert.success { color: #146c43; background: #eaf8f0; border: 1px solid #b9e3ca; }
.empty-card, .loading-card { background: #fff; border: 1px solid var(--border); text-align: center; }
.empty-card { padding: 50px 24px; }
.empty-card h2 { color: var(--navy); }
.empty-card p { max-width: 570px; margin: 0 auto; color: var(--muted); }
.empty-icon { width: 70px; border-radius: 16px; }

.payslip-company-logo {
    display: block;
    width: 150px;
    height: 70px;
    margin-bottom: 14px;
    object-fit: contain;
    object-position: left center;
}

@media (max-width: 800px) {
    .portal-header { height: 66px; padding: 0 18px; }
    .portal-brand img { width: 145px; }
    .profile-menu > summary { min-width: 0; padding: 5px; }
    .profile-trigger-copy, .profile-chevron { display: none; }
    .profile-menu-panel { top: calc(100% + 8px); }
    .portal-content { width: min(100% - 28px, 1120px); padding: 28px 0; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .feature-card { min-height: 155px; }
    .mobile-navigation { justify-content: space-around; }
    .mobile-navigation a { min-width: 0; flex: 1; padding-right: 4px; padding-left: 4px; }
    .document-action { display: none; }
    .actions-heading { align-items: flex-start; flex-direction: column; }
    .payslip-document { padding: 22px 18px; }
    .payslip-header, .payslip-meta, .payslip-summary-grid { grid-template-columns: 1fr; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-content { padding: 22px; }
    .auth-card { padding: 28px 24px; }
    .onboarding-card { padding: 24px 20px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field-wide { grid-column: auto; }
}

@media print {
    .portal-header, .mobile-navigation, .print-hidden, .back-link { display: none !important; }
    .portal-content { width: 100%; padding: 0; }
    .page-heading { margin-bottom: 20px; }
    .payslip-document { border: 0; }
}
.payslip-table .payslip-table-heading th { padding-top: 18px; background: transparent; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.payslip-table .payslip-table-subtotal th { color: var(--navy); background: #f3f6fb; border-top: 1px solid var(--border); }
.payslip-table .payslip-table-subtotal th:last-child { text-align: right; }

/* Verlof */
.year-select { padding: 9px 12px; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
.alert.info { color: #0b4a8f; background: var(--blue-soft); border: 1px solid #c7dcff; }
.muted { color: var(--muted); }
.mt-section { margin-top: 28px !important; }
.leave-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; }
.leave-card { padding: 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.leave-card span, .leave-card strong { display: block; }
.leave-card span { color: var(--muted); font-size: .85rem; font-weight: 700; }
.leave-card strong { margin-top: 8px; color: var(--navy); font-size: 1.6rem; }
.leave-card-balance { color: #fff; background: linear-gradient(135deg, var(--navy), #1257cd); border: 0; }
.leave-card-balance span { color: #9fc4ff; }
.leave-card-balance strong { color: #fff; }

/* Salarisgrafiek op het dashboard */
.salary-chart { margin-top: 20px; padding: 22px 24px 14px; background: #fff; border: 1px solid var(--border); border-radius: 16px; }
.salary-chart-header { margin-bottom: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.salary-chart .card-label { color: var(--muted); font-size: .82rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.salary-chart-totals { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-size: .9rem; }
.salary-chart-totals strong { margin-left: 4px; color: var(--navy); }
.salary-chart .legend { width: 10px; height: 10px; margin-right: 6px; display: inline-block; border-radius: 3px; }
.salary-chart .legend.gross, .salary-chart .bar.gross { fill: #cfe0ff; background: #cfe0ff; }
.salary-chart .legend.net, .salary-chart .bar.net { fill: var(--blue); background: var(--blue); }
.salary-chart svg { width: 100%; height: auto; display: block; }
.salary-chart .grid-line { stroke: var(--border); stroke-dasharray: 3 4; }
.salary-chart .month-label { fill: var(--muted); font-size: 12px; text-anchor: middle; }
