/* ==========================================================================
   Atelier — beheeromgeving
   ========================================================================== */

:root {
  --bg: #f4f1ec;
  --card: #fffdfa;
  --ink: #1d1a17;
  --soft: #6a6259;
  --faint: #978e83;
  --line: #e2dbd0;
  --line-strong: #cfc6b8;
  --accent: #1d1a17;
  --sold: #b3362d;
  --ok: #3f7a4f;
  --star: #e0a526;
  --radius: 14px;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Carattere', cursive;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

h1 { margin: 0; font: 400 44px/1 var(--serif); }
h2 { margin: 0 0 14px; font: 500 22px/1.2 var(--serif); }
small { color: var(--faint); font-size: 12px; font-weight: 400; }
b { font-weight: 500; }

.a-muted { margin: 6px 0 0; color: var(--soft); font-size: 14px; }
.a-hint { margin: 0 0 18px; font-size: 13px; color: var(--faint); }

/* ---------- Knoppen & velden ---------- */

.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--card);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .1s;
}
.a-btn:hover { border-color: var(--ink); }
.a-btn:active { transform: translateY(1px); }
.a-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.a-btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-btn-primary:hover { background: #3a342e; }
.a-btn:disabled { opacity: .5; cursor: wait; }

.a-link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--soft); text-decoration: underline; text-underline-offset: 3px;
}
.a-link:hover { color: var(--ink); }

.a-input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.a-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 26, 23, .08); }
textarea.a-input { resize: vertical; line-height: 1.6; }

.a-field { display: grid; gap: 6px; margin-bottom: 14px; }
.a-field > span { font-size: 13px; font-weight: 500; color: var(--soft); }

.a-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.a-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }

/* ---------- Inloggen ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: min(380px, 100%); padding: 40px 34px 30px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: 0 30px 60px -30px rgba(40, 30, 20, .25);
  text-align: center;
}
.login-name { margin: 0; font: 400 34px/1 var(--script); }
.login-card h1 { font-size: 22px; letter-spacing: .3em; text-transform: uppercase; font-family: var(--sans); font-weight: 400; margin: 10px 0 28px; }
.login-card .a-field { text-align: left; }
.login-card input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; }
.login-card input:focus { outline: none; border-color: var(--ink); }
.login-card .a-btn { width: 100%; min-height: 48px; }
.login-error { min-height: 1.5em; margin: 12px 0 0; color: var(--sold); font-size: 14px; }
.login-back { font-size: 13px; color: var(--faint); }

/* ---------- Bovenbalk ---------- */

.a-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 0 28px; min-height: 64px;
  background: rgba(244, 241, 236, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.a-brand { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); white-space: nowrap; }
.a-brand span { font: 400 28px/1 var(--script); letter-spacing: 0; text-transform: none; color: var(--ink); margin-right: 8px; vertical-align: -3px; }

.a-tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.a-tabs button {
  position: relative; padding: 20px 14px; border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--soft); white-space: nowrap;
}
.a-tabs button[aria-selected="true"] { color: var(--ink); }
.a-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px; background: var(--ink); }
.a-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 4px; border-radius: 99px; background: var(--sold); color: #fff; font-size: 11px; }

.a-top-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; white-space: nowrap; }
.a-top-actions a { color: var(--soft); }

.a-main { max-width: 1320px; margin: 0 auto; padding: 36px 28px 120px; }

.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }

.a-upload { position: relative; min-height: 50px; padding: 0 24px; font-size: 15px; }
.a-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.a-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.a-toolbar .a-input { width: 240px; border-radius: 999px; padding-left: 16px; }

.a-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: #fff; overflow-x: auto; max-width: 100%; }
.a-seg button { padding: 7px 14px; border: 0; border-radius: 999px; background: none; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--soft); white-space: nowrap; }
.a-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- Uploadvoortgang ---------- */

.a-uploads { display: grid; gap: 8px; margin-bottom: 16px; }
.a-upload-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; font-size: 14px;
}
.a-upload-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--line); }
.a-upload-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-upload-row .state { color: var(--soft); font-size: 13px; }
.a-upload-row.is-done .state { color: var(--ok); }
.a-upload-row.is-error .state { color: var(--sold); }

/* ---------- Kaarten ---------- */

.a-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.a-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: box-shadow .25s, transform .25s, opacity .25s;
}
.a-card:has([data-multi][open]) { position: relative; z-index: 5; }
.a-card:hover { box-shadow: 0 14px 34px -22px rgba(40, 30, 20, .4); }
.a-cards:not(.no-drag) .a-card { cursor: grab; }
.a-card.is-new { animation: pop .5s ease both; }
.a-card.is-dragging { opacity: .35; }
.a-card.is-removing { opacity: 0; transform: scale(.96); }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }

.a-thumb { position: relative; aspect-ratio: 4 / 3; background: #ebe5dc; }
.a-thumb { overflow: hidden; border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.a-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.a-card.is-sold .a-thumb img { opacity: .75; }

.a-star {
  position: absolute; top: 8px; left: 8px;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .88); box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.a-star svg { width: 20px; height: 20px; fill: none; stroke: var(--soft); stroke-width: 1.6; stroke-linejoin: round; transition: fill .2s, stroke .2s, transform .2s; }
.a-star[aria-pressed="true"] svg { fill: var(--star); stroke: var(--star); }
.a-star:active svg { transform: scale(.85); }

.a-handle {
  position: absolute; top: 8px; right: 8px;
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .88); color: var(--soft); font-size: 20px; cursor: grab;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.a-cards.no-drag .a-handle { display: none; }

.a-badges { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 6px; }
.a-badge {
  display: none;
  padding: 3px 10px; border-radius: 99px; background: var(--sold); color: #fff; font-size: 12px; font-weight: 500;
}
.a-badge-hidden { background: #5d564e; }
.a-card.is-sold .a-badge-sold, .a-card.is-hidden .a-badge-hidden { display: block; }
.a-card.is-hidden .a-thumb img { opacity: .35; filter: grayscale(.6); }

.a-switch-hide input:checked + .a-switch-ui { background: #5d564e; }

.a-fields { padding: 14px 16px 16px; display: grid; gap: 10px; }

.a-title {
  width: 100%; padding: 4px 6px; margin: 0 -6px; border: 1px solid transparent; border-radius: 8px; background: none;
  font: 500 22px/1.2 var(--serif);
}
.a-title:hover { border-color: var(--line); }
.a-title:focus { outline: none; border-color: var(--ink); background: #fff; }
.a-title::placeholder { color: var(--sold); opacity: .7; }

/* Prijs + verkocht, collectie + verbergen: twee gelijke rijen, schakelaars recht onder elkaar */
.a-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; }

.a-price, .a-multi summary {
  min-width: 0; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px;
}
.a-price { display: flex; align-items: center; gap: 6px; }

/* Collecties kiezen met vinkjes (een werk kan in meerdere collecties zitten) */
.a-multi { position: relative; min-width: 0; }
.a-multi summary {
  position: relative; display: block; line-height: 40px; padding-right: 30px; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; list-style: none;
}
.a-multi summary::-webkit-details-marker { display: none; }
.a-multi summary::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 1.5px solid var(--soft); border-bottom: 1.5px solid var(--soft); transform: translateY(-70%) rotate(45deg);
}
.a-multi summary:hover { border-color: var(--line-strong); }
.a-multi[open] summary { border-color: var(--ink); }
.a-multi-list {
  position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 260px; overflow: auto;
  padding: 6px; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 14px 30px -12px rgba(40, 30, 20, .35);
}
.a-multi-list label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; font-size: 14px; }
.a-multi-list label:hover { background: #f5f0e8; }
.a-multi-list input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.a-multi-list p { margin: 0; padding: 8px 10px; color: var(--faint); font-size: 13px; white-space: nowrap; }
.a-price:focus-within { border-color: var(--ink); }
.a-price span { color: var(--faint); }
.a-price input { width: 100%; min-width: 0; border: 0; background: none; padding: 8px 0; font-size: 15px; }
.a-price input:focus { outline: none; }
.a-card.is-sold .a-price { opacity: .5; }

.a-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 500; user-select: none; }
.a-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.a-switch-ui { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); transition: background .2s; flex: none; }
.a-switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.a-switch input:checked + .a-switch-ui { background: var(--sold); }
.a-switch input:checked + .a-switch-ui::after { transform: translateX(18px); }
.a-switch input:focus-visible + .a-switch-ui { outline: 2px solid var(--ink); outline-offset: 2px; }

.a-more { display: none; padding-top: 4px; }
.a-cards.show-details .a-more { display: block; }
.a-more .a-field { margin-bottom: 10px; }
.a-more .a-input { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.a-more .a-inline { gap: 16px; }
.a-card-del { margin-left: auto; }
.a-card-del:hover, .a-card-del.is-confirm { color: var(--sold); }

.a-save { font-size: 12px; color: var(--faint); }
.a-save.is-ok { color: var(--ok); }
.a-save.is-error { color: var(--sold); }
.a-thumb .a-save { position: absolute; right: 10px; bottom: 10px; padding: 3px 10px; border-radius: 99px; background: rgba(255, 255, 255, .92); font-weight: 500; }
.a-thumb .a-save:empty { display: none; }
.a-del { border: 0; background: none; padding: 4px 8px; margin-right: -8px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--faint); }
.a-del:hover { color: var(--sold); }
.a-del.is-confirm { background: var(--sold); color: #fff; }

.a-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--soft); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }

/* ---------- Tabel (spreadsheet-weergave) ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.a-layout { margin-left: auto; }
.a-details-btn { min-height: 38px; margin-left: auto; font-size: 13px; }
.a-details-btn:not([hidden]) + .a-layout { margin-left: 0; }
.a-details-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.a-layout button { display: inline-flex; align-items: center; gap: 6px; }
.a-layout svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.a-table-wrap {
  overflow: auto; max-height: calc(100vh - 96px);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}

.a-table { width: 100%; min-width: 1180px; border-collapse: separate; border-spacing: 0; font-size: 14px; }

.a-table th {
  position: sticky; top: 0; z-index: 2;
  padding: 0; text-align: left; white-space: nowrap;
  background: #f7f3ed; border-bottom: 1px solid var(--line-strong);
}
.a-table th button {
  width: 100%; padding: 10px; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--soft);
}
.a-table th button:hover { color: var(--ink); }
.a-table th[aria-sort] button { color: var(--ink); }
.a-table th[aria-sort="ascending"] button::after { content: ' ↑'; }
.a-table th[aria-sort="descending"] button::after { content: ' ↓'; }

.a-table td { padding: 0; border-bottom: 1px solid var(--line); vertical-align: middle; background: var(--card); }
.a-table tr:last-child td { border-bottom: 0; }
.a-table tbody tr:hover td { background: #faf6f0; }
.a-table tr.is-sold td { background: #fbf1ef; }
.a-table tr.is-hidden td { color: var(--faint); }
.a-table tr.is-hidden td input:not([type="checkbox"]), .a-table tr.is-hidden td select { color: var(--faint); }
.a-table tr.is-hidden .c-title-in img { opacity: .35; filter: grayscale(.6); }
.a-table tr.is-new td { animation: flash 1.6s ease; }
.a-table tr.is-dragging td { opacity: .35; }
.a-drag-ghost {
  position: fixed; top: -200px; left: 0;
  display: flex; align-items: center; gap: 10px; max-width: 320px; padding: 6px 14px 6px 6px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 10px;
  font: 500 17px/1.2 var(--serif); white-space: nowrap;
}
.a-drag-ghost img { width: 36px; height: 36px; object-fit: cover; border-radius: 6px; }
.a-drag-ghost span { overflow: hidden; text-overflow: ellipsis; }
@keyframes flash { from { background: #f3e4bf; } }

/* Cellen zien eruit als tekst, en worden een invoerveld zodra je erin klikt */
.a-table input:not([type="checkbox"]), .a-table select {
  width: 100%; min-height: 36px; padding: 5px 10px;
  border: 1px solid transparent; border-radius: 0; background: transparent;
  font-size: 14px;
}
.a-table input:not([type="checkbox"]):hover, .a-table select:hover { border-color: var(--line); }
.a-table input:not([type="checkbox"]):focus, .a-table select:focus {
  outline: none; border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink);
}
.a-table input::placeholder { color: var(--line-strong); }
.a-table select { cursor: pointer; }
.a-table .a-multi summary { height: 36px; line-height: 34px; padding-left: 10px; border-color: transparent; border-radius: 0; background: transparent; font-size: 14px; }
.a-table .a-multi summary:hover { border-color: var(--line); }
.a-table .a-multi[open] summary { border-color: var(--ink); background: #fff; }

.a-table .c-title { min-width: 260px; }
.a-table .c-title-in { display: flex; align-items: center; gap: 4px; padding-left: 8px; }
.a-table .c-title-in img { flex: none; width: 30px; height: 30px; object-fit: cover; border-radius: 5px; }
.a-table tbody:not(.no-drag) .c-title-in img { cursor: grab; }
.a-table th.c-title button { padding-left: 52px; }
.a-table .c-title input { font: 500 17px/1.2 var(--serif); }
.a-table .c-title input::placeholder { color: var(--sold); opacity: .6; }
.a-table .c-price { width: 120px; }
.a-table .c-price label { display: flex; align-items: center; padding-left: 10px; color: var(--faint); }
.a-table .c-price input { padding-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.a-table .c-check { width: 84px; text-align: center; }
.a-table .c-cat { width: 170px; }
.a-table .c-mat { width: 160px; }
.a-table .c-dim { width: 130px; }
.a-table .c-year { width: 76px; }
.a-table .c-desc { min-width: 180px; }
.a-table .c-state { width: 104px; padding: 0 8px; white-space: nowrap; }

/* Foto + titel blijven zichtbaar als je horizontaal scrollt */
.a-table .c-title { position: sticky; left: 0; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.a-table th.c-title { z-index: 3; }

.a-switch-sm { justify-content: center; }
.a-switch-sm .a-switch-ui { width: 38px; height: 22px; }
.a-switch-sm .a-switch-ui::after { width: 16px; height: 16px; }
.a-switch-sm input:checked + .a-switch-ui::after { transform: translateX(16px); }

.a-star-sm { position: static; width: 30px; height: 30px; margin: 0 auto; box-shadow: none; background: transparent; }
.a-star-sm:hover { background: #f1ebe2; }

.a-empty-cell { padding: 50px 20px !important; text-align: center; color: var(--soft); }

/* ---------- Collecties ---------- */

.a-coll-filter { width: auto; min-width: 170px; border-radius: 999px; }

.a-new-coll { display: flex; gap: 10px; flex-wrap: wrap; }
.a-new-coll .a-input { width: 260px; border-radius: 999px; padding-left: 16px; }

.a-colls { display: grid; gap: 18px; }
.a-coll-head { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: start; }
.a-coll-cover { width: 96px; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: #ebe5dc; display: grid; place-items: center; }
.a-coll-cover img { width: 100%; height: 100%; object-fit: cover; }
.a-coll-cover span { font-size: 11px; color: var(--faint); text-align: center; padding: 6px; }
.a-coll-main { display: grid; gap: 8px; min-width: 0; }
.a-coll-main .a-title { font-size: 28px; margin: 0 -6px; }
.a-coll-main .a-muted { margin: 0; }
.a-coll-side { display: flex; align-items: center; gap: 6px; }
.a-coll-side .a-switch { margin-right: 12px; }
.a-coll.is-hidden .a-coll-cover { opacity: .45; filter: grayscale(.5); }

.a-icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 16px;
}
.a-icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.a-icon-btn:disabled { opacity: .35; cursor: default; }

.a-coll-works { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.a-coll-work {
  position: relative; width: 76px; height: 76px; padding: 0; border: 2px solid transparent; border-radius: 10px;
  overflow: hidden; cursor: pointer; background: #ebe5dc; transition: border-color .2s, transform .15s;
}
.a-coll-work img { width: 100%; height: 100%; object-fit: cover; }
.a-coll-work:hover:not(:disabled) { transform: translateY(-2px); }
.a-coll-work.is-cover { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.a-coll-work span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0;
  background: var(--ink); color: #fff; font-size: 10px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.a-coll-work.is-hidden { opacity: .35; cursor: not-allowed; }

/* Kiezer (dialoogvenster) */
.a-dialog {
  width: min(1000px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  border: 0; border-radius: 20px; background: var(--card); color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(30, 20, 10, .5);
}
.a-dialog::backdrop { background: rgba(29, 26, 23, .45); backdrop-filter: blur(3px); }
.a-dialog-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.a-dialog-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 24px 24px 16px; border-bottom: 1px solid var(--line); }
.a-dialog-head h2 { margin: 0; font-size: 28px; }
.a-dialog-head .a-muted { max-width: 520px; }
.a-dialog-head .a-input { width: 240px; border-radius: 999px; }
.a-dialog-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--line); }
.a-dialog-foot .a-muted { margin: 0 auto 0 0; }

.a-picker {
  flex: 1; overflow-y: auto; padding: 18px 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px;
}
.a-pick { display: grid; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; }
.a-pick-img { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #ebe5dc; border: 2px solid transparent; transition: border-color .15s; }
.a-pick-img img { width: 100%; height: 100%; object-fit: cover; }
.a-pick-img i {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 13px;
  background: rgba(255, 255, 255, .9); color: transparent; box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
}
.a-pick.is-picked .a-pick-img { border-color: var(--ink); }
.a-pick.is-picked .a-pick-img i { background: var(--ink); color: #fff; }
.a-pick:not(.is-picked) .a-pick-img img { opacity: .8; }
.a-pick-title { font: 500 15px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-pick-note { font-size: 11px; color: var(--faint); }

/* ---------- Sleep-overlay ---------- */

.a-drop {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: rgba(29, 26, 23, .55); backdrop-filter: blur(4px);
  pointer-events: none;
}
.a-drop div {
  padding: 50px 70px; border: 2px dashed #fff; border-radius: 24px; color: #fff;
  font: 400 34px/1 var(--serif);
}

/* ---------- Over-formulier ---------- */

.a-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.a-box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.a-box-head h2 { margin: 0; }
.a-narrow { max-width: 560px; }

.a-photo-box { display: flex; gap: 24px; align-items: center; }
.a-photo { width: 120px; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: #ebe5dc; flex: none; display: grid; place-items: center; }
.a-photo img { width: 100%; height: 100%; object-fit: cover; }
.a-photo span { font: 400 44px/1 var(--script); color: var(--soft); }
.a-photo-box .a-inline { margin-top: 14px; }

.a-expos { display: grid; gap: 14px; margin-top: 16px; }
.a-expo { position: relative; padding: 18px 18px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.a-expo .a-grid2 { grid-template-columns: 1fr 1fr; }
.a-expo-remove { position: absolute; top: 12px; right: 14px; }
.a-expo .a-field:first-of-type { padding-right: 90px; }

.a-savebar {
  position: sticky; bottom: 16px; z-index: 5;
  display: flex; justify-content: flex-end; align-items: center; gap: 16px;
  padding: 12px 12px 12px 22px; margin-top: 10px;
  background: rgba(255, 253, 250, .95); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 16px 34px -18px rgba(40, 30, 20, .35);
}
.a-savebar .a-muted { margin: 0; }
.a-savebar.is-dirty .a-muted { color: var(--sold); }

/* ---------- Berichten ---------- */

.a-msgs { display: grid; gap: 10px; max-width: 860px; }
.a-msg { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.a-msg summary { display: grid; grid-template-columns: 12px 1fr auto; gap: 14px; align-items: center; padding: 16px 20px; cursor: pointer; list-style: none; }
.a-msg summary::-webkit-details-marker { display: none; }
.a-msg .unread-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.a-msg.is-unread .unread-dot { background: var(--sold); }
.a-msg.is-unread .who { font-weight: 500; }
.a-msg .who { display: block; }
.a-msg .subj { display: block; font-size: 13px; color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-msg time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.a-msg-body { padding: 0 20px 18px 46px; }
.a-msg-body p { white-space: pre-wrap; margin: 0 0 14px; line-height: 1.6; }
.a-msg-meta { font-size: 13px; color: var(--soft); margin-bottom: 14px; }
.a-msg-meta a { color: inherit; }

/* ---------- Melding ---------- */

.a-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px;
  transition: opacity .25s, transform .25s;
  max-width: calc(100vw - 32px);
}
.a-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.a-toast.is-error { background: var(--sold); }

/* ---------- Mobiel ---------- */

@media (max-width: 860px) {
  .a-top { flex-wrap: wrap; gap: 0 16px; padding: 10px 16px 0; }
  .a-brand { flex: 1; }
  .a-tabs { order: 3; flex-basis: 100%; margin: 0 -8px; }
  .a-tabs button { padding: 14px 10px; }
  .a-main { padding: 24px 16px 100px; }
  h1 { font-size: 36px; }
  .a-toolbar .a-input { width: 100%; }
  .a-upload { width: 100%; }
  .a-layout, .a-details-btn { margin-left: 0; }
  .a-coll-filter { width: 100%; }
  .a-new-coll, .a-new-coll .a-input { width: 100%; }
  .a-coll-head { grid-template-columns: 72px 1fr; }
  .a-coll-cover { width: 72px; }
  .a-coll-side { grid-column: 1 / -1; }
  .a-dialog-head .a-input { width: 100%; }
  .a-table-wrap { max-height: calc(100vh - 120px); margin: 0 -16px; border-radius: 0; border-inline: 0; }
  .a-grid2, .a-expo .a-grid2 { grid-template-columns: 1fr; }
  .a-photo-box { flex-direction: column; align-items: flex-start; }
  .a-msg-body { padding-left: 20px; }
}
