/* Servicesite Businesspoint (service.businesspoint.nl). Zelfde ontwerpregels als het dashboard:
   wit en neutraal grijs, paars alleen voor logo, hoofdknop en links; status in rood/oranje/groen. Fira Sans, hoeken 4px. */
:root {
  --brand: #6a1e5a; --brand-2: #551848; --brand-tint: #f3f0f2;
  --bg: #f4f4f3; --surface: #fff; --surface-2: #f0f0ee; --text: #1d1d1d; --text-2: #4d4d4d; --muted: #6b6b6b;
  --border: #e1e1de; --border-strong: #c7c7c3; --good: #2e7d4f; --warning: #a86f00; --critical: #b3261e;
  --radius: 4px; --font: "Fira Sans", system-ui, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--brand); }
a:hover { color: var(--brand-2); }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 6px; font-weight: 600; }
h2 { font-size: 18px; margin: 0 0 10px; font-weight: 600; }
h3 { font-size: 16px; margin: 18px 0 8px; font-weight: 600; }
p { margin: 0 0 12px; }
.small { font-size: 14px; color: var(--muted); }
.sub { color: var(--text-2); margin: 0 0 18px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Kop en voet */
.top { background: var(--surface); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-size: 15px; color: var(--muted); border-left: 1px solid var(--border); padding-left: 10px; }
.top-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a, .top-nav button { font: inherit; font-size: 15px; background: none; border: 0; color: var(--text-2); text-decoration: none; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; }
.top-nav a:hover, .top-nav button:hover { background: var(--surface-2); color: var(--text); }
.top-nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.preview-bar { margin-top: 12px; font-size: 14px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
main { padding-top: 28px; padding-bottom: 48px; min-height: 60vh; }
.foot { border-top: 1px solid var(--border); background: var(--surface); padding: 22px 0; font-size: 14px; color: var(--text-2); }
.foot-in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot p { margin: 4px 0 0; max-width: 560px; }

/* Vlakken */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; }
.card.narrow { max-width: 620px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.lead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lead .sub { margin: 0; }
.muted-box { background: var(--surface-2); border-radius: var(--radius); padding: 14px 16px; }
.note { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; background: var(--surface); }
.note.attention { border-color: #e3c27a; background: #fdf8ec; }
.note.done { border-color: #b9d8c4; background: #f1f8f3; }
.note b { display: block; margin-bottom: 2px; }

/* Knoppen */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 500; min-height: 44px; padding: 0 18px; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.link { border: 0; background: none; color: var(--brand); padding: 0 4px; min-height: 32px; text-decoration: underline; }
.btn.link:hover { background: none; color: var(--brand-2); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.actions .right { display: flex; gap: 10px; margin-left: auto; }

/* Formulier */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; min-width: 0; }
.field label, .label { font-size: 14px; font-weight: 500; color: var(--text); }
.field .opt { font-weight: 400; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--muted); }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 2px solid var(--brand-tint); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--critical); }
.err { color: var(--critical); font-size: 14px; }
.form-error { color: var(--critical); font-size: 15px; min-height: 0; margin: 10px 0 0; }
.form-error:empty { display: none; }
.row { display: grid; gap: 0 14px; grid-template-columns: repeat(6, 1fr); }
.c6 { grid-column: span 6; } .c4 { grid-column: span 4; } .c3 { grid-column: span 3; } .c2 { grid-column: span 2; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 4px 0 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.code-input { font-size: 22px; letter-spacing: 6px; text-align: center; max-width: 220px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.sub-block { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }

/* Tabs (inloggen) */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 0 0 16px; }
.tabs button { font: inherit; font-size: 15px; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; color: var(--text-2); margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); font-weight: 500; }

/* Stappen */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps li { flex: 1; font-size: 14px; color: var(--muted); border-top: 3px solid var(--border); padding-top: 8px; counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { border-top-color: var(--text-2); color: var(--text-2); }
.steps li.current { border-top-color: var(--brand); color: var(--text); font-weight: 500; }

/* Apparaatkeuze */
.devices { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-bottom: 16px; }
.device { text-align: left; font: inherit; font-size: 15px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; color: var(--text); }
.device:hover { border-color: var(--text-2); }
.device[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-tint); }
.device .small { display: block; }

/* Bijlagen */
.drop { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 18px; text-align: center; background: var(--surface-2); }
.drop.over { border-color: var(--brand); background: var(--brand-tint); }
.drop p { margin: 6px 0 0; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; font-size: 13px; }
.thumb img, .thumb video, .thumb .fileicon { display: block; width: 100%; height: 96px; object-fit: cover; background: var(--surface-2); }
.thumb .fileicon { display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.thumb .meta { padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb .bar { height: 3px; background: var(--surface-2); }
.thumb .bar i { display: block; height: 3px; width: 0; background: var(--brand); transition: width .2s; }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; cursor: pointer; font: inherit; font-size: 18px; line-height: 1; color: var(--text); }
.thumb.failed { border-color: var(--critical); }
.thumb.failed .meta { color: var(--critical); white-space: normal; }
a.thumb { color: var(--text); text-decoration: none; }

/* Overzicht en status */
.summary { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; margin: 0; }
.summary dt { color: var(--muted); font-size: 14px; }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.sum-head { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.sum-head:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.status { display: inline-block; font-size: 14px; font-weight: 500; padding: 2px 8px; border-radius: var(--radius); border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface); white-space: nowrap; }
.status.open { border-color: #e3c27a; color: var(--warning); }
.status.busy { border-color: #e3c27a; color: var(--warning); }
.status.done { border-color: #b9d8c4; color: var(--good); }
.status.wait { border-color: #ecb3ae; color: var(--critical); }
.track { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 8px 0 18px; }
.track li { border-top: 3px solid var(--border); padding-top: 8px; font-size: 14px; color: var(--muted); }
.track li.done { border-top-color: var(--good); color: var(--text-2); }
.track li.current { border-top-color: var(--brand); color: var(--text); font-weight: 500; }
.track li span { display: block; font-weight: 400; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 10px 0; border-top: 1px solid var(--border); }
.timeline li:first-child { border-top: 0; }
.timeline .who { font-weight: 500; }
.timeline .txt { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.tickets { list-style: none; padding: 0; margin: 0; }
.tickets li { border-top: 1px solid var(--border); }
.tickets li:first-child { border-top: 0; }
.tickets a { display: grid; grid-template-columns: 130px 1fr auto; gap: 4px 16px; align-items: center; padding: 14px 4px; color: var(--text); text-decoration: none; }
.tickets a:hover { background: var(--surface-2); }
.tickets .num { font-weight: 600; }
.tickets .desc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { color: var(--muted); padding: 10px 0; }
.big-num { font-size: 22px; font-weight: 600; }

@media (max-width: 760px) {
  h1 { font-size: 21px; }
  .grid2 { grid-template-columns: 1fr; }
  .c4, .c3, .c2 { grid-column: span 6; }
  .row.keep .c2 { grid-column: span 2; } .row.keep .c4 { grid-column: span 4; }
  .card { padding: 16px; }
  .summary { grid-template-columns: 1fr; gap: 0; }
  .summary dd { margin-bottom: 8px; }
  .steps li { font-size: 0; } .steps li::before { font-size: 13px; } .steps li.current { font-size: 13px; }
  .tickets a { grid-template-columns: 1fr auto; }
  .tickets .desc { grid-column: 1 / -1; white-space: normal; }
  .brand span { display: none; }
  .top-in { flex-wrap: wrap; gap: 0; padding-top: 6px; padding-bottom: 6px; }
  .top-nav { margin-left: -6px; }
  .top-nav { flex-wrap: nowrap; gap: 2px; }
  .top-nav a, .top-nav button { font-size: 14px; padding: 8px 6px; white-space: nowrap; }
  .brand img { height: 26px; }
  .actions .right { width: 100%; } .actions .right .btn { flex: 1; }
  .track li { font-size: 13px; padding-right: 6px; }
}

/* v149: één meldscherm, "Meer details" en inloggen met het webshopaccount */
details.more, details.login-line { border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; margin: 14px 0; }
details.more > summary, details.login-line > summary { cursor: pointer; font-weight: 500; color: var(--brand); min-height: 32px; display: flex; align-items: center; gap: 6px; }
details.more[open] > summary, details.login-line[open] > summary { margin-bottom: 10px; }
details.login-line { background: var(--brand-tint); border-color: transparent; }
