/* SAMY LAB – lab.samymrad.de. Neutrales Lab: Off-White, weiße Flächen, 1px-Haarlinien,
   Anthrazit, RAL 3000 Feuerrot als einziger Akzent. Ansicht Hundehelme: Tannengrün/Weiß.
   Keine externen Ressourcen, keine Verläufe, keine Schlagschatten. */

:root {
  --bg: #F6F6F2;
  --surface: #FFFFFF;
  --surface-2: #FBFBF8;
  --line: #D8D8D2;
  --line-strong: #B9B9B1;
  --ink: #1A1B1E;
  --ink-2: #45464B;
  --ink-3: #6E6F74;
  --red: #AF2B1E;
  --red-hover: #962417;
  --red-tint: #F7ECE9;
  --ok: #2D6A3E;
  --ok-tint: #EAF2EC;
  --warn: #8A5B00;
  --warn-tint: #FAF1DF;
  --focus: #1A1B1E;
  --radius: 2px;
  --sans: "Inter", "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--sans);
  font-feature-settings: "tnum" 1;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--red); text-underline-offset: 0.2em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.hint { color: var(--ink-3); font-size: 12.5px; }
.opt { color: var(--ink-3); font-weight: 400; }
.fineprint { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
.eyebrow {
  font: 600 11px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 8px;
}
.visually-hidden, .visually-hidden-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 50; }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ Wortmarke */
.wordmark { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.wordmark-mark { width: 14px; height: 14px; background: var(--red); display: inline-block; }
.wordmark-text { font: 700 15px/1 var(--sans); letter-spacing: 0.22em; }
.wordmark-host { font-size: 11.5px; color: var(--ink-3); padding-left: 10px; border-left: 1px solid var(--line); }
.wordmark--inverse .wordmark-mark { background: #fff; }
.wordmark--inverse .wordmark-text { color: #fff; }

/* ------------------------------------------------------------ Buttons & Felder */
.btn {
  font: 500 14px/1 var(--sans);
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 10px 16px;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-secondary { background: var(--surface); border-color: var(--ink); color: var(--ink); }
.btn-secondary:not(:disabled):hover { background: var(--ink); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--ink-2); background: var(--surface); }
.btn-ghost:not(:disabled):hover { border-color: var(--ink); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: var(--red); color: var(--red); }
.btn-danger:not(:disabled):hover { background: var(--red); color: #fff; }
.btn-small { padding: 6px 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
input[type=text], input[type=password], input[type=number], select, textarea {
  font: 14px/1.4 var(--sans);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 10px;
  width: 100%;
}
input.mono, textarea.code { font-family: var(--mono); font-size: 13px; }
textarea { resize: vertical; }
textarea.code { min-height: 220px; background: var(--surface-2); white-space: pre; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
input[type=file] { font-size: 13px; color: var(--ink-2); }

.msg { margin-top: 12px; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }
.msg:empty { display: none; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--red); }
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  background: var(--red-tint);
  padding: 10px 12px;
  font-size: 13.5px;
  margin-top: 14px;
}
.tag {
  display: inline-block;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.1em;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 3px 5px;
  vertical-align: 2px;
  margin-left: 6px;
}
.tag-neutral { color: var(--ink-3); border-color: var(--line-strong); }

/* ------------------------------------------------------------ Login-Portal */
.page-login { min-height: 100vh; display: flex; }
.portal { display: grid; grid-template-columns: minmax(320px, 5fr) 7fr; width: 100%; min-height: 100vh; }
.portal-brand {
  background: var(--red);
  color: #fff;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
}
.portal-claim h1 { font-size: 56px; line-height: 1; letter-spacing: -0.03em; font-weight: 600; }
.portal-claim p { margin-top: 16px; max-width: 30ch; color: #F6DDD9; font-size: 15px; }
.portal-specs { margin: 0; display: grid; gap: 10px; border-top: 1px solid rgba(255, 255, 255, 0.35); padding-top: 18px; }
.portal-specs div { display: flex; justify-content: space-between; gap: 16px; }
.portal-specs dt { font: 600 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: #F6DDD9; }
.portal-specs dd { margin: 0; font-size: 12.5px; }
.portal-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--bg); }
.portal-form form { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); padding: 32px; }
.portal-form h2 { font-size: 20px; }
.form-stack .btn-primary { margin-top: 20px; }
.form-error { margin-top: 14px; color: var(--red); font-size: 13.5px; font-weight: 500; }
.form-error:empty { display: none; }
@media (max-width: 820px) {
  .portal { grid-template-columns: 1fr; }
  .portal-brand { padding: 28px; gap: 28px; }
  .portal-claim h1 { font-size: 40px; }
}

/* ------------------------------------------------------------ App-Rahmen */
.page-app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-row {
  max-width: 1280px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.account { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.account-id { display: flex; align-items: center; gap: 8px; }
.account-name { font-weight: 600; font-family: var(--mono); font-size: 13px; }
.role-badge {
  font: 600 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--ink-2); padding: 4px 6px;
}
.role-badge[data-role=admin] { border-color: var(--red); color: var(--red); }
.quota { display: flex; align-items: center; gap: 18px; padding-left: 20px; border-left: 1px solid var(--line); }
.quota-item { display: grid; grid-template-columns: auto auto; column-gap: 8px; row-gap: 4px; align-items: baseline; }
.quota-label { font: 500 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.quota-value { font-size: 13px; text-align: right; }
.quota-value.low { color: var(--red); font-weight: 600; }
.quota-item .bar { grid-column: 1 / -1; }
.quota-note { font-size: 11.5px; color: var(--warn); }
.quota-note:empty { display: none; }
.bar { display: block; height: 3px; background: var(--line); min-width: 120px; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--ink); }
.bar-fill.low { background: var(--red); }

.tabs { max-width: 1280px; margin: 0 auto; padding: 0 24px 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  font: 500 14px/1 var(--sans);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 16px; cursor: pointer; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px;
}
.tab:hover { color: var(--ink); border-color: var(--ink); }
.tab[aria-selected=true] { color: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: var(--red-tint); }

main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 28px 24px 56px; }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h1 { font-size: 26px; letter-spacing: -0.02em; }
.statusbar {
  border-top: 1px solid var(--line); background: var(--surface);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px; font-size: 11.5px; color: var(--ink-3);
}

/* ------------------------------------------------------------ Panels */
.panel { background: var(--surface); border: 1px solid var(--line); padding: 22px 24px 24px; margin-bottom: 18px; }
.panel-flush { padding: 0; }
.panel-flush .panel-head { padding: 16px 20px; border-bottom: 1px solid var(--line); margin: 0; }
.panel-flush .msg { padding: 0 20px 16px; }
.panel-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.panel-head--compact { align-items: center; justify-content: space-between; margin-bottom: 4px; }
.panel-head h2 { font-size: 17px; }
.panel-head--compact h2 { font-size: 15px; }
.panel-sub { color: var(--ink-3); font-size: 13.5px; margin-top: 3px; }
.panel-num {
  font-size: 12px; font-weight: 600; color: var(--red);
  border: 1px solid var(--red); padding: 4px 6px; line-height: 1;
}
.panel-head .state-badge { margin-left: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.split-wide { grid-template-columns: 3fr 2fr; }
.split-col { min-width: 0; }
.col-title { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin: 6px 0 10px; }
.split-col .col-title ~ .col-title { margin-top: 22px; }
@media (max-width: 900px) { .split, .split-wide { grid-template-columns: 1fr; } }

.stepper { list-style: none; margin: 0; padding: 0; display: flex; border: 1px solid var(--line); background: var(--surface); }
.stepper li { padding: 9px 14px; font-size: 13px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.stepper li + li { border-left: 1px solid var(--line); }
.stepper li span { font-size: 11px; }
.stepper li[data-state=active] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.stepper li[data-state=active] span { color: var(--red); }
.stepper li[data-state=done] { color: var(--ink-2); }
.stepper li[data-state=done] span::after { content: " ✓"; color: var(--ok); }
.stepper li[data-state=locked] { text-decoration: line-through; }

.dropzone {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px dashed var(--line-strong); background: var(--surface-2);
  padding: 18px; cursor: pointer;
}
.dropzone:hover { border-color: var(--ink); }
.visually-hidden-input:focus-visible + .dropzone { outline: 2px solid var(--focus); outline-offset: 2px; }
.dropzone-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.dropzone-meta { font-size: 12px; color: var(--ink-3); }
.dropzone-file { font-size: 12px; color: var(--ink); }
.dropzone-file:empty { display: none; }

.viewport { margin: 0; border: 1px solid var(--line); background: var(--surface-2); position: relative; min-height: 320px; display: flex; flex-direction: column; }
.viewport img { width: 100%; height: auto; display: block; flex: 1; object-fit: contain; background: #fff; }
.viewport-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--ink-3); font-size: 13px; min-height: 280px; }
.viewport-busy { position: absolute; top: 10px; right: 10px; background: var(--ink); color: #fff; font-size: 11px; padding: 4px 7px; }
.viewport figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); background: var(--surface); }
.hash { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }

.params { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.param { display: grid; grid-template-columns: 1fr 120px; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.param label { font-size: 13px; color: var(--ink); font-weight: 500; }
.param-range { grid-column: 1; font-size: 11px; color: var(--ink-3); }
.param-input { grid-column: 2; grid-row: 1 / span 2; position: relative; display: block; }
.param-input input { padding-right: 34px; text-align: right; }
.param-input::after { content: "mm"; position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); color: var(--ink-3); }
.param.changed label::after { content: " •"; color: var(--red); }
.param.invalid input { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }

.state-badge {
  font: 600 10.5px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 7px; border: 1px solid var(--line-strong); color: var(--ink-3); white-space: nowrap;
}
.state-badge[data-state=queued], .state-badge[data-state=running] { border-color: var(--warn); color: var(--warn); background: var(--warn-tint); }
.state-badge[data-state=succeeded], .state-badge[data-state=active] { border-color: var(--ok); color: var(--ok); background: var(--ok-tint); }
.state-badge[data-state=failed], .state-badge[data-state=timeout], .state-badge[data-state=interrupted], .state-badge[data-state=locked] { border-color: var(--red); color: var(--red); background: var(--red-tint); }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { font: 600 10.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2); }
.table th.num, .table td.num { text-align: right; }
.table tr.empty td { color: var(--ink-3); font-style: italic; }
.table td.hash { max-width: 220px; }
.table-cost th { font-weight: 500; color: var(--ink-2); }
.table-cost td { font-family: var(--mono); text-align: right; }
.table-cost .sub { display: block; font: 11px var(--sans); color: var(--ink-3); }
.table-cost tfoot th, .table-cost tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; color: var(--ink); }
.table-scroll { overflow-x: auto; }

.checklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checklist li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.checklist li.empty { color: var(--ink-3); }
.checklist .verdict { font: 600 11px/1.4 var(--mono); }
.checklist li[data-ok=true] .verdict { color: var(--ok); }
.checklist li[data-ok=false] .verdict { color: var(--red); }
.checklist li[data-ok=unknown] .verdict { color: var(--warn); }

/* ------------------------------------------------------------ Admin */
.admin-grid { display: grid; grid-template-columns: 340px 1fr; gap: 18px; align-items: start; }
@media (max-width: 1060px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-main { min-width: 0; }
.live { display: flex; align-items: center; gap: 12px; }
.switch { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-2); }
.table-users td { white-space: nowrap; }
.table-users select { width: auto; min-width: 150px; padding: 6px 8px; font: 12.5px var(--mono); }
.table-users input[type=number] { width: 84px; padding: 5px 7px; font: 12.5px var(--mono); text-align: right; }
.user-name { font-family: var(--mono); font-weight: 600; }
.user-meta { display: block; font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.usage { display: grid; grid-template-columns: auto auto; gap: 4px 8px; align-items: center; }
.usage .bar { grid-column: 1 / -1; min-width: 90px; }
.usage-text { font-family: var(--mono); font-size: 12px; }
.usage-est { font-size: 11px; color: var(--warn); }
.row-actions { display: flex; gap: 6px; }
tr.self td { background: var(--surface-2); }
tr.inactive td { color: var(--ink-3); }

.token-box { border: 1px solid var(--red); border-top-width: 3px; background: var(--surface); padding: 18px 20px 20px; margin-bottom: 18px; }
.token-box h2 { font-size: 15px; }
.token-warning { font-size: 13px; color: var(--red); margin-top: 6px; }
.token-field { display: flex; gap: 8px; margin-top: 12px; }
.token-field input { background: var(--red-tint); border-color: var(--red); font-size: 12.5px; }

/* ------------------------------------------------------------ Hundehelme (Marke Grün/Weiß) */
.theme-helme {
  --h-green: #1F4E36;
  --h-green-2: #2E6B4A;
  --h-tint: #EAF1EB;
  --h-line: #C5D4C9;
  --h-ink: #17261E;
  --h-muted: #41564A;
  --h-red: #AF2B1E;
  color: var(--h-ink);
}
.lab-strip {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  font-size: 12px; color: var(--ink-3);
  border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; margin-bottom: 18px;
}
.lab-strip .mono { font-size: 10.5px; letter-spacing: 0.12em; color: var(--ink-2); }
.helme-customer { background: #FFFFFF; border: 1px solid var(--h-line); padding: 44px 44px 36px; }
.helme-hero { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: center; }
.emblem { width: 240px; height: 240px; display: block; }
.helme-eyebrow { font: 600 13px/1 var(--sans); letter-spacing: 0.04em; color: var(--h-green-2); margin-bottom: 12px; }
.helme-intro h1 { font: 600 40px/1.08 var(--serif); letter-spacing: -0.015em; color: var(--h-green); max-width: 18ch; }
.helme-lead { font-size: 17px; line-height: 1.6; color: var(--h-muted); margin-top: 16px; max-width: 54ch; }
.segmented { display: inline-flex; margin-top: 26px; border: 1px solid var(--h-green); border-radius: 999px; padding: 3px; background: #fff; }
.segment {
  font: 500 14px/1 var(--sans); border: 0; background: none; color: var(--h-green);
  padding: 10px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center;
}
.segment-key { font-size: 11px; border: 1px solid currentColor; border-radius: 999px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; }
.segment[aria-checked=true] { background: var(--h-green); color: #fff; }
.theme-helme :focus-visible { outline-color: var(--h-green); }
.helme-steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--h-line); }
.helme-step { padding: 28px 28px 8px 0; }
.helme-step + .helme-step { padding-left: 28px; border-left: 1px solid var(--h-line); }
.helme-step-num { font: 600 44px/1 var(--serif); color: var(--h-green); display: block; margin-bottom: 14px; }
.helme-step h2 { font: 600 21px/1.2 var(--serif); color: var(--h-green); margin-bottom: 10px; }
.helme-step p { color: var(--h-muted); font-size: 15.5px; line-height: 1.6; }
.helme-step .helme-coin { margin-top: 14px; padding: 10px 12px; background: var(--h-tint); border-left: 3px solid #C9A45C; font-size: 14px; color: var(--h-ink); }
.helme-red { color: var(--h-red); font-weight: 600; }
.helme-tip { margin-top: 24px; font-size: 13.5px; color: var(--h-muted); border-top: 1px solid var(--h-line); padding-top: 16px; }
.pictogram { width: 100%; max-width: 260px; height: auto; margin-top: 14px; display: block; }
.views { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 10px; }
.views li { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--h-muted); }
.view-frame { width: 58px; height: 46px; border: 1.5px solid var(--h-green); border-radius: 6px; position: relative; background: var(--h-tint); }
.view-dot { position: absolute; background: var(--h-green); border-radius: 50%; }
.view-dot--top { width: 22px; height: 28px; left: 18px; top: 9px; border-radius: 50% 50% 45% 45%; }
.view-dot--front { width: 26px; height: 24px; left: 16px; top: 11px; }
.view-dot--side { width: 30px; height: 18px; left: 12px; top: 14px; border-radius: 50% 30% 30% 50%; }
@media (max-width: 900px) {
  .helme-customer { padding: 28px 22px; }
  .helme-hero { grid-template-columns: 1fr; gap: 24px; }
  .emblem { width: 180px; height: 180px; }
  .helme-intro h1 { font-size: 30px; }
  .helme-steps { grid-template-columns: 1fr; }
  .helme-step, .helme-step + .helme-step { padding: 22px 0 6px; border-left: 0; border-top: 1px solid var(--h-line); }
}

.helme-upload { margin-top: 18px; background: #fff; border: 1px solid var(--h-line); border-top: 3px solid var(--h-green); padding: 24px 28px 26px; }
.helme-upload-tag { font-size: 10.5px; letter-spacing: 0.14em; color: var(--h-green-2); margin-bottom: 6px; }
.helme-upload h2 { font: 600 20px/1.2 var(--serif); color: var(--h-green); }
.helme-upload header p { color: var(--h-muted); font-size: 14px; margin-top: 6px; }
.dropzone-helme { margin-top: 16px; border-color: var(--h-line); background: var(--h-tint); }
.dropzone-helme:hover { border-color: var(--h-green); }
.dropzone-helme .dropzone-title { color: var(--h-green); }
.helme-upload .checklist { margin-top: 14px; border-top-color: var(--h-line); }
.helme-upload .checklist:empty { display: none; }
.helme-upload .checklist li { border-bottom-color: var(--h-line); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.thumbs:empty { display: none; }
.thumbs figure { margin: 0; width: 150px; font-size: 11.5px; color: var(--h-muted); }
.thumbs img, .thumbs video { width: 150px; height: 110px; object-fit: cover; border: 1px solid var(--h-line); display: block; background: var(--h-tint); }
.thumbs figcaption { margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-helme { border-color: var(--h-line); color: var(--h-green); }
.btn-helme:not(:disabled):hover { border-color: var(--h-green); color: var(--h-green); }


/* ------------------------------------------------------------ Lab Design: Web-to-CAD-Eingabe */
.view-head h1 { max-width: 30ch; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 8px; }
.choice-group { margin-bottom: 18px; }
.choice-group--inline { margin: 14px 0 0; }
.choice-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.choice-card {
  text-align: left; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 16px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: var(--ink);
}
.choice-card:hover { border-color: var(--ink); }
.choice-card[aria-checked=true] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: var(--red-tint); }
.choice-title { font-weight: 600; font-size: 15px; }
.choice-hint { font-size: 13px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 13px/1 var(--sans); padding: 8px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-checked=true], .chip[aria-pressed=true] { border-color: var(--red); color: var(--red); background: var(--red-tint); }
#cad-optic-note { margin-top: 10px; }
.actions--end { justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 22px; }
.file-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list:empty { display: none; }
.file-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; border: 1px solid var(--line); padding: 6px 8px; background: var(--surface); }
.file-item--err { border-color: var(--red); background: var(--red-tint); }
.file-thumb { width: 44px; height: 44px; object-fit: cover; display: block; background: var(--surface-2); border: 1px solid var(--line); }
.file-thumb--3d { display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--red); }
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-name { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 11.5px; color: var(--ink-3); }
details.expert, details.tech { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
details.expert > summary, details.tech > summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
details.tech[open] > summary { margin-bottom: 14px; }
.viewer3d { flex: 1; min-height: 380px; position: relative; background: #fff; }
.viewer3d canvas { width: 100% !important; height: 100% !important; display: block; position: absolute; inset: 0; cursor: grab; }
.viewer3d canvas:active { cursor: grabbing; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.downloads:empty { display: none; }
.downloads .btn { text-decoration: none; display: inline-block; }
.panel-muted { background: var(--surface-2); }
.panel-muted .panel-head { margin-bottom: 0; }

/* ------------------------------------------------------------ Verwaltung: Bereichsrechte */
.access-grid { margin-top: 14px; }
.access-rows { display: flex; flex-direction: column; gap: 6px; }
.access-row { display: grid; grid-template-columns: 1fr minmax(150px, auto); gap: 10px; align-items: center; font-size: 13px; color: var(--ink); font-weight: 400; }
.access-row select { padding: 6px 8px; font-size: 13px; }
.access-row select.off { color: var(--ink-3); }
.access-cell { min-width: 300px; }
.access-cell .template-select { margin-bottom: 8px; font: 12.5px var(--sans); }
.access-row--compact { grid-template-columns: 120px 1fr; font-size: 12px; }
.access-row--compact select { min-width: 0; width: 100%; font: 12px var(--sans); padding: 4px 6px; }
.table-users td { vertical-align: top; }

/* ------------------------------------------------------------ Hundehelme: Referenzblatt */
.helme-ref { margin-top: 14px; font-size: 14px; color: var(--h-green); border-left: 3px solid var(--h-green); padding-left: 10px; }

/* ------------------------------------------------------------ Phase B: Rückfragen & Druckauftrag */
.dialog { border: 1px solid var(--red); background: var(--red-tint); padding: 16px 18px; margin-bottom: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dialog-head h3 { font-size: 15px; }
#dialog-intro { margin-top: 4px; }
.assumptions { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }
.assumptions:empty { display: none; }
.assumptions .assumptions-head { list-style: none; margin-left: -18px; font-weight: 500; }
.questions { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.questions:empty { display: none; }
.question { background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; }
.question-text { font-size: 14px; font-weight: 500; color: var(--ink); margin-bottom: 8px; display: block; }
.question .unit-input { display: flex; align-items: center; gap: 8px; max-width: 220px; }
.question .unit-input span { font: 12px var(--mono); color: var(--ink-3); }
.order-form { max-width: 640px; }
.label-like { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.estimate { font-size: 15px; padding: 9px 0; }
.col-title--spaced { margin-top: 22px; }
.orders-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.orders-list li { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.orders-list li.empty { color: var(--ink-3); font-style: italic; }
.orders-list .order-main { flex: 1; min-width: 220px; }
.orders-list .order-meta { display: block; font-size: 12px; color: var(--ink-3); }
.state-badge[data-state=angefragt] { border-color: var(--warn); color: var(--warn); }
.state-badge[data-state=angenommen], .state-badge[data-state=im_druck] { border-color: var(--ink); color: var(--ink); }
.state-badge[data-state=fertig] { border-color: var(--ok); color: var(--ok); }
.state-badge[data-state=abgelehnt], .state-badge[data-state=storniert] { border-color: var(--line-strong); color: var(--ink-3); }
.order-note-cell { white-space: normal !important; max-width: 240px; font-size: 12.5px; }

/* ------------------------------------------------------------ Tier-Skulpturen */
.notice--soft { border-left-color: var(--ink-3); background: var(--surface-2); }
.bar--wide { min-width: 220px; margin-top: 8px; }
input[type=range] { width: 100%; accent-color: var(--red); }
#tiere-height-out { font-size: 14px; color: var(--ink); margin-left: 6px; }
