/* ==========================================================================
   RoosterAssistent — Stylesheet
   Font: Inter (self-hosted), Kleuren: Teal palette
   ========================================================================== */

/* --- Fonts --- */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/Inter_18pt-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/Inter_18pt-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* --- Variables --- */
:root {
    --primary: #0D9488;
    --primary-dark: #0F766E;
    --primary-darkest: #115E59;
    --primary-light: #CCFBF1;
    --terracotta: #EA580C;
    --charcoal: #1C1917;
    --warm-grey: #78716C;
    --off-white: #FAFAF9;
    --white: #FFFFFF;
    --red: #EF4444;
    --emerald: #10B981;
    --amber: #F59E0B;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;

    --radius: 6px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--charcoal);
    background: var(--off-white);
    line-height: 1.5;
}

/* --- Header / Nav --- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid #E7E5E4;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--primary-darkest);
    flex-shrink: 0;
}

.nav-logo-img {
    height: 30px;
    width: auto;
}

.nav-logo-woordmerk {
    height: 24px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    margin-left: 1rem;
}

.nav-link {
    text-decoration: none;
    color: var(--warm-grey);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-user-name {
    font-weight: 600;
    color: var(--primary-darkest);
    font-size: 0.9rem;
}

.nav-logout-form {
    display: inline;
}

.nav-logout {
    color: var(--warm-grey);
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
}

/* --- Skip link (accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-darkest);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 var(--radius) 0;
    z-index: 200;
    transition: top 0.1s;
}

.skip-link:focus {
    top: 0;
}

/* --- Main Content --- */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

/* --- Messages --- */
.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.message-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }
.message-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* --- Login Page --- */
.login-body {
    background: var(--off-white);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.login-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-img {
    height: 32px;
    width: auto;
}

.login-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.password-change-intro {
    color: var(--warm-grey);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--charcoal);
}

.form-group input {
    padding: 0.6rem 0.75rem;
    border: 1px solid #D6D3D1;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border: 1px solid #D6D3D1;
}

.btn-outline:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.btn-full {
    width: 100%;
    padding: 0.7rem;
}

/* --- Rooster Header --- */
.rooster-header {
    margin-bottom: 1rem;
    text-align: center;
}

.rooster-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.rooster-nav > a,
.rooster-nav > span {
    flex: 0 0 120px;
}

.rooster-nav > span {
    display: block;
}

.rooster-nav > a:last-child,
.rooster-nav > span:last-child {
    text-align: right;
}

.rooster-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-darkest);
    letter-spacing: -0.02em;
}

.rooster-subtitle {
    color: var(--warm-grey);
    font-size: 0.95rem;
}

.rooster-version {
    color: var(--warm-grey);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    margin-bottom: 0.75rem;
}

/* --- Rooster Actions Bar --- */
.rooster-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.btn-ical {
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
}

.btn-ical svg {
    vertical-align: middle;
}

/* --- Rooster Grid (Vakgroepsrooster) --- */
.rooster-grid-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid #E7E5E4;
}

.rooster-grid {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: 0.7rem;
}

.rooster-grid th,
.rooster-grid td {
    text-align: center;
    white-space: nowrap;
}

.rooster-grid thead th {
    position: sticky;
    top: 0;
    background: var(--off-white);
    z-index: 10;
    font-weight: 600;
    color: var(--charcoal);
}

.col-dag {
    padding: 0.2rem 0;
    border-left: 1px solid #E7E5E4;
}

.dag-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.dag-weekday {
    font-size: 0.65rem;
    color: var(--warm-grey);
    text-transform: lowercase;
}

.dag-num {
    font-size: 0.8rem;
}

.dd-header {
    padding: 0.1rem 0;
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--warm-grey);
    width: 32px;
    min-width: 32px;
}

.dd-av {
    border-right: 1px solid #E7E5E4;
}

.dagdeel-row th {
    border-bottom: 2px solid var(--primary);
}

/* Sticky first column */
.sticky-col {
    position: sticky;
    left: 0;
    z-index: 20;
    background: var(--white);
    border-right: 2px solid var(--primary);
}

thead .sticky-col {
    z-index: 30;
    background: var(--off-white);
}

.col-arts {
    padding: 0.3rem 0.5rem;
    font-weight: 600;
    text-align: left;
    font-size: 0.8rem;
    min-width: 40px;
    max-width: 50px;
    width: 40px;
}

/* Grid cells */
.cell {
    padding: 0.15rem 0.1rem;
    font-size: 0.6rem;
    font-weight: 500;
    min-width: 32px;
    height: 24px;
    border-bottom: 1px solid #F5F5F4;
}

/* Weekend styling — alleen op lege cellen (has-activity overschrijft) */
.weekend:not(.has-activity) {
    background-color: #F5F5F4 !important;
}

.cell.weekend.act-empty {
    background-color: #EBEBEA !important;
}

/* Feestdag styling (lichtroze, consistent met Cheery PDF output) — alleen op lege cellen */
.feestdag:not(.has-activity) {
    background-color: #FFF0F5 !important;
}

/* FD (Feestdagdienst) op feestdag: fuchsia met witte tekst (Cheery kleurcode) */
.cell.feestdag.act-dienst-fd {
    background-color: #FF208E !important;
    color: #FFF !important;
}

/* Highlight own row */
.my-row .sticky-col {
    background: var(--primary-light);
    color: var(--primary-darkest);
}

.my-row .cell {
    border-bottom-color: var(--primary-light);
}

/* --- Activity Colors: Modern (default) --- */
.act-ok      { background: #D1FAE5; color: #065F46; }
.act-kc      { background: #CCFBF1; color: #115E59; }
.act-p       { background: #E0F2FE; color: #075985; }
.act-d3      { background: #E0E7FF; color: #3730A3; }
.act-dienst  { background: #FEE2E2; color: #991B1B; }
.act-va      { background: #F5F5F4; color: #78716C; }
.act-pd      { background: #E2E8F0; color: #334155; }
.act-crv     { background: #FEF3C7; color: #92400E; }
.act-buitenpoli { background: #EDE9FE; color: #5B21B6; }
.act-vsu     { background: #DBEAFE; color: #1E40AF; }
.act-tbd     { background: #FFF7ED; color: #C2410C; }
.act-moet    { background: #FFEDD5; color: #9A3412; }
.act-ziek    { background: #B0B7C3; color: #374151; }
.act-blokkade { background: #FECDD3; color: #9F1239; }
.act-other   { background: #F5F5F4; color: var(--charcoal); }
.act-empty   { background: transparent; color: transparent; }

/* --- Activity Colors: Klassiek (MedSpace legacy) --- */
.palette-klassiek .act-ok       { background: #FFFF38; color: #000; }
.palette-klassiek .act-kc       { background: #FFFFBF; color: #000; }
.palette-klassiek .act-p        { background: #A59FFF; color: #000; }
.palette-klassiek .act-d3       { background: #1847FF; color: #FFF; }
.palette-klassiek .act-dienst   { background: #F70031; color: #FFF; }
.palette-klassiek .act-dienst-wd { background: #FFCCFF; color: #000; }
.palette-klassiek .act-dienst-fd { background: #FF208E; color: #FFF; }
.palette-klassiek .act-va       { background: #008700; color: #FFF; }
.palette-klassiek .act-pd       { background: #1AFF10; color: #000; }
.palette-klassiek .act-crv      { background: #1AFF10; color: #000; }
.palette-klassiek .act-buitenpoli { background: #DFBFFF; color: #000; }
.palette-klassiek .act-buitenpoli-bc  { background: #FF78FF; color: #000; }
.palette-klassiek .act-buitenpoli-vph { background: #A920FF; color: #FFF; }
.palette-klassiek .act-vsu      { background: #70D3FF; color: #000; }
.palette-klassiek .act-tbd      { background: #E5DFFF; color: #000; }
.palette-klassiek .act-pok      { background: #BFFFFF; color: #000; }
.palette-klassiek .act-moet     { background: #FFA570; color: #000; }
.palette-klassiek .act-ziek     { background: #8E99A4; color: #374151; }
.palette-klassiek .act-blokkade { background: #FFB3BA; color: #000; }
.palette-klassiek .act-other    { background: #F5F5F4; color: var(--charcoal); }
.palette-klassiek .act-empty    { background: transparent; color: transparent; }

/* --- Toggle Bar (palette + layout) --- */
.toggle-bar {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.palette-toggle,
.layout-toggle {
    display: inline-flex;
    background: #E7E5E4;
    border-radius: var(--radius);
    padding: 2px;
    gap: 2px;
    font-size: 0.8rem;
}

.palette-toggle button,
.layout-toggle button {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    color: var(--warm-grey);
    transition: all 0.15s;
}

.palette-toggle button.active,
.layout-toggle button.active {
    background: var(--white);
    color: var(--charcoal);
    box-shadow: var(--shadow);
}

/* --- Compact Layout --- */
.layout-compact {
    table-layout: fixed;
}

.layout-compact .col-arts {
    width: 36px;
    min-width: 36px;
    max-width: 36px;
    padding: 0.2rem 0.3rem;
    font-size: 0.7rem;
}

.col-dag-compact {
    padding: 0.2rem 0;
    border-left: 1px solid #E7E5E4;
    border-right: 1px solid #E7E5E4;
    min-width: 28px;
    width: 28px;
}

.compact-cell {
    min-width: 32px;
    width: 32px;
    height: 18px;
    padding: 0.05rem 0.1rem;
    font-size: 0.55rem;
    border-right: 1px solid #E7E5E4;
}

/* Arts separator in compact mode */
.compact-vm td {
    border-top: 2px solid #D6D3D1;
}

.compact-vm .sticky-col {
    border-top: 2px solid #D6D3D1;
}

/* My-row in compact: all 3 rows */
.compact-vm.my-row .sticky-col,
.compact-nm.my-row td,
.compact-av.my-row td {
    /* inherits from .my-row .cell already */
}

.compact-vm.my-row .sticky-col,
.compact-nm.my-row .sticky-col,
.compact-av.my-row .sticky-col {
    background: var(--primary-light);
    color: var(--primary-darkest);
}

/* --- Personal Rooster (Mijn Rooster) --- */
.personal-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 600px;
    margin: 0 auto;
}

.personal-day {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid #E7E5E4;
}

.personal-day.weekend {
    background: #F5F5F4 !important;
    border-color: #EBEBEA;
}

.personal-day.feestdag {
    background: #FFF0F5 !important;
    border-color: #F5E6EC;
}

.personal-date {
    display: flex;
    gap: 0.4rem;
    align-items: baseline;
}

.personal-weekday {
    font-size: 0.8rem;
    color: var(--warm-grey);
    font-weight: 500;
    width: 20px;
}

.personal-daynum {
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
}

.personal-cells {
    display: flex;
    gap: 3px;
}

.personal-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 36px;
}

.personal-summary {
    font-size: 0.75rem;
    color: var(--warm-grey);
    text-align: right;
}

/* --- Legend --- */
.legend {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid #E7E5E4;
}

.legend-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

.legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--warm-grey);
}

.legend-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--warm-grey);
}

.empty-state h2 {
    color: var(--charcoal);
    margin-bottom: 0.5rem;
}

/* --- Niet-gepubliceerd placeholder --- */
.niet-gepubliceerd-state {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 480px;
    margin: 0 auto;
}

.niet-gepubliceerd-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.niet-gepubliceerd-state h2 {
    color: var(--charcoal);
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
}

.niet-gepubliceerd-state p {
    color: var(--warm-grey);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

/* --- Ruilverzoeken --- */
.ruil-overzicht {
    max-width: 700px;
    margin: 0 auto;
}

.ruil-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-darkest);
    margin-bottom: 1rem;
}

.ruil-inbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ruil-filters {
    display: flex;
    gap: 0.25rem;
}

.ruil-filters .btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

.ruil-lijst {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ruil-kaart {
    background: var(--white);
    border: 1px solid #E7E5E4;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    border-left: 4px solid #D6D3D1;
}

.ruil-status-open { border-left-color: var(--amber); }
.ruil-status-goedgekeurd { border-left-color: var(--emerald); }
.ruil-status-afgewezen { border-left-color: var(--red); }

.ruil-kaart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.ruil-arts-code {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary-darkest);
    margin-right: 0.5rem;
}

.ruil-arts-naam {
    color: var(--warm-grey);
    font-size: 0.9rem;
}

.ruil-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ruil-badge-open { background: #FEF3C7; color: #92400E; }
.ruil-badge-goedgekeurd { background: #D1FAE5; color: #065F46; }
.ruil-badge-afgewezen { background: #FEE2E2; color: #991B1B; }

.ruil-datum { font-weight: 600; color: var(--charcoal); }
.ruil-datum-groot { font-weight: 600; color: var(--charcoal); font-size: 1.05rem; margin-bottom: 0.25rem; }

.ruil-reden {
    color: var(--charcoal);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.ruil-detail {
    color: var(--warm-grey);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.ruil-meta {
    color: var(--warm-grey);
    font-size: 0.75rem;
}

.ruil-toelichting {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--off-white);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--charcoal);
}

.ruil-toelichting-label {
    font-weight: 600;
    color: var(--primary-darkest);
}

.ruil-actie-panel {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #E7E5E4;
}

.ruil-actie-panel .form-group {
    margin-bottom: 0.5rem;
}

.ruil-actie-panel textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #D6D3D1;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    resize: vertical;
}

.ruil-actie-panel textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.ruil-actie-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-success {
    background: var(--emerald);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--white);
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-danger:hover {
    background: #FEF2F2;
}

/* Ruilverzoek form page */
.ruil-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.ruil-form-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid #E7E5E4;
}

.ruil-form-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-darkest);
    margin-bottom: 0.25rem;
}

.ruil-form-date {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: 0.25rem;
}

.ruil-form-info {
    color: var(--warm-grey);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.ruil-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ruil-form textarea,
.ruil-form select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #D6D3D1;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    resize: vertical;
}

.ruil-form textarea:focus,
.ruil-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-hint {
    font-weight: 400;
    color: var(--warm-grey);
    font-size: 0.8rem;
}

.ruil-form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Ruil swap summary */
.ruil-swap-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
    padding: 0.5rem 0.75rem;
    background: var(--off-white);
    border-radius: 4px;
    font-size: 0.9rem;
}

.ruil-swap-summary-large {
    font-size: 0.95rem;
}

.ruil-swap-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.ruil-swap-arrow {
    color: var(--warm-grey);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.ruil-swap-date {
    color: var(--warm-grey);
    font-size: 0.8rem;
}

.ruil-swap-act {
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.8rem;
    background: var(--primary-light);
    color: var(--primary-darkest);
}

.ruil-afgestemd {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #065F46;
    background: #D1FAE5;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.ruil-afgestemd::before {
    content: "\2713";
}

.ruil-badge-afgestemd {
    background: #D1FAE5;
    color: #065F46;
}

.ruil-kaart-badges {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

/* Fieldset for swap partner */
.ruil-fieldset {
    border: 1px solid #E7E5E4;
    border-radius: var(--radius);
    padding: 1rem;
    margin: 0;
}

.ruil-fieldset legend {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-darkest);
    padding: 0 0.5rem;
}

.form-row {
    display: flex;
    gap: 0.75rem;
}

.form-group-half {
    flex: 1;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Personal day as clickable link */
a.personal-day {
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, border-color 0.15s;
}

a.personal-day:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

/* Nav badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--terracotta);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.25rem;
    vertical-align: middle;
}

/* --- Ruil uitleg --- */
.ruil-uitleg {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--primary-darkest);
}

.ruil-uitleg a {
    color: var(--primary-dark);
    font-weight: 600;
}

/* --- Grid selectie voor ruilverzoek --- */
td.selectable {
    cursor: pointer;
}

td.selectable:hover {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    z-index: 5;
    position: relative;
}

td.selected {
    outline: 3px solid var(--terracotta) !important;
    outline-offset: -3px;
    z-index: 6;
    position: relative;
    box-shadow: 0 0 0 1px var(--terracotta);
}

/* Selectie floating bar */
.ruil-selectie-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    z-index: 200;
    max-width: 90vw;
}

.ruil-selectie-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.ruil-selectie-info small {
    color: var(--warm-grey);
}

.ruil-selectie-actions {
    display: flex;
    gap: 0.35rem;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* --- Rooster banners --- */
.concept-banner {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.rooster-banner {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.banner-concept {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

.banner-feedback {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

.banner-heropend {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.banner-diensten {
    background: #CCFBF1;
    color: #115E59;
    border: 1px solid #99F6E4;
}

/* --- Editor launch bar --- */
.editor-launch-bar {
    margin-bottom: 0.75rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-logo-woordmerk {
        display: none;
    }

    .nav-container {
        gap: 0.5rem;
    }

    .rooster-title {
        font-size: 1.2rem;
    }

    .personal-grid {
        max-width: 100%;
    }

    .personal-day {
        grid-template-columns: 50px 1fr;
        grid-template-rows: auto auto;
    }

    .personal-summary {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .rooster-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
    }
}

/* ==========================================================================
   Jaartotalen (roostermaker overzicht)
   ========================================================================== */

/* --- Wrapper --- */
.jaartotalen-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem auto;
    max-width: 80rem;
}

/* --- Tabel basis --- */
.jaartotalen-tabel {
    border-collapse: collapse;
    font-size: 0.8125rem;
    margin: 0 auto;
    border: 2px solid #115e59;
}

.jaartotalen-tabel th,
.jaartotalen-tabel td {
    padding: 0.375rem 0.5rem;
    text-align: center;
    border: 1px solid #e5e5e5;
}

/* --- Kolombreedtes --- */
.jt-va,
.jt-pd,
.jt-dienst,
.jt-dienst-def,
.jt-dienst-con,
.jt-sigma {
    width: 3.25rem;
}

/* --- Arts-kolom: links uitgelijnd, vetgedrukt --- */
.jt-arts {
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    width: 3.5rem;
}

/* --- Group headers (bovenste headerrij) --- */
/* Witte tekst, scheidende border-bottom voor de hele rij */
.jt-group-row th {
    color: white;
    font-weight: 600;
    font-size: 0.8125rem;
    white-space: nowrap;
    border-bottom: 2px solid #115e59;
}

/* Arts group header: primaire teal, rechterrand scheidt van Vakantie-groep */
.jt-group-row th.jt-arts {
    background: #0d9488;
    border-right: 2px solid #115e59;
}

/* Vakantie group header: dieper teal, omrand door 2px borders */
.jt-group-row th.jt-group-va {
    background: #0f766e;
    border-left: 2px solid #115e59;
    border-right: 2px solid #115e59;
}

/* PD group header: primaire teal, omrand door 2px borders */
.jt-group-row th.jt-group-pd {
    background: #0d9488;
    border-left: 2px solid #115e59;
    border-right: 2px solid #115e59;
}

/* Diensten — definitief group header: dieper teal (voorheen .jt-group-dienst) */
.jt-group-row th.jt-group-dienst-def {
    background: #0f766e;
    border-left: 2px solid #115e59;
    border-right: 2px solid #115e59;
}

/* Diensten — concept group header: amber-donker achtergrond */
.jt-group-row th.jt-group-dienst-con {
    background: #92400e;
    color: #fef3c7;
    border-left: 2px solid #78350f;
    border-right: 2px solid #78350f;
    border-bottom: 2px solid #78350f;
}

/* Sigma group header: donkerste teal */
.jt-group-row th.jt-group-sigma {
    background: #115e59;
    border-left: 2px solid #115e59;
}

/* --- Sub-headers (tweede headerrij) --- */
/* Zachte teal achtergrond, donker teal tekst, scheidende border-bottom */
.jt-sub-row th {
    background: #f0fdfa;
    color: #115e59;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    border-bottom: 2px solid #115e59;
}

/* Eerste datakolom sub-header (VA Aanvraag) krijgt linkerrand */
.jt-sub-row th.jt-va:first-of-type {
    border-left: 2px solid #115e59;
}

/* Concept sub-header: licht amber-tint */
.jt-sub-row th.jt-dienst-con {
    background: #fffbeb;
    color: #92400e;
    font-weight: 600;
    font-size: 0.75rem;
    white-space: nowrap;
    border-bottom: 2px solid #115e59;
}

/* Sigma sub-header cel: geen aparte cel nodig (rowspan=2 dekt), maar fallback */
.jt-sub-row th.jt-group-sigma {
    background: #f0fdfa;
    color: #115e59;
    font-weight: 700;
}

/* --- Totaalkolommen (VA Totaal, PD Totaal, Diensten Totaal) --- */
/* Vetgedrukt, linker- en rechterrand voor visuele groepsscheiding */
.jaartotalen-tabel th.jt-totaal,
.jaartotalen-tabel td.jt-totaal {
    font-weight: 700;
    border-left: 2px solid #115e59;
    border-right: 2px solid #115e59;
}

/* Totaalkolommen in sub-header en body: zachte teal achtergrond */
.jt-sub-row th.jt-totaal,
.jaartotalen-tabel tbody td.jt-totaal {
    background: #f0fdfa;
}

/* Totaalkolom definitief: zelfde als .jt-totaal maar specifiek voor dienst-def */
.jaartotalen-tabel th.jt-totaal-def,
.jaartotalen-tabel td.jt-totaal-def {
    font-weight: 700;
    border-left: 2px solid #115e59;
    border-right: 2px solid #115e59;
    background: #f0fdfa;
}

/* Totaalkolom concept: amber */
.jaartotalen-tabel th.jt-totaal-con,
.jaartotalen-tabel td.jt-totaal-con {
    font-weight: 700;
    border-left: 2px solid #b45309;
    border-right: 2px solid #b45309;
    background: #fef3c7;
    color: #78350f;
}

/* Sigma-cel (body) */
.jaartotalen-tabel td.jt-sigma {
    background: #f0fdfa;
    color: #115e59;
    font-weight: 700;
    border-left: 2px solid #115e59;
}

/* Concept-cellen (body): amber-tint zebra */
.jaartotalen-tabel tbody tr:nth-child(odd) td.jt-dienst-con {
    background: #fffdf7;
    color: #78350f;
}

.jaartotalen-tabel tbody tr:nth-child(even) td.jt-dienst-con {
    background: #fef9ee;
    color: #78350f;
}

/* Concept totaalkolom behoudt achtergrond bij zebra */
.jaartotalen-tabel tbody tr:nth-child(odd) td.jt-totaal-con,
.jaartotalen-tabel tbody tr:nth-child(even) td.jt-totaal-con {
    background: #fef3c7;
    color: #78350f;
}

/* Sigma-cel behoudt achtergrond bij zebra */
.jaartotalen-tabel tbody tr:nth-child(odd) td.jt-sigma,
.jaartotalen-tabel tbody tr:nth-child(even) td.jt-sigma {
    background: #f0fdfa;
    color: #115e59;
}

/* --- Zebra striping (body) --- */
.jaartotalen-tabel tbody tr:nth-child(odd) td {
    background: white;
}

.jaartotalen-tabel tbody tr:nth-child(even) td {
    background: #f5f5f4;
}

/* Totaalkolommen behouden hun achtergrond bij zebra (hogere specificiteit) */
.jaartotalen-tabel tbody tr:nth-child(odd) td.jt-totaal,
.jaartotalen-tabel tbody tr:nth-child(even) td.jt-totaal {
    background: #f0fdfa;
}

/* --- Row hover: overschrijft zebra en totaalkolom achtergrond --- */
.jaartotalen-tabel tbody tr:hover td {
    background: #ccfbf1;
}

/* --- Linkerrand eerste datakolom in body en footer (VA Aanvraag, kolom 2) --- */
.jaartotalen-tabel tbody td:nth-child(2),
.jt-totaal-row td:nth-child(2) {
    border-left: 2px solid #115e59;
}

/* --- Row hover: concept-cellen krijgen amber hover (hogere specificiteit) --- */
.jaartotalen-tabel tbody tr:hover td.jt-dienst-con {
    background: #fde68a;
}

/* --- Column hover vanuit footer (JS voegt .jt-col-hover toe aan body-cellen) --- */
/* Hogere specificiteit dan row-hover zodat het altijd werkt */
.jaartotalen-tabel tbody tr td.jt-col-hover {
    background: #ccfbf1;
}

/* Kolom-hover concept-cellen: amber hover */
.jaartotalen-tabel tbody tr td.jt-dienst-con.jt-col-hover {
    background: #fde68a;
}

/* Kolom-hover sigma-cel */
.jaartotalen-tabel tbody tr td.jt-sigma.jt-col-hover {
    background: #ccfbf1;
}

/* --- Nulwaarden: gedimd --- */
.jt-zero {
    color: #d4d4d4;
}

/* --- Footer totaalrij --- */
.jt-totaal-row {
    border-top: 2px solid #115e59;
}

.jt-totaal-row td {
    font-weight: 700;
    background: #f0fdfa;
    color: #115e59;
}

/* Footer concept-cellen: amber achtergrond */
.jt-totaal-row td.jt-footer-con {
    background: #fef3c7;
    color: #78350f;
}

/* Footer sigma-cel: teal */
.jt-totaal-row td.jt-sigma {
    background: #f0fdfa;
    color: #115e59;
}

.jt-download-row {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* ==========================================================================
   Mijn Totalen (persoonlijke pagina)
   ========================================================================== */

.mijn-totalen {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1rem 0 1.5rem;
}

.totalen-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #115e59;
    margin: 0 0 0.75rem;
}

.totalen-subtitle {
    font-weight: 400;
    color: #78716c;
    font-size: 0.8125rem;
}

.totalen-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.totalen-groep {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 4rem;
}

.totalen-label {
    font-size: 0.75rem;
    color: #78716c;
    white-space: nowrap;
}

.totalen-waarde {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1c1917;
}

.totalen-detail .totalen-waarde {
    font-size: 1rem;
    color: #78716c;
}

/* VA opgenomen subtitle */
.va-opgenomen-tm {
    font-size: 0.75rem;
    color: #78716c;
}

.va-saldo {
    color: #78716c;
    cursor: help;
}
