/* Serviceportal its zug – Designsystem
   Sachlich, ruhig, gut lesbar. Navy-Navigation, Zuger Blau als Akzent, Status über Farbe UND Text. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --navy-950: #08141f;
  --navy-900: #0d1f30;
  --navy-800: #152c42;
  --navy-700: #22405c;
  --navy-300: #9fb3c8;

  --text: #0f1b2a;
  --text-muted: #4a5a6c;
  --text-subtle: #677788;
  --border: #e1e7ee;
  --border-strong: #cbd5e1;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-alt: #f8fafc;

  --accent: #0b5cad;
  --accent-hover: #094a8c;
  --accent-soft: #e9f2fc;
  --focus: #2f80d1;

  --success: #0e6e47;  --success-bg: #e6f5ed;
  --info: #0b5cad;     --info-bg: #e9f2fc;
  --warning: #8a5300;  --warning-bg: #fff3dc;
  --danger: #b42318;   --danger-bg: #fdecea;
  --neutral: #475569;  --neutral-bg: #eef2f6;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 42, 0.06);
  --shadow: 0 1px 3px rgba(15, 27, 42, 0.06), 0 6px 16px rgba(15, 27, 42, 0.06);
  --shadow-lg: 0 20px 48px rgba(8, 20, 31, 0.22);
  --sidebar: 252px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }
.ok { color: var(--success); }
.warn, .text-warn { color: var(--warning); font-weight: 600; }
.pad { padding: 16px 20px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------------------ Icons */
.icon { width: 18px; height: 18px; flex: none; }

/* ------------------------------------------------------------ Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30;
  display: flex; flex-direction: column;
  background: var(--navy-900); color: #dbe5ef;
  border-right: 1px solid var(--navy-950);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; border-bottom: 1px solid var(--navy-800); }
.brand img { width: 30px; height: auto; }
.brand strong { display: block; color: #fff; font-size: 16px; letter-spacing: -0.01em; }
.brand span { display: block; color: var(--navy-300); font-size: 12px; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.nav-group { margin: 18px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-300); }
.nav-item {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 12px; margin: 2px 0;
  border-radius: var(--radius-sm); color: #cbd8e5; font-weight: 500; font-size: 14px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.nav-item:hover { background: var(--navy-800); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item .icon { opacity: 0.9; }
.nav-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #f2b53c; color: #2b1d00; font-size: 12px; font-weight: 700; text-align: center; }
.nav-item.active .nav-badge { background: #fff; color: var(--accent); }
.sidebar-foot { padding: 16px 22px; border-top: 1px solid var(--navy-800); font-size: 12px; color: var(--navy-300); display: grid; gap: 2px; }

.main { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 60px;
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-weight: 600; font-size: 15px; }
.env-badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--warning-bg); color: var(--warning); white-space: nowrap; }
.env-local { background: var(--neutral-bg); color: var(--neutral); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.user { display: flex; align-items: center; gap: 10px; padding: 0 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.user-text { display: grid; line-height: 1.25; }
.user-text strong { font-size: 14px; }
.user-text span { font-size: 12px; color: var(--text-muted); max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted); transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--neutral-bg); color: var(--text); text-decoration: none; }
.menu-btn { display: none; }
.content { padding: 28px 32px 48px; max-width: 1440px; width: 100%; outline: none; }

/* ------------------------------------------------------------ Seitenkopf */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header h1 { font-size: 26px; font-weight: 700; }
.page-header p { margin-top: 4px; color: var(--text-muted); max-width: 720px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin: 26px 0 12px; }
.section-title:first-of-type { margin-top: 4px; }
.footnote { margin-top: 18px; font-size: 13px; color: var(--text-subtle); }
.inline-select { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-alt); border-color: #b5c2d1; }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: #f1c4bf; }
.btn-danger-ghost:hover { background: var(--danger-bg); }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent; }
.btn.loading::after { content: ''; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.5); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: inherit; font: inherit;
}
.kpi-link { transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.kpi-link:hover { border-color: #b9cde3; box-shadow: var(--shadow); }
.kpi-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi-hint { font-size: 12.5px; color: var(--text-subtle); }
.kpi-attention { border-left: 4px solid #e6a23c; }
.kpi-danger { border-left: 4px solid var(--danger); }
.kpi-danger .kpi-hint { color: var(--danger); font-weight: 600; }

/* ------------------------------------------------------------ Panels und Karten */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 22px; padding: 20px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 14px; }
.panel.flush .panel-head { padding: 16px 20px 12px; }
.panel-head h2 { font-size: 16px; font-weight: 650; }
.panel.attention { border-color: #f0cf90; box-shadow: 0 0 0 3px #fff3dc; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-2 > .panel { margin-bottom: 22px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.product h3 { font-size: 17px; }
.product-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.product-icon .icon { width: 22px; height: 22px; }
.product .muted { font-size: 14px; flex: 0; }
.included { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--text-muted); }
.included .icon { width: 16px; height: 16px; color: var(--success); margin-top: 2px; }
.avail { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: var(--radius-sm); }
.avail .icon { width: 16px; height: 16px; margin-top: 2px; }
.avail-ok { background: var(--success-bg); color: var(--success); }
.avail-wait { background: var(--warning-bg); color: var(--warning); }
.card-foot { margin-top: auto; padding-top: 6px; }
.card-foot .btn { width: 100%; }

/* ------------------------------------------------------------ Toolbar, Tabs, Suche */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface); }
.toolbar select { height: 38px; padding: 0 32px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.toolbar-count { margin-left: auto; font-size: 13px; color: var(--text-muted); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--neutral-bg); padding: 4px; border-radius: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-muted); font-weight: 600; font-size: 13.5px; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab-count { min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(15, 27, 42, 0.07); font-size: 12px; text-align: center; }
.tab.active .tab-count { background: var(--accent-soft); color: var(--accent); }
.search { position: relative; flex: 1 1 280px; max-width: 420px; display: flex; align-items: center; }
.search .icon { position: absolute; left: 11px; color: var(--text-subtle); width: 17px; height: 17px; pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }

/* ------------------------------------------------------------ Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { position: sticky; top: 0; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-subtle); background: var(--surface-alt); padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; background: var(--surface-alt); border-top: 1px solid var(--border-strong); border-bottom: 0; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; transition: background 0.12s; }
tr.clickable:hover { background: #f5f9fd; }
tr.clickable:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.cell-main { display: block; font-weight: 550; }
.cell-sub { display: block; font-size: 12.5px; color: var(--text-subtle); margin-top: 1px; }
td.empty { text-align: center; color: var(--text-subtle); padding: 36px 16px; }
.more { padding: 12px; text-align: center; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------ Status-Chips */
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-success { background: var(--success-bg); color: var(--success); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-warning { background: var(--warning-bg); color: var(--warning); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }
.chip-neutral { background: var(--neutral-bg); color: var(--neutral); }

/* ------------------------------------------------------------ Hinweise */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.notice .icon { margin-top: 2px; }
.notice-info { background: var(--info-bg); color: #0a3f75; }
.notice-warning { background: var(--warning-bg); color: #6b4100; }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ------------------------------------------------------------ Detailbereich (Drawer) */
dialog { padding: 0; border: 0; color: var(--text); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8, 20, 31, 0.45); }
#drawer { position: fixed; inset: 0 0 0 auto; height: 100vh; width: min(600px, 100vw); margin: 0; }
#drawer[open] { animation: slide-in 0.22s var(--ease); }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } }
.drawer-panel { height: 100%; display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-lg); }
.drawer-head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--border); }
.drawer-head h2 { font-size: 20px; margin: 2px 0 8px; }
.drawer-sub { font-size: 13px; color: var(--text-subtle); font-family: var(--mono); }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.drawer-section { font-size: 14px; font-weight: 650; margin: 26px 0 12px; }
.drawer-body .table-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.facts div { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.facts div:nth-child(odd) { border-right: 1px solid var(--border); }
.facts dt { font-size: 12px; color: var(--text-subtle); font-weight: 500; }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }

.steps { list-style: none; display: flex; padding: 0; margin: 0 0 20px; counter-reset: step; }
.steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 12px; color: var(--text-subtle); position: relative; }
.steps li::before { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.steps li:first-child::before { display: none; }
.steps li span { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); font-weight: 700; font-size: 12px; }
.steps li.done span { background: var(--success); border-color: var(--success); color: #fff; }
.steps li.done span .icon { width: 14px; height: 14px; }
.steps li.done::before, .steps li.current::before { background: var(--success); }
.steps li.current { color: var(--text); font-weight: 600; }
.steps li.current span { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding-bottom: 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.tl-meta { font-size: 12.5px; color: var(--text-subtle); }

.messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.msg { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-alt); }
.msg.internal { background: #fffaf0; border-color: #f2dfb6; }
.msg-head { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 4px; }
.msg-head span:last-child { margin-left: auto; color: var(--text-subtle); font-size: 12px; }

.cost-box { display: flex; justify-content: space-between; gap: 16px; padding: 16px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cost-box.open { border-color: #f0cf90; background: #fffaf0; }
.cost-box strong { display: block; font-size: 22px; margin: 2px 0 4px; }
.cost-box p { font-size: 14px; color: var(--text-muted); }
.cost-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ------------------------------------------------------------ Formulare und Dialog */
#dialog { width: min(560px, calc(100vw - 32px)); margin: auto; border-radius: 14px; }
#dialog.wide { width: min(760px, calc(100vw - 32px)); }
#dialog[open] { animation: pop 0.18s var(--ease); }
@keyframes pop { from { transform: translateY(8px) scale(0.99); opacity: 0; } }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-intro { color: var(--text-muted); margin-bottom: 16px; font-size: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-alt); border-radius: 0 0 14px 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full, .form-grid .notice { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-hint { font-size: 12.5px; color: var(--text-subtle); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus, .toolbar select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(11, 92, 173, 0.15);
}
.field .static { min-height: 40px; display: flex; align-items: center; font-weight: 600; }
.fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px 16px; display: grid; gap: 14px; margin: 0; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { flex: 1 1 200px; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; font-size: 14px; font-weight: 550; }
.choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.choice input { width: 18px; height: 18px; accent-color: var(--accent); }
.fieldset .form-grid[hidden] { display: none; }
.fieldset legend { padding: 0 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 8px 0; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.checks { display: grid; gap: 4px; }
.form-error { padding: 10px 12px; margin-bottom: 14px; border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger); font-size: 14px; font-weight: 500; }
.receipt-form { padding: 20px; }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.export-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }

/* ------------------------------------------------------------ Kommissionierung und Staging */
progress.progress { width: 120px; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: var(--neutral-bg); vertical-align: middle; appearance: none; }
progress.progress::-webkit-progress-bar { background: var(--neutral-bg); border-radius: 999px; }
progress.progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.progress.big { width: 100%; height: 10px; }
.scan-box { padding: 16px; margin: 0 0 12px; border: 2px dashed #b9cde3; border-radius: var(--radius); background: var(--accent-soft); display: grid; gap: 10px; }
.scan-box textarea { font-family: var(--mono); }
.scan-foot { display: flex; align-items: center; gap: 14px; }
.staging-form { margin-top: 8px; display: grid; gap: 12px; }

/* ------------------------------------------------------------ Meldungen */
#toasts { position: fixed; inset: auto 20px 20px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; z-index: 100; display: grid; gap: 10px; }
#toasts:not(:popover-open):empty { display: none; }
.scan-error ul { margin: 4px 0 0; padding-left: 18px; }
.scan-error { margin: 0; padding: 10px 12px; border-left: 4px solid var(--danger); border-radius: var(--radius-sm); background: var(--danger-bg); color: var(--danger); font-size: 14px; font-weight: 500; }
.pick-list summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); margin: 4px 0 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px; animation: pop 0.2s var(--ease); transition: opacity 0.3s, transform 0.3s; border-left: 4px solid #3ac28a; }
.toast-error { border-left-color: #ff6b5e; }
.toast.leaving { opacity: 0; transform: translateY(6px); }

/* ------------------------------------------------------------ Anmeldung */
.login { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 20px; padding: 24px; background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, #1d3b57 100%); }
.login-card { width: min(420px, 100%); background: var(--surface); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-brand img { width: 34px; }
.login-brand strong { display: block; font-size: 17px; }
.login-brand span { display: block; font-size: 13px; color: var(--text-muted); }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-env { font-size: 14px; color: var(--warning); background: var(--warning-bg); padding: 8px 12px; border-radius: var(--radius-sm); margin: 10px 0 4px; }
.login-form { display: grid; gap: 16px; margin-top: 20px; }
.login-form .form-error { margin: 0; }
.login-foot { color: var(--navy-300); font-size: 13px; text-align: center; }

/* ------------------------------------------------------------ Responsiv */
@media (max-width: 1360px) {
  .grid-2 { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 1100px) {
  .user-text { display: none; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.2s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .topbar { padding: 0 14px; }
  .content { padding: 20px 16px 40px; }
  .env-badge { display: none; }
}
@media (max-width: 640px) {
  .form-grid, .facts { grid-template-columns: 1fr; }
  .facts div:nth-child(odd) { border-right: 0; }
  .page-header h1 { font-size: 22px; }
  .kpi-value { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; }
  .tab { flex: none; }
  .search { flex-basis: 100%; max-width: none; }
  .toolbar-count { margin-left: 0; }
  .steps li { font-size: 0; }
}

