/*! RIOT GARAGE Beheer · Pinky Creative Studio · +31 6 38 90 94 16 · https://stopmetzoeken.store */
:root {
  --top: 60px;
  --side: 236px;
  --r: 12px;
  --r-sm: 8px;
  --panel: var(--surface);
  --panel-2: var(--surface-2);
  --hover: color-mix(in srgb, var(--text) 6%, transparent);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 28%, transparent);
  --ok: #2fbf71;
  --warn: #ff8c1a;
  --bad: #e5484d;
  --st-pending: #ff8c1a;
  --st-confirmed: #2fbf71;
  --st-done: #8b8d90;
  --st-cancelled: #5c5c5c;
  --st-noshow: #e5484d;
  --card-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .6);
}
:root[data-theme="light"] {
  --st-cancelled: #a9a9a9;
  --card-shadow: 0 1px 2px rgba(20, 20, 20, .05), 0 12px 32px -20px rgba(20, 20, 20, .18);
}
html, body { min-height: 100%; }
body { font-size: 14px; line-height: 1.5; }
html.has-layer { overflow: hidden; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82em; }
.sp { flex: 1; }
.logo--light { display: none !important; }
:root[data-theme="light"] .logo--dark { display: none !important; }
:root[data-theme="light"] .logo--light { display: block !important; }

/* ---------- icons ---------- */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- boot ---------- */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--bg); }
.boot .logo { width: min(260px, 60vw); height: auto; }
.spin { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--text) 18%, transparent); border-top-color: var(--accent); animation: a-spin .8s linear infinite; flex: none; }
@keyframes a-spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: .875rem; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s; user-select: none; }
.btn:hover { border-color: color-mix(in srgb, var(--text) 26%, var(--line)); background: color-mix(in srgb, var(--panel-2) 80%, var(--text) 6%); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn[disabled], .btn.is-busy { opacity: .5; pointer-events: none; }
.btn.is-busy::after { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: a-spin .7s linear infinite; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn--danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn--danger-ghost { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn--danger-ghost:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: var(--bad); }
.btn--sm { min-height: 32px; padding: 0 10px; font-size: .8rem; gap: 6px; }
.btn--sm .ic { width: 15px; height: 15px; }
.btn--block { width: 100%; min-height: 46px; font-size: .95rem; }
.ib { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; flex: none; transition: background .18s, border-color .18s, color .18s; text-decoration: none; }
.ib:hover { background: var(--hover); border-color: color-mix(in srgb, var(--text) 24%, var(--line)); }
.ib:focus-visible { outline: none; box-shadow: var(--ring); }
.ib[disabled] { opacity: .35; pointer-events: none; }
.ib--sm { width: 30px; height: 30px; }
.ib--xs { width: 22px; height: 22px; border: 0; }
.ib--xs .ic { width: 13px; height: 13px; }
.ib[aria-pressed="false"] { color: var(--muted); }

/* ---------- inputs ---------- */
.inp { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 16px; outline: none; transition: border-color .18s, box-shadow .18s; }
@media (min-width: 900px) { .inp { font-size: .9rem; } }
.inp:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); }
.inp:focus { border-color: var(--accent); box-shadow: var(--ring); }
.inp[disabled] { opacity: .45; }
.inp[readonly] { color: var(--muted); }
.inp.is-bad { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }
.inp--sm { min-height: 34px; padding: 5px 10px; width: auto; }
.inp--ta { min-height: 80px; resize: vertical; line-height: 1.45; font-family: var(--font); }
.inp--plate { text-transform: uppercase; font-weight: 800; letter-spacing: .06em; }
select.inp { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8d90' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; cursor: pointer; }
input[type="date"].inp, input[type="time"].inp { color-scheme: inherit; }
.inp-wrap { position: relative; }
.inp-wrap .inp { padding-right: 46px; }
.ib--in { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; width: 34px; height: 34px; }
.fld { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.fld > label, .fld__lbl { font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.fld__hint { color: var(--muted); font-size: .78rem; }
.form-err { color: var(--bad); font-size: .85rem; font-weight: 600; min-height: 0; }
.form-err:not(:empty) { margin: 2px 0 12px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .g2 { grid-template-columns: 1fr; } }

/* switch */
.sw { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; min-width: 0; }
.sw__in { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw__track { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: color-mix(in srgb, var(--text) 18%, transparent); transition: background .2s; }
.sw__knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transition: transform .25s var(--ease); }
.sw__in:checked + .sw__track { background: var(--accent); }
.sw__in:checked + .sw__track .sw__knob { transform: translateX(18px); }
.sw__in:focus-visible + .sw__track { box-shadow: var(--ring); }
.sw__in:disabled + .sw__track { opacity: .4; }
.sw__txt { display: grid; min-width: 0; }
.sw__txt b { font-weight: 600; }
.sw__txt small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }

/* segmented */
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); max-width: 100%; }
.seg__b { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-weight: 600; font-size: .82rem; cursor: pointer; transition: background .18s, color .18s; white-space: nowrap; }
.seg__b:hover { color: var(--text); }
.seg__b[aria-checked="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .25), inset 0 -2px 0 var(--accent); }
.seg__b:focus-visible { outline: none; box-shadow: var(--ring); }
.seg__b .ic { width: 16px; height: 16px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; color: var(--sc, var(--muted)); background: color-mix(in srgb, var(--sc, var(--muted)) 14%, transparent); border: 1px solid color-mix(in srgb, var(--sc, var(--muted)) 30%, transparent); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-pending, .st-b-pending { --sc: var(--st-pending); }
.st-confirmed, .st-b-confirmed { --sc: var(--st-confirmed); }
.st-done, .st-b-done { --sc: var(--st-done); }
.st-cancelled, .st-b-cancelled { --sc: var(--st-cancelled); }
.st-noshow, .st-b-noshow { --sc: var(--st-noshow); }
.q-new, .q-b-new { --sc: var(--accent); }
.q-answered, .q-b-answered { --sc: #4ea1ff; }
.q-won, .q-b-won { --sc: var(--ok); }
.q-lost, .q-b-lost { --sc: var(--st-done); }
:root[data-theme="light"] .chip { color: color-mix(in srgb, var(--sc) 78%, #000); }
.pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }
.pill--acc { background: color-mix(in srgb, var(--accent) 14%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
:root[data-theme="light"] .pill--acc { color: color-mix(in srgb, var(--accent) 80%, #000); }
.plate { display: inline-block; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); color: var(--text); font-weight: 800; font-size: .74rem; letter-spacing: .06em; border: 1px solid var(--steel); font-family: var(--font); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; }
.tag.is-past { opacity: .55; }

/* ---------- login ---------- */
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 24px 16px; overflow: hidden; }
.login__bg { position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(60% 50% at 85% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
  radial-gradient(50% 40% at 0% 100%, color-mix(in srgb, var(--steel) 16%, transparent), transparent 70%),
  repeating-linear-gradient(-55deg, transparent 0 22px, color-mix(in srgb, var(--text) 3%, transparent) 22px 23px), var(--bg); }
.login__card { position: relative; width: min(420px, 100%); padding: 28px 28px 22px; border-radius: 18px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.login__card::before { content: ''; position: absolute; left: 28px; right: 28px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 0%, transparent)); }
.login__top { display: flex; justify-content: flex-end; gap: 8px; margin: -8px -8px 6px 0; }
.login__logo .logo { width: 190px; height: auto; margin: 0 auto 14px; }
.login__h { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 2rem; letter-spacing: .02em; line-height: 1.1; text-align: center; }
.login__sub { margin: 4px 0 22px; text-align: center; color: var(--muted); }
.login__err { color: var(--bad); font-weight: 600; font-size: .88rem; margin: -4px 0 12px; min-height: 1.3em; }
.login__foot { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: .74rem; text-align: center; }
.login__foot .ic { width: 14px; height: 14px; }
.login__sig { margin: 0; color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-align: center; }
.shake { animation: a-shake .42s; }
@keyframes a-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: var(--top) 1fr; grid-template-areas: "top top" "side main"; min-height: 100vh; min-height: 100dvh; }
.app.is-wide { --side: 72px; }
@media (min-width: 900px) { .app { background: linear-gradient(90deg, color-mix(in srgb, var(--bg-2) 60%, var(--bg)) calc(var(--side) - 1px), var(--line) calc(var(--side) - 1px) var(--side), transparent var(--side)); } }
.top { grid-area: top; position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 10px; padding: 0 16px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand .logo { height: 34px; width: auto; }
.brand__tag { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; padding: 2px 8px; border-left: 2px solid var(--accent); line-height: 1.2; }
.badges { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
.badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.badge.is-ok i { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.badge.is-off i { background: var(--st-cancelled); }
.badge.is-bad { color: var(--bad); }
.badge.is-bad i { background: var(--bad); }
.off-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--bad); color: #fff; font-weight: 800; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; animation: a-pulse 2s infinite; white-space: nowrap; }
.off-pill .ic { width: 14px; height: 14px; }
@keyframes a-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--bad) 22%, transparent); } }
.top__sp { flex: 1; }
.top__links { display: flex; gap: 4px; }
.top__link { display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 7px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .8rem; white-space: nowrap; }
.top__link:hover { color: var(--text); background: var(--hover); }
.top__link .ic { width: 13px; height: 13px; }
.top__user { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .85rem; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #000)); color: #fff; font-weight: 800; font-size: .8rem; }
.side { grid-area: side; position: sticky; top: var(--top); height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); scrollbar-width: thin; }
.nav__grp { display: grid; gap: 2px; }
.nav__h { padding: 0 10px 6px; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); opacity: .8; }
.nav__a { position: relative; display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 10px; border-radius: 9px; color: var(--muted); font-weight: 600; text-decoration: none; transition: background .16s, color .16s; }
.nav__a:hover { background: var(--hover); color: var(--text); }
.nav__a:focus-visible { outline: none; box-shadow: var(--ring); }
.nav__a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.nav__a[aria-current="page"]::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav__a[aria-current="page"] .ic { color: var(--accent); }
.nav__l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav__dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800; font-style: normal; display: grid; place-items: center; }
.nav__dot--sm { min-width: 8px; width: 8px; height: 8px; padding: 0; font-size: 0; }
.side__foot { margin-top: auto; display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.side__foot a { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: .8rem; font-weight: 600; text-decoration: none; }
.side__foot a:hover { color: var(--text); background: var(--hover); }
.side__foot small { padding: 8px 10px 0; color: var(--muted); font-size: .68rem; opacity: .75; }
.app.is-wide .nav__l, .app.is-wide .nav__h, .app.is-wide .side__foot span, .app.is-wide .side__foot small { display: none; }
.app.is-wide .side { padding: 18px 10px; align-items: stretch; }
.app.is-wide .nav__a, .app.is-wide .side__foot a { justify-content: center; padding: 0; }
.app.is-wide .nav__dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; font-size: .6rem; padding: 0 4px; }
.app.is-wide .nav__dot--sm { min-width: 8px; height: 8px; padding: 0; }
.view { grid-area: main; min-width: 0; padding: 26px 28px 60px; outline: none; }
.tabs { display: none; }

@media (max-width: 1240px) { .top__links, .top__uname { display: none; } }
@media (max-width: 1080px) { .badges { display: none; } }
@media (max-width: 899px) {
  .app, .app.is-wide { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "main"; }
  .side { display: none; }
  .top { padding: 0 12px; gap: 8px; }
  .top__user, .top__out, .top__lang { display: none; }
  .brand .logo { height: 30px; }
  .view { padding: 18px 16px calc(96px + env(safe-area-inset-bottom)); }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tab { position: relative; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: .66rem; font-weight: 700; text-decoration: none; cursor: pointer; min-width: 0; }
  .tab .ic { width: 22px; height: 22px; }
  .tab__l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab[aria-current="page"], .tab.is-on { color: var(--text); }
  .tab[aria-current="page"] .ic, .tab.is-on .ic { color: var(--accent); }
  .tab .nav__dot { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: .6rem; padding: 0 4px; }
}
@media (max-width: 420px) { .brand__tag { display: none; } }

/* ---------- page head + cards ---------- */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; }
.ph__t { min-width: 0; }
.ph h1 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: .02em; line-height: 1.05; display: flex; align-items: center; gap: 12px; overflow-wrap: anywhere; }
.ph h1::before { content: ''; width: 7px; height: .9em; border-radius: 2px; background: var(--accent); transform: skewX(-14deg); flex: none; }
.ph p { margin: 6px 0 0; color: var(--muted); }
.ph__a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--card-shadow); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card__ttl { display: flex; align-items: center; gap: 10px; font-size: .92rem; font-weight: 700; min-width: 0; }
.card__ttl .ic { color: var(--accent); }
.card__body { padding: 16px 18px 18px; min-width: 0; }
.card__save { display: flex; justify-content: flex-end; margin-top: 6px; }
.card--span { grid-column: 1 / -1; }
.empty { display: grid; justify-items: center; gap: 6px; padding: 36px 16px; text-align: center; color: var(--muted); }
.empty b { color: var(--text); font-weight: 700; }
.empty p { margin: 0 0 8px; max-width: 420px; }
.empty__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 6px; }
.empty__ic .ic { width: 24px; height: 24px; color: var(--steel); }
.empty--err .empty__ic .ic { color: var(--bad); }
.skw { display: grid; gap: 10px; }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--panel-2) 25%, color-mix(in srgb, var(--line) 80%, var(--panel-2)) 50%, var(--panel-2) 75%); background-size: 200% 100%; animation: a-sh 1.3s infinite linear; }
@keyframes a-sh { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 9800; display: grid; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; border-radius: 11px; background: #141414; color: #f4f4f4; border: 1px solid #2c2c2c; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); font-weight: 600; font-size: .86rem; transform: translateY(12px); opacity: 0; transition: transform .3s var(--ease), opacity .25s; pointer-events: auto; }
.toast.is-on { transform: none; opacity: 1; }
.toast span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast > .ic { color: var(--ok); }
.toast--err { border-color: var(--bad); }
.toast--err > .ic { color: var(--bad); }
.toast--info > .ic { color: var(--warn); }
.toast .ib { width: 28px; height: 28px; border: 0; color: #aaa; }
@media (max-width: 899px) { .toasts { right: 16px; left: 16px; width: auto; bottom: calc(80px + env(safe-area-inset-bottom)); } }

/* ---------- modal + drawer ---------- */
.mdl-bg, .drw-bg { position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .28s var(--ease); }
.mdl-bg.is-on, .drw-bg.is-on { opacity: 1; }
.mdl { position: fixed; left: 50%; top: 50%; z-index: 9001; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .32s var(--ease), opacity .24s; }
.mdl--wide { width: min(760px, calc(100vw - 32px)); }
.mdl.is-on { transform: translate(-50%, -50%); opacity: 1; }
.mdl__head, .drw__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); flex: none; }
.mdl__ttl, .drw__ttl { flex: 1; min-width: 0; display: grid; }
.mdl__ttl h2, .drw__ttl h2 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: 1.3rem; letter-spacing: .02em; line-height: 1.15; overflow-wrap: anywhere; }
.mdl__ttl small, .drw__ttl small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.mdl__ttl small:empty, .drw__ttl small:empty { display: none; }
.mdl__body, .drw__body { padding: 18px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.mdl__foot, .drw__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex: none; }
.mdl__foot:empty, .drw__foot:empty { display: none; }
.mdl__txt { margin: 0 0 12px; font-size: .95rem; }
.mdl__txt--warn { color: var(--bad); font-weight: 600; }
.drw { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001; width: min(540px, 100vw); display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); box-shadow: -30px 0 80px -30px rgba(0, 0, 0, .6); transform: translateX(104%); transition: transform .38s var(--ease); }
.drw.is-on { transform: none; }
.drw__sec { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.drw__sec:last-child { border-bottom: 0; margin-bottom: 0; }
.drw__sec > h3 { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.drw--sheet { width: min(380px, 100vw); }
@media (max-width: 560px) {
  .drw { width: 100vw; border-left: 0; }
  .mdl { top: auto; bottom: 0; left: 0; width: 100vw; max-height: 92dvh; border-radius: 18px 18px 0 0; transform: translateY(100%); }
  .mdl.is-on { transform: none; }
  .mdl__foot { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .mdl__foot .btn, .drw__foot .btn { flex: 1; }
  .drw__foot .sp { display: none; }
}
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 8px 16px; margin: 0 0 14px; font-size: .9rem; }
.kv dt { color: var(--muted); font-size: .8rem; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.kv a { color: var(--text); font-weight: 600; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px; }
.quote-box { padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--accent); margin-bottom: 14px; }
.quote-box small { display: block; color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.quote-box p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.copyrow { display: flex; gap: 8px; }
.copyrow .inp { flex: 1; min-width: 0; width: auto; }
.rs { margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.rs summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 700; list-style: none; }
.rs summary::-webkit-details-marker { display: none; }
.rs summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.rs[open] summary::after { transform: rotate(-135deg); }
.rs__body { padding: 4px 12px 14px; }
.slots { display: grid; gap: 10px; }
.slots__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.slots__list > p, .slots__list > .skw { grid-column: 1 / -1; margin: 0; }
.slot { display: grid; gap: 1px; padding: 7px 4px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; text-align: center; transition: border-color .16s, background .16s; }
.slot b { font-size: .88rem; }
.slot small { font-size: .66rem; color: var(--ok); font-weight: 700; }
.slot.is-full small { color: var(--bad); }
.slot.is-past { opacity: .35; cursor: not-allowed; }
.slot:hover:not([disabled]) { border-color: var(--accent); }
.slot[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot[aria-pressed="true"] small { color: #fff; }
.slots__custom { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slots__custom label { font-size: .78rem; color: var(--muted); font-weight: 600; }
.nb .sw { margin-bottom: 8px; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.wknav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wknav__l { font-weight: 700; margin-left: 6px; }
.search { position: relative; display: flex; align-items: center; flex: 1 1 260px; min-width: 0; max-width: 420px; }
.search .ic { position: absolute; left: 10px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search .inp { padding-left: 34px; width: 100%; }
.search--sm { max-width: none; flex: none; margin-bottom: 8px; }
.range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.range__l { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.count { margin: 0 0 8px; }

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n ic" "l l" "go go"; align-items: start; gap: 2px; padding: 16px 16px 12px; text-align: left; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; overflow: hidden; box-shadow: var(--card-shadow); transition: transform .2s var(--ease), border-color .2s; }
.kpi::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--steel); opacity: .5; }
.kpi--hot::after { background: var(--accent); opacity: 1; }
.kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.kpi:focus-visible { outline: none; box-shadow: var(--ring); }
.kpi__ic { grid-area: ic; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--steel); }
.kpi--hot .kpi__ic { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kpi__n { grid-area: n; font-family: var(--font-display); font-weight: 400; font-size: 2.4rem; line-height: 1; letter-spacing: .01em; }
.kpi__l { grid-area: l; color: var(--muted); font-weight: 600; font-size: .85rem; margin-top: 4px; }
.kpi__go { grid-area: go; display: inline-flex; align-items: center; gap: 3px; margin-top: 10px; font-size: .74rem; font-weight: 700; color: var(--muted); }
.kpi__go .ic { width: 13px; height: 13px; transition: transform .2s; }
.kpi:hover .kpi__go { color: var(--accent); }
.kpi:hover .kpi__go .ic { transform: translateX(3px); }
.dash__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash__grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) { .kpis { gap: 10px; } .kpi { padding: 12px; } .kpi__n { font-size: 2rem; } }
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tl__row { width: 100%; display: grid; grid-template-columns: 52px 4px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid transparent; background: var(--panel-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .16s; }
.tl__row:hover { border-color: color-mix(in srgb, var(--sc) 60%, var(--line)); }
.tl__time { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: .02em; }
.tl__bar { align-self: stretch; border-radius: 2px; background: var(--sc); }
.tl__main { display: grid; min-width: 0; }
.tl__main b, .tl__main small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl__main small { color: var(--muted); }
@media (max-width: 480px) { .tl__row { grid-template-columns: 46px 4px minmax(0, 1fr); } .tl__row .chip { grid-column: 3; justify-self: start; } }
.load { display: grid; gap: 6px; margin-bottom: 8px; }
.load__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 64px; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 8px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.load__row:hover { background: var(--hover); }
.load__row.is-today .load__d b { color: var(--accent); }
.load__d { display: grid; line-height: 1.2; }
.load__d b { text-transform: capitalize; font-size: .85rem; }
.load__d small { color: var(--muted); font-size: .72rem; }
.load__track { height: 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); overflow: hidden; }
.load__fill { display: block; height: 100%; border-radius: 6px; background: var(--steel); transition: width .6s var(--ease); }
.load--mid .load__fill { background: var(--warn); }
.load--hi .load__fill { background: var(--accent); }
.load--closed .load__track { background: repeating-linear-gradient(-45deg, transparent 0 4px, var(--line) 4px 5px); }
.load__n { text-align: right; font-weight: 700; font-size: .8rem; font-variant-numeric: tabular-nums; }
.load--closed .load__n { color: var(--muted); font-weight: 500; }
.bars { display: grid; gap: 9px; margin-bottom: 8px; }
.bars__row { display: grid; grid-template-columns: minmax(90px, 38%) minmax(0, 1fr) 30px; align-items: center; gap: 10px; font-size: .84rem; }
.bars__l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars__t { height: 8px; border-radius: 5px; background: var(--panel-2); overflow: hidden; }
.bars__f { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, var(--steel)), var(--accent)); }
.bars__n { text-align: right; font-variant-numeric: tabular-nums; }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.quick .btn { justify-content: flex-start; min-height: 44px; }

/* ---------- week calendar ---------- */
.wk-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); box-shadow: var(--card-shadow); scrollbar-width: thin; }
.wk { display: grid; grid-template-columns: 56px repeat(7, minmax(110px, 1fr)); min-width: 840px; }
.wk__corner { border-bottom: 1px solid var(--line); position: sticky; left: 0; background: var(--panel); z-index: 3; }
.wk__head { display: grid; justify-items: center; gap: 0; padding: 10px 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); text-align: center; }
.wk__head b { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.wk__num { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.15; }
.wk__head small { font-size: .7rem; color: var(--muted); }
.wk__head.is-today .wk__num { color: #fff; background: var(--accent); border-radius: 8px; padding: 0 8px; }
.wk__head.is-closed { opacity: .6; }
.wk__times { position: sticky; left: 0; z-index: 2; background: var(--panel); display: grid; grid-auto-rows: var(--hour); }
.wk__times span { font-size: .7rem; color: var(--muted); text-align: right; padding: 2px 8px 0 0; transform: translateY(-8px); font-variant-numeric: tabular-nums; }
.wk__times span:first-child { transform: none; }
.wk__col { position: relative; height: calc(var(--hour) * var(--rows)); border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) - 1px), var(--line) calc(var(--hour) - 1px) var(--hour)), repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2 - 1px), color-mix(in srgb, var(--line) 45%, transparent) calc(var(--hour) / 2 - 1px) calc(var(--hour) / 2), transparent calc(var(--hour) / 2) var(--hour)); cursor: copy; }
.wk__col.is-today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.wk__col.is-closed { cursor: not-allowed; background-color: color-mix(in srgb, var(--text) 3%, transparent); }
.wk__col.is-closed::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--line) 60%, transparent) 8px 9px); pointer-events: none; }
.wk__shade { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, transparent 0 8px, color-mix(in srgb, var(--line) 55%, transparent) 8px 9px); }
.wk__now { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 2; pointer-events: none; }
.wk__now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.wk__b { position: absolute; z-index: 1; display: flex; flex-direction: column; gap: 0; padding: 5px 7px 5px 9px; border-radius: 7px; border: 1px solid color-mix(in srgb, var(--sc) 45%, transparent); background: color-mix(in srgb, var(--sc) 16%, var(--panel)); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; font-size: .76rem; line-height: 1.25; transition: transform .14s, box-shadow .14s; }
.wk__b::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc); }
.wk__b:hover { z-index: 4; transform: scale(1.02); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); }
.wk__b:focus-visible { outline: none; box-shadow: var(--ring); z-index: 4; }
.wk__b b, .wk__b small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk__b small { color: var(--muted); }
.wk__bt { font-weight: 800; font-size: .68rem; color: var(--sc); }
:root[data-theme="light"] .wk__bt { color: color-mix(in srgb, var(--sc) 75%, #000); }
.wk__b.st-b-cancelled { opacity: .55; }
.wk__b.st-b-cancelled b { text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend__i { display: inline-flex; align-items: center; gap: 6px; }
.legend__i i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.legend__hint { margin-left: auto; }

/* ---------- table ---------- */
.tbl { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; box-shadow: var(--card-shadow); }
.tbl__h, .tbl__r { display: grid; grid-template-columns: 110px minmax(140px, 1.3fr) minmax(110px, 1fr) minmax(120px, 1fr) 140px 110px; gap: 12px; align-items: center; padding: 10px 16px; }
.tbl__h { background: var(--panel-2); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); }
.tbl__r { position: relative; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .14s; min-width: 0; }
.tbl__r:last-child { border-bottom: 0; }
.tbl__r:hover { background: var(--hover); }
.tbl__r:focus-visible { outline: none; box-shadow: inset var(--ring); }
.tbl__r::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 2px 2px 0; background: var(--sc, transparent); }
.tbl__r > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tbl__dt, .tbl__who { display: grid; }
.tbl__dt small, .tbl__who small { color: var(--muted); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl__who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl__car { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tbl--audit .tbl__h, .tbl--audit .tbl__r { grid-template-columns: 150px 110px 180px minmax(0, 1fr); }
.tbl__r--static { cursor: default; }
.tbl__r.is-warn { --sc: var(--bad); }
.tbl__wrap { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .tbl__h { display: none; }
  .tbl__r { grid-template-columns: 1fr auto; grid-template-areas: "dt st" "who who" "svc svc" "car ref"; gap: 4px 10px; padding: 12px 14px 12px 16px; }
  .tbl__r > span:nth-child(1) { grid-area: dt; display: flex; gap: 8px; align-items: baseline; }
  .tbl__r > span:nth-child(2) { grid-area: who; }
  .tbl__r > span:nth-child(3) { grid-area: svc; color: var(--muted); }
  .tbl__r > span:nth-child(4) { grid-area: car; }
  .tbl__r > span:nth-child(5) { grid-area: st; }
  .tbl__r > span:nth-child(6) { grid-area: ref; text-align: right; }
  .tbl--audit .tbl__r { grid-template-columns: 1fr auto; grid-template-areas: "dt who" "st st" "car car"; }
  .tbl--audit .tbl__r > span:nth-child(1) { grid-area: dt; }
  .tbl--audit .tbl__r > span:nth-child(2) { grid-area: who; }
  .tbl--audit .tbl__r > span:nth-child(3) { grid-area: st; color: var(--text); font-weight: 600; }
  .tbl--audit .tbl__r > span:nth-child(4) { grid-area: car; text-align: left; }
}

/* ---------- quotes ---------- */
.qs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.qc { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px 16px 14px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); box-shadow: var(--card-shadow); cursor: pointer; transition: border-color .16s, transform .16s var(--ease); min-width: 0; }
.qc::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sc); }
.qc:hover { border-color: color-mix(in srgb, var(--sc) 50%, var(--line)); transform: translateY(-1px); }
.qc:focus-visible { outline: none; box-shadow: var(--ring); }
.qc__h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.qc__who { display: grid; min-width: 0; }
.qc__who b { font-size: 1rem; overflow-wrap: anywhere; }
.qc__who small { color: var(--muted); font-size: .76rem; }
.qc__h select { flex: none; font-weight: 700; color: var(--sc); }
.qc__msg { margin: 0; color: color-mix(in srgb, var(--text) 85%, var(--muted)); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.qc__f { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.qc__car { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .82rem; min-width: 0; }
.qc__car .ic { width: 16px; height: 16px; }

/* ---------- chats ---------- */
.chats { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.chats__list { display: grid; gap: 6px; max-height: calc(100dvh - 210px); overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.chats__i { display: grid; gap: 4px; padding: 12px 14px; text-align: left; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .16s; min-width: 0; }
.chats__i:hover { border-color: color-mix(in srgb, var(--text) 26%, var(--line)); }
.chats__i[aria-current="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.chats__top { display: flex; justify-content: space-between; gap: 8px; }
.chats__top b { font-size: .7rem; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); border: 1px solid var(--line); }
.chats__top small { color: var(--muted); font-size: .74rem; }
.chats__pv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.chats__tr { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); min-height: 360px; display: flex; flex-direction: column; min-width: 0; box-shadow: var(--card-shadow); }
.chats__th { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chats__th div { display: grid; min-width: 0; }
.chats__th small { color: var(--muted); font-size: .76rem; }
.chats__back { display: none; }
.chats__log { display: flex; flex-direction: column; gap: 10px; padding: 16px; max-height: calc(100dvh - 260px); overflow-y: auto; }
.bub { max-width: 82%; padding: 9px 13px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.bub small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.bub p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.bub--me { align-self: flex-end; background: color-mix(in srgb, var(--accent) 16%, var(--panel-2)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); border-bottom-left-radius: 13px; border-bottom-right-radius: 4px; }
@media (max-width: 900px) {
  .chats { grid-template-columns: minmax(0, 1fr); }
  .chats.has-sel .chats__list { display: none; }
  .chats:not(.has-sel) .chats__tr { display: none; }
  .chats__back { display: inline-grid; }
  .chats__list, .chats__log { max-height: none; }
}

/* ---------- settings ---------- */
.stg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .stg { grid-template-columns: minmax(0, 1fr); } }
.hours { display: grid; gap: 4px; margin: 8px 0; }
.hrow { display: grid; grid-template-columns: minmax(130px, 1fr) auto; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.hrow:last-child { border-bottom: 0; }
.hrow .sw__txt b { text-transform: capitalize; }
.hrow__t { display: flex; align-items: center; gap: 6px; }
.hrow__t .inp { width: 110px; }
.hrow__c { display: none; font-size: .82rem; }
.hrow.is-closed .hrow__t { display: none; }
.hrow.is-closed .hrow__c { display: block; }
@media (max-width: 400px) { .hrow { grid-template-columns: 1fr; gap: 2px; } .hrow__t .inp { width: 100%; flex: 1; } }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; font-weight: 600; font-size: .86rem; transition: border-color .16s; }
.check:hover { border-color: color-mix(in srgb, var(--text) 26%, var(--line)); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; margin: 0; }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
/* prices editor */
.prices { display: grid; gap: 4px; margin: 8px 0; }
.prow { display: grid; grid-template-columns: minmax(130px, 1.3fr) minmax(200px, 1.4fr) minmax(110px, 1fr); align-items: center; gap: 10px 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.prow:last-child { border-bottom: 0; }
.prow--h { padding-top: 0; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.prow__svc { font-weight: 600; font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.prow__ctl { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.prow__ctl .inp { width: 120px; flex: none; }
.prow__prev { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.prow__prev--req { color: var(--muted); font-weight: 600; font-style: italic; }
@media (max-width: 560px) {
  .prow { grid-template-columns: 1fr auto; gap: 4px 10px; }
  .prow--h { display: none; }
  .prow__ctl { grid-column: 1; }
  .prow__prev { grid-column: 2; grid-row: 1; justify-self: end; }
}
.bdp { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 700px) { .bdp { grid-template-columns: minmax(0, 1fr); } }
.bdp__cal { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--panel-2); }
.bdp__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.bdp__head b { text-transform: capitalize; }
.bdp__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.bdp__grid small { text-align: center; font-size: .66rem; color: var(--muted); text-transform: uppercase; }
.bdp__d { aspect-ratio: 1; min-height: 32px; border-radius: 7px; border: 1px solid transparent; background: var(--panel); color: var(--text); font-weight: 600; font-size: .82rem; cursor: pointer; }
.bdp__d:hover { border-color: var(--accent); }
.bdp__d.is-closed { color: var(--muted); background: transparent; }
.bdp__d.is-today { border-color: color-mix(in srgb, var(--text) 40%, transparent); }
.bdp__d.is-past { opacity: .45; }
.bdp__d.is-on { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: line-through; }
.bdp__chips { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.mailst { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); margin-bottom: 14px; }
.mailst > .ic { color: var(--ok); margin-top: 2px; }
.mailst.is-off > .ic { color: var(--warn); }
.mailst p { margin: 2px 0 0; }

/* ---------- FX studio ---------- */
.savestate { font-size: .8rem; font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 20px; }
.savestate.is-saving::before { content: ''; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); border-top-color: transparent; animation: a-spin .7s linear infinite; }
.savestate.is-saved { color: var(--ok); }
.savestate.is-saved::before { content: '✓'; }
.savestate.is-err { color: var(--bad); }
.fx { display: grid; grid-template-columns: minmax(320px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx__ctl { display: grid; gap: 14px; min-width: 0; }
.swlist { display: grid; }
.swlist .sw { border-top: 1px solid var(--line); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: .78rem; font-weight: 600; cursor: pointer; }
.swatch i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .45); }
.swatch[aria-checked="true"] { border-color: var(--text); box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 18%, transparent); }
.swatch:focus-visible { outline: none; box-shadow: var(--ring); }
.swatch--custom { position: relative; padding-left: 6px; }
.swatch__custom { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch__custom::-webkit-color-swatch-wrapper { padding: 0; }
.swatch__custom::-webkit-color-swatch { border: 1px solid rgba(127, 127, 127, .5); border-radius: 50%; }
.swatch__custom::-moz-color-swatch { border-radius: 50%; }
.swatch__hex { font-size: .78rem; color: var(--muted); }
.card--danger { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--bad) 7%, var(--panel)), var(--panel)); }
.card--danger .card__ttl .ic { color: var(--bad); }
.card--danger.is-live { border-color: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent), var(--card-shadow); }
.killst { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; font-weight: 800; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); margin-bottom: 10px; }
.killst i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 25%, transparent); }
.killst.is-on { background: var(--bad); color: #fff; text-transform: uppercase; letter-spacing: .04em; }
.card--danger .sw__in:checked + .sw__track { background: var(--bad); }
.pv { position: sticky; top: calc(var(--top) + 16px); display: flex; flex-direction: column; min-width: 0; height: calc(100dvh - var(--top) - 40px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; box-shadow: var(--card-shadow); }
.pv__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pv__t { display: flex; align-items: center; gap: 8px; margin-right: auto; font-size: .88rem; }
.pv__t .ic { color: var(--accent); }
@media (max-width: 1100px) { .fx { grid-template-columns: minmax(0, 1fr); } .pv { position: relative; top: 0; height: 70vh; } }

/* stage */
.stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: start center; overflow: hidden; background: repeating-linear-gradient(-45deg, var(--bg-2) 0 10px, color-mix(in srgb, var(--bg-2) 70%, var(--line)) 10px 11px); }
.stage[data-w="full"] { place-items: stretch; }
.stage__box { position: relative; overflow: hidden; background: var(--bg); }
.stage:not([data-w="full"]) .stage__box { margin-top: 12px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, .6); }
.stage[data-w="390"] .stage__box { border-radius: 26px; box-shadow: 0 0 0 6px #111, 0 0 0 7px #333, 0 24px 60px -24px rgba(0, 0, 0, .6); }
.stage__frame { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #0a0a0a; }
.stage[data-w="full"] .stage__frame { position: static; display: block; }
.stage__loading { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; box-shadow: var(--shadow); z-index: 2; }
.stage__missing { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 24px; text-align: center; color: var(--muted); }
.stage__missing .ic { width: 34px; height: 34px; color: var(--steel); }
.stage__missing b { color: var(--text); }
.stage__missing p { margin: 0; }

/* ---------- LX studio ---------- */
.view--lx { padding: 0; }
.lx { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "top top top" "left center right"; height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); min-height: 560px; }
.lx__top { grid-area: top; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.lx__grp { display: flex; align-items: center; gap: 6px; }
.lx__lbl { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.lx__sp { flex: 1; }
.lx__state { font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.lx__state.is-dirty { color: var(--warn); }
.lx__state.is-dirty::before { content: '● '; }
.btn.is-dirty { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.lx__left, .lx__right { min-height: 0; overflow-y: auto; padding: 14px; background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); scrollbar-width: thin; }
.lx__left { grid-area: left; border-right: 1px solid var(--line); }
.lx__right { grid-area: right; border-left: 1px solid var(--line); }
.lx__center { grid-area: center; display: flex; min-width: 0; min-height: 0; }
.lx__center .stage { flex: 1; }
.lx__h { display: flex; align-items: center; gap: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 4px 0 10px; }
.lx__h .ic { width: 15px; height: 15px; color: var(--accent); }
.lx__secs { display: grid; gap: 4px; margin-bottom: 20px; }
.sec { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 0; border-radius: 9px; }
.sec:hover { background: var(--hover); }
.sec__go { flex: 1; min-width: 0; display: grid; text-align: left; padding: 6px 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; border-radius: 8px; }
.sec__go:focus-visible { outline: none; box-shadow: var(--ring); }
.sec__n { font-weight: 600; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec__go small { font-size: .7rem; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.sec.is-hidden .sec__n { color: var(--muted); text-decoration: line-through; }
.sec.is-hidden small { color: var(--warn); font-family: var(--font); font-weight: 700; }
.sec.is-absent { opacity: .5; }
.lx__texts { display: grid; gap: 4px; }
.txt { display: grid; gap: 1px; text-align: left; padding: 7px 9px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; min-width: 0; }
.txt:hover { background: var(--hover); }
.txt.is-sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.txt code { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt span { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txt.is-edited code { color: var(--accent); }
.txt.is-edited code::after { content: ' ●'; }
.insp__key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.insp__key code { font-size: .8rem; padding: 3px 8px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.ve { display: grid; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 12px; }
.ve__h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lx__ta { font-size: .92rem; min-height: 60px; }
.ve__orig { font-size: .8rem; }
.ve__orig summary { cursor: pointer; color: var(--muted); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.ve__orig p { margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.ve__a { display: flex; flex-wrap: wrap; gap: 6px; }
.others { display: grid; gap: 4px; }
.others__i { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.others__i:hover { border-color: var(--accent); }
.others__i b { font-size: .7rem; color: var(--muted); }
.others__i span { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.lx__mobile { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.chipbtn { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: .8rem; cursor: pointer; }
.chipbtn:hover { border-color: var(--accent); color: var(--accent); }
.ai__st { display: flex; align-items: center; gap: 10px; min-height: 0; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.vers { display: grid; gap: 6px; }
.ver { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel-2); }
.ver.is-cur { border-color: var(--accent); }
.ver__v { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.ver__m { display: grid; min-width: 0; }
.ver__m b { overflow-wrap: anywhere; }
.ver__m small { color: var(--muted); font-size: .76rem; }
@media (max-width: 1279px) {
  .lx { grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "top top" "center left" "center right"; }
  .lx__left { border-right: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); max-height: 38vh; }
}
@media (max-width: 899px) {
  .view--lx { padding: 0 0 calc(80px + env(safe-area-inset-bottom)); }
  .lx { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .lx__w { display: none; }
  .lx__center { height: 64vh; min-height: 360px; }
  .lx__left, .lx__right { border: 0; border-top: 1px solid var(--line); max-height: none; overflow: visible; }
  .lx__left { order: 3; }
  .lx__right { order: 2; }
  .lx__mobile { display: block; padding: 12px 16px; margin: 0; }
}

/* ---------- more sheet ---------- */
.more { display: grid; gap: 4px; }
.more__a { min-height: 46px; }
.more__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: 6px; font-weight: 600; color: var(--muted); }
.more__row .inp { width: auto; }
.more__badges .badges { display: flex; flex-wrap: wrap; overflow: visible; padding: 10px 0; }
.more .btn--block { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .drw, .mdl, .toast, .kpi, .load__fill { transition-duration: .01s !important; }
  .off-pill { animation-duration: 6s; }
}
.card__body .seg { display: flex; width: 100%; }
.card__body .seg__b { flex: 1 1 auto; justify-content: center; }
@media (max-width: 1600px) { .lx__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .lx__top { gap: 8px 10px; } }
@media (max-width: 1360px) { .lx__state { max-width: 0; overflow: hidden; padding: 0; } .lx__state.is-dirty { max-width: 14px; } }

/* ---------- boekhouding / accounting ---------- */
.inv-draft { --sc: var(--st-done); }
.inv-sent { --sc: #4ea1ff; }
.inv-paid { --sc: var(--ok); }
.inv-overdue { --sc: var(--bad); }
.inv { min-width: 0; }
.inv-amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ib--ok:hover { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.ib--danger:hover { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.tbl--inv .tbl__h, .tbl--inv .tbl__r { grid-template-columns: 104px 96px minmax(130px, 1.3fr) 110px 150px 180px; }
.tbl__acts { flex-wrap: wrap; }
.inv-pushed { margin-left: 6px; }
.inv-pushed.is-link { cursor: pointer; }
.inv-pushed.is-link:hover { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.tbl--inv-ro .tbl__h, .tbl--inv-ro .tbl__r { grid-template-columns: 110px 100px minmax(140px, 1.4fr) 120px 118px; }
.tbl--exp .tbl__h, .tbl--exp .tbl__r { grid-template-columns: 110px minmax(120px, 1.2fr) minmax(110px, 1fr) 120px minmax(0, 1.4fr); }
.tbl__acts { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
/* accounting count pills */
.fin-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.fin-stat { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-weight: 600; font-size: .85rem; color: var(--muted); }
.fin-stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc, var(--muted)); flex: none; }
.fin-stat b { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--text); line-height: 1; }
.kpi__n--money { font-size: 1.7rem; letter-spacing: 0; overflow-wrap: anywhere; }
@media (max-width: 380px) { .kpi__n--money { font-size: 1.4rem; } }
/* invoice form */
.ih { margin: 18px 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.ih:first-child { margin-top: 0; }
.ilines { display: grid; gap: 8px; }
.iline { display: grid; grid-template-columns: minmax(0, 1fr) 74px 104px 78px 30px; gap: 8px; align-items: center; }
.iline--h { gap: 8px; margin-bottom: 2px; }
.iline--h span { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.itot { display: grid; gap: 4px; justify-items: end; margin: 14px 0 4px; }
.itot__r { display: flex; align-items: baseline; gap: 16px; font-size: .9rem; color: var(--muted); }
.itot__r b { min-width: 120px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }
.itot__g { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 1.05rem; font-weight: 700; }
.itot__g span { color: var(--text); font-weight: 700; }
.itot__gv { color: var(--accent) !important; font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
@media (max-width: 620px) {
  .iline { grid-template-columns: 1fr 1fr; grid-template-areas: "desc desc" "qty price" "vat rm"; gap: 6px 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .iline > :nth-child(1) { grid-area: desc; }
  .iline > :nth-child(2) { grid-area: qty; }
  .iline > :nth-child(3) { grid-area: price; }
  .iline > :nth-child(4) { grid-area: vat; }
  .iline > :nth-child(5) { grid-area: rm; justify-self: end; }
  .iline--h { display: none; }
}
@media (max-width: 760px) {
  .tbl--inv .tbl__h, .tbl--inv-ro .tbl__h, .tbl--exp .tbl__h { display: none; }
  .tbl--inv .tbl__r, .tbl--inv-ro .tbl__r {
    grid-template-columns: 1fr auto; grid-template-areas: "num st" "cli cli" "amt act"; gap: 4px 10px; padding: 12px 14px 12px 16px;
  }
  .tbl--inv .tbl__r > span:nth-child(1), .tbl--inv-ro .tbl__r > span:nth-child(1) { grid-area: num; }
  .tbl--inv .tbl__r > span:nth-child(2), .tbl--inv-ro .tbl__r > span:nth-child(2) { grid-area: cli; color: var(--muted); font-size: .8rem; }
  .tbl--inv .tbl__r > span:nth-child(3), .tbl--inv-ro .tbl__r > span:nth-child(3) { grid-area: cli; }
  .tbl--inv .tbl__r > span:nth-child(4), .tbl--inv-ro .tbl__r > span:nth-child(4) { grid-area: amt; font-size: 1.05rem; }
  .tbl--inv .tbl__r > span:nth-child(5), .tbl--inv-ro .tbl__r > span:nth-child(5) { grid-area: st; justify-self: end; }
  .tbl--inv .tbl__r > span:nth-child(6) { grid-area: act; justify-self: end; }
  .tbl--exp .tbl__r {
    grid-template-columns: 1fr auto; grid-template-areas: "sup dat" "cat amt" "note note"; gap: 4px 10px; padding: 12px 14px;
  }
  .tbl--exp .tbl__r > span:nth-child(1) { grid-area: dat; justify-self: end; color: var(--muted); }
  .tbl--exp .tbl__r > span:nth-child(2) { grid-area: sup; font-weight: 700; }
  .tbl--exp .tbl__r > span:nth-child(3) { grid-area: cat; }
  .tbl--exp .tbl__r > span:nth-child(4) { grid-area: amt; justify-self: end; font-size: 1.05rem; }
  .tbl--exp .tbl__r > span:nth-child(5) { grid-area: note; }
}

/* ---------- koppelingen / integraties ---------- */
.int-fields:empty { display: none; }
.int-fields { margin-bottom: 4px; }
.int-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 6px 0 2px; }
.int-badge { display: inline-flex; min-height: 24px; align-items: center; }
.int-exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.int-exports .btn { justify-content: flex-start; min-height: 44px; }

/* ---------- bank ---------- */
.bank { display: grid; gap: 16px; min-width: 0; }
.bank-res { display: grid; gap: 16px; min-width: 0; }
.bank input[type="file"] { padding: 7px 10px; cursor: pointer; }
.tbl--bank .tbl__h, .tbl--bank .tbl__r { grid-template-columns: 110px minmax(120px, 1.2fr) minmax(130px, 1.6fr) 120px; }
.bank-matches { display: grid; gap: 8px; }
.bank-match { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel-2); cursor: pointer; transition: border-color .16s, background .16s; }
.bank-match:hover { border-color: color-mix(in srgb, var(--text) 22%, var(--line)); }
.bank-match__cb { width: 18px; height: 18px; accent-color: var(--accent); flex: none; cursor: pointer; }
.bank-match__num { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.bank-un { display: grid; gap: 6px; }
.bank-un__r { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.bank-un__r:last-child { border-bottom: 0; }
@media (max-width: 760px) {
  .tbl--bank .tbl__h { display: none; }
  .tbl--bank .tbl__r { grid-template-columns: 1fr auto; grid-template-areas: "cp dat" "desc desc" "amt amt"; gap: 4px 10px; padding: 12px 14px; }
  .tbl--bank .tbl__r > span:nth-child(1) { grid-area: dat; justify-self: end; color: var(--muted); }
  .tbl--bank .tbl__r > span:nth-child(2) { grid-area: cp; font-weight: 700; }
  .tbl--bank .tbl__r > span:nth-child(3) { grid-area: desc; }
  .tbl--bank .tbl__r > span:nth-child(4) { grid-area: amt; justify-self: start; font-size: 1.05rem; }
}
@media (max-width: 560px) {
  .bank-match { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "cb num conf" "cb amt amt"; gap: 4px 10px; }
  .bank-match__cb { grid-area: cb; }
  .bank-match__num { grid-area: num; }
  .bank-match .inv-amt { grid-area: amt; }
  .bank-match .chip { grid-area: conf; justify-self: end; }
  .bank-un__r { grid-template-columns: 1fr auto; }
  .bank-un__r > span:nth-child(1) { order: 3; grid-column: 1 / -1; }
}
