/* Kantooromgeving – bouwt voort op /gedeeld/basis.css */
[hidden] { display: none !important; }
body { background: var(--page); }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 24px;
  padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--line);
}
.side-logo { width: 150px; height: auto; display: block; margin: 0 8px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 11px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700;
}
.nav a:hover { background: var(--page); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.count:not(:empty) { min-width: 1.5em; padding: 2px 7px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; text-align: center; }
.side-user { margin-top: auto; padding: 0 8px; color: var(--ink-soft); font-size: .92rem; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.content { padding: 32px 40px 80px; max-width: 1180px; width: 100%; }
.content h1 { margin: 0 0 6px; }
.kop { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kop .lead { margin: 0; }
.kop-acties { display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; z-index: 10; height: auto; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .side-logo { width: 72px; margin: 0; flex: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 9px 10px; white-space: nowrap; font-size: .92rem; }
  .side-user { display: none; }
  .content { padding: 20px 16px 64px; }
}

/* Knoppen */
.btn { margin: 0; }
.btn.small { padding: 9px 14px; font-size: .92rem; }
.btn.quiet { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.quiet:hover { border-color: var(--ink-soft); }
.btn.danger { background: var(--surface); color: var(--error); border-color: color-mix(in srgb, var(--error) 40%, var(--line)); }
.btn.primary { margin-left: 0; }

/* Tabs */
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin-bottom: 16px; }
.seg button { font: 700 .92rem/1 var(--body); background: none; border: 0; border-radius: 999px; padding: 9px 14px; color: var(--ink-soft); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* Tabellen en rijen */
.lijst { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; }
.rij { display: grid; grid-template-columns: 150px minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.rij:first-child { border-top: 0; }
.rij.klik { cursor: pointer; }
.rij.klik:hover { background: #FAFAFA; }
.rij .wanneer { font-weight: 700; }
.rij .sub { color: var(--ink-soft); font-size: .9rem; }
.rij .acties { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rij.klanten { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .8fr) 110px 110px; }
.lijst-kop { font-size: .82rem; color: var(--ink-soft); font-weight: 700; background: #FAFAFA; }
@media (max-width: 860px) {
  .rij, .rij.klanten { grid-template-columns: 1fr; gap: 4px; }
  .rij .acties { justify-content: flex-start; margin-top: 8px; }
  .lijst-kop { display: none; }
  .rij.klanten .hide-m { display: none; }
}
.klantlink { color: var(--ink); font-weight: 700; text-decoration: none; }
.klantlink:hover { text-decoration: underline; }
.empty { color: var(--ink-soft); padding: 18px; margin: 0; }

.chip-s { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #ECEBEB; color: var(--ink-soft); white-space: nowrap; }
.chip-s.aangevraagd { background: #FDF0E3; color: #8A4A07; }
.chip-s.bevestigd { background: #E5F2E8; color: #1F6B35; }
.chip-s.gefactureerd { background: var(--brand-soft); color: var(--brand-dark); }

/* Zoeken */
.zoek { position: relative; flex: 1; min-width: 240px; max-width: 460px; }
.zoek input { padding-left: 40px; }
.zoek::before { content: ""; position: absolute; left: 14px; top: 50%; width: 14px; height: 14px; margin-top: -9px; border: 2px solid var(--ink-soft); border-radius: 50%; }
.zoek::after { content: ""; position: absolute; left: 27px; top: 50%; width: 7px; height: 2px; margin-top: 5px; background: var(--ink-soft); transform: rotate(45deg); }

/* Klantkaart */
.kaart-kop { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.kaart-kop h1 { margin: 0 0 4px; }
.contactregel { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-soft); }
.contactregel a { color: var(--brand); font-weight: 700; text-decoration: none; }
.terug { display: inline-block; margin-bottom: 12px; color: var(--ink-soft); text-decoration: none; font-weight: 700; }
.terug:hover { color: var(--ink); }
.kolommen { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .kolommen { grid-template-columns: 1fr; } }
.blok { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 18px; margin-bottom: 20px; }
.blok h2 { margin: 0 0 12px; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.paard { border-top: 1px solid var(--line); padding: 14px 0; }
.paard:first-of-type { border-top: 0; padding-top: 0; }
.paard .naam { font-weight: 700; font-size: 1.05rem; }
.paard.inactief { opacity: .55; }
.paard .acties { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: .94rem; margin: 6px 0 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.notitie { border-top: 1px solid var(--line); padding: 12px 0; }
.notitie .meta { color: var(--ink-soft); font-size: .85rem; display: flex; justify-content: space-between; gap: 8px; }
.notitie p { margin: 4px 0 0; white-space: pre-wrap; }
.notitie-form textarea { min-height: 72px; }
.notitie-form .rij2 { display: flex; gap: 10px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.notitie-form select { width: auto; flex: 1; min-width: 140px; }
.historie .item { border-top: 1px solid var(--line); padding: 12px 0; }
.historie .item:first-child { border-top: 0; padding-top: 0; }
.historie .regel1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.historie details { margin-top: 6px; font-size: .92rem; }
.historie summary { cursor: pointer; color: var(--ink-soft); }

/* Facturen */
.factuur { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); padding: 16px 18px; margin-bottom: 14px; }
.factuur .kop2 { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.factuur .kop2 .wanneer { font-weight: 700; }
.regels { width: 100%; border-collapse: collapse; }
.regels td { padding: 6px 8px 6px 0; vertical-align: middle; }
.regels td.bedrag { width: 130px; }
.regels td.x { width: 36px; text-align: right; }
.regels input { padding: 8px 10px; }
.regels .eur { position: relative; }
.regels .eur::before { content: "€"; position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.regels .eur input { padding-left: 24px; text-align: right; }
.totaal { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; }
.totaal .som { font: 700 1.15rem/1 var(--head); }
.totaal .rechts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.totaal input { width: 150px; padding: 9px 10px; }
.x-btn { background: none; border: 0; color: var(--ink-soft); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.x-btn:hover { color: var(--error); background: #F7E7E3; }
.toevoegen { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

/* Instellingen */
.instel-type { border-top: 1px solid var(--line); }
.instel-type:first-of-type { border-top: 0; }
.instel-type > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; font-weight: 700; }
.instel-type > summary::-webkit-details-marker { display: none; }
.instel-type > summary .sub { font-weight: 400; color: var(--ink-soft); }
.instel-type form { padding: 0 0 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .grid3 { grid-template-columns: 1fr; } }
.vinkjes { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 4px 0 16px; }

/* Dialoog */
.dlg { border: 0; padding: 0; width: min(560px, calc(100% - 24px)); max-height: 90vh; border-radius: 16px; background: var(--page); color: var(--ink); }
.dlg::backdrop { background: rgb(0 0 0 / .45); }
.dlg-inner { padding: 22px 20px; overflow: auto; max-height: 90vh; }
.dlg h2 { margin: 0 0 6px; font-size: 1.25rem; }
.dlg .actions { position: static; background: none; border: 0; padding: 0; margin-top: 18px; }
.dlg .day { padding: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 700 .95rem/1 var(--body); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip.near { border-color: var(--brand); }
.chip.niet-werkdag { border-style: dashed; }
.legend { color: var(--ink-soft); font-size: .88rem; margin: 6px 0 10px; }

/* Inloggen */
.login-wrap { max-width: 440px; margin: 0 auto; padding: 48px 16px; }
.login-wrap img { width: 160px; margin-bottom: 24px; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; border: 1px solid var(--line); margin: 6px 0 10px; }
.geheim { font-family: ui-monospace, Menlo, monospace; font-size: .9rem; letter-spacing: .06em; word-break: break-all; background: var(--surface); border: 1px dashed var(--line); padding: 8px 10px; border-radius: 8px; }
.code-input { font-size: 1.6rem !important; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ---------- Agenda ---------- */
.ag-legenda { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; font-size: .82rem; }
.ag-legenda .ag-item { position: static; display: inline-block; padding: 3px 9px; border-radius: 6px; }
.ag-vrij-l { padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, #F4F3F3 0 6px, #EAE9E9 6px 12px); color: var(--ink-soft); }
.ag-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-panel); overflow: hidden; }
.ag-tijden { position: relative; margin-top: 40px; height: var(--h); border-right: 1px solid var(--line); }
.ag-tijden span { position: absolute; right: 6px; transform: translateY(-50%); font-size: .72rem; color: var(--ink-soft); }
.ag-tijden span:first-child { transform: none; }
.ag-dag { border-right: 1px solid var(--line); min-width: 0; }
.ag-dag:last-child { border-right: 0; }
.ag-kop { height: 40px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.ag-dag.vandaag .ag-kop { color: var(--brand-dark); background: var(--brand-soft); }
.ag-dag.vrij .ag-kolom { background: repeating-linear-gradient(135deg, #FAFAFA 0 6px, #F1F0F0 6px 12px); }
.ag-kolom { position: relative; height: var(--h); }
.ag-kolom > i { position: absolute; left: 0; right: 0; border-top: 1px solid #EEEDED; }
.ag-item { position: absolute; overflow: hidden; text-align: left; border: 0; border-left: 4px solid; border-radius: 6px; padding: 3px 6px; font: .74rem/1.25 var(--body); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; }
.ag-item span, .ag-item strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-item.bevestigd { background: #E5F2E8; border-color: #2E8B4A; }
.ag-item.aangevraagd { background: #FDF0E3; border-color: #E07B0B; }
.ag-item.afgerond { background: #ECEBEB; border-color: #8A8C8C; }
.ag-item.bezet { background: repeating-linear-gradient(135deg, #E4E3E3 0 6px, #DAD9D9 6px 12px); border-color: #9C9E9E; color: var(--ink-soft); cursor: default; }
.ag-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; z-index: 2; }
.ag-item:hover:not(.bezet) { filter: brightness(.97); z-index: 2; }
.ag-zp { font-style: normal; font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-dark); }
.ag-lijst { display: none; }
.ag-ldag h2 { font-size: 1rem; margin: 18px 0 8px; text-transform: capitalize; }
.ag-ldag h2 .sub { text-transform: none; font-weight: 400; }
.ag-ldag.vandaag h2 { color: var(--brand-dark); }
.ag-lrij { position: static; width: 100%; flex-direction: row; gap: 12px; padding: 10px 12px; margin-bottom: 6px; font-size: .92rem; }
.ag-lrij .tijd { flex: 0 0 auto; font-weight: 700; }
.ag-lrij span { white-space: normal; }
@media (max-width: 860px) {
  .ag-grid { display: none; }
  .ag-lijst { display: block; }
}

/* Foto's bij een afspraak */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 6px; margin: 8px 0 4px; }
.foto { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--page) center / cover no-repeat; cursor: zoom-in; padding: 0; }
