/*
 * AdminOnline — eigen stijl bovenop Bootstrap 5.
 * Alleen merkkleur en een paar details; de rest is Bootstrap.
 */

:root {
    --ao-brand: #177a5f;        /* groen uit de pixelXp-factuur */
    --ao-brand-dark: #10513f;
    /* Links in merkkleur (Bootstrap 5.3 gebruikt de -rgb-varianten) */
    --bs-link-color: #177a5f;
    --bs-link-color-rgb: 23, 122, 95;
    --bs-link-hover-color: #10513f;
    --bs-link-hover-color-rgb: 16, 81, 63;
}

/* Merkkleur voor primaire knoppen */
.btn-primary {
    --bs-btn-bg: var(--ao-brand);
    --bs-btn-border-color: var(--ao-brand);
    --bs-btn-hover-bg: var(--ao-brand-dark);
    --bs-btn-hover-border-color: var(--ao-brand-dark);
    --bs-btn-active-bg: var(--ao-brand-dark);
    --bs-btn-active-border-color: var(--ao-brand-dark);
    --bs-btn-disabled-bg: var(--ao-brand);
    --bs-btn-disabled-border-color: var(--ao-brand);
}

.ao-logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--ao-brand-dark);
}

/* Setup-stappen */
.ao-steps .ao-step {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .875rem;
}

/* Herstelcodes en commando's: goed leesbaar en makkelijk te kopiëren */
.ao-codes {
    font-family: var(--bs-font-monospace);
    font-size: 1rem;
    letter-spacing: .05em;
}

.ao-log {
    max-height: 18rem;
    overflow: auto;
    font-size: .8rem;
    white-space: pre-wrap;
}

/* QR-code in setup */
.ao-qr {
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
}

/* ---------------------------------------------------------------- fase 1 */

/* Merkkleur ook voor links-als-knop en outline-primary */
.btn-outline-primary {
    --bs-btn-color: var(--ao-brand);
    --bs-btn-border-color: var(--ao-brand);
    --bs-btn-hover-bg: var(--ao-brand);
    --bs-btn-hover-border-color: var(--ao-brand);
    --bs-btn-active-bg: var(--ao-brand-dark);
    --bs-btn-active-border-color: var(--ao-brand-dark);
}
.pagination {
    --bs-pagination-active-bg: var(--ao-brand);
    --bs-pagination-active-border-color: var(--ao-brand);
    --bs-pagination-color: var(--ao-brand-dark);
}
.form-check-input:checked {
    background-color: var(--ao-brand);
    border-color: var(--ao-brand);
}
.nav-pills {
    --bs-nav-pills-link-active-bg: var(--ao-brand);
    --bs-nav-link-color: var(--ao-brand-dark);
    --bs-nav-link-hover-color: var(--ao-brand);
}

/* Opslaan-balk blijft zichtbaar onder de navigatie bij lange formulieren */
.ao-savebar {
    position: sticky;
    top: var(--ao-sticky-top); /* 0.20.0: geen menubalk meer boven de pagina vanaf 992 px */
    z-index: 1010;
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    margin: -1.5rem calc(-.5 * var(--bs-gutter-x)) 1.5rem;
    padding: .75rem calc(.5 * var(--bs-gutter-x));
}
@media (max-width: 575.98px) {
    .ao-savebar .breadcrumb { display: none; }
}

/* Bulkactiebalk onderaan een lijst met selectievakjes (Te factureren) */
.ao-bulkbar {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    background-color: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
    margin: 1rem calc(-.5 * var(--bs-gutter-x)) -1.5rem;
    padding: .75rem calc(.5 * var(--bs-gutter-x));
}

/* Klikbare tabelrijen */
tr[data-href] { cursor: pointer; }

/* Tekst met regeleinden (notities) */
.ao-preline { white-space: pre-line; }

/* Flex-kinderen mogen smaller worden dan hun inhoud (text-truncate) */
.min-w-0 { min-width: 0; }

/* Briefpapier-voorbeeld in instellingen (A4-verhouding) */
.ao-letterhead-preview {
    display: block;
    width: 120px;
    height: 170px;
    object-fit: contain;
}

/* Huidige stap in de setup-wizard in merkgroen */
.ao-steps .ao-step-current {
    background-color: var(--ao-brand);
    color: #fff;
}

/* Tabelrij die een bewerkvenster opent */
tr[data-modal-fill] { cursor: pointer; }

/* Absoluut gepositioneerde elementen (bijv. .visually-hidden in knoppen) binnen de scrollcontainer houden,
   anders veroorzaken ze op mobiel horizontaal scrollen van de hele pagina. */
.table-responsive { position: relative; }

/* Actiebalk onderaan lange selectielijsten (import) */
.ao-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    background-color: var(--bs-tertiary-bg);
    border-top: 1px solid var(--bs-border-color);
    padding: .75rem 0;
}

/* ---------------------------------------------------------------- fase 2: facturen */

/* Factuurregels in het bewerkscherm: elke regel een blok met scheidingslijn */
.ao-line { padding: 1rem 0; }
.ao-line + .ao-line { border-top: 1px solid var(--bs-border-color); }

/* PDF-voorbeeld op de factuurpagina (alleen op grote schermen) */
.ao-pdf-frame {
    width: 100%;
    height: 72rem;
    max-height: 85vh;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background: #fff;
}

/* Mailopmaak (0.5.1) */
.ao-code {
    tab-size: 2;
    white-space: pre;
    overflow-x: auto;
    line-height: 1.45;
}
/* Editor op het verstuurscherm (Quill 2, snow-thema) in Bootstrap-stijl */
.ao-editor .ql-toolbar.ql-snow {
    border-color: var(--bs-border-color);
    border-top-left-radius: var(--bs-border-radius);
    border-top-right-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg);
}
.ao-editor .ql-toolbar.ql-snow button {
    width: 36px;
    height: 32px;
}
.ao-editor .ql-container.ql-snow {
    border-color: var(--bs-border-color);
    border-bottom-left-radius: var(--bs-border-radius);
    border-bottom-right-radius: var(--bs-border-radius);
    font-family: var(--bs-body-font-family);
    font-size: 1rem;
    background: var(--bs-body-bg);
}
.ao-editor .ql-editor {
    min-height: 18rem;
    line-height: 1.5;
}
.ao-editor .ql-editor p,
.ao-editor .ql-editor ol {
    margin-bottom: .75rem;
}
.ao-editor:focus-within .ql-container.ql-snow {
    border-color: #8bbdaf;
    box-shadow: 0 0 0 .25rem rgba(23, 122, 95, .25);
}
.ao-editor.is-invalid .ql-container.ql-snow,
.ao-editor.is-invalid .ql-toolbar.ql-snow {
    border-color: var(--bs-form-invalid-border-color);
}
.ao-editor .ql-snow .ql-tooltip {
    z-index: 5;
}
.ao-editor .ql-snow .ql-tooltip[data-mode=link]::before { content: "Link:"; }
.ao-editor .ql-snow .ql-tooltip::before { content: "Ga naar:"; }
.ao-editor .ql-snow .ql-tooltip a.ql-action::after { content: "Wijzigen"; }
.ao-editor .ql-snow .ql-tooltip a.ql-remove::before { content: "Verwijderen"; }
.ao-editor .ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "Opslaan"; }

.ao-mail-preview {
    display: block;
    height: 42rem;
    background: #f2f4f3;
}

/* Bank › Te verwerken (0.12.0): "Overslaan…" als knop zonder driehoekje */
details.ao-skip > summary { list-style: none; }
details.ao-skip > summary::-webkit-details-marker { display: none; }

/* ── Toasts (0.13.2, partials/flash.php) ─────────────────────────────────────────────────────────
   Bevestigingen zweven boven de pagina (position: fixed, boven de sticky menubalk) en verschuiven niets.
   Positie/afstand/tijd uit Beheer › Instellingen › Weergave via de modifier-klasse en de custom properties
   --ao-toast-offset en --ao-toast-delay op de container. Het ringetje om het kruisje loopt in
   --ao-toast-delay vol; app.js sluit de toast op animationend. Aanwijzen of focus pauzeert de animatie. */
.ao-toasts {
    position: fixed;
    width: min(24rem, calc(100% - 2rem));
}
.ao-toasts--top-start, .ao-toasts--top-center, .ao-toasts--top-end { top: var(--ao-toast-offset, 50px); }
.ao-toasts--bottom-start, .ao-toasts--bottom-center, .ao-toasts--bottom-end { bottom: var(--ao-toast-offset, 50px); }
.ao-toasts--top-start, .ao-toasts--bottom-start { left: 1rem; }
.ao-toasts--top-end, .ao-toasts--bottom-end { right: 1rem; }
.ao-toasts--top-center, .ao-toasts--bottom-center { left: 50%; transform: translateX(-50%); }

.ao-toast {
    --bs-toast-spacing: .5rem;
    --bs-toast-bg: var(--bs-body-bg);
    --bs-toast-font-size: .9375rem;
    width: 100%;
    pointer-events: auto;
    border: 0;
    border-left: 4px solid var(--bs-success);
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .18);
}
.ao-toast .toast-body { padding-right: .25rem; }
.ao-toast .toast-body .bi { line-height: 1.5; }

/* Kruisje met aftelring; 44×44 px aanraakvlak */
.ao-toast-close {
    position: relative;
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    margin-right: .25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--bs-secondary-color);
    font-size: .8rem;
}
.ao-toast-close:hover { color: var(--bs-body-color); }
.ao-toast-close:focus-visible { outline: 2px solid var(--bs-success); outline-offset: -2px; }
.ao-toast-ring {
    position: absolute;
    inset: .375rem;
    width: calc(100% - .75rem);
    height: calc(100% - .75rem);
    transform: rotate(-90deg); /* start op 12 uur, loopt met de klok mee */
}
.ao-toast-ring circle { fill: none; stroke-width: 2.5; }
.ao-toast-ring-track { stroke: var(--bs-border-color); }
.ao-toast-ring-fill {
    stroke: var(--bs-success);
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: ao-toast-countdown var(--ao-toast-delay, 5s) linear forwards;
}
.ao-toast:hover .ao-toast-ring-fill,
.ao-toast:focus-within .ao-toast-ring-fill { animation-play-state: paused; }
@keyframes ao-toast-countdown { to { stroke-dashoffset: 0; } }

/* Instellingen › Weergave: positiekiezer als schematisch scherm (menubalk + 3×2 posities) */
.ao-posgrid {
    max-width: 26rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-tertiary-bg);
}
.ao-posgrid-bar { height: .75rem; background: var(--ao-brand-dark); }
.ao-posgrid-cells {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 4.5rem);
    gap: .25rem;
    padding: .25rem;
}
.ao-posgrid-cell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: .375rem;
    padding: .375rem;
    border: 2px solid transparent;
    border-radius: var(--bs-border-radius-sm);
    font-size: .75rem;
    line-height: 1.2;
    color: var(--bs-secondary-color);
    cursor: pointer;
    user-select: none;
}
.ao-posgrid-cell--bottom-start, .ao-posgrid-cell--bottom-center, .ao-posgrid-cell--bottom-end { flex-direction: column-reverse; }
.ao-posgrid-cell--top-start, .ao-posgrid-cell--bottom-start { align-items: flex-start; text-align: left; }
.ao-posgrid-cell--top-end, .ao-posgrid-cell--bottom-end { align-items: flex-end; text-align: right; }
.ao-posgrid-toast {
    width: 60%;
    height: .625rem;
    border: 1px dashed var(--bs-secondary-color);
    border-radius: 2px;
}
.ao-posgrid-cell:hover { background: var(--bs-body-bg); }
.btn-check:checked + .ao-posgrid-cell {
    border-color: var(--ao-brand);
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-weight: 600;
}
.btn-check:checked + .ao-posgrid-cell .ao-posgrid-toast { border: 1px solid var(--ao-brand); background: var(--ao-brand); }
.btn-check:focus-visible + .ao-posgrid-cell { box-shadow: 0 0 0 .25rem rgba(23, 122, 95, .25); }

/* ------------------------------------------------------------------ zoeksuggesties (0.14.0) */
.ao-suggest-wrap { position: relative; }
.ao-suggest-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: min(60vh, 26rem);
    overflow-y: auto;
    min-width: 14rem;
}
.ao-suggest-menu .list-group-item { min-height: 44px; }          /* aanraakvlak */
.ao-suggest-menu > * { flex-shrink: 0; }                           /* 0.20.0: lange lijst = scrollen, niet samendrukken */
/* 0.20.2: het menu is zelf het paneel (achtergrond, rand, schaduw); de regels hebben geen eigen buitenrand. Anders valt een
   vaste schuifbalk (Safari met muis, Windows) buiten de regels en lijkt de schaduw ±15 px naar rechts verschoven. */
.ao-suggest-menu { background-color: var(--bs-body-bg); border: var(--bs-border-width) solid var(--bs-border-color); border-radius: var(--bs-border-radius); box-shadow: var(--ao-shadow-float) !important; }
.ao-suggest-menu > .list-group-item { border-width: 0 0 var(--bs-border-width); border-radius: 0; }
.ao-suggest-menu > .list-group-item:last-child { border-bottom-width: 0; }
.ao-suggest-menu .ao-suggest-item, .ao-results .list-group-item-action { color: var(--bs-body-color); }
.ao-suggest-menu .ao-suggest-item.active { background-color: var(--ao-brand); border-color: var(--ao-brand); }
.ao-suggest-menu .ao-suggest-item.active .text-body-secondary { color: rgba(255, 255, 255, .8) !important; }

/* ------------------------------------------------------------------ hulp (0.14.0) */
.ao-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    margin: -0.25rem 0;
    border: 0;
    background: none;
    color: var(--bs-secondary-color);
    vertical-align: middle;
    border-radius: 50%;
    position: relative;
}
.ao-help::after { content: ""; position: absolute; inset: -10px; }   /* 44×44 aanraakvlak zonder de regel op te rekken */
.ao-help:hover, .ao-help:focus-visible, .ao-help[aria-expanded="true"] { color: var(--ao-brand); }
.ao-help-popover { max-width: min(22rem, calc(100vw - 2rem)); }
.ao-help-popover .popover-body p:last-of-type { margin-bottom: .5rem; }
.ao-help-pop .ao-help-more { display: inline-block; font-weight: 500; }
.ao-help-panel { --bs-offcanvas-width: min(32rem, 100vw); }
.ao-help-body h2, .ao-help-body h3 { scroll-margin-top: 5rem; }
.ao-help-body h2 { font-size: 1.2rem; margin-top: 1.75rem; }
.ao-help-body h3 { font-size: 1.05rem; margin-top: 1.5rem; }
.ao-help-body h4 { font-size: 1rem; margin-top: 1.25rem; }
.ao-help-body > :first-child { margin-top: 0; }
.ao-help-tip {
    display: flex;
    gap: .6rem;
    padding: .6rem .8rem;
    margin: 0 0 1rem;
    border-left: 3px solid var(--ao-brand);
    background: var(--bs-tertiary-bg);
    border-radius: .25rem;
}
.ao-help-target { animation: ao-help-flash 2s ease-out 1; }
@keyframes ao-help-flash { from { background-color: rgba(23, 122, 95, .18); } to { background-color: transparent; } }

/* ------------------------------------------------------------------ portaal: werken als klant (0.14.0) */
.ao-acting-bar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #ffc107;
    color: #212529;
    border-bottom: 1px solid rgba(0, 0, 0, .15);
}
/* "Niet afbreken" in de mail-editor (0.14.5): zichtbaar gemarkeerd, in de mail harde spaties */
.ao-editor .ql-editor .ao-nowrap {
    white-space: nowrap;
    background: rgba(23, 122, 95, .12);
    border-bottom: 1px dotted rgba(23, 122, 95, .6);
}
.ao-editor .ql-toolbar button.ql-nowrap .bi {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
}
/* Klikbare tegels op de portaal-home (0.14.5): huiskleur links, reageert op aanwijzen en focus */
.ao-tile {
    border-left: 4px solid var(--ao-brand);
    transition: box-shadow .15s ease, transform .15s ease;
}
.ao-tile:hover,
.ao-tile:focus-within {
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12) !important;
    transform: translateY(-1px);
}
.ao-tile .stretched-link:focus-visible {
    outline: none;
}
.ao-tile:focus-within {
    outline: 2px solid var(--ao-brand);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .ao-tile { transition: none; }
    .ao-tile:hover, .ao-tile:focus-within { transform: none; }
}
/* Keuzekaarten met een radioknop (strippenkaart bestellen, 0.14.5): hele kaart klikbaar, keuze zichtbaar */
.ao-choice {
    cursor: pointer;
    min-height: 44px;
}
.ao-choice:hover {
    border-color: var(--ao-brand);
}
.ao-choice:has(input:checked) {
    border-color: var(--ao-brand);
    box-shadow: 0 0 0 1px var(--ao-brand);
    background: rgba(23, 122, 95, .05);
}

/* Mailopmaak › opmaak van één regel (0.15.0): geen extra ruimte onder de laatste lijst/alinea in het voorbeeld */
.ao-line-preview > :last-child { margin-bottom: 0; }

/* Uitgaven-inbox (0.15.3): sleepvak en documentweergave */
.ao-dropzone { border: 2px dashed var(--bs-border-color); transition: border-color .15s, background-color .15s; }
.ao-dropzone.is-dragover { border-color: var(--bs-primary); background-color: var(--bs-primary-bg-subtle); }
/* Authenticator-code bij update en terugzetten (0.18.0): zes cijfers, niet over de volle breedte */
.ao-code-input { width: 9rem; letter-spacing: .15em; }
.ao-doc-frame { --bs-aspect-ratio: 141.4%; }
.ao-doc-frame iframe { border: 0; }
/* Document naast het verwerkformulier (0.17.3): zonder .ratio kreeg het iframe de standaardmaat van de browser (300 × 150).
   Het iframe vult nu het hele vak; onder xl (vak boven het formulier, in te klappen) een vaste hoogte. */
.ao-doc-frame--side { height: 80vh; min-height: 420px; }
.ao-doc-frame--side iframe { display: block; width: 100%; height: 100%; }
@media (min-width: 992px) { .ao-doc-frame { --bs-aspect-ratio: 0; height: calc(100vh - 170px); min-height: 520px; } }
/* Uitgaven-inbox verwerken (0.16.0): document naast het formulier, twijfel = oranje */
.ao-doubt { border-color: var(--bs-warning) !important; box-shadow: 0 0 0 .15rem rgba(var(--bs-warning-rgb), .25); }
.ao-doubt-msg { margin-top: .15rem; }
@media (min-width: 1200px) {
    .ao-inbox-doc { position: sticky; top: 1rem; }
    .ao-doc-frame--side { height: calc(100vh - 6rem) !important; min-height: 520px; }
    .ao-doc-image { max-height: calc(100vh - 6rem); object-fit: contain; width: 100%; }
}

/* ================================================================== 0.19.0 — vormentaal (FASE17 §4.1)
   Eén betekenis per middel. Tokens hieronder; componenten gebruiken alleen deze tokens.
   - Status: stil (normale afloop) · aandacht (iemand moet iets doen) · achterstand (gaat mis) · neutraal (label/categorie).
   - Schaduw alleen voor wat zweeft (opslaan-balk, bulkbalk, dropdowns, suggesties, toasts, modals); panelen zijn plat.
   - Cijfers in tabellen tabulair, zodat bedragen op de komma uitlijnen. */
:root {
    --ao-quiet: #5f6f69;
    --ao-foot-ink: #697077;     /* voetregel (0.20.6): bewust lichter dan --ao-quiet, het minst belangrijke op het scherm; 4,76:1 op #f8f9fa, de enige achtergrond van de voet */
    --ao-attn: #8a5300;
    --ao-attn-bg: #fff4e0;
    --ao-attn-line: #efb45a;
    --ao-bad: #b42318;
    --ao-bad-ink: #ffffff;
    --ao-neutral-line: var(--bs-border-color);
    --ao-shadow-float: 0 4px 16px rgba(16, 40, 32, .12);
    --ao-shadow-overlay: 0 18px 50px rgba(16, 40, 32, .28);
    --ao-flash: rgba(23, 122, 95, .14);
}

/* Panelen liggen op de pagina: rand, geen schaduw */
.card { --bs-card-box-shadow: none; box-shadow: none; }

/* Status als badge. De bestaande text-bg-*-klassen dragen in AdminOnline al vaste betekenissen
   (success = in orde, warning = aandacht, danger = achterstand, de rest = label); hier krijgen ze de vorm die
   daarbij hoort. Buiten .badge (knoppen, vlakken) verandert niets. Nieuwe code gebruikt status_class(). */
.badge.text-bg-success, .badge.ao-st--quiet {
    color: var(--ao-quiet) !important;
    background-color: transparent !important;
    font-weight: 500;
    padding-left: 0;
    padding-right: 0;
}
.badge.text-bg-success::before, .badge.ao-st--quiet::before {
    content: "";
    display: inline-block;
    width: .45em;
    height: .45em;
    margin-right: .4em;
    border-radius: 50%;
    background: currentColor;
    opacity: .55;
    vertical-align: .1em;
}
.badge.text-bg-warning, .badge.ao-st--attn {
    color: var(--ao-attn) !important;
    background-color: var(--ao-attn-bg) !important;
    box-shadow: inset 0 0 0 1px var(--ao-attn-line);
    font-weight: 600;
}
.badge.text-bg-danger, .badge.ao-st--bad {
    color: var(--ao-bad-ink) !important;
    background-color: var(--ao-bad) !important;
}
.badge.text-bg-info, .badge.text-bg-dark, .badge.text-bg-secondary, .badge.text-bg-primary, .badge.text-bg-light, .badge.ao-st--neutral, .badge.ao-label {
    color: var(--bs-secondary-color) !important;
    background-color: transparent !important;
    box-shadow: inset 0 0 0 1px var(--ao-neutral-line);
    font-weight: 500;
}
.badge.text-bg-light.border, .badge.text-bg-secondary.border { border: 0 !important; }
/* Statusbadges in een knop (tellers): compact, zonder stip */
.btn .badge.text-bg-warning { box-shadow: none; }

/* Eén maat voor de paginatitel (er waren 15 varianten): titel krimpt niet meer tussen bekijken en bewerken */
main h1:not(.ao-title-free), .ao-savebar h1 {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.25;
}
.table { font-variant-numeric: tabular-nums; }
.ao-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Zwevende lagen */
.ao-savebar, .ao-bulkbar, .ao-actionbar { box-shadow: var(--ao-shadow-float); }
.dropdown-menu { box-shadow: var(--ao-shadow-float); }
.ao-confirm .modal-content { box-shadow: var(--ao-shadow-overlay); border: 0; }

/* Terug waar je was (AJAX laag 1) en vervangen blokken (laag 2): even oplichten */
.ao-flash-target { animation: ao-flash 1.6s ease-out 1; }
@keyframes ao-flash { from { background-color: var(--ao-flash); } to { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .ao-flash-target { animation: none; } }

/* Klikbare tegels: reageren met een rand, niet met een schaduw */
.ao-tile { transition: border-color .15s ease; }
.ao-tile:hover, .ao-tile:focus-within { box-shadow: none !important; transform: none; border-color: var(--ao-brand) !important; }

/* Meldingen op schermen met een document (instelling ui.toast_doc_position): over de formulierkolom */
.ao-toasts.ao-toasts--doc-bottom-start { top: auto; bottom: 1rem; left: 1rem; right: auto; transform: none; }
.ao-toasts.ao-toasts--doc-bottom-end { top: auto; bottom: 1rem; right: 1rem; left: auto; transform: none; }
.ao-toasts.ao-toasts--doc-top-end { bottom: auto; top: calc(var(--ao-sticky-top) + 1rem); right: 1rem; left: auto; transform: none; }

/* Bank › Te verwerken (0.19.0, FASE17 §4.1 punt 21) */
.ao-bk-amount { font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.ao-bk-text mark { padding: 0 .15em; background: #fff1b8; border-radius: 2px; }
.ao-bk-target { line-height: 1.45; }
.ao-bk-diff { margin-left: .35rem; font-size: .8125rem; font-weight: 600; color: var(--ao-attn); white-space: nowrap; }
.ao-bk-reason { font-size: .8125rem; color: var(--bs-secondary-color); border: 1px solid var(--bs-border-color); border-radius: .25rem; padding: 0 .4rem; }
.ao-bk-reason:not(.is-ok) { border: 0; padding: 0; }
.ao-bk-reason.is-ok { color: #1f7a4d; border-color: #b9dccb; background: #eef8f2; }
.ao-bk-row--done { background: var(--bs-tertiary-bg); }
/* Op een aanraakscherm de linkknoppen in een ingeklapte regel groot genoeg om te raken (0.20.5, review) */
@media (pointer: coarse) {
    .ao-bk-done-actions .btn-link { min-height: 2.75rem; display: inline-flex; align-items: center; }
}
.ao-bank-panel { --bs-offcanvas-width: min(960px, 100vw); }
.ao-bank-panel iframe { display: block; width: 100%; height: 100%; border: 0; }
.ao-suggest-item.active .text-success, .ao-suggest-item.active .text-warning-emphasis { color: #fff !important; }
/* In een paneel (layout/embed): geen menubalk, dus de opslaan-balk plakt bovenaan */
.ao-embed .ao-savebar { top: 0; margin-top: -1rem; }

/* Inbox verwerken (0.19.0, FASE17 W1/W2) */
.ao-doubt-summary { font-size: .875rem; color: var(--ao-attn); background: var(--ao-attn-bg); border: 1px solid var(--ao-attn-line); border-radius: var(--bs-border-radius); padding: .4rem .65rem; }
.ao-doubt-summary a { color: inherit; font-weight: 600; }
.ao-saved-note { color: #1f7a4d; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; animation: ao-saved-fade 6s ease-in forwards; }
@keyframes ao-saved-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ao-saved-note { animation: none; } }

/* Lijsten (0.19.0, FASE17 §4.1 punt 7): één regel per item, sorteren via de kolomkop, mobiel als lijst */
.ao-list > :not(caption) > * > * { padding-top: .45rem; padding-bottom: .45rem; }
.ao-list thead th { white-space: nowrap; }
.ao-list-main { max-width: 1px; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ao-list-main .ao-list-name { font-weight: 500; }
.ao-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.ao-sort:hover, .ao-sort:focus-visible { color: var(--ao-brand); text-decoration: underline; }
.ao-sort.is-active { color: var(--bs-body-color); }
.ao-mrow { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 44px; }
.ao-mrow-main { display: flex; flex-direction: column; min-width: 0; }
.ao-mrow-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ao-mrow-side { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex-shrink: 0; }

/* Mail bekijken (0.19.0): de mail houdt zijn eigen witte achtergrond, ook in donkere modus */
.ao-mail-frame { display: block; width: 100%; height: calc(100vh - 260px); min-height: 420px; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: #fff; }

/* Dashboard "Vandaag" (0.19.0): per onderwerp een kopregel met één knop, daaronder eventueel de regels */
.ao-today { padding: .75rem 1rem; }
.ao-today + .ao-today, .card-body + .ao-today { border-top: 1px solid var(--bs-border-color-translucent); }
.ao-today-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: .5rem; row-gap: .25rem; min-height: 31px; }
.ao-today-head > .bi { color: var(--bs-secondary-color); }
.ao-today-title { font-weight: 600; }
.ao-today-sub { margin-top: .25rem; padding-left: 1.5rem; }
.ao-today .list-group { margin-top: .25rem; }
.ao-today-row { display: flex; align-items: center; gap: .5rem; padding-left: 1.5rem; padding-right: 0; }
.ao-today .ao-today-row { background: transparent; }
.card > .list-group .ao-today-row { padding-left: 1rem; padding-right: 1rem; }
.ao-today-nr { min-width: 4.5rem; font-weight: 600; white-space: nowrap; }
.ao-fig { display: flex; justify-content: space-between; gap: .75rem; }
.ao-w-10 { max-width: 10rem; }

/* ================================================================== 0.20.0 — zijbalk, documentindeling, zoeken (FASE17 §4.3/§10)
   Lagen: zijbalk = vaste zone (eigen functie, eigen kleur, geen schaduw); zwevende panelen in de smalle stand,
   zoeksuggesties en het account-menu = zwevend (schaduw). Breedtes en kleuren alleen via de tokens hieronder. */
:root {
    --ao-side-w: 232px;
    --ao-side-bg: var(--ao-brand-dark);
    --ao-side-ink: rgba(255, 255, 255, .8);
    --ao-side-ink-muted: rgba(255, 255, 255, .55);
    --ao-side-hover: rgba(255, 255, 255, .08);
    --ao-side-active: rgba(255, 255, 255, .16);
    --ao-side-line: rgba(255, 255, 255, .12);
    --ao-sticky-top: 56px;                 /* hoogte van wat bovenaan plakt (onder 992 px de smalle balk) */
    --ao-count-bg: #ffc107;                /* teller = aandacht, gevuld */
    --ao-count-ink: #212529;
}
@media (min-width: 992px) {
    :root { --ao-sticky-top: 0px; }
    .ao-side-narrow { --ao-side-w: 64px; }
}

/* Inhoud: één container (1320 px) met 24 px zijruimte vanaf 992 px; documentschermen gebruiken de volle breedte */
.ao-container { --bs-gutter-x: 1.5rem; width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: calc(var(--bs-gutter-x) * .5); }
@media (min-width: 992px) { .ao-container { --bs-gutter-x: 3rem; max-width: calc(1320px + 3rem); } }
.ao-doc .ao-container { max-width: none; }
.ao-main { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.ao-main:focus { outline: 0; }
.ao-skip:focus { position: fixed !important; top: .5rem; left: .5rem; z-index: 1100; background: var(--bs-body-bg); padding: .5rem .75rem; border-radius: var(--bs-border-radius); }

/* Smalle balk bovenaan, alleen onder 992 px */
.ao-topbar { position: sticky; top: 0; z-index: 1030; height: 56px; display: flex; align-items: center; gap: .25rem; padding: 0 .25rem; background: var(--ao-side-bg); }
.ao-topbar-btn { width: 44px; height: 44px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--bs-border-radius); background: transparent; color: var(--ao-side-ink); font-size: 1.25rem; }
.ao-topbar-btn:hover { color: #fff; background: var(--ao-side-hover); }
.ao-topbar-btn:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ao-brand { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; color: #fff; font-weight: 600; font-size: 1.125rem; text-decoration: none; white-space: nowrap; }
.ao-brand:hover { color: #fff; }
.ao-brand .bi { font-size: 1.25rem; }
.ao-brand:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: var(--bs-border-radius-sm); }
.ao-mode { font-size: .75rem; }

/* Zijbalk */
.ao-side { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--ao-side-bg); }
.ao-side-inner { display: flex; flex-direction: column; width: 100%; height: 100%; background: var(--ao-side-bg); color: var(--ao-side-ink); }
.ao-side-head { display: flex; align-items: center; gap: .5rem; padding: .375rem .5rem .375rem 1.25rem; min-height: 52px; }
.ao-side-head .ao-brand { font-size: 1.0625rem; }
.ao-side-nav { flex: 1 1 auto; overflow-y: auto; padding: .25rem .5rem .75rem; }
.ao-side-foot { padding: .5rem; border-top: 1px solid var(--ao-side-line); }
@media (min-width: 992px) {
    .ao-side { position: fixed; top: 0; bottom: 0; left: 0; z-index: 1030; width: var(--ao-side-w); }
    .ao-page { margin-left: var(--ao-side-w); }
}
/* Voetregel onderaan het venster op korte pagina's, na de inhoud op lange (0.20.6) */
/* min-height zonder de smalle balk bovenaan (onder 992 px, staat buiten .ao-page), anders net te hoog en scrolt het (review) */
.ao-page { display: flex; flex-direction: column; min-height: calc(100vh - var(--ao-sticky-top)); min-height: calc(100dvh - var(--ao-sticky-top)); }
.ao-page > .ao-main { flex: 1 0 auto; width: 100%; }
.ao-foot { font-size: .75rem; color: var(--ao-foot-ink); }
.ao-foot .btn-link, .ao-foot a { padding: 0; border: 0; font-size: inherit; color: var(--ao-foot-ink); text-decoration: none; }
.ao-foot .btn-link:hover, .ao-foot a:hover, .ao-foot .btn-link:focus-visible, .ao-foot a:focus-visible { color: var(--bs-body-color); }
@media print { .ao-page { display: block; min-height: 0; } }  /* geen lege tweede pagina met alleen de voet (review) */
.ao-foot kbd { padding: 0 .3em; border: 1px solid var(--bs-border-color); background: transparent; color: inherit; font-size: .9em; }
.ao-nav { list-style: none; margin: 0; padding: 0; }
.ao-nav-link {
    position: relative; display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 40px; padding: .45rem .75rem;
    border: 0; border-radius: var(--bs-border-radius); background: transparent; color: var(--ao-side-ink);
    font-size: .9375rem; line-height: 1.25; text-align: left; text-decoration: none; white-space: nowrap;
}
@media (max-width: 991.98px) { .ao-nav-link { min-height: 44px; } }
@media (min-width: 992px) { .ao-nav-link { min-height: 36px; padding-top: .35rem; padding-bottom: .35rem; } }
.ao-foot-row { display: flex; align-items: center; gap: .25rem; }
.ao-foot-account { flex: 1 1 auto; min-width: 0; }
.ao-foot-btn { flex: 0 0 auto; width: 40px; justify-content: center; padding-inline: 0; }
.ao-nav-link > .bi { flex-shrink: 0; width: 1.25rem; font-size: 1.125rem; text-align: center; }
.ao-nav-link:hover, .ao-nav-link[aria-expanded="true"] { background: var(--ao-side-hover); color: #fff; }
.ao-nav-link.active { background: var(--ao-side-active); color: #fff; font-weight: 600; }
.ao-nav-link:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ao-nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ao-nav-head { padding: .75rem .75rem .2rem; color: var(--ao-side-ink-muted); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ao-nav-groupbtn { display: none; }
.ao-nav-dot { position: absolute; top: 3px; right: 3px; min-width: 1.1rem; padding: 0 .3rem; border-radius: 1rem; background: var(--ao-count-bg); color: var(--ao-count-ink); font-size: .625rem; font-weight: 700; line-height: 1.1rem; text-align: center; }
/* Tellers en de modusmarkering houden hun gevulde vorm (de badge-remap van 0.19.0 is voor statussen op de pagina) */
.ao-side .badge.text-bg-warning, .ao-topbar .badge.text-bg-warning { color: var(--ao-count-ink) !important; background-color: var(--ao-count-bg) !important; box-shadow: none; }
.ao-side .badge.text-bg-danger, .ao-topbar .badge.text-bg-danger { color: #fff !important; background-color: var(--ao-bad) !important; }
.ao-side .badge::before, .ao-topbar .badge::before { content: none !important; }
.ao-nav-count { flex-shrink: 0; font-size: .75rem; }

/* Zoekveld bovenaan de zijbalk */
.ao-side-search { position: relative; padding: 0 .5rem .5rem; }
.ao-search-btn { display: none; }
.ao-search-field { position: relative; }
.ao-search-field .form-control { padding-left: 2rem; padding-right: 2rem; min-height: 36px; font-size: .875rem; background-color: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .15); color: #fff; }
.ao-search-field .form-control::placeholder { color: var(--ao-side-ink-muted); }
.ao-search-field .form-control:focus { background-color: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15); }
.ao-search-icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--ao-side-ink-muted); font-size: .8125rem; pointer-events: none; }
.ao-search-kbd { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); padding: .05rem .35rem; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: var(--ao-side-ink-muted); font-size: .6875rem; pointer-events: none; }
.ao-search-field .form-control:focus ~ .ao-search-kbd, .ao-search-field .form-control:not(:placeholder-shown) ~ .ao-search-kbd { display: none; }
@media (max-width: 991.98px) { .ao-search-field .form-control { font-size: 16px; min-height: 44px; } .ao-search-kbd { display: none; } }
/* Suggesties: licht en breder dan de zijbalk, over de pagina heen */
.ao-side-search .ao-suggest-menu { right: auto; width: min(28rem, calc(100vw - 1rem)); }
.ao-suggest-menu .ao-suggest-group { min-height: 0; }
.ao-suggest-group { padding: .5rem .75rem .2rem; color: var(--bs-secondary-color); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.ao-suggest-group + .ao-suggest-item { border-top-width: 0; }

/* Smalle stand (64 px), alleen vanaf 992 px. Namen worden zwevende labels, groepen zwevende panelen. */
@media (min-width: 992px) {
    .ao-side-narrow .ao-side-head { flex-direction: column; justify-content: center; padding: .5rem 0; gap: .25rem; }
    .ao-side-narrow .ao-side-head .ao-mode { font-size: .625rem; padding: .25em .4em; }
    .ao-side-narrow .ao-side-head .ao-mode .bi { display: none; }
    .ao-side-narrow .ao-side-nav { overflow: visible; }
    .ao-side-narrow .ao-nav-link { justify-content: center; padding: .45rem; }
    .ao-side-narrow .ao-nav-single > .ao-nav-link > .ao-nav-label,
    .ao-side-narrow .ao-brand > .ao-nav-label,
    .ao-side-narrow .ao-search-btn > .ao-nav-label {
        position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); z-index: 2;
        padding: .3rem .55rem; border-radius: var(--bs-border-radius-sm); background: var(--ao-side-bg); color: #fff;
        box-shadow: var(--ao-shadow-float); font-size: .8125rem; font-weight: 500; overflow: visible; pointer-events: none;
        opacity: 0; visibility: hidden; transition: opacity .12s ease, visibility 0s linear .12s;
    }
    .ao-side-narrow .ao-brand { position: relative; justify-content: center; width: 44px; }
    .ao-side-narrow .ao-nav-single > .ao-nav-link:hover > .ao-nav-label,
    .ao-side-narrow .ao-nav-single > .ao-nav-link:focus-visible > .ao-nav-label,
    .ao-side-narrow .ao-brand:hover > .ao-nav-label,
    .ao-side-narrow .ao-brand:focus-visible > .ao-nav-label,
    .ao-side-narrow .ao-search-btn:hover > .ao-nav-label,
    .ao-side-narrow .ao-search-btn:focus-visible > .ao-nav-label { opacity: 1; visibility: visible; transition-delay: 0s; }
    .ao-side-narrow .ao-nav-single > .ao-nav-link[aria-expanded="true"] > .ao-nav-label { opacity: 0; visibility: hidden; }
    .ao-side-narrow .ao-nav-single .ao-nav-count { position: absolute; top: 2px; right: 2px; font-size: .625rem; padding: .2em .4em; }
    .ao-side-narrow .ao-nav-groupbtn { display: flex; }
    .ao-side-narrow .ao-nav-group { position: relative; }
    .ao-side-narrow .ao-nav-panel {
        position: absolute; left: calc(100% + 8px); top: -.25rem; z-index: 3; min-width: 14rem; padding: .25rem .5rem .5rem;
        border-radius: var(--bs-border-radius); background: var(--ao-side-bg); box-shadow: var(--ao-shadow-float);
        opacity: 0; visibility: hidden; transition: opacity .12s ease, visibility 0s linear .15s;
    }
    .ao-side-narrow .ao-nav-panel::before { content: ""; position: absolute; top: 0; bottom: 0; left: -16px; width: 16px; } /* brug: de muis valt niet in het gat */
    .ao-side-narrow .ao-nav-group:hover > .ao-nav-panel,
    .ao-side-narrow .ao-nav-group:focus-within > .ao-nav-panel,
    .ao-side-narrow .ao-nav-group.is-open > .ao-nav-panel { opacity: 1; visibility: visible; transition-delay: 0s; }
    .ao-side-narrow .ao-nav-group.is-closed > .ao-nav-panel { opacity: 0; visibility: hidden; }
    .ao-side-narrow .ao-nav-panel .ao-nav-head { padding-top: .5rem; }
    .ao-side-narrow .ao-nav-panel .ao-nav-link { justify-content: flex-start; padding: .45rem .75rem; }
    .ao-side-narrow .ao-side-search { padding: 0 .5rem .25rem; }
    .ao-side-narrow .ao-search-btn { display: flex; }
    .ao-side-narrow .ao-search-field { display: none; }
    .ao-side-narrow.ao-search-open .ao-search-field { display: block; position: absolute; left: calc(100% - .25rem); top: 0; z-index: 4; width: 22rem; padding: .5rem; border-radius: var(--bs-border-radius); background: var(--ao-side-bg); box-shadow: var(--ao-shadow-float); }
    .ao-side-narrow.ao-search-open .ao-search-icon { left: 1.2rem; }
    .ao-side-narrow.ao-search-open .ao-search-kbd { right: 1rem; }
    .ao-side-narrow .ao-side-search .ao-suggest-menu { left: .5rem; }
    .ao-side-narrow .ao-foot-row { flex-direction: column; }
    .ao-side-narrow .ao-foot-account, .ao-side-narrow .ao-foot-btn { width: 100%; }
    .ao-side-narrow .ao-foot-account > .ao-nav-link > .ao-nav-label { display: none; }
}
@media (min-width: 992px) and (prefers-reduced-motion: reduce) {
    .ao-side-narrow .ao-nav-panel, .ao-side-narrow .ao-nav-label { transition: none !important; }
}

/* Documentindeling (FASE17 §10 punt 9): formulier links met vaste breedte, sleepbare scheiding, document rechts tot onderaan */
.ao-split { --ao-split-w: 440px; }
.ao-split-handle { display: none; }
@media (min-width: 992px) {
    .ao-split:not(.ao-split--xl) { display: grid; grid-template-columns: min(var(--ao-split-w), calc(100% - 376px)) 16px minmax(0, 1fr); align-items: start; }
    .ao-split:not(.ao-split--xl) > .ao-split-handle { display: block; }
}
@media (min-width: 1200px) {
    .ao-split--xl { display: grid; grid-template-columns: min(var(--ao-split-w), calc(100% - 376px)) 16px minmax(0, 1fr); align-items: start; }
    .ao-split--xl > .ao-split-handle { display: block; }
}
.ao-split-form { min-width: 0; }
.ao-split-handle { position: relative; align-self: stretch; cursor: col-resize; touch-action: none; outline: 0; }
.ao-split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); background: transparent; transition: background-color .15s ease; }
.ao-split-grip { position: sticky; top: calc(var(--ao-sticky-top) + 45vh); display: block; width: 6px; height: 40px; margin: 0 auto; border-radius: 3px; background: var(--bs-border-color); transition: background-color .15s ease; }
.ao-split-handle:hover::before, .ao-split-handle.is-dragging::before, .ao-split-handle:focus-visible::before { background: var(--ao-brand); }
.ao-split-handle:hover .ao-split-grip, .ao-split-handle.is-dragging .ao-split-grip, .ao-split-handle:focus-visible .ao-split-grip { background: var(--ao-brand); }
.ao-split-handle:focus-visible .ao-split-grip { outline: 2px solid var(--ao-brand); outline-offset: 2px; }
body.ao-is-splitting { cursor: col-resize; user-select: none; }
body.ao-is-splitting iframe { pointer-events: none; } /* anders slikt het document de muis tijdens het slepen */
.ao-split-doc { min-width: 0; }
@media (min-width: 992px) {
    .ao-split:not(.ao-split--xl) > .ao-split-doc { position: sticky; top: calc(var(--ao-sticky-top) + 1rem); height: calc(100vh - var(--ao-sticky-top) - 2rem); display: flex; flex-direction: column; }
}
@media (min-width: 1200px) {
    .ao-split--xl > .ao-split-doc { position: sticky; top: calc(var(--ao-sticky-top) + 1rem); height: calc(100vh - var(--ao-sticky-top) - 2rem); display: flex; flex-direction: column; }
    .ao-split--xl > .ao-split-doc .collapse { display: flex !important; flex-direction: column; flex: 1 1 auto; min-height: 0; }
}
/* Het documentvak vult de rest van de kolom, wat erin staat (iframe, afbeelding) vult het vak */
@media (min-width: 992px) {
    .ao-split:not(.ao-split--xl) .ao-doc-fill { flex: 1 1 auto; min-height: 0; height: auto !important; max-height: none !important; }
}
@media (min-width: 1200px) {
    .ao-split--xl .ao-doc-fill { flex: 1 1 auto; min-height: 0; height: auto !important; max-height: none !important; }
}
.ao-doc-fill { display: block; overflow: hidden; }
.ao-doc-fill--pdf { aspect-ratio: 1 / 1.414; max-height: 85vh; }
@media (min-width: 992px) { .ao-split:not(.ao-split--xl) .ao-doc-fill--pdf { aspect-ratio: auto; } }
@media (min-width: 1200px) { .ao-split--xl .ao-doc-fill--pdf { aspect-ratio: auto; } }
.ao-doc-fill .ao-pdf-frame { max-height: none; border: 0; border-radius: 0; }
.ao-doc-fill > iframe, .ao-doc-fill > img { display: block; position: static; width: 100%; height: 100%; border: 0; }
.ao-doc-fill > img { object-fit: contain; }
@media (max-width: 1199.98px) {
    .ao-split--xl { display: flex; flex-direction: column; }
    .ao-split--xl > .ao-split-doc { order: -1; margin-bottom: 1rem; }
}
@media (min-width: 1200px) {
    .ao-split--xl .ao-inbox-doc { position: static; display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
    .ao-split--xl .ao-doc-image { max-height: none; }
}
/* Onder 992 px staat het document boven de gegevens (zoals vóór 0.20.0 op het inbox-item) */
@media (max-width: 991.98px) {
    .ao-split:not(.ao-split--xl) { display: flex; flex-direction: column; }
    .ao-split:not(.ao-split--xl) > .ao-split-doc { order: -1; margin-bottom: 1rem; }
}
/* Vaste indeling zonder sleepstreep (klantenportaal) */
@media (min-width: 992px) {
    .ao-split.ao-split--fixed { grid-template-columns: min(var(--ao-split-w), calc(100% - 376px)) minmax(0, 1fr); column-gap: 1.5rem; }
}
/* Meldingen links of in het midden: naast de zijbalk, niet eroverheen */
@media (min-width: 992px) {
    .ao-app .ao-toasts--top-start, .ao-app .ao-toasts--bottom-start, .ao-app .ao-toasts.ao-toasts--doc-bottom-start { left: calc(var(--ao-side-w) + 1rem); }
    .ao-app .ao-toasts--top-center, .ao-app .ao-toasts--bottom-center { left: calc(50% + var(--ao-side-w) / 2); }
}
/* Werken als klant: de gele balk plakt bovenaan, het document plakt eronder */
@media (min-width: 992px) { .ao-portal.ao-acting { --ao-sticky-top: 3rem; } }
.ao-split .ao-savebar { margin-left: calc(var(--bs-gutter-x, 1.5rem) * -.5); margin-right: 0; }

/* Mail bekijken: geen formulier, het bericht krijgt de rest van het venster */
@media (min-width: 992px) { .ao-mail-frame { height: calc(100vh - var(--ao-sticky-top) - 13rem); } }

/* Paginakop (partials/page_head): kruimelpad, titel + onderregel links, acties rechts, tabbladen eronder */
.ao-head { margin-bottom: 1rem; }
.ao-head-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; column-gap: 1rem; row-gap: .5rem; }
.ao-head h1 { margin-bottom: 0; }
.ao-head-sub { margin-top: .2rem; color: var(--bs-secondary-color); font-size: .875rem; }
.ao-head-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.ao-head .nav-tabs { margin-top: 1rem; }

/* Sneltoetsen */
.ao-keys { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; align-items: baseline; }
.ao-keys dt { font-weight: 400; white-space: nowrap; }
.ao-keys dd { margin: 0; }
kbd { font-size: .8em; }

/* Zoekresultaten (/zoeken) */
.ao-results + .ao-results { margin-top: 1.5rem; }
.ao-results h2 { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--bs-secondary-color); margin-bottom: .5rem; }
.ao-results .list-group-item { min-height: 44px; }

/* Klantenportaal als visitekaartje (0.20.0, FASE17 §3.7/§10 punt 13): lichte kop met het logo van de onderneming,
   betalen bovenaan, geen Bootstrap-blauw. */
.ao-portal-nav { background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); --bs-navbar-active-color: var(--ao-brand-dark); --bs-navbar-hover-color: var(--ao-brand); }
.ao-portal-nav .nav-link { position: relative; }
@media (min-width: 768px) {
    .ao-portal-nav .nav-link.active::after { content: ""; position: absolute; left: .5rem; right: .5rem; bottom: -.5rem; height: 2px; background: var(--ao-brand); border-radius: 1px; }
}
.ao-portal-nav .nav-link.active { font-weight: 600; }
.ao-portal-brand { display: inline-flex; align-items: center; min-height: 44px; color: var(--bs-body-color); font-weight: 600; font-size: 1.125rem; text-decoration: none; }
.ao-portal-brand:hover { color: var(--bs-body-color); }
.ao-portal-brand img { display: block; height: auto; max-width: 100%; }
.ao-portal-brand--lg { font-size: 1.5rem; }
.ao-pay-amount { font-size: 1.5rem; font-weight: 600; line-height: 1.2; margin: .15rem 0 .25rem; font-variant-numeric: tabular-nums; }
.ao-pay-qr img { display: block; margin: 0 auto .25rem; background: #fff; padding: .25rem; border-radius: var(--bs-border-radius-sm); }
.ao-totals { max-width: 22rem; margin-left: auto; }
/* Tegels zonder gekleurde streep (P4): de rand reageert bij aanwijzen, dat is genoeg om klikbaar te lezen */
.ao-portal .ao-tile { border-left: var(--bs-border-width) solid var(--bs-border-color); }
.ao-totals .ao-fig + .ao-fig { margin-top: .25rem; }

/* Focus en uitklapvakken in de huiskleur (beheer en portaal); waren Bootstrap-blauw (P5) */
:root { --ao-focus-line: #8bbdaf; --ao-focus-ring: rgba(23, 122, 95, .25); }
.form-control:focus, .form-select:focus { border-color: var(--ao-focus-line); box-shadow: 0 0 0 .25rem var(--ao-focus-ring); }
.form-check-input:focus { border-color: var(--ao-focus-line); box-shadow: 0 0 0 .25rem var(--ao-focus-ring); }
.btn:focus-visible { box-shadow: 0 0 0 .25rem var(--ao-focus-ring); }
.accordion { --bs-accordion-active-color: var(--ao-brand-dark); --bs-accordion-active-bg: rgba(23, 122, 95, .07); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--ao-focus-ring); --bs-accordion-btn-focus-border-color: var(--ao-focus-line); }
.accordion-button:not(.collapsed)::after { filter: hue-rotate(-60deg) saturate(.6); }
.ao-side .ao-search-field .form-control:focus { border-color: rgba(255, 255, 255, .5); box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15); }

/* Documentvak zonder document (0.20.1): rustig, op de plek waar anders de PDF staat */
.ao-doc-empty { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; border: 1px dashed var(--bs-border-color); border-radius: var(--bs-border-radius); color: var(--bs-secondary-color); text-align: center; }
.ao-doc-empty > .bi { font-size: 2rem; margin-bottom: .5rem; }

.ao-portal-single { max-width: 52rem; }

/* ======================================================================================================
   Vormentaal (0.21.0, docs/FASE22_ONTWERP.md): één vorm per betekenis, rustiger typografie.
   ====================================================================================================== */
/* R6 typografie: basis 15 px, titel 22 px, tabel 14 px, kolom- en paneelkoppen 12 px grijs */
:root { --bs-body-font-size: .9375rem; --ao-meta-size: .8125rem; --ao-label-size: .75rem; }
.ao-main .btn:not(.btn-sm):not(.btn-lg) { --bs-btn-font-size: .9375rem; --bs-btn-padding-y: .4375rem; } /* zelfde hoogte als voorheen (38 px) */
.ao-main .form-control:not(.form-control-sm):not(.form-control-lg), .ao-main .form-select:not(.form-select-sm):not(.form-select-lg), .ao-main .input-group-text { font-size: .9375rem; }
@media (max-width: 991.98px) {
    /* geen automatisch inzoomen op een iPhone: invoervelden op een telefoon minstens 16 px */
    .ao-main .form-control, .ao-main .form-select, .ao-main .input-group-text { font-size: 16px !important; }
}
main h1:not(.ao-title-free), .ao-savebar h1 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.01em; }
.form-text, .ao-main .small, .ao-main small, .ao-head-sub, .ao-countline { font-size: var(--ao-meta-size); }
.h6.text-uppercase { font-size: var(--ao-label-size); font-weight: 600; letter-spacing: .06em; }
.ao-main .table { font-size: .875rem; }
.ao-main .table > thead > tr > th { font-size: var(--ao-label-size); font-weight: 600; color: var(--bs-secondary-color); --bs-table-bg: transparent; border-bottom-color: var(--bs-border-color); }
.ao-main .table > thead > tr > th .ao-sort { color: inherit; }
.ao-main .table > thead > tr > th .ao-sort.is-active { color: var(--bs-body-color); }
.ao-main .badge { font-size: var(--ao-label-size); font-weight: 500; }
.ao-countline { color: var(--bs-secondary-color); margin-bottom: .5rem; }
.ao-countline strong { color: var(--bs-body-color); font-weight: 600; }

/* R1 tabbladen: overal nav-tabs, zonder iconen; past het niet, dan horizontaal scrollen in plaats van een tweede rij */
.ao-head .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.ao-head .nav-tabs .nav-link { white-space: nowrap; }
.nav-tabs.ao-fade-end { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
.nav-tabs.ao-fade-start { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem); mask-image: linear-gradient(to right, transparent, #000 2.5rem); }
.nav-tabs.ao-fade-start.ao-fade-end { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); }
.nav-tabs .nav-link { color: var(--bs-secondary-color); }
.nav-tabs .nav-link:hover { color: var(--bs-body-color); }
.nav-tabs .nav-link.active { color: var(--bs-body-color); font-weight: 500; }

/* R1 filterchips: één lijst smaller maken; telling in de chip, één actief */
.ao-chips { display: flex; flex-wrap: wrap; gap: .375rem; }
.ao-chip {
    display: inline-flex; align-items: center; gap: .375rem; min-height: 2rem; padding: .2rem .7rem;
    border: 1px solid var(--bs-border-color); border-radius: 50rem; background: var(--bs-body-bg);
    color: var(--bs-body-color); font-size: var(--ao-meta-size); line-height: 1.2; text-decoration: none; cursor: pointer;
}
.ao-chip:hover { border-color: var(--bs-secondary-color); }
.ao-chip:focus-visible { outline: 2px solid var(--ao-brand); outline-offset: 2px; }
.ao-chip[aria-pressed="true"], .ao-chip.is-active { background: var(--bs-body-color); border-color: var(--bs-body-color); color: #fff; }
.ao-chip-count { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.ao-chip[aria-pressed="true"] .ao-chip-count, .ao-chip.is-active .ao-chip-count { color: rgba(255, 255, 255, .75); }
@media (pointer: coarse) { .ao-chip { min-height: 2.75rem; } }
.ao-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.ao-filterbar .ao-filter-search { flex: 1 1 18rem; min-width: 12rem; }
.ao-filterbar .form-select { width: auto; max-width: 16rem; }

/* R3 klikbare regel: achtergrond bij aanwijzen en een chevron aan het eind; niet-klikbare regels geen van beide */
.ao-main .table > tbody > tr[data-href] { cursor: pointer; }
.ao-main .table > tbody > tr[data-href]:hover > * { --bs-table-bg-state: var(--bs-tertiary-bg); }
.ao-main .table > tbody > tr[data-href] > td:last-child { position: relative; padding-right: 2rem; }
.ao-main .table > tbody > tr[data-href] > td:last-child::after {
    content: "\F285"; font-family: "bootstrap-icons"; position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    color: var(--bs-secondary-color); font-size: .75rem; line-height: 1; pointer-events: none;
}
.ao-main .table:has(> tbody > tr[data-href]) > thead > tr > th:last-child, .ao-main .table.ao-list > thead > tr > th:last-child { padding-right: 2rem; }
/* Lege laatste kolom voor de chevron als de echte laatste kolom op een smal scherm verdwijnt */
.ao-main .table .ao-chev-cell { width: 1%; padding-left: 0; }
.ao-mrow::after { content: "\F285"; font-family: "bootstrap-icons"; color: var(--bs-secondary-color); font-size: .75rem; flex-shrink: 0; margin-left: -.25rem; }

/* R4 kaarten: óf één bestemming (hele kaart klikbaar, rand + pijl), óf een groep links (kaart zelf doet niets) */
.ao-tile-link { position: relative; transition: border-color .15s ease; }
.ao-tile-link .ao-tile-arrow { position: absolute; top: 1rem; right: 1rem; color: var(--bs-secondary-color); transition: transform .15s ease, color .15s ease; }
.ao-tile-link:hover, .ao-tile-link:focus-within { border-color: var(--ao-brand); }
.ao-tile-link:hover .ao-tile-arrow, .ao-tile-link:focus-within .ao-tile-arrow { color: var(--ao-brand); transform: translateX(3px); }
.ao-tile-link .stretched-link:focus-visible { outline: none; }
.ao-tile-link:has(.stretched-link:focus-visible) { outline: 2px solid var(--ao-brand); outline-offset: 2px; }
.ao-tile-title { font-size: 1rem; font-weight: 600; margin-bottom: .25rem; padding-right: 1.5rem; }
.ao-tile-title a { color: var(--bs-body-color); text-decoration: none; }
.ao-tile-title .bi { color: var(--ao-brand); margin-right: .375rem; }
.ao-tile-group .ao-tile-title a:hover { color: var(--ao-brand); text-decoration: underline; }
.ao-tile-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: .5rem 0 0; padding: 0; list-style: none; font-size: var(--ao-meta-size); }
@media (prefers-reduced-motion: reduce) { .ao-tile-link, .ao-tile-link .ao-tile-arrow { transition: none; } .ao-tile-link:hover .ao-tile-arrow, .ao-tile-link:focus-within .ao-tile-arrow { transform: none; } }

/* Uitzondering in een formulier (0.21.1, FASE23 §2): ingeklapt; dicht toont de regel wat er is ingevuld */
.ao-more > summary { display: block; position: relative; padding: .25rem 0 .25rem 1rem; list-style: none; cursor: pointer; font-size: var(--ao-meta-size); }
.ao-more > summary::-webkit-details-marker { display: none; }
.ao-more > summary::before { content: "\F285"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .45rem; font-size: .625rem; line-height: 1; color: var(--bs-secondary-color); transition: transform .15s ease; }
.ao-more[open] > summary::before { transform: rotate(90deg); }
.ao-more-label { color: var(--bs-link-color); }
.ao-more > summary:hover .ao-more-label { text-decoration: underline; }
.ao-more-state { color: var(--bs-body-color); font-weight: 500; }
.ao-more-state::before { content: " · "; color: var(--bs-secondary-color); font-weight: 400; }
.ao-more-state:empty { display: none; }
.ao-more > summary:focus-visible { outline: 2px solid var(--ao-brand); outline-offset: 2px; border-radius: .25rem; }
.ao-more-body { padding: .25rem 0 .5rem 1rem; }
.ao-amount-narrow { max-width: 12rem; }
@media (pointer: coarse) { .ao-more > summary { min-height: 2.75rem; padding-top: .6rem; } .ao-more > summary::before { top: .8rem; } }
@media (prefers-reduced-motion: reduce) { .ao-more > summary::before { transition: none; } }

/* Klein uploadvlak naar de inbox (0.21.1, FASE23 §4): een knop met een stippellijn = je kunt er ook iets op laten vallen */
.ao-quickdrop-btn { border: 1px dashed var(--bs-secondary-color); color: var(--bs-body-color); background: var(--bs-body-bg); }
.ao-quickdrop-btn:hover, .ao-quickdrop-btn:focus-visible { border-color: var(--ao-brand); color: var(--ao-brand); background: var(--bs-body-bg); }
.ao-quickdrop.is-armed .ao-quickdrop-btn { border-color: var(--ao-brand); color: var(--ao-brand); background: rgba(23, 122, 95, .06); }
.ao-quickdrop.is-over .ao-quickdrop-btn { border-style: solid; background: rgba(23, 122, 95, .12); }
.ao-quickdrop.is-busy .ao-quickdrop-btn { cursor: progress; }
/* "op notadatum" is een tekstknop; op een aanraakscherm groot genoeg om te tikken (review 0.21.1) */
@media (pointer: coarse) { .ao-paid-quick { min-height: 2.75rem; display: inline-flex; align-items: center; } }
