/* Intranet-specifieke opmaak, bovenop de gedeelde Greving-huisstijl. */

.admin-page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

/* Balk bovenaan op de testomgeving (INTRANET_STAGING=true in de .env) */
.staging-banner {
    background: repeating-linear-gradient(135deg, #E8590C, #E8590C 24px, #D9480F 24px, #D9480F 48px);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 15px;
}
.staging-banner a { color: #fff; text-decoration: underline; }
.staging-banner .fa-triangle-exclamation { margin-right: 6px; }

/* ---- Nieuwe vormgeving (ontwerp Carolien): kleurtokens ---- */
:root {
    --band: #C5D3E8;          /* lichtblauwe headerband */
    --accent-blue: #A6C0E4;   /* lichtblauwe icoonblokken */
    --accent-ice: #E9EFF8;    /* heel licht blauw (decoratie, velden) */
    --badge-pink: #E9998F;    /* roze tellerbadge */
    --serif: Georgia, 'Times New Roman', serif;
}

/* Header: lichtblauwe band met hangend navy logo-kaartje */
.site-header {
    background: var(--band);
    position: relative;
    z-index: 2;
}
.site-header-band {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 0 24px;
}
.site-header-side { flex: 1 1 0; min-width: 0; padding-top: 22px; }
.back-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 17px;
    text-decoration: none;
    transition: background 0.12s ease, color 0.12s ease;
}
.back-circle:hover { background: #fff; color: var(--brand-primary, #0E2050); }
.logo-card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--brand-primary, #0E2050);
    color: #fff;
    text-decoration: none;
    padding: 20px 44px 16px;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 10px 24px rgba(14, 32, 80, 0.25);
}
/* Het logobestand heeft navy letters; op het navy kaartje maken we ze wit. */
.logo-card-letters { width: 164px; height: 64px; object-fit: contain; filter: brightness(0) invert(1); }
.logo-card-since {
    margin-top: 3px;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #8FA3CC;
}
.site-header-user {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-size: 14px;
    color: var(--brand-primary, #0E2050);
}
.site-user-name { font-weight: 700; }
.site-user-branch { color: #4E6285; font-size: 13px; }
.btn-link {
    background: none;
    border: none;
    color: var(--brand-primary, #0E2050);
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 0;
    font-family: inherit;
}
/* Ruimte onder het logo-kaartje; navigatie loopt via de tegels en de terugpijl */
.site-header { padding-bottom: 34px; }
@media (max-width: 760px) {
    .site-header-band { flex-wrap: wrap; }
    .logo-card { order: -1; width: 100%; border-radius: 0; padding: 14px 20px 12px; }
    .site-header-side { padding-top: 12px; padding-bottom: 4px; }
}

/* Zachte lichtblauwe cirkels aan de rechterrand, zoals in het ontwerp */
.page-decor {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 340px at calc(100% + 120px) 38%, var(--accent-ice) 0 339px, transparent 340px),
        radial-gradient(circle 260px at calc(100% + 60px) 88%, #D3E0F1 0 259px, transparent 260px);
}
main.page { position: relative; z-index: 1; }

/* Login */
.login-wrap { display: flex; justify-content: center; padding: 64px 16px; }
.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(14, 32, 80, 0.12);
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    text-align: center;
}
.login-logo { max-width: 220px; margin-bottom: 12px; }
.login-card h1 { margin: 0 0 4px; color: var(--brand-primary, #0E2050); letter-spacing: 3px; text-transform: uppercase; font-size: 20px; }
.login-sub { color: #5A6278; margin: 0 0 24px; }
.login-card form { text-align: left; }
.field-label { display: block; font-weight: 600; margin: 14px 0 6px; color: #151D38; }
.checkbox-inline { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: #5A6278; white-space: nowrap; cursor: pointer; }
.checkbox-inline input { cursor: pointer; }
.btn-block { width: 100%; margin-top: 20px; }
.form-error {
    background: #FDECEC;
    color: #B3261E;
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 14px;
    font-size: 14px;
}

/* Paginatab: navy tab die aan de headerband hangt, met doorlopend lijntje */
.admin-page { padding-top: 0; overflow-x: clip; }
/* Pagina's die niet met de titeltab beginnen krijgen gewone ruimte bovenaan */
.admin-page > :first-child:not(.page-title):not(.page-head) { margin-top: 24px; }
h1.page-title {
    position: relative;
    display: inline-block;
    align-self: flex-start; /* main.page is een flex-kolom: niet uitrekken */
    width: fit-content;
    background: var(--brand-primary, #0E2050);
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 28px;
    padding: 15px 30px;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 6px 18px rgba(14, 32, 80, 0.18);
}
h1.page-title .fa-solid, h1.page-title .fa-regular { margin-right: 12px; }
h1.page-title .title-serif { font-family: var(--serif); font-weight: 700; }
/* Dun lijntje dat vanaf de tab naar rechts doorloopt (zoals in het ontwerp) */
h1.page-title::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 0;
    width: 100vw;
    height: 2px;
    background: rgba(14, 32, 80, 0.28);
}

/* Dashboard-tegels: wit kaartje met gekleurd icoonblok links en tellerbadge */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
.tile {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 116px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 6px 22px rgba(14, 32, 80, 0.10);
    padding: 0;
    text-decoration: none;
    color: #151D38;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
a.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(14, 32, 80, 0.16); }
/* Zachte kwartcirkel als decoratie in de kaart */
.tile::after {
    content: '';
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    background: var(--accent-ice);
    width: 130px;
    height: 130px;
    right: -40px;
    top: -60px;
}
.tile-block {
    position: relative;
    z-index: 1;
    align-self: stretch;
    flex: 0 0 94px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border-radius: 20px 26px 26px 20px;
    margin: 0;
}
.tile-navy .tile-block { background: var(--brand-primary, #0E2050); color: #fff; }
.tile-blue .tile-block { background: var(--accent-blue); color: var(--brand-primary, #0E2050); }
/* Variant: icoon in gevulde lichtblauwe cirkel (Bedrijven, Ons team) */
.tile-circle .tile-block {
    flex: 0 0 72px;
    height: 72px;
    align-self: center;
    margin-left: 24px;
    border-radius: 50%;
    background: var(--accent-blue);
    color: var(--brand-primary, #0E2050);
    font-size: 28px;
}
/* Variant: icoon in dunne cirkelrand (Vestigingen) */
.tile-ring .tile-block {
    flex: 0 0 72px;
    height: 72px;
    align-self: center;
    margin-left: 24px;
    border-radius: 50%;
    background: none;
    border: 2.5px solid var(--brand-primary, #0E2050);
    color: var(--brand-primary, #0E2050);
    font-size: 28px;
    box-sizing: border-box;
}
/* Variant: alleen het icoon, zonder blok (Bestellingen) */
.tile-bare .tile-block {
    flex: 0 0 72px;
    height: 72px;
    align-self: center;
    margin-left: 24px;
    background: none;
    color: var(--brand-primary, #0E2050);
    font-size: 42px;
}
/* Variant: groot getal in het blok (lenzen-hub) */
.tile-block-count { font-size: 38px; font-weight: 700; font-family: inherit; }
.tile-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; padding: 24px 20px 24px 0; }
.tile-title { font-weight: 700; color: var(--brand-primary, #0E2050); font-size: 17px; line-height: 1.3; }
.tile-sub { color: #6B7590; font-size: 13px; }
/* Roze tellerbadge in de hoek rechtsonder */
.tile-badge {
    position: absolute;
    z-index: 1;
    right: -14px;
    bottom: -14px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--badge-pink);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 12px 0;
    box-sizing: border-box;
}
.tile-soon { opacity: 0.55; }
.tile-soon small { font-weight: 400; color: #5A6278; }

/* Overzicht */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; }
.input-select { min-width: 180px; }
.empty-state { color: #5A6278; padding: 32px 0; }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 18px rgba(14, 32, 80, 0.08); margin-top: 16px; }
.data-table th { text-align: left; background: #E8ECF4; color: #0E2050; padding: 12px 14px; font-size: 14px; }
.data-table td { padding: 12px 14px; border-top: 1px solid #EEF1F7; font-size: 15px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-new { background: #E5F0FF; color: #0B4EB3; }
.badge-sent_to_supplier { background: #E6F6EA; color: #1B7B34; }
.badge-cancelled { background: #FDECEC; color: #B3261E; }

/* Knoppen */
.btn {
    display: inline-block;
    background: #E8ECF4;
    color: #0E2050;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: filter 0.12s ease;
}
.btn:hover { filter: brightness(0.95); }
.btn-primary { background: var(--brand-primary, #0E2050); color: #fff; }
.btn-primary:hover { filter: brightness(1.15); }
.btn-small { padding: 6px 14px; font-size: 14px; }
.btn-danger { background: #B3261E; color: #fff; }

/* Detail */
.back-link { display: inline-block; margin-bottom: 10px; color: #0B4EB3; text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.detail-card { background: #fff; border-radius: 14px; box-shadow: 0 4px 18px rgba(14, 32, 80, 0.08); padding: 22px; }
.detail-card h2 { margin: 0 0 14px; font-size: 17px; color: var(--brand-primary, #0E2050); }
.detail-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; }
.detail-list dt { color: #5A6278; font-size: 14px; }
.detail-list dd { margin: 0; font-size: 15px; }
.status-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.flash { border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-size: 15px; }
.flash-ok { background: #E6F6EA; color: #1B7B34; }
.flash-error { background: #FDECEC; color: #B3261E; }

/* Vestigingen */
.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.branch-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(14, 32, 80, 0.08); }
.branch-photo { width: 100%; height: 160px; object-fit: cover; display: block; }
.branch-body { padding: 16px 18px 18px; }
.branch-body h2 { margin: 0 0 6px; font-size: 18px; color: var(--brand-primary, #0E2050); }
.branch-address { color: #5A6278; font-size: 14px; margin: 0 0 10px; }
.branch-body a { color: #0B4EB3; text-decoration: none; }
.branch-body details { margin-top: 8px; }
.branch-body summary { cursor: pointer; color: #0E2050; font-weight: 600; font-size: 14px; }
.branch-opening { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: #151D38; }

/* Ideeënbus */
.ideas-layout { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; margin-top: 18px; }
@media (max-width: 800px) { .ideas-layout { grid-template-columns: 1fr; } }
.ideas-layout-single { grid-template-columns: minmax(280px, 520px); }
.idea-form h2 { margin-top: 0; }
/* Ontwerp Carolien: intro + grote serif-kop links, formulierkaart rechts */
.idea-hero {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(320px, 480px);
    gap: 56px;
    justify-content: center;
    align-items: start;
    margin-top: 34px;
}
@media (max-width: 800px) { .idea-hero { grid-template-columns: 1fr; gap: 28px; } }
.idea-intro { font-size: 14px; line-height: 1.55; color: #33405E; }
.idea-headline {
    font-family: var(--serif);
    font-weight: 700;
    color: var(--brand-primary, #0E2050);
    font-size: 44px;
    line-height: 1.08;
    margin: 18px 0;
}
.idea-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(14, 32, 80, 0.12);
    padding: 0 30px 26px;
}
.idea-card-head { display: flex; align-items: center; gap: 22px; margin-bottom: 6px; }
.idea-card-icon {
    flex: 0 0 80px;
    height: 88px;
    margin-top: -8px;
    border-radius: 16px;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(14, 32, 80, 0.14);
}
.idea-card-head h2 { font-family: var(--serif); color: var(--brand-primary, #0E2050); font-size: 24px; margin: 12px 0 0; }
.idea-card .input { background: var(--accent-ice); border-color: transparent; border-radius: 10px; }
.idea-card .input:focus { outline: 2px solid var(--brand-primary, #0E2050); }
.idea-submit { width: 100%; margin-top: 18px; padding: 14px; font-size: 16px; border-radius: 12px; }
.input-textarea { resize: vertical; min-height: 110px; }
.ideas-heading { margin: 0 0 4px; font-size: 17px; color: var(--brand-primary, #0E2050); }
.idea-card { margin-bottom: 12px; }
.idea-card h3 { margin: 0 0 8px; font-size: 16px; color: #151D38; }
.idea-body { margin: 0 0 10px; white-space: pre-line; }
.idea-meta { margin: 0; color: #5A6278; font-size: 13px; }

/* Interne bestellingen */
.page-intro { color: #5A6278; margin-top: -6px; }
.supply-table td { padding: 8px 14px; }
.qty-col { width: 110px; text-align: center; }
.qty-input { width: 90px; text-align: center; padding: 6px 8px; }
.product-code { color: #8A93AB; font-size: 12px; margin-left: 6px; }
.form-actions { margin-top: 18px; }
.reference-input { max-width: 320px; margin-bottom: 14px; }
.branch-select { max-width: 320px; margin-bottom: 14px; display: block; }
.matrix-scroll { overflow-x: auto; }
.matrix-table th, .matrix-table td { padding: 4px 6px; text-align: center; }
.matrix-table .sphere-col { text-align: right; white-space: nowrap; background: #E8ECF4; color: #0E2050; min-width: 74px; }
.matrix-input { width: 58px; padding: 4px 4px; }
.rx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 640px) { .rx-grid { grid-template-columns: 1fr; } }
.rx-grid fieldset { border: 1px solid #E1E6F0; border-radius: 10px; padding: 12px 16px 16px; }
.rx-grid legend { font-weight: 600; color: #0E2050; padding: 0 6px; }
.dagas4-form { max-width: 720px; }

/* Documentlijsten (personeel/bedrijven): kaartjes met lichtblauw icoonblok */
/* Zelfde raster als de dashboardtegels (.tile-grid), zodat de blokjes even breed zijn */
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 24px; }
.doc-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    background: #FFFFFF;
    border: none;
    border-radius: 16px;
    padding: 14px 22px 14px 0;
    min-height: 78px;
    text-decoration: none;
    color: #1B2334;
    box-shadow: 0 6px 20px rgba(14, 32, 80, 0.10);
    transition: transform .12s ease, box-shadow .12s ease;
}
.doc-item:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(14, 32, 80, 0.16); }
/* Icoonblok steekt iets boven en onder het kaartje uit, zoals in het ontwerp */
.doc-icon {
    flex: 0 0 84px;
    height: 92px;
    margin: -7px 0;
    border-radius: 16px;
    background: var(--accent-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(14, 32, 80, 0.14);
}
.doc-item strong { display: block; color: #0E2050; font-size: 16px; }
.doc-item small { color: #8A93AB; }

/* Inhoudspagina's (reglementen) */
.content-page { max-width: 800px; line-height: 1.65; }
.content-page h2 { color: #0E2050; margin: 22px 0 8px; font-size: 19px; }
.content-page h3 { color: #0E2050; margin: 16px 0 6px; font-size: 16px; }
.content-page ul, .content-page ol { padding-left: 22px; }
.content-page li { margin-bottom: 6px; }
.content-version { color: #8A93AB; font-size: 13px; margin-top: 24px; }

/* Smoelenboek */
.group-title { color: #0E2050; margin: 28px 0 12px; border-bottom: 2px solid #F39200; display: inline-block; padding-bottom: 4px; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.person-card { background: #FFFFFF; border: 1px solid #E1E6F0; border-radius: 10px; padding: 14px; text-align: center; }
.person-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; }
.person-photo-empty { display: flex; align-items: center; justify-content: center; font-size: 44px; background: #E8ECF4; margin-left: auto; margin-right: auto; }
.person-name { font-weight: 600; color: #0E2050; }
.person-role { color: #5A6278; font-size: 13px; margin-top: 2px; }
.person-since { color: #8A93AB; font-size: 12px; margin-top: 4px; }

.tile-disabled { opacity: .55; cursor: default; }
.tile-disabled small { display: block; font-size: 11px; color: #8A93AB; }

/* Fotoalbum */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.album-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 4px 18px rgba(14, 32, 80, 0.08); text-decoration: none; color: #151D38; transition: transform 0.12s ease; }
.album-card:hover { transform: translateY(-2px); }
.album-cover { width: 100%; height: 170px; object-fit: cover; display: block; }
.album-cover-empty { display: flex; align-items: center; justify-content: center; font-size: 44px; background: #E8ECF4; }
.album-info { padding: 12px 16px 14px; }
.album-title { font-weight: 600; color: #0E2050; }
.album-meta { color: #8A93AB; font-size: 13px; margin-top: 2px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.photo-item { display: block; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(14, 32, 80, 0.08); }
.photo-item img { width: 100%; height: 180px; object-fit: cover; display: block; }
.photo-item-admin { position: relative; }
.photo-delete { position: absolute; right: 8px; bottom: 8px; }
.field-spacing { margin-top: 14px; }
.album-description { resize: vertical; min-height: 90px; font-family: inherit; }

/* Beheer */
.nav-admin { border: 1px solid rgba(255, 255, 255, 0.35); }
.category-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.category-tab { padding: 8px 14px; border-radius: 999px; border: 1px solid #D3DAE8; background: #fff; color: #0E2050; text-decoration: none; font-size: 14px; }
.category-tab.active { background: var(--brand-primary, #0E2050); color: #fff; border-color: var(--brand-primary, #0E2050); }
.admin-table td { vertical-align: middle; }
.admin-table .input { padding: 7px 10px; font-size: 14px; }
.code-col { width: 100px; }
.sort-col { width: 100px; }
.sort-col .input { min-width: 64px; }

/* Artikelbeheer: artikelnaam krijgt de meeste ruimte, cijferkolommen smal.
   Op smalle schermen scrollt de tabel horizontaal in plaats van af te kappen. */
.products-scroll { overflow-x: auto; }
.products-table .name-col { width: 38%; min-width: 400px; }
.products-table .code-col { width: 84px; }
.products-table .sort-col { width: 88px; }
.products-table .sort-col .input { min-width: 64px; }
.products-table .stock-col { width: 76px; }
.products-table .active-col { width: 60px; }
.active-col { width: 70px; text-align: center; }
.actions-col { white-space: nowrap; text-align: right; }
.actions-col .btn { margin-left: 6px; }
.inline-form { display: inline; }

/* Accountbeheer: velden genoeg ruimte geven; op smalle schermen scrollt de tabel */
.accounts-scroll { overflow-x: auto; }
.accounts-table .input { min-width: 130px; }
.accounts-table td:first-child .input { min-width: 170px; }
.accounts-table td { white-space: nowrap; }
.admin-subtitle { color: #0E2050; margin: 28px 0 10px; }
.add-form { max-width: 860px; }
.add-form-grid { display: grid; grid-template-columns: 1fr 140px 140px; gap: 14px; }
@media (max-width: 640px) { .add-form-grid { grid-template-columns: 1fr; } }

/* Nieuw account (accountbeheer): ruime grid van drie gelijke kolommen. */
.account-form { max-width: 1020px; }
.account-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 20px; align-items: start; }
.account-form-grid .field-label { margin-top: 0; }
.account-form-grid > div { padding-bottom: 8px; }
.account-form .input { width: 100%; box-sizing: border-box; }
.account-form .btn { margin-top: 10px; }
.account-form-grid .checkbox-inline { margin-top: 12px; }
@media (max-width: 860px) { .account-form-grid { grid-template-columns: 1fr; } }
.person-form { max-width: 560px; }
.person-photo-preview { display: block; margin-bottom: 10px; }
.order-card .order-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.order-card h3 { margin: 0 0 4px; color: #0E2050; }
.order-lines { margin: 10px 0 0; padding-left: 20px; }
.order-lines li { margin-bottom: 4px; }
.order-card-muted { opacity: .75; }
.order-actions { display: flex; gap: 8px; align-items: center; }

/* Verwerking interne bestellingen (hoofdkantoor) */
.orders-section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; font-size: 18px; color: #0E2050; }
.orders-section-sub { font-weight: 400; font-size: 14px; color: #8A93AB; }
.status-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status-new { background: #FDEBD2; color: #B36A00; }
.status-packed { background: #D9E9FB; color: #1D5FA8; }
.status-completed { background: #DDF2E1; color: #1E7A38; }
.order-short-note { color: #B36A00; font-weight: 600; }
.orders-archive summary { cursor: pointer; color: #5A6278; margin-bottom: 12px; }
.status-lines { background: #fff; border: 1px solid #E1E6F0; border-radius: 12px; overflow: hidden; margin: 0 0 10px; max-width: 720px; }
.status-line { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #EEF1F6; font-size: 15px; }
.status-line:last-child { border-bottom: 0; }
.status-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; background: #C4CCDD; }
.status-line-item { flex: 1 1 auto; color: #33405E; }
.status-line-qty { flex: 0 0 auto; white-space: nowrap; color: #8A93AB; }
.status-line-full .status-dot, .status-dot-full { background: #2FA352; }
.status-line-partial .status-dot, .status-dot-partial { background: #F39200; }
.status-line-partial .status-line-qty { color: #B36A00; font-weight: 700; }
.status-line-none .status-dot, .status-dot-none { background: #D64545; }
.status-line-none .status-line-qty { color: #B02A2A; font-weight: 700; }
.status-legend { display: flex; align-items: center; gap: 8px; color: #8A93AB; font-size: 13px; margin: 0 0 24px; }
.status-legend .status-dot { width: 8px; height: 8px; }

/* Voorraad magazijn */
.stock-list { background: #fff; border: 1px solid #E1E6F0; border-radius: 12px; overflow: hidden; max-width: 720px; margin-bottom: 8px; }
.stock-row { padding: 14px 18px; border-bottom: 1px solid #EEF1F6; }
.stock-row:last-child { border-bottom: 0; }
.stock-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 8px; }
.stock-name { color: #33405E; font-size: 15px; }
.stock-amount { white-space: nowrap; font-size: 14px; color: #8A93AB; }
.stock-amount-low { color: #B36A00; font-weight: 700; }
.stock-amount-none { color: #B02A2A; font-weight: 700; }
.stock-bar { height: 8px; border-radius: 999px; background: #EEF1F6; overflow: hidden; }
.stock-bar-fill { height: 100%; border-radius: 999px; transition: width .2s ease; }
.stock-bar-ok { background: #2FA352; }
.stock-bar-low { background: #F39200; }
.stock-bar-none { background: #D64545; }

/* Voorraad in artikelbeheer en bestelformulier */
.stock-col { text-align: center; }
.stock-count { font-weight: 700; color: #0E2050; }
.stock-count.stock-low { color: #B36A00; }
.stock-count.stock-out { color: #B02A2A; }
.restock-inline { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.restock-box { min-width: 96px; text-align: center; font-size: 14px; font-weight: 700; color: #8A93AB; }
.stock-edit-toggle { margin-left: auto; background: none; border: 0; color: #1D5FA8; font-size: 14px; cursor: pointer; padding: 8px 0; text-decoration: underline; }
.stock-edit { display: flex; align-items: flex-end; gap: 12px; margin-top: 10px; padding: 12px; border-radius: 10px; background: #F2F5FA; }
.stock-edit[hidden] { display: none; }
.stock-edit-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #5A6482; }
.stock-edit-field .input { width: 110px; }
.stock-hint { color: #8A93AB; font-size: 13px; max-width: 720px; margin-top: 10px; }
.row-out-of-stock td { color: #A6ADC2; }
.out-of-stock-badge { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: #FDEDED; color: #B02A2A; font-size: 12px; font-weight: 700; }
.order-show-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }

/* Het hidden-attribuut moet altijd winnen van een display-regel. Op de
   iPad stond de stepper anders altijd open en leek "Aantal aanpassen"
   niets te doen. */
[hidden] { display: none !important; }

/* Pickrij (tablet, ook iPad in portretstand): grote tikvlakken, geen
   typwerk. touch-action: manipulation haalt de tikvertraging en de
   dubbeltik-zoom van Safari weg. */
.pick-row { background: #fff; border: 2px solid #E1E6F0; border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.pick-main { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 14px 16px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: rgba(14, 32, 80, 0.12); user-select: none; -webkit-user-select: none; }
.pick-main:active { background: rgba(14, 32, 80, 0.05); }
.pick-check { flex: 0 0 auto; width: 30px; height: 30px; border: 2px solid #C4CCDD; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.pick-item { flex: 1 1 auto; min-width: 0; font-size: 17px; line-height: 1.3; color: #1B2334; overflow-wrap: anywhere; }
.pick-qty { flex: 0 0 auto; min-width: 64px; text-align: right; font-size: 17px; font-weight: 700; color: #0E2050; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pick-full { border-color: #1E7A38; background: #F2FBF4; }
.pick-full .pick-check { background: #1E7A38; border-color: #1E7A38; }
.pick-full .pick-check::after { content: '\2713'; }
.pick-partial { border-color: #F39200; background: #FFF8EE; }
.pick-partial .pick-check { background: #F39200; border-color: #F39200; }
.pick-partial .pick-check::after { content: '\00BD'; }
.pick-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 0 16px 12px 60px; }
.pick-adjust-toggle { min-height: 44px; padding: 8px 14px; border: 1px solid #C4CCDD; border-radius: 10px; background: #fff; color: #1D5FA8; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(14, 32, 80, 0.12); }
.pick-adjust-toggle[aria-expanded="true"] { background: #E8ECF4; }
.pick-stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper-btn { width: 52px; height: 52px; border-radius: 10px; border: 2px solid #C4CCDD; background: #fff; font-size: 26px; font-weight: 700; color: #0E2050; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(14, 32, 80, 0.12); user-select: none; -webkit-user-select: none; }
.stepper-btn:active { background: #E8ECF4; }
.stepper-value { min-width: 40px; text-align: center; font-size: 22px; font-weight: 700; color: #0E2050; font-variant-numeric: tabular-nums; }
.btn-finish { margin-top: 18px; padding: 16px; font-size: 17px; min-height: 56px; touch-action: manipulation; }

/* Bestellingen op een smal scherm (iPad in portretstand, telefoon): koppen
   onder elkaar, knoppen op volle breedte, niets dat buiten de kaart valt. */
@media (max-width: 900px) {
    .order-show-head, .order-card .order-head { flex-direction: column; align-items: stretch; }
    .order-show-head .btn, .order-card .order-head > .btn { width: 100%; text-align: center; box-sizing: border-box; }
    .order-actions { flex-wrap: wrap; }
    .order-actions .btn, .order-actions form, .order-actions form .btn { width: 100%; box-sizing: border-box; text-align: center; }
    .pick-tools { padding-left: 16px; }
    .pick-main { gap: 12px; }
}

/* Print: alleen de bestelling zelf, geen knoppen/navigatie */
@media print {
    .site-header, .page-decor, .no-print, .flash { display: none !important; }
    body { background: #fff; }
    h1.page-title { background: none; color: #0E2050; box-shadow: none; padding: 0; }
    h1.page-title::after { content: none; }
    .pick-row { border: 1px solid #999; border-radius: 0; margin-bottom: 0; page-break-inside: avoid; }
    .pick-check { border: 1px solid #333; border-radius: 0; }
    .pick-full .pick-check, .pick-partial .pick-check { background: none; color: #000; }
}

/* ---- "Wat is er nieuw"-venster op het dashboard ---- */
.updates-link-regel { margin: -12px 0 8px; }
.updates-link { color: var(--brand-primary, #0E2050); font-weight: 600; text-decoration: none; }
.updates-link:hover { text-decoration: underline; }
.updates-chip { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 20px; background: var(--badge-pink, #E9998F); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }
.updates-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(14, 32, 80, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.updates-overlay[hidden] { display: none; }
.updates-box { background: #fff; border-radius: 20px; box-shadow: 0 16px 48px rgba(14, 32, 80, 0.25); width: 100%; max-width: 620px; max-height: 85vh; overflow-y: auto; padding: 22px 26px; margin: auto; }
.updates-kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.updates-kop h2 { margin: 0; font-size: 20px; color: var(--brand-primary, #0E2050); }
.updates-kop h2 .fa-solid { margin-right: 10px; color: var(--badge-pink, #E9998F); }
.updates-sluit { border: none; background: var(--accent-ice, #E9EFF8); color: var(--brand-primary, #0E2050); width: 34px; height: 34px; border-radius: 10px; font-size: 20px; cursor: pointer; }
.updates-sub { color: #5A6278; margin: 6px 0 14px; font-size: 14px; }
.updates-groep { margin-top: 18px; }
.updates-groep h3 { margin: 0 0 6px; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: #5A6278; }
.updates-groep h3 .fa-solid { margin-right: 8px; color: var(--accent-blue, #A6C0E4); }
.updates-groep ul { list-style: none; margin: 0; padding: 0; }
.updates-groep li { display: flex; align-items: baseline; gap: 14px; padding: 9px 14px; border-radius: 10px; font-size: 15px; line-height: 1.45; }
.updates-groep li + li { margin-top: 6px; }
.updates-groep li.is-nieuw { background: var(--accent-ice, #E9EFF8); }
.updates-groep li a { color: #151D38; text-decoration: none; flex: 1; }
.updates-groep li a:hover { text-decoration: underline; }
.updates-groep li > span:not(.updates-chip):not(.updates-datum) { flex: 1; }
.updates-groep li .updates-chip { margin-left: 0; margin-right: 2px; flex: 0 0 auto; }
.updates-datum { color: #8B90A3; font-size: 12px; white-space: nowrap; margin-left: 6px; }
.updates-voet { display: flex; justify-content: flex-end; margin-top: 18px; }
.updates-gezien { padding: 10px 18px; border-radius: 12px; border: none; background: var(--brand-primary, #0E2050); color: #fff; font-weight: 600; cursor: pointer; font-size: 15px; }
body.updates-open { overflow: hidden; }
@media (max-width: 480px) { .updates-box { padding: 16px; } }

/* ---- Documenten: mappen, kruimelpad en beheerlijsten ---- */
.doc-icon-map { background: var(--brand-primary, #0E2050); }
.kruimels { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: 14px; color: #5A6278; }
.kruimels a { color: #0B4EB3; text-decoration: none; }
.kruimels a:hover { text-decoration: underline; }
.kruimel-sep { color: #B5BCCC; }
.page-intro .kruimels { display: inline-flex; margin: 0 10px 0 0; }
.veld-hint { display: block; color: #8A93AB; font-size: 13px; margin-top: 6px; }
.beheer-kolommen { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 18px; }
.beheer-kolommen .detail-card h2 .fa-solid { margin-right: 8px; color: var(--accent-blue, #A6C0E4); }
.beheer-lijst { display: flex; flex-direction: column; gap: 10px; }
.beheer-rij { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 10px 14px; box-shadow: 0 2px 10px rgba(14, 32, 80, 0.08); }
.beheer-rij form { margin: 0; }
.beheer-icoon { flex: 0 0 38px; height: 38px; border-radius: 10px; background: var(--accent-ice, #E9EFF8); color: var(--brand-primary, #0E2050); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.beheer-icoon-map { background: var(--brand-primary, #0E2050); color: #fff; }
.beheer-titel { flex: 1 1 200px; font-weight: 600; color: #0E2050; text-decoration: none; }
.beheer-titel-form { display: flex; flex: 1 1 260px; gap: 8px; align-items: center; }
.input-inline { padding: 7px 10px; font-size: 14px; flex: 1; min-width: 0; }
.beheer-meta { color: #8A93AB; font-size: 13px; flex: 1 1 160px; }
@media (max-width: 700px) {
    .beheer-meta { flex-basis: 100%; }
}

/* ---- Community ---- */
.community-form { max-width: 760px; margin-top: 16px; }
.community-form form { margin: 0; }
.community-form-kop { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.community-form-kop > div { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.community-form-kop strong { color: #0E2050; }
.community-naam { width: 220px; max-width: 100%; }
.community-avatar { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%; background: var(--accent-blue, #A6C0E4); color: var(--brand-primary, #0E2050); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.community-form .input-textarea { min-height: 80px; }
.community-form-voet { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.community-bijlage-knop { cursor: pointer; color: #0B4EB3; font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: var(--accent-ice, #E9EFF8); }
.community-bijlage-knop input { display: none; }
.community-bijlage-tekst { flex: 1; color: #5A6278; font-size: 13px; }
.community-feed { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-top: 24px; }
.community-bericht { background: #fff; border-radius: 16px; padding: 16px 20px; box-shadow: 0 6px 20px rgba(14, 32, 80, 0.10); }
.community-bericht-kop { display: flex; align-items: center; gap: 12px; }
.community-afzender { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.community-afzender strong { color: #0E2050; }
.community-afzender time { color: #8A93AB; font-size: 13px; }
.community-bericht-kop form { margin: 0; }
.community-verwijder { border: none; background: transparent; color: #B5BCCC; cursor: pointer; font-size: 15px; padding: 6px 8px; border-radius: 8px; }
.community-verwijder:hover { background: #FDECEC; color: #B3261E; }
.community-tekst { margin: 12px 0 0; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.community-fotos { display: grid; gap: 8px; margin-top: 12px; }
.community-fotos-1 { grid-template-columns: 1fr; }
.community-fotos-2 { grid-template-columns: 1fr 1fr; }
.community-fotos-3 { grid-template-columns: repeat(3, 1fr); }
.community-fotos a { display: block; border-radius: 12px; overflow: hidden; background: var(--accent-ice, #E9EFF8); }
.community-fotos img { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; }
.community-fotos-2 img, .community-fotos-3 img { height: 200px; }
.community-bestanden { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.community-bestanden a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--accent-ice, #E9EFF8); color: #0E2050; text-decoration: none; font-size: 14px; overflow-wrap: anywhere; }
.community-bestanden a:hover { text-decoration: underline; }
.community-paginering { display: flex; align-items: center; gap: 14px; margin-top: 22px; max-width: 760px; }
.community-pagina { flex: 1; text-align: center; color: #5A6278; font-size: 14px; }
.community-paginering .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
