/* ============================================================================
   NeuroMark Platform — Design System (Iteration 1)
   Client-approved direction: „Schritt für Schritt" (concierge wizard).

   Warm editorial paper + deep forest green · Fraunces serif display ·
   DM Sans body · JetBrains Mono data. Light-mode only (by design).

   This is the shared token + component layer for mockups-v2/ (all screens
   and the shell). Nothing here depends on the old mockups/ theme.css.
   ============================================================================ */

:root {
  --paper:   #faf8f3;
  --card:    #fffdf9;
  --ink:     #211c15;
  --ink-2:   #4d463a;
  --muted:   #7c7261;
  --line:    #e8e1d2;
  --green:   #1e5f43;
  --green-2: #174a34;
  --green-3: #2e7d5b;
  --green-bg:#e9f1eb;
  --rose:    #b3445f;
  --rose-bg: #fbeef1;
  --shadow-card: 0 1px 2px rgba(33,28,21,.05), 0 24px 48px -24px rgba(33,28,21,.18);
  --shadow-cta:  0 10px 24px -8px rgba(30,95,67,.45);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }

body {
  min-height: 100dvh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(30,95,67,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(179,68,95,.05), transparent 55%),
    var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.serif { font-family: 'Fraunces', Georgia, serif; }

.nm-role-hidden { display: none !important; }

/* ---------- Brand & top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--green-3), var(--green));
  color: #fff; box-shadow: 0 8px 18px -6px rgba(30,95,67,.45);
}
.brand-name { font-weight: 700; letter-spacing: -.01em; font-size: 15.5px; }
.brand-name small { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 1px; }

.step-chip {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green);
  background: var(--green-bg); border: 1px solid rgba(46,125,91,.25);
  padding: 6px 12px; border-radius: 999px;
}
.link-help {
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 6px 10px; border-radius: 999px; transition: all .2s var(--ease);
}
.link-help:hover { color: var(--green); background: var(--green-bg); }

/* ---------- Wizard stage ---------- */
.stage {
  flex: 1; width: 100%; max-width: 1400px; margin: 0 auto;
  padding: clamp(8px, 2vw, 24px) clamp(20px, 4vw, 56px) 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* ---------- Narrative rail ---------- */
.narrative { display: none; }
@media (min-width: 1024px) { .narrative { display: block; } }
.narrative.mobile { display: block; }
@media (min-width: 1024px) { .narrative.mobile { display: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--green); border-radius: 2px; }

.display {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -.02em;
  color: var(--ink); text-wrap: balance;
}
.display em { font-style: italic; font-weight: 500; color: var(--green); }

.narrative-sub {
  margin-top: 16px; color: var(--ink-2); font-size: 15px; max-width: 38ch;
  line-height: 1.65;
}

.illus {
  margin: 26px 0 0; width: 132px; height: 132px; border-radius: 36px;
  background: var(--green-bg); border: 1px solid rgba(46,125,91,.22);
  display: grid; place-items: center;
  box-shadow: 0 18px 36px -18px rgba(30,95,67,.35);
  animation: floaty 7s ease-in-out infinite;
}
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }

.progress { margin-top: 30px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.progress-meta b { color: var(--ink-2); font-weight: 600; }
.track { height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--green-3)); border-radius: 999px; transition: width .6s var(--ease); }

.trust {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; gap: 16px; flex-wrap: wrap;
}
.trust span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.trust svg { color: var(--green-3); flex-shrink: 0; }

/* ---------- Step panel ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-card);
  position: relative;
}
.panel.anim-in { animation: rise .55s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.kicker {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--green); margin-bottom: 10px;
}
.panel h2 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -.015em; line-height: 1.15; color: var(--ink);
}
.panel .lede { margin-top: 8px; color: var(--muted); font-size: 13.5px; max-width: 48ch; }

/* Selected department chip */
.dept-chip {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 8px;
  background: var(--green-bg); border: 1px solid rgba(46,125,91,.25); color: var(--green);
  font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 7px 14px;
  animation: rise .45s var(--ease) both;
}
.dept-chip svg { width: 15px; height: 15px; }

/* Option rows */
.options { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: 18px; border: 1.5px solid var(--line);
  background: #fff; cursor: pointer; transition: all .25s var(--ease);
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i) * 70ms);
}
.opt:hover { border-color: var(--green-3); transform: translateX(3px); }
.opt.selected { border-color: var(--green); background: var(--green-bg); box-shadow: 0 10px 24px -14px rgba(30,95,67,.4); }
.opt-icon {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--green-bg); color: var(--green); transition: all .25s var(--ease);
}
.opt.selected .opt-icon { background: var(--green); color: #fff; }
.opt-body { flex: 1; min-width: 0; }
.opt-body b { display: block; font-size: 14.5px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.opt-body span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line);
  flex-shrink: 0; display: grid; place-items: center; transition: all .2s var(--ease);
}
.opt.selected .radio { border-color: var(--green); }
.opt.selected .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pop .3s var(--ease); }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }

/* Step 1 — integrated full-width layout */
.step1-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.step1-copy { min-width: 0; }
.step1-head .display { font-size: clamp(26px, 2.6vw, 36px); }
.step1-head .lede { max-width: 60ch; margin-top: 10px; }
.step1-head .dept-chip { margin-top: 4px; }

.dropzone {
  margin-top: 20px; border: 1.5px dashed #c9bfa9; border-radius: 20px;
  background: #fbf8f1; padding: 44px 24px; cursor: pointer; min-height: 214px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  text-align: center; transition: all .25s var(--ease);
}
.dropzone:hover, .dropzone.drag { border-color: var(--green); background: var(--green-bg); }
.dz-badge {
  width: 60px; height: 60px; border-radius: 18px; flex-shrink: 0;
  background: var(--card); border: 1px solid var(--line); color: var(--green);
  display: grid; place-items: center; box-shadow: 0 8px 16px -10px rgba(33,28,21,.2);
  transition: transform .25s var(--ease);
}
.dz-badge svg { width: 26px; height: 26px; }
.dropzone:hover .dz-badge { transform: translateY(-3px); }
.dz-text { min-width: 0; }
.dz-title { display: block; font-weight: 700; font-size: 16px; color: var(--ink); }
.dz-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.files { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.file {
  display: flex; align-items: center; gap: 10px; padding: 10px 13px;
  border-radius: 13px; border: 1px solid var(--line); background: #fff;
  animation: rise .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms);
}
.file-type {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700; letter-spacing: .02em;
}
.file-type.pdf { background: var(--rose-bg); color: var(--rose); }
.file-type.img { background: var(--green-bg); color: var(--green); }
.file-info { flex: 1; min-width: 0; }
.file-info b { display: block; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); margin-top: 1px; }
.file-remove { padding: 5px; }

.step1-foot {
  margin-top: 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.step1-foot .trust { margin: 0; padding: 0; border: none; }
.step1-foot .btn { min-width: 220px; flex-shrink: 0; }
.status { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 11px; }
.status.ready { color: var(--green); }
.status.busy { color: var(--muted); }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.ready .dot { animation: breathe 2s ease-in-out infinite; }
.status.busy .dot { animation: spin-dot 1s linear infinite; }
@keyframes breathe { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .45; } }
@keyframes spin-dot { 0% { opacity: 1; } 50% { opacity: .3; } 100% { opacity: 1; } }
.file-remove {
  border: none; background: none; color: #c3b9a4; cursor: pointer; padding: 6px;
  border-radius: 8px; transition: all .2s var(--ease); flex-shrink: 0;
}
.file-remove:hover { color: var(--rose); background: var(--rose-bg); }

/* Summary */
.summary { margin-top: 22px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sum-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; background: #fff; }
.sum-row + .sum-row { border-top: 1px solid var(--line); }
.sum-row .lbl { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.sum-row .val { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.sum-row .val.mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; }
.fineprint { margin-top: 14px; font-size: 12px; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; }

/* Buttons & actions */
.panel-actions { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 14.5px; padding: 14px 24px; cursor: pointer; border: none;
  transition: all .25s var(--ease); text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--green-2); transform: translateY(-1px); }
.btn-primary:disabled { background: #cfc7b4; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-primary:not(:disabled)::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  display: none; animation: spin .7s linear infinite;
}
.btn-primary.busy:not(:disabled) { pointer-events: none; }
.btn-primary.busy:not(:disabled)::after { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--green-bg); color: var(--green); }
.btn-secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { border-color: var(--green-3); color: var(--green); }

.inline-error {
  margin-top: 14px; display: none; align-items: center; gap: 8px;
  color: var(--rose); font-size: 12.5px; font-weight: 600;
}
.inline-error.show { display: flex; animation: shake .4s var(--ease); }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ---------- Processing dashboard (replaces old success view) ---------- */
.success { display: none; }
body.done .stage { grid-template-columns: minmax(0, 1fr); max-width: 1400px; }
body.done .narrative, body.done .panel { display: none; }
body.done .success { display: block; padding: 6px 0 16px; }

.proc {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start;
}
@media (min-width: 900px) {
  .proc { grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); gap: 28px; }
}

/* Left: live summary */
.proc-summary {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(18px, 2.4vw, 26px); box-shadow: var(--shadow-card);
  min-width: 0;
  animation: rise .55s var(--ease) both;
}
.proc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.proc-head .kicker { margin-bottom: 8px; }
.proc-title {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -.015em; line-height: 1.1; color: var(--ink);
}
.proc-sub { margin-top: 6px; color: var(--muted); font-size: 13px; }
.proc-count {
  flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  color: var(--green); background: var(--green-bg); border: 1px solid rgba(46,125,91,.25);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
body.done-all .proc-count { background: var(--green); color: #fff; border-color: var(--green); }

.proc-progress { margin-top: 12px; }
.proc-progress .track { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.proc-progress .bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--green), var(--green-3)); border-radius: 999px; transition: width .5s var(--ease); }

.proc-list { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; list-style: none; }
@media (min-width: 1024px) {
  .proc-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (min-width: 1180px) {
  .proc-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.proc-item {
  display: flex; align-items: flex-start; gap: 11px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 13px; background: #fff;
  transition: all .25s var(--ease);
}
.proc-item.is-processing { border-color: rgba(46,125,91,.4); box-shadow: 0 12px 26px -16px rgba(30,95,67,.3); }
.proc-item.is-done { border-color: rgba(46,125,91,.22); }
.proc-type {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 8.5px; font-weight: 700; letter-spacing: .02em;
}
.proc-type.pdf { background: var(--rose-bg); color: var(--rose); }
.proc-type.img { background: var(--green-bg); color: var(--green); }
.proc-info { flex: 1; min-width: 0; }
.proc-info b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.proc-info span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.proc-info .proc-brief {
  font-size: 11px; color: var(--ink-2); line-height: 1.35; margin-top: 3px; display: block;
}
.proc-info .proc-doctype {
  display: inline-flex; align-items: center; margin-top: 8px;
  font-family: 'DM Sans', sans-serif; font-size: 10.5px; font-weight: 700; color: var(--green);
  background: var(--green-bg); border: 1px solid rgba(46,125,91,.25); padding: 4px 10px; border-radius: 999px;
  white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.proc-status {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; white-space: nowrap;
}
.proc-status.done { color: var(--green); background: var(--green-bg); }
.proc-status.processing { color: #8a7f6c; background: #f3eee4; }
.proc-status.waiting { color: var(--muted); background: #efe9dc; }
.proc-status .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.proc-status.processing .dot { animation: breathe 1.4s ease-in-out infinite; }

/* Right: actions */
.proc-actions {
  background: var(--card); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(22px, 2.6vw, 30px); box-shadow: var(--shadow-card);
  position: relative; animation: rise .55s var(--ease) both .08s;
}
.proc-actions h3 {
  font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 16px;
  letter-spacing: -.01em; color: var(--ink);
}
.proc-actions .hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 20px; line-height: 1.5; }
.pa-col { display: flex; flex-direction: column; gap: 10px; }
.pa-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 999px; font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 14px; padding: 14px 20px; cursor: pointer; border: none;
  transition: all .25s var(--ease); text-decoration: none;
}
.pa-btn:active { transform: scale(.97); }
.pa-btn:disabled { cursor: not-allowed; }
.pa-btn.primary { background: var(--green); color: #fff; box-shadow: var(--shadow-cta); }
.pa-btn.primary:hover:not(:disabled) { background: var(--green-2); transform: translateY(-1px); }
.pa-btn.primary:disabled { background: #cfc7b4; box-shadow: none; transform: none; }
.pa-btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.pa-btn.secondary:hover:not(:disabled) { border-color: var(--green-3); color: var(--green); }
.pa-btn.secondary:disabled { color: #c7bdaa; background: #f6f2e9; border-color: var(--line); }

/* Export dropdown */
.export { position: relative; }
.export-menu {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); padding: 6px; display: none; flex-direction: column; gap: 2px;
}
.export-menu.open { display: flex; animation: rise .2s var(--ease) both; }
.export-menu button {
  border: none; background: none; font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--ink-2); text-align: left; padding: 10px 14px; border-radius: 11px; cursor: pointer;
  transition: all .15s var(--ease);
}
.export-menu button:hover { background: var(--green-bg); color: var(--green); }
.export-menu .ext { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--muted); margin-left: 6px; }

/* transient ack toast (export / edit) */
.ack {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%) translateY(8px);
  background: var(--green); color: #fff; font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-cta);
  opacity: 0; pointer-events: none; transition: all .3s var(--ease); white-space: nowrap;
}
.ack.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Footer ---------- */
.foot {
  padding: 18px clamp(20px, 4vw, 56px) 26px; max-width: 1240px; margin: 0 auto; width: 100%;
}
.tech {
  margin-top: 14px; border: 1px dashed var(--line); border-radius: 14px; padding: 4px 16px;
  background: rgba(255,253,249,.6);
}
.tech summary {
  cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted); padding: 9px 0; user-select: none; list-style: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.tech summary::-webkit-details-marker { display: none; }
.tech summary::before { content: "›"; transition: transform .2s var(--ease); }
.tech[open] summary::before { transform: rotate(90deg); }
.tech dl {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 22px;
  padding: 10px 0 14px; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
}
.tech dt { color: var(--muted); opacity: .8; }
.tech dd { color: var(--ink-2); margin: 0 0 6px; }

@media (max-width: 640px) {
  .topbar-right .step-chip { display: none; }
  .panel-actions .btn { flex: 1; }
}

/* Hidden toggles must beat author display rules. */
.proc-tabs[hidden], .proc-list[hidden], .list-panel[hidden] { display: none !important; }

/* ---------- Vorschau: „coole Liste“ (Tab 1) ---------- */
.proc-tabs {
  display: flex; gap: 4px; margin-top: 18px; padding: 4px;
  background: #f2eddf; border-radius: 999px; width: max-content;
}
.proc-tab {
  border: none; background: transparent; font-family: 'DM Sans', sans-serif;
  font-weight: 700; font-size: 12.5px; color: var(--muted); padding: 8px 18px;
  border-radius: 999px; cursor: pointer; transition: all .2s var(--ease);
}
.proc-tab:hover { color: var(--green); }
.proc-tab.active { background: #fff; color: var(--green); box-shadow: 0 2px 8px rgba(33,28,21,.1); }
.list-panel { margin-top: 18px; overflow-x: auto; }
.list-panel::-webkit-scrollbar, .sheet::-webkit-scrollbar { height: 8px; }
.list-panel::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.list-panel::-webkit-scrollbar-thumb:hover, .sheet::-webkit-scrollbar-thumb:hover { background: #d8cfbd; }
.list-lead { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.list-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.list-table thead th {
  text-align: left; font-family: 'DM Sans', sans-serif; font-size: 9.5px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.list-table tbody td { padding: 8px 8px; border-bottom: 1px solid #f0ebdd; vertical-align: top; color: var(--ink-2); }
.list-table .grp td {
  background: var(--green-bg); font-family: 'Fraunces', Georgia, serif; font-weight: 500;
  font-size: 13px; color: var(--green); padding: 11px 10px;
  border-bottom: 1px solid rgba(46,125,91,.25);
}
.list-table .sum td {
  font-weight: 800; color: var(--green); border-top: 2px solid var(--green-3);
  padding-top: 12px; border-bottom: none;
}
.list-table .gtx { font-size: 12px; color: var(--ink); font-weight: 500; }
.list-table .mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; white-space: nowrap; color: var(--ink-2); }
.list-table .num { font-family: 'JetBrains Mono', monospace; font-size: 12px; text-align: right; white-space: nowrap; }
.list-table .num.neg { color: var(--rose); }
.list-table .check { white-space: nowrap; }
.list-table .check .ok, .list-table .check .chk {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; letter-spacing: .02em;
}
.list-table .check .ok { color: var(--green); background: var(--green-bg); border: 1px solid rgba(46,125,91,.25); }
.list-table .check .chk { color: #9a6b1f; background: #fdf3e0; border: 1px solid #efd9ad; }
.list-table .ltx { min-width: 150px; cursor: help; border-bottom: 1px dotted var(--muted); font-size: 11.5px; line-height: 1.5; white-space: normal; }
@media (max-width: 720px) {
  .list-table .ltx { min-width: 150px; }
}

/* ---------- Dialog / Overlay (Freigeben) ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60; display: none; align-items: center;
  justify-content: center; padding: 20px; background: rgba(33,28,21,.35);
  backdrop-filter: blur(3px);
}
.overlay.open { display: flex; animation: fade .2s var(--ease) both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 480px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow-card); padding: 26px; animation: rise .3s var(--ease) both;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 500; font-size: 20px; color: var(--ink); }
.dlg-close { border: none; background: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; line-height: 0; transition: all .2s var(--ease); }
.dlg-close:hover { color: var(--ink); background: #f2eddf; }
.modal-body { margin-top: 12px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.modal-body .note {
  margin-top: 16px; padding: 13px 15px; background: #fff7ef; border: 1px solid #f0e2c9;
  border-radius: 13px; font-size: 12.5px; color: #8a6d3a;
}
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

/* ---------- Shared form field ---------- */
.step1-name { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.field-label { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); font-family: 'DM Sans', sans-serif; }
.field-label .field-tag { font-weight: 500; color: var(--muted); font-size: 11px; }
.dm-input { width: 100%; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
.dm-input:focus { outline: none; border-color: var(--green-3); box-shadow: 0 0 0 3px var(--green-bg); }
