/* ═══════════════════════════════════════════════
   DESIGN TOKENS
═══════════════════════════════════════════════ */
:root {
  --gold:        #C9A84C;
  --gold-light:  #E8C96A;
  --gold-dark:   #8B6914;
  --silver:      #A8B4C0;
  --bg:          #0F1117;
  --bg2:         #181C26;
  --bg3:         #1F2435;
  --border:      #2A3045;
  --text:        #E8EAF0;
  --text-muted:  #7A8299;
  --green:       #2ECC71;
  --red:         #E74C3C;
  --blue:        #3498DB;
  --purple:      #9B59B6;
  --orange:      #E67E22;
  --sidebar-w:   252px;
}

/* ── Light Mode: nur Token-Override; Gold bleibt, Flaechen/Text invertieren ── */
html[data-theme="light"] {
  --bg:          #F3F5F9;
  --bg2:         #FFFFFF;
  --bg3:         #EDF0F6;
  --border:      #DBE1EC;
  --text:        #1C2331;
  --text-muted:  #5A6679;
  --silver:      #46506A;
}

/* Monochrome Outline-Icons (Lucide-Stil); faerben sich ueber currentColor */
.ic {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ══════════════════════════════
   KONTRAHENTEN-/KUNDENSUCHE (Autocomplete)
══════════════════════════════ */
.kunden-search-row { display:flex; align-items:center; gap:10px; margin:2px 0 12px; flex-wrap:wrap; }
#kunden-list-card > .kunden-search-row { padding:12px 18px; margin:0; }
#artikel-list-card > .kunden-search-row { padding:12px 18px 8px; margin:0; }
#artikel-list-card > .art-filter-row { padding:0 18px 12px; margin:0 !important; }
#kunde-editor > #kf-type-gate { margin:14px 18px 0 !important; }
#kunde-editor > .btn-group { padding:0 18px 18px; }
.kac-wrap { position:relative; flex:1 1 280px; min-width:240px; max-width:560px; }
.kac-icon { position:absolute; left:11px; top:50%; transform:translateY(-50%); font-size:13px; opacity:.55; pointer-events:none; }
.kac-input { width:100%; padding-left:31px !important; padding-right:30px !important; }
.kac-clear { position:absolute; right:10px; top:50%; transform:translateY(-50%); cursor:pointer; color:var(--text-muted); font-size:13px; line-height:1; }
.kac-clear:hover { color:var(--text); }
.kac-list { position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px); background:var(--bg3);
  border:1px solid var(--border); border-radius:9px; box-shadow:0 12px 30px rgba(0,0,0,.5);
  max-height:340px; overflow-y:auto; padding:4px; }
.kac-item { display:flex; flex-direction:column; gap:1px; padding:7px 10px; border-radius:6px; cursor:pointer; }
.kac-item:hover, .kac-item.active { background:rgba(201,168,76,0.16); }
.kac-item-name { font-size:13px; color:var(--text); font-weight:600; }
.kac-item-sub { font-size:11px; color:var(--text-muted); }
.kac-empty { padding:9px 11px; font-size:12px; color:var(--text-muted); }
.kac-count { font-size:11.5px; color:var(--text-muted); white-space:nowrap; margin-left:auto; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
#sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-hex {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  clip-path: polygon(50% 0%,100% 25%,100% 75%,50% 100%,0% 75%,0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.logo-text { flex: 1; }

.logo-mark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--gold-light);
}

.logo-sub {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 1px;
}

.db-badge {
  min-width: 0;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.22);
  font-size: 10.5px;
  color: var(--gold-light);
  display: flex;
  align-items: center;
  gap: 6px;
}
#conn-badge-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Die Versionsangabe behaelt ihren Platz, auch wenn der Benutzername lang wird. */
.sidebar-footer > :last-child { flex-shrink: 0; margin-left: 8px; }

.db-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* Global search */
nav { padding: 4px 0; flex: 1; overflow-y: auto; }

.nav-section {
  padding: 12px 16px 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 16px;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-muted);
  border-left: 3px solid transparent;
  transition: all .13s;
  user-select: none;
  position: relative;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }

.nav-item.active {
  background: rgba(201,168,76,.09);
  color: var(--gold-light);
  border-left-color: var(--gold);
}

.nav-icon { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Icon-Groessen je Kontext */
.global-search .ic { width: 15px; height: 15px; }
.icon-btn .ic { width: 17px; height: 17px; }
.logo-hex { color: #14181f; }
.logo-hex .ic { width: 18px; height: 18px; stroke-width: 2; }

/* Light-Mode: Gold-Akzent als Dunkelgold (besserer Kontrast auf hellem Grund) */
html[data-theme="light"] .nav-item.active { background: rgba(201,168,76,.16); color: var(--gold-dark); }
html[data-theme="light"] .logo-mark,
html[data-theme="light"] .db-badge { color: var(--gold-dark); }
html[data-theme="light"] .icon-btn:hover { color: var(--gold-dark); }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

/* ══════════════════════════════
   MAIN AREA
══════════════════════════════ */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 26px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}

.page-title { font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; }
.page-sub { font-size: 11px; color: var(--text-muted); margin-left: 6px; }

.header-center { flex: 1; display: flex; align-items: center; justify-content: center; }

.global-search {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: wrap;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: visible;
  width: 100%;
  max-width: 820px;
  font-size: 12px;
  color: var(--text-muted);
  transition: border-color .15s;
}
.global-search[data-enabled="false"] { display:none; }
.global-search:focus-within { border-color: var(--gold); }
.global-search-main { flex:1 1 220px; display:flex; align-items:center; gap:8px; min-width:0; min-height:44px; padding:0 8px 0 12px; }
.global-search-main input[type="text"] { min-width:0; width:100%; background:none; border:none; outline:none; color:var(--text); font-size:12px; }
.global-search-main input[type="text"]:disabled { cursor:not-allowed; color:var(--text-muted); }
.global-search .shortcut {
  font-size: 10px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}
.global-search-reset {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  border:0;
  background:transparent;
  color:var(--text-muted);
  cursor:pointer;
  font:inherit;
  font-size:18px;
}
.global-search-reset:hover { color:var(--text); background:var(--bg2); }
.global-search-reset:focus-visible,
.global-search-categories input:focus-visible,
.global-search-result:focus-visible,
.global-search-retry:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.global-search-categories {
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:4px;
  min-width:0;
  padding:4px 6px;
  border:0;
  border-left:1px solid var(--border);
}
.global-search-categories legend {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}
.global-search-categories label {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  gap:5px;
  min-width:0;
  min-height:44px;
  padding:5px 8px;
  border:1px solid transparent;
  border-radius:6px;
  color:var(--text-muted);
  cursor:pointer;
  white-space:nowrap;
}
.global-search-categories label:hover { border-color:var(--border); background:var(--bg2); color:var(--text); }
.global-search-categories label:has(input:checked) { border-color:var(--gold); background:var(--bg2); color:var(--text); font-weight:650; }
.global-search-categories input { flex:0 0 auto; width:16px; height:16px; accent-color:var(--gold); }
.global-search-categories input:checked { outline-color:var(--gold); }
.global-search-categories:disabled label { cursor:not-allowed; opacity:.6; }
.global-search-categories[aria-invalid="true"] { border-color:var(--red); }
.global-search-category-hint { flex:0 0 100%; padding:6px 10px; border-top:1px solid var(--border); color:var(--red); font-size:11px; }
.global-search-live { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.global-search-results {
  display: none;
  position: absolute;
  z-index: 1200;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 80px));
  overflow-y: auto;
  padding: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,.42);
}
.global-search-results.open { display: block; }
.global-search-group + .global-search-group { margin-top:5px; border-top:1px solid var(--border); padding-top:5px; }
.global-search-group h2 { padding:6px 10px 4px; color:var(--text-muted); font-size:10px; letter-spacing:.05em; text-transform:uppercase; }
.global-search-group-status { padding:10px; color:var(--text-muted); font-size:11px; }
.global-search-group-status.is-error { color:var(--red); }
.global-search-retry { min-height:44px; margin:0 10px 8px; padding:7px 10px; border:1px solid var(--border); border-radius:7px; background:var(--bg3); color:var(--text); cursor:pointer; font:inherit; font-size:11px; }
.global-search-retry:hover { border-color:var(--gold); background:var(--bg2); }
.global-search-result {
  display: grid;
  grid-template-columns: 94px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}
.global-search-result:hover,
.global-search-result.active { background: var(--bg3); }
.global-search-result.active { outline:1px solid var(--gold); }
.global-search-result-type {
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.global-search-result-main { min-width: 0; }
.global-search-result-title {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.global-search-result-sub {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-search-result .global-search-result-sub,
.global-search-result-birthdate {
  display: inline;
}
.global-search-result-birthdate {
  color: var(--text-muted);
  font-size: 10px;
}
.customer-search-result .global-search-result-birthdate::before { content: ' · '; }
.global-search-message {
  padding: 14px 12px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.header-op-refresh { font: inherit; }
.header-op-refresh:disabled { cursor:wait; opacity:.65; }

.date-range {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
}

.dr-btn {
  padding: 5px 11px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .13s;
  user-select: none;
}
.dr-btn.active, .dr-btn:hover { background: var(--gold-dark); color: var(--gold-light); }
.dr-btn:disabled { cursor:not-allowed; opacity:.45; }
.dr-btn:disabled:hover { background:transparent; color:var(--text-muted); }

.icon-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  position: relative;
  transition: all .13s;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-light); }

.export-btn {
  padding: 6px 14px;
  background: var(--gold-dark);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  border-radius: 7px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 600;
  transition: all .13s;
  white-space: nowrap;
}
.export-btn:hover { background: var(--gold); color: #000; }

.primary-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border: none;
  color: #000;
  border-radius: 7px;
  font-size: 11.5px;
  cursor: pointer;
  font-weight: 700;
  transition: opacity .13s;
  white-space: nowrap;
}
.primary-btn:hover { opacity: .88; }

/* ══════════════════════════════
   CONTENT AREA
══════════════════════════════ */
#content {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
}

/* ══════════════════════════════
   KPI CARDS
══════════════════════════════ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.kpi-card.gold::before   { background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.kpi-card.silver::before { background: linear-gradient(90deg, #5a6a7a, var(--silver)); }
.kpi-card.green::before  { background: linear-gradient(90deg, #1a7a42, var(--green)); }
.kpi-card.red::before    { background: linear-gradient(90deg, #7a1a1a, var(--red)); }
.kpi-card.blue::before   { background: linear-gradient(90deg, #1a3a7a, var(--blue)); }
.kpi-card.purple::before { background: linear-gradient(90deg, #3a1a7a, var(--purple)); }
.kpi-card.orange::before { background: linear-gradient(90deg, #7a3a00, var(--orange)); }

.kpi-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; }
.kpi-value { font-size: 22px; font-weight: 700; margin: 5px 0 3px; color: var(--text); }
.kpi-delta { font-size: 11.5px; }
.kpi-delta.pos { color: var(--green); }
.kpi-delta.neg { color: var(--red); }
.kpi-icon { position: absolute; right: 14px; top: 14px; font-size: 20px; opacity: .18; }

/* ══════════════════════════════
   CHART CARDS
══════════════════════════════ */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.chart-grid.full    { grid-template-columns: 1fr; }
.chart-grid.thirds  { grid-template-columns: 2fr 1fr; }
.chart-grid.three   { grid-template-columns: 1fr 1fr 1fr; }

.chart-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.chart-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.chart-sub   { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.chart-legend { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.legend-item  { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--text-muted); cursor: pointer; }
.legend-dot   { width: 10px; height: 10px; border-radius: 2px; }

/* ══════════════════════════════
   TABLE CARDS
══════════════════════════════ */
.table-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 22px;
}

.table-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 9px;
  gap: 6px;
}
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text); font-size: 11.5px; width: 150px;
}

.filter-btn {
  padding: 4px 11px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 7px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all .13s;
  white-space: nowrap;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--gold); color: var(--gold-light); }

.btn-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  padding: 9px 18px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th:hover { color: var(--text); }

td {
  padding: 10px 18px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(42,48,69,.55);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.018); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.sb-settled   { background: rgba(46,204,113,.12); color: var(--green);   border: 1px solid rgba(46,204,113,.25); }
.sb-pending   { background: rgba(230,126,34,.12);  color: var(--orange);  border: 1px solid rgba(230,126,34,.25); }
.sb-open      { background: rgba(52,152,219,.12);  color: var(--blue);    border: 1px solid rgba(52,152,219,.25); }
.sb-cancelled { background: rgba(231,76,60,.12);   color: var(--red);     border: 1px solid rgba(231,76,60,.25); }
.sb-fixed     { background: rgba(201,168,76,.12);  color: var(--gold-light); border: 1px solid rgba(201,168,76,.25); }
.sb-draft     { background: rgba(122,130,153,.12); color: var(--text-muted); border: 1px solid rgba(122,130,153,.25); }
.sb-active    { background: rgba(46,204,113,.12);  color: var(--green);   border: 1px solid rgba(46,204,113,.25); }
.sb-alert     { background: rgba(231,76,60,.12);   color: var(--red);     border: 1px solid rgba(231,76,60,.25); }
.sb-warn      { background: rgba(230,126,34,.12);  color: var(--orange);  border: 1px solid rgba(230,126,34,.25); }

/* BIQ-71 W4c: Badge-Gruppe „Hinweise" in der Kontrahentenliste (Profil-/Legitimationsauffaelligkeiten,
   kundenAttentionBadges in kunden.js) — mehrere .status-badge-Chips sauber untereinander/nebeneinander
   stapeln statt einer einzelnen langen Zeile. */
.kunden-attention-cell { display: flex; flex-wrap: wrap; gap: 4px; max-width: 230px; }

/* Metal Badges */
.metal-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 20px; font-size: 10.5px; font-weight: 600; }
.badge-gold      { background: rgba(201,168,76,.14);  color: var(--gold-light); border: 1px solid rgba(201,168,76,.28); }
.badge-silver    { background: rgba(168,180,192,.14); color: var(--silver);     border: 1px solid rgba(168,180,192,.28); }
.badge-platinum  { background: rgba(52,152,219,.14);  color: #5dace8;           border: 1px solid rgba(52,152,219,.28); }
.badge-palladium { background: rgba(155,89,182,.14);  color: #b07fd4;           border: 1px solid rgba(155,89,182,.28); }

.tx-buy  { color: var(--green); font-weight: 600; }
.tx-sell { color: var(--red);   font-weight: 600; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}
.page-btns { display: flex; gap: 4px; }
.page-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  background: var(--bg3);
  border: 1px solid var(--border);
  font-size: 11.5px;
  transition: all .13s;
}
.page-btn.active, .page-btn:hover { background: var(--gold-dark); border-color: var(--gold); color: var(--gold-light); }

/* ══════════════════════════════
   METAL TICKER
══════════════════════════════ */
.ticker-bar {
  display: flex;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 22px;
}
.ticker-item {
  flex: 1;
  padding: 10px 18px;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.ticker-item:last-child { border-right: none; }
.ticker-metal  { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.ticker-symbol { font-size: 9.5px; color: var(--text-muted); }
.ticker-price  { font-size: 17px; font-weight: 700; }
.ticker-change { font-size: 10.5px; }
.ticker-change.pos { color: var(--green); }
.ticker-change.neg { color: var(--red); }
/* Kurs-/Risikoleiste (Dashboard + Ordererfassung): je Metall EUR/oz, EUR/g und die offene Risikoposition. */
.krl-item { flex-direction: column; align-items: flex-start; gap: 3px; }
.krl-head { display: flex; align-items: baseline; gap: 6px; }
.krl-prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.krl-oz { font-size: 15px; font-weight: 700; }
.krl-g { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.krl-risk { display:flex;align-items:baseline;gap:6px;font-size:15px;font-weight:600;white-space:nowrap; }
.krl-risk-amount { margin-left:8px; }
.krl-risk-amount + .krl-risk-amount { margin-left:16px; }

/* Dashboard- und Order-Kurse verteilen sich wie die Bestandsfilter nach verfuegbarem Platz.
   Mindestbreite 300px (Uli 2026-08-08): unterhalb davon brechen die langen Silber-/Goldmengen
   (z. B. "36.103,48 g  1.160,7537 oz") in der Risikozeile um. Lieber eine Kachel umbrechen lassen
   als die Zeile — bei 1440px ergibt das 3+1 statt vier gequetschter Kacheln. */
#view-dashboard > .ticker-bar, #oe-krl {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));
  gap:10px;
  overflow:visible;
  border:0;
  background:transparent;
}
#view-dashboard > .ticker-bar > .ticker-item, #oe-krl > .ticker-item {
  min-width:0;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--bg3);
}
#view-dashboard > .ticker-bar .krl-risk, #oe-krl .krl-risk { flex-wrap:wrap; white-space:normal; }
.risk-completeness-warning {
  display:inline-flex;
  align-items:center;
  gap:5px;
  margin-top:3px;
  padding:2px 7px;
  border:1px solid rgba(243,156,18,.42);
  border-radius:999px;
  background:rgba(243,156,18,.14);
  color:#F39C12;
  font-size:10.5px;
  font-weight:700;
  line-height:1.35;
}
.risk-completeness-icon { font-size:12px;line-height:1; }
.risk-value-partial {
  text-decoration: underline dotted #F39C12 1px;
  text-underline-offset: 3px;
}

/* ══════════════════════════════
   SECTION LABEL
══════════════════════════════ */
.section-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ══════════════════════════════
   RISK COMPONENTS
══════════════════════════════ */
.risk-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; margin-bottom: 22px; }
.risk-heat-grid    { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 22px; }
.risk-metal-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 14px; margin-bottom: 22px; }

.risk-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.risk-card-header { padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.risk-card-title  { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; }
.risk-status      { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.risk-status.ok      { background: var(--green); box-shadow: 0 0 6px var(--green); }
.risk-status.warn    { background: #F39C12;      box-shadow: 0 0 6px #F39C12; }
.risk-status.breach  { background: var(--red);   box-shadow: 0 0 6px var(--red); }
.risk-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.risk-row  { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.risk-metric { background: var(--bg3); border-radius: 8px; padding: 9px 11px; }
.risk-metric-label { font-size: 9.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 3px; }
.risk-metric-value { font-size: 15px; font-weight: 700; }
.risk-metric-sub   { font-size: 9.5px; color: var(--text-muted); margin-top: 2px; }
.risk-metric-values { display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap; }
.risk-metric--split .risk-metric-sub { font-size:15px;font-weight:700;color:var(--text);margin-top:0; }

#var-cards { grid-template-columns:repeat(3,minmax(0,1fr));gap:12px; }
.var-summary-card { min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:9px;background:var(--bg3); }
.var-summary-horizon { margin-bottom:10px;color:var(--gold-light);font-size:10px;font-weight:700;letter-spacing:.65px;text-transform:uppercase; }
.var-summary-metric { display:grid;min-width:0;gap:3px; }
.var-summary-metric--benefit { margin-top:9px;padding-top:9px;border-top:1px solid var(--border); }
.var-summary-label { color:var(--text-muted);font-size:9.5px;font-weight:650;letter-spacing:.55px;text-transform:uppercase; }
.var-summary-value { max-width:100%;color:var(--text);font-size:16px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.25;overflow-wrap:anywhere; }
.var-summary-metric--benefit .var-summary-value { color:var(--green);font-size:14px; }

@media (max-width:920px) {
  #var-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:620px) {
  #var-cards { grid-template-columns:minmax(0,1fr); }
}

.apf-table { width:100%;border-collapse:separate;border-spacing:0;font-size:12px;min-width:980px; }
.apf-table td { padding:3px 4px; }
.apf-buy-head,.apf-sell-head,.apf-middle-head { text-align:center;font-weight:700;padding:0 4px 4px; }
.apf-buy-head { color:var(--gold-dark);background:color-mix(in srgb,var(--gold-dark) 8%,transparent); }
.apf-sell-head { color:var(--green);background:color-mix(in srgb,var(--green) 8%,transparent);border-left:2px solid var(--border-strong,var(--border)); }
.apf-middle-head { border-left:2px solid var(--border-strong,var(--border));background:var(--bg3); }
.apf-buy-block { background:color-mix(in srgb,var(--gold-dark) 5%,transparent); }
.apf-sell-block { background:color-mix(in srgb,var(--green) 5%,transparent); }
.apf-table tbody td:nth-child(-n+4) { background-color:color-mix(in srgb,var(--gold-dark) 4%,transparent); }
.apf-table tbody td:nth-child(n+7) { background-color:color-mix(in srgb,var(--green) 4%,transparent); }
.apf-middle { padding-left:8px!important;background:var(--bg3); }
.apf-middle-first,.apf-sell-block { border-left:2px solid var(--border-strong,var(--border)); }
.apf-result { color:var(--blue,#2f80ed);font-style:italic;font-weight:700;text-align:right;white-space:nowrap;padding:3px 8px!important; }
.apf-head-result { margin-top:5px;color:var(--text-muted);font-size:11.5px; }
.apf-head-result strong { color:inherit;font-style:italic; }
.fg-group-list { display:flex;gap:6px;flex-wrap:wrap;margin-top:8px; }
.fg-group-chip { border:1px solid var(--border);border-radius:999px;background:var(--bg3);padding:3px 8px;font-size:.72rem;font-weight:600; }
.fg-detail-toggle { margin:0 12px 10px; }
.fg-detail { border-top:1px solid var(--border); }
.fg-detail-value { min-width:180px;max-width:480px;vertical-align:top; }
.fg-json { margin:0;padding-left:18px;display:grid;gap:3px;white-space:normal;overflow-wrap:anywhere; }
.fg-json-key { color:var(--text-muted);font-weight:600; }
.fg-decision { color:var(--text-muted);font-size:.75rem;margin-top:3px; }
/* BIQ-116 Kap. K/F-187: Zaehler-Badge am Gruppen-Tab. Es erscheint NUR mit einem tatsaechlich
   geladenen Zaehler groesser null — ein "0" an einer Freigabestelle behauptete "nichts zu tun". */
.fg-tab-badge { display:inline-block;min-width:16px;padding:0 5px;margin-left:5px;border-radius:999px;
  background:var(--bg2);border:1px solid var(--border);font-size:10px;font-weight:700;line-height:15px;text-align:center; }
.filter-btn.active .fg-tab-badge { border-color:var(--gold);color:var(--gold-light); }
.filter-btn[disabled] { opacity:.45;cursor:not-allowed;pointer-events:none; }
/* BIQ-98 Nachtrag, Uli-Entscheid (Option A): die Kacheluebersicht (#fg-overview-grid) macht die
   Tab-Leiste als Navigationsmittel ueberfluessig -- rein KOSMETISCH ausgeblendet, OHNE die
   gesperrte Gruppen-Zustandsmaschine (F-175...F-187, fgRenderTabs/fgSwitch/fgStartSection) oder
   Biq116KapKFreigabenNavStaticContractTest anzufassen: dieser Contract laeuft in einer Node-VM
   ohne CSS-Kaskade und prueft ausschliesslich das von der JS-Logik selbst gesetzte
   `el.style.display` -- eine Stylesheet-Regel ist fuer ihn unsichtbar. `!important` gewinnt
   bewusst gegen die nicht-`!important`-Inline-Zuweisung, mit der fgRenderTabs() die Leiste bei
   mehr als einer sichtbaren Gruppe technisch weiterhin "anzeigt". Die tab-lose Arbeitsliste der
   Startgruppe (#freigaben-list) bleibt bewusst sichtbar -- genau das ist Option A gegenueber dem
   (nicht gewaehlten) Option B mit zusaetzlichem JS-Sichtbarkeits-Schalter. */
#fg-tablist { display:none !important; }

.risk-label-pill { font-size: 9.5px; font-weight: 700; letter-spacing: .7px; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.pill-ok     { background: rgba(46,204,113,.14); color: var(--green); border: 1px solid rgba(46,204,113,.28); }
.pill-warn   { background: rgba(243,156,18,.14); color: #F39C12;      border: 1px solid rgba(243,156,18,.28); }
.pill-breach { background: rgba(231,76,60,.14);  color: var(--red);   border: 1px solid rgba(231,76,60,.28); }

.limit-bar-labels { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--text-muted); margin-bottom: 4px; }
.limit-bar-track  { height: 7px; background: var(--bg3); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.limit-bar-fill   { height: 100%; border-radius: 4px; transition: width .5s ease; }
.bar-ok     { background: linear-gradient(90deg,#1a7a42,var(--green)); }
.bar-warn   { background: linear-gradient(90deg,#7a5a00,#F39C12); }
.bar-breach { background: linear-gradient(90deg,#7a1a1a,var(--red)); }

.heat-cell { border-radius: 10px; padding: 13px; text-align: center; font-size: 11.5px; font-weight: 600; }
.heat-low    { background: rgba(46,204,113,.13); border: 1px solid rgba(46,204,113,.28); color: var(--green); }
.heat-medium { background: rgba(243,156,18,.13); border: 1px solid rgba(243,156,18,.28); color: #F39C12; }
.heat-high   { background: rgba(231,76,60,.13);  border: 1px solid rgba(231,76,60,.28);  color: var(--red); }

.exposure-bar-wrap { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.exp-label { width: 36px; color: var(--text-muted); text-align: right; font-size: 9.5px; }
.exp-track { flex: 1; height: 13px; background: var(--bg3); border-radius: 4px; position: relative; overflow: hidden; border: 1px solid var(--border); }
.exp-long  { position: absolute; left: 50%; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: rgba(46,204,113,.7); }
.exp-short { position: absolute; right: 50%; top: 0; bottom: 0; border-radius: 4px 0 0 4px; background: rgba(231,76,60,.7); }
.exp-center{ position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--border); }
.exp-value { width: 56px; text-align: right; font-weight: 700; font-size: 10.5px; }

/* ══════════════════════════════
   BUILDER / FORM PANELS
══════════════════════════════ */
.builder-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; height: calc(100vh - 120px); }
.builder-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow-y: auto; display: flex; flex-direction: column; }
.builder-panel-header { padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text); position: sticky; top: 0; background: var(--bg2); z-index: 1; }
.builder-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.builder-section-title { font-size: 10.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 9px; }
.checkbox-group { display: flex; flex-direction: column; gap: 6px; }
.cb-item { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 4px 7px; border-radius: 6px; transition: background .1s; font-size: 12.5px; }
.cb-item:hover { background: var(--bg3); }
.cb-item input[type=checkbox] { accent-color: var(--gold); width: 13px; height: 13px; }
.radio-group { display: flex; flex-direction: column; gap: 6px; }
.radio-item { display: flex; align-items: center; gap: 7px; cursor: pointer; padding: 4px 7px; border-radius: 6px; transition: background .1s; font-size: 12.5px; }
.radio-item:hover { background: var(--bg3); }
.radio-item input[type=radio] { accent-color: var(--gold); width: 13px; height: 13px; }
.select-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; outline: none; cursor: pointer; transition: border-color .13s; }
.select-input:focus { border-color: var(--gold); }
.text-input  { width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text); border-radius: 7px; padding: 6px 9px; font-size: 12.5px; outline: none; transition: border-color .13s; }
.text-input:focus { border-color: var(--gold); }

#view-bestand .inventory-filter-header { align-items:stretch;flex-direction:column;gap:11px;padding:12px 16px; }
#view-bestand .inventory-filter-heading { align-self:flex-start; }
#view-bestand .inventory-filter-controls { display:grid;grid-template-columns:repeat(5,minmax(0,1fr)) max-content max-content max-content;align-items:center;gap:7px;width:100%; }
#view-bestand .inventory-filter-field { min-width:0; }
#view-bestand .inventory-filter-controls > .select-input,
#view-bestand .inventory-filter-article .oe-in { min-height:32px;padding:5px 8px;font-size:11.5px; }
#view-bestand .inventory-filter-article,
#view-bestand .inventory-filter-article > *,
#view-bestand .inventory-filter-article .oe-in { width:100%;min-width:0; }
#view-bestand .inventory-filter-toggle { display:flex;align-items:center;gap:5px;min-height:32px;margin:0;cursor:pointer;white-space:nowrap; }
#view-bestand .inventory-filter-submit { min-height:32px; }

/* BIQ-50: identical quantity-column geometry across overview and all detail tables. */
#view-bestand .so-stock-grid-scroll { max-width:100%;overflow-x:auto; }
#view-bestand .so-stock-grid { min-width:680px;table-layout:fixed; }
#view-bestand .so-stock-col-article { width:27%; }
#view-bestand .so-stock-col-metal { width:21%; }
#view-bestand .so-stock-col-description { width:48%; }
#view-bestand .so-stock-col-quantity { width:13%; }
#view-bestand .so-inline-toggle { display:block;width:100%;background:none;border:0;padding:0;color:inherit;font:inherit;text-align:left;cursor:pointer; }
#view-bestand .so-inline-toggle:hover { text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:3px; }
#view-bestand .so-inline-toggle:focus-visible { outline:2px solid var(--gold);outline-offset:3px;border-radius:3px; }
#view-bestand .so-inline-article-row.is-expanded > td,
#view-bestand .so-inline-location-row.is-expanded > td { background:rgba(201,168,76,.09); }
#view-bestand .so-inline-article-detail-row > td { padding:0;border-bottom:1px solid var(--border); }
#view-bestand .so-inline-article-panel { padding:12px 14px 14px 18px;background:var(--bg3);border-left:3px solid var(--gold); }
#view-bestand .so-inline-detail-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px; }
#view-bestand .so-inline-detail-heading strong { display:block;font-size:12px; }
#view-bestand .so-inline-detail-heading span { display:block;margin-top:2px;color:var(--text-muted);font-size:11px; }
#view-bestand .so-inline-denom-row > td { padding:0;border-bottom:1px solid var(--border); }
#view-bestand .so-inline-denom-panel { padding:10px 12px 12px 18px;background:var(--bg2);border-left:3px solid var(--silver); }
#view-bestand .so-inline-message { padding:16px;text-align:center;color:var(--text-muted); }

@media (max-width:1199px) {
  #view-bestand .inventory-filter-controls { grid-template-columns:repeat(4,minmax(0,1fr)); }
  #view-bestand .inventory-filter-submit { grid-column:4;justify-self:end; }
}
@media (max-width:760px) {
  #view-bestand .inventory-filter-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #view-bestand .inventory-filter-submit { grid-column:1/-1;justify-self:stretch;width:100%; }
}
@media (max-width:480px) {
  #view-bestand .inventory-filter-controls { grid-template-columns:minmax(0,1fr); }
  #view-bestand .inventory-filter-submit { grid-column:auto; }
  #view-bestand .so-inline-article-panel { padding:10px 8px 12px 10px; }
  #view-bestand .so-inline-denom-panel { padding:9px 7px 11px 10px; }
  #view-bestand .so-inline-detail-heading { align-items:flex-start; }
}

.build-btn { margin: 14px 18px; padding: 9px; background: linear-gradient(135deg, var(--gold-dark), var(--gold)); border: none; color: #000; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; letter-spacing: .3px; transition: opacity .13s; }
.build-btn:hover { opacity: .88; }
.builder-preview { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.preview-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; color: var(--text-muted); text-align: center; gap: 11px; }
.preview-placeholder-icon { font-size: 44px; opacity: .28; }
.preview-placeholder-text { font-size: 13.5px; }
.preview-placeholder-sub  { font-size: 11.5px; max-width: 240px; line-height: 1.6; }

/* ══════════════════════════════
   INFO / DETAIL CARDS
══════════════════════════════ */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin-bottom: 22px; }
.detail-item { background: var(--bg2); padding: 12px 16px; }
.detail-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 3px; }
.detail-value { font-size: 13px; font-weight: 600; color: var(--text); }

.info-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 22px; }
.info-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 24px; color: var(--text-muted); text-align: center; gap: 10px; }
.empty-state-icon { font-size: 42px; opacity: .25; }
.empty-state-text { font-size: 14px; color: var(--text); }
.empty-state-sub  { font-size: 12px; max-width: 280px; line-height: 1.6; }

/* ══════════════════════════════
   ALERT / NOTIFICATION ITEMS
══════════════════════════════ */
.alert-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 22px; }
.alert-item { background: var(--bg2); padding: 13px 18px; display: flex; align-items: flex-start; gap: 13px; transition: background .1s; cursor: pointer; }
.alert-item:hover { background: var(--bg3); }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.alert-dot.red    { background: var(--red); box-shadow: 0 0 5px var(--red); }
.alert-dot.orange { background: var(--orange); box-shadow: 0 0 5px var(--orange); }
.alert-dot.gold   { background: var(--gold); box-shadow: 0 0 5px var(--gold); }
.alert-dot.green  { background: var(--green); }
.alert-dot.muted  { background: var(--text-muted); }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.alert-desc  { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.alert-time  { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

/* ══════════════════════════════
   SETTINGS COMPONENTS
══════════════════════════════ */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 18px; }
.settings-nav { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 0; height: fit-content; }
.settings-nav-item { padding: 8px 16px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; border-left: 3px solid transparent; transition: all .13s; }
.settings-nav-item:hover { background: var(--bg3); color: var(--text); }
.settings-nav-item.active { color: var(--gold-light); border-left-color: var(--gold); background: rgba(201,168,76,.08); }
.dfc-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin:12px 0; }
.dfc-grid { display:grid; gap:9px; margin-top:10px; }
.dfc-card { border:1px solid var(--border); border-radius:10px; background:var(--bg2); padding:12px; }
.dfc-card-head { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; font-size:12px; font-weight:600; }
.dfc-meta { color:var(--text-muted); font-size:11px; margin-top:5px; overflow-wrap:anywhere; }
.dfc-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:10px; margin:10px 0; }
.dfc-form-grid label,.dfc-json-label { display:grid; gap:5px; font-size:11px; color:var(--text-muted); }
.dfc-json { width:100%; min-height:260px; resize:vertical; box-sizing:border-box; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:var(--text); padding:10px; font:11px/1.45 ui-monospace,monospace; }
.dfc-message { border:1px solid var(--red); color:var(--red); background:rgba(200,70,70,.09); border-radius:8px; padding:10px; margin-bottom:10px; white-space:pre-wrap; }
.depot-module-tabs { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 16px; padding:5px; border:1px solid var(--border); border-radius:12px; background:var(--bg2); }
.depot-module-tab { appearance:none; border:1px solid transparent; border-radius:8px; padding:9px 14px; color:var(--text-muted); background:transparent; font:inherit; font-size:12.5px; cursor:pointer; }
.depot-module-tab:hover { color:var(--text); background:var(--bg3); }
.depot-module-tab.active { color:var(--gold-light); border-color:var(--gold); background:rgba(201,168,76,.13); }
.depot-module-tab:focus-visible { outline:2px solid var(--gold); outline-offset:2px; }
.depot-module-panel[hidden] { display:none; }
.depot-module-panel > .settings-section { border:1px solid var(--border); border-radius:12px; background:var(--bg2); padding:16px; margin-bottom:14px; }
.dfc-editor-group { border-top:1px solid var(--border); padding-top:12px; margin-top:14px; }
.dfc-editor-group h4 { font-size:12px; margin:0 0 10px; color:var(--text); }
.dfc-editor-group .oe-in[type="number"] { width:100%; min-width:90px; }
.dfc-table-scroll { overflow-x:auto; margin-top:10px; }
.dfc-matrix { width:100%; min-width:1080px; border-collapse:collapse; font-size:11px; }
.dfc-matrix th { padding:8px; border-bottom:1px solid var(--border); color:var(--text-muted); text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:.35px; }
.dfc-matrix td { padding:8px; border-bottom:1px solid var(--border); vertical-align:top; }
.dfc-matrix .oe-in { min-width:105px; width:100%; box-sizing:border-box; }
.dfc-matrix .dfc-wide { min-width:220px; }
.dfc-matrix-detail td { padding:0 8px 12px 38px; background:rgba(255,255,255,.015); }
.dfc-matrix-detail[hidden] { display:none; }
.dfc-case-list { display:grid; gap:6px; padding-top:8px; }
.dfc-case { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:6px; padding:8px; border:1px solid var(--border); border-radius:8px; }
.dfc-case span { color:var(--text-muted); }
.dfc-case strong { display:block; color:var(--text); margin-top:2px; font-weight:600; }
.dfc-expand { min-width:28px; padding:4px 7px; }
@media (max-width:700px) { .depot-module-tabs { display:grid; grid-template-columns:1fr 1fr; } .depot-module-tab { text-align:left; } }
.kf-tabs { display:flex; flex-wrap:wrap; gap:2px; border-bottom:1px solid rgba(255,255,255,.09); margin:4px 0 16px; }
.kf-tab { appearance:none; background:transparent; border:0; padding:8px 14px; font-family:inherit; font-size:13px; font-weight:600; text-align:left; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; transition:all .13s; white-space:nowrap; }
.kf-tab:hover { color:var(--text); background:var(--bg3); }
.kf-tab.active { color:var(--gold-light); border-bottom-color:var(--gold); }
.kf-pane { display:none; }
.kf-pane.active { display:block; }
.kf-private-only, .kf-private-section-head, .kf-private-addresses, .kf-ubo-placeholder { display:none; }
.kf-type-cards { display:grid; grid-template-columns:repeat(2,minmax(220px,1fr)); gap:12px; max-width:760px; }
.kf-type-card { min-height:92px; padding:16px 18px; border:1px solid var(--border); border-radius:10px; background:var(--bg3); color:var(--text); text-align:left; cursor:pointer; display:flex; flex-direction:column; gap:7px; font:inherit; }
.kf-type-card:hover { border-color:var(--gold); background:rgba(201,168,76,.07); }
.kf-type-card:focus-visible, .kf-private-checkout input:focus-visible, .kf-private-checkout select:focus-visible, .kf-private-checkout textarea:focus-visible, .kf-private-checkout button:focus-visible { outline:2px solid var(--gold-light); outline-offset:2px; }
.kf-type-card-title { color:var(--gold-light); font-size:15px; font-weight:700; }
.kf-type-card > span:last-child { color:var(--text-muted); font-size:12px; line-height:1.45; }

/* BIQ-71: Privatkunden als vertikaler Checkout; Gewerbe behält die vorhandene Reiteransicht. */
#kf-body.kf-private-checkout { max-width:1080px; margin:0 auto; display:flex !important; flex-direction:column; gap:14px; }
.kf-private-checkout > .kf-tabs { display:none; }
.kf-private-checkout > .kf-pane { display:none; }
.kf-private-checkout > #kf-pane-basis,
.kf-private-checkout > #kf-pane-lieferstellen,
.kf-private-checkout > #kf-pane-compliance,
.kf-private-checkout > #kf-pane-zahlung { display:block; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--bg2); }
.kf-private-checkout > #kf-pane-basis { order:1; }
.kf-private-checkout > #kf-pane-lieferstellen { order:2; }
.kf-private-checkout > #kf-pane-compliance { order:3; }
.kf-private-checkout > #kf-pane-zahlung { order:4; }
.kf-private-checkout .kf-private-only { display:flex; }
.kf-private-checkout .kf-private-hide { display:none !important; }
.kf-private-checkout #kf-pane-basis > div[style*="display:grid"],
.kf-private-checkout #kf-pane-lieferstellen > div[style*="display:grid"],
.kf-private-checkout #kf-legit-block > div[style*="display:grid"] { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
.kf-private-section-head { align-items:center; gap:11px; margin:0 0 16px; }
.kf-private-checkout .kf-private-section-head { display:flex; }
.kf-private-section-head strong, .kf-private-section-head small { display:block; }
.kf-private-section-head strong { font-size:14px; }
.kf-private-section-head small { margin-top:2px; color:var(--text-muted); font-size:11.5px; }
.kf-private-checkout #kf-pane-lieferstellen > .chart-sub,
.kf-private-checkout #kf-pane-lieferstellen > .kf-site-flags,
.kf-private-checkout #kf-pane-lieferstellen > .kf-site-lager,
.kf-private-checkout #kf-pane-lieferstellen > table,
.kf-private-checkout #kf-pane-lieferstellen > .btn-group,
.kf-private-checkout #kf-pane-lieferstellen > .kf-sites-filter,
.kf-private-checkout #kf-pane-lieferstellen > .kf-sites-md { display:none !important; }
.kf-private-checkout #kf-pane-lieferstellen > div[style*="display:grid"] > .login-row:nth-child(-n+2) { display:none; }
.kf-private-checkout .kf-private-addresses { display:flex; flex-direction:column; gap:12px; margin-top:18px; }
.kf-private-subsection { border-top:1px solid var(--border); padding-top:14px; }
.kf-private-toggle-row { display:flex; justify-content:space-between; gap:18px; align-items:center; }
.kf-private-toggle-row strong, .kf-private-toggle-row small { display:block; }
.kf-private-toggle-row small { color:var(--text-muted); margin-top:3px; font-size:11.5px; }
.kf-private-radio { border:0; padding:0; margin:0; display:flex; align-items:center; gap:14px; min-height:44px; }
.kf-private-radio label { display:flex; align-items:center; gap:6px; white-space:nowrap; }
.kf-private-address-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.kf-private-address-grid:not([hidden]) { display:grid; }
.kf-private-checkout #kf-pane-compliance > div:first-of-type { margin-bottom:12px; }
.kf-private-checkout #kf-legit-section { display:block !important; }
.kf-private-checkout #kf-legit-section > .chart-sub { display:none; }
.kf-private-checkout .kf-ubo-placeholder { display:block; margin-top:18px; padding:14px; border:1px dashed var(--border); border-radius:10px; background:rgba(127,127,127,.04); }
.kf-placeholder-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.kf-placeholder-head span { padding:3px 8px; border-radius:999px; color:var(--text-muted); background:rgba(127,127,127,.12); font-size:10.5px; }
.kf-ubo-placeholder p { color:var(--text-muted); font-size:11.5px; margin:6px 0 0; }
.kf-ubo-placeholder > .kf-private-radio { margin-top:8px; }
.kf-legit-notes { margin-top:12px; }
.kf-ubo-placeholder :disabled { opacity:.65; cursor:not-allowed; }

/* BIQ-137 L6: Gesetzliche Vertretung — zwei feste, gleich grosse Karten (Slot 1/Slot 2), keine dynamische
   Liste (Vera/UI-Konzept Abschnitt 2/6). Nur sichtbar PRIVAT + minderjaehrig (kfLegrepApplyVisibility). */
.kf-legrep-section { margin-top:14px; padding:14px; border:1px solid var(--border); border-radius:10px; background:rgba(127,127,127,.04); }
.kf-legrep-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.kf-legrep-head strong { font-size:13.5px; display:block; }
.kf-legrep-head small { display:block; margin-top:2px; color:var(--text-muted); font-size:11.5px; line-height:1.4; }
.kf-legrep-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.kf-legrep-card { padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--bg3); }
.kf-legrep-card-head { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-bottom:10px; }
.kf-legrep-card-head strong { font-size:13px; }
.kf-legrep-card-head small { color:var(--text-muted); font-size:11px; }
.kf-legrep-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.kf-legrep-fields .login-row { display:block; min-width:0; }
@media (max-width:760px) {
  .kf-legrep-cards { grid-template-columns:1fr; }
  .kf-legrep-fields { grid-template-columns:1fr; }
}
.kf-private-checkout #kf-pane-zahlung > .chart-sub { display:none; }
.kf-private-checkout #kf-pane-zahlung table { display:block; overflow:visible; }
.kf-private-checkout #kf-pane-zahlung thead { display:none; }
.kf-private-checkout #kf-pane-zahlung tbody { display:flex; flex-direction:column; gap:10px; }
.kf-private-checkout #kf-pane-zahlung tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 12px; padding:12px; border:1px solid var(--border); border-radius:10px; }
.kf-private-checkout #kf-pane-zahlung td { display:block; padding:0; border:0; }
.kf-private-checkout #kf-pane-zahlung td[data-label]::before { content:attr(data-label); display:block; margin:0 0 4px; color:var(--text-muted); font-size:10.5px; }

/* Gewerbekunden behalten ihre Reiter; jeder aktive Reiter folgt dem akzeptierten Privatkunden-Blockstil. */
#kf-body.kf-commercial-tabs { max-width:1180px; margin:0 auto; padding-bottom:4px; }
.kf-commercial-tabs > .kf-tabs { margin:8px 18px 16px; border-bottom-color:var(--border); }
.kf-commercial-tabs > .kf-pane.active { min-width:0; margin:0 18px; padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--bg2); }
.kf-commercial-section-head { display:none; }
.kf-commercial-tabs .kf-commercial-section-head { display:flex; align-items:center; gap:11px; margin:0 0 16px; }
.kf-commercial-section-head strong,
.kf-commercial-section-head small { display:block; }
.kf-commercial-section-head strong { font-size:14px; }
.kf-commercial-section-head small { margin-top:2px; color:var(--text-muted); font-size:11.5px; line-height:1.45; }
.kf-commercial-tabs input:focus-visible,
.kf-commercial-tabs select:focus-visible,
.kf-commercial-tabs textarea:focus-visible,
.kf-commercial-tabs button:focus-visible,
.kf-commercial-tabs .filter-btn:focus-visible { outline:2px solid var(--gold-light); outline-offset:2px; }

/* Ansprechpartner: bestehende fünf Nutzfelder als Karten, künftige BIQ-119-Felder nur als Placeholder. */
.kf-commercial-tabs .kf-contact-table { display:block; width:100%; overflow:visible; }
.kf-commercial-tabs .kf-contact-table thead { display:none; }
.kf-commercial-tabs #kf-contacts { display:flex; flex-direction:column; gap:12px; }
.kf-commercial-tabs .kf-contact-card,
.kf-commercial-tabs .kf-contact-card > td { display:block; width:100%; }
.kf-commercial-tabs .kf-contact-card > td { padding:0; border:0; }
.kf-commercial-tabs .kf-contact-card-body { display:block; padding:14px; border:1px solid var(--border); border-radius:10px; background:var(--bg3); }
.kf-commercial-tabs .kf-contact-card-head,
.kf-commercial-tabs .kf-contact-placeholder-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.kf-commercial-tabs .kf-contact-card-head { margin-bottom:12px; }
.kf-commercial-tabs .kf-contact-card-head strong { font-size:13.5px; }
.kf-commercial-tabs .kf-contact-remove { flex:none; min-height:36px; padding:6px 10px; font:inherit; }
.kf-commercial-tabs .kf-contact-fields,
.kf-commercial-tabs .kf-contact-kyc-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.kf-commercial-tabs .kf-contact-fields > .login-row,
.kf-commercial-tabs .kf-contact-kyc-fields > .login-row { display:block; min-width:0; }
.kf-commercial-tabs .kf-contact-primary { grid-column:1/-1; display:flex; align-items:center; gap:7px; min-height:32px; font-size:12.5px; }
.kf-commercial-tabs .kf-contact-auth-placeholder { margin-top:14px; padding:14px; border:1px dashed var(--border); border-radius:10px; background:rgba(127,127,127,.04); }
.kf-commercial-tabs .kf-contact-placeholder-head strong,
.kf-commercial-tabs .kf-contact-placeholder-head small { display:block; }
.kf-commercial-tabs .kf-contact-placeholder-head strong { font-size:13px; }
.kf-commercial-tabs .kf-contact-placeholder-head small { margin-top:3px; color:var(--text-muted); font-size:11px; line-height:1.4; }
.kf-commercial-tabs .kf-contact-placeholder-head > span,
.kf-commercial-tabs .kf-contact-auth-state { color:var(--text-muted); background:rgba(127,127,127,.12); font-size:10.5px; }
.kf-commercial-tabs .kf-contact-placeholder-head > span { flex:none; padding:3px 8px; border-radius:999px; }
.kf-commercial-tabs .kf-contact-auth-state { display:inline-block; margin-top:10px; padding:3px 8px; border-radius:6px; font-weight:700; letter-spacing:.35px; }
.kf-commercial-tabs .kf-contact-auth-controls { min-width:0; margin:12px 0 0; padding:0; border:0; }
.kf-commercial-tabs .kf-contact-auth-controls legend { margin-bottom:6px; color:var(--text-muted); font-size:11px; font-weight:700; }
.kf-commercial-tabs .kf-contact-auth-radios { display:flex; align-items:center; gap:16px; min-height:32px; }
.kf-commercial-tabs .kf-contact-auth-radios label { display:flex; align-items:center; gap:6px; }
.kf-commercial-tabs .kf-contact-auth-controls > .login-row { display:block; max-width:360px; margin-top:10px; }
.kf-commercial-tabs .kf-contact-kyc-title { margin:16px 0 8px; color:var(--text-muted); font-size:11px; font-weight:700; }
.kf-commercial-tabs .kf-contact-auth-placeholder :disabled { opacity:.65; cursor:not-allowed; }

@media (max-width:720px) {
  #artikel-list-card > .kunden-search-row { padding:12px 14px 8px; }
  #artikel-list-card > .art-filter-row { padding:0 14px 12px; }
  #artikel-list-card > .kunden-search-row .kac-wrap { flex-basis:100%; min-width:0; max-width:none; }
  #artikel-list-card > .kunden-search-row .filter-btn { min-height:44px; display:flex; align-items:center; }
  #artikel-list-card > .kunden-search-row .kac-count { flex:1 1 auto; text-align:right; }
  /* BIQ-71 W4c: Arbeitslisten-Filterschalter (Profil/Legitimation) und „Alle A–Z" auf Touch-Zielgroesse. */
  #kunden-list-card > .kunden-search-row .filter-btn { min-height:44px; display:flex; align-items:center; }
  #kunden-list-card > .kunden-search-row .kac-count { flex:1 1 auto; text-align:right; }
  #artikel-list-card .art-filter-row > span:first-child { flex:0 0 100%; }
  #artikel-list-card .art-filter-row > .select-input { width:auto !important; min-width:120px; flex:1 1 135px !important; }
  .kf-type-cards { grid-template-columns:1fr; }
  #kf-body.kf-private-checkout { margin:0; }
  .kf-private-checkout > #kf-pane-basis, .kf-private-checkout > #kf-pane-lieferstellen, .kf-private-checkout > #kf-pane-compliance, .kf-private-checkout > #kf-pane-zahlung { padding:14px; }
  .kf-private-address-grid { grid-template-columns:1fr; }
  .kf-private-checkout #kf-pane-basis > div[style*="display:grid"],
  .kf-private-checkout #kf-pane-lieferstellen > div[style*="display:grid"],
  .kf-private-checkout #kf-legit-block > div[style*="display:grid"] { grid-template-columns:1fr !important; }
  .kf-private-toggle-row { align-items:flex-start; }
  .kf-private-checkout #kf-pane-zahlung tr { grid-template-columns:1fr; }
  .kf-private-checkout button, .kf-private-checkout .filter-btn { min-height:44px; }
  #kf-body.kf-commercial-tabs { margin:0; }
  .kf-commercial-tabs > .kf-tabs { margin:8px 14px 14px; }
  .kf-commercial-tabs > .kf-pane.active { margin:0 14px; padding:14px; }
  .kf-commercial-tabs .kf-contact-fields,
  .kf-commercial-tabs .kf-contact-kyc-fields { grid-template-columns:1fr; }
  .kf-commercial-tabs .kf-contact-card-body,
  .kf-commercial-tabs .kf-contact-auth-placeholder { padding:12px; }
  .kf-commercial-tabs .kf-contact-card-head,
  .kf-commercial-tabs .kf-contact-placeholder-head { align-items:stretch; flex-direction:column; }
  .kf-commercial-tabs .kf-contact-remove { min-height:44px; align-self:flex-start; }
  .kf-commercial-tabs .kf-contact-placeholder-head > span { align-self:flex-start; }
}
.kf-site-card { border:1px solid rgba(255,255,255,.10); border-radius:8px; padding:12px 14px; margin-bottom:10px; background:rgba(255,255,255,.02); }
.kf-site-head { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; align-items:end; }
.kf-site-addr { display:grid; grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); gap:10px; margin-top:10px; }
.kf-site-flags { display:flex; flex-wrap:wrap; gap:18px; align-items:center; margin-top:10px; font-size:13px; }
.kf-site-preview-wrap { margin-top:12px; }
.kf-site-preview { font-size:12.5px; line-height:1.55; padding:9px 11px; border-radius:6px; background:rgba(255,255,255,.03); border:1px dashed rgba(255,255,255,.13); }
/* BIQ-9: Master-Detail für Lieferstellen/Standorte — Karten bleiben im DOM, nur die gewählte ist sichtbar. */
.kf-sites-md { display:grid; grid-template-columns:minmax(250px,320px) minmax(0,1fr); gap:14px; align-items:start; margin-top:8px; }
@media (max-width:920px) { .kf-sites-md { grid-template-columns:1fr; } }
.kf-sites-filter { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; margin-bottom:8px; }
.kf-sites-filter .text-input { width:auto; flex:1 1 140px; }
.kf-sites-list { border:1px solid rgba(255,255,255,.10); border-radius:8px; overflow:hidden; background:rgba(255,255,255,.02); }
.kf-site-row { padding:9px 12px; cursor:pointer; border-bottom:1px solid rgba(255,255,255,.07); border-left:3px solid transparent; transition:background .1s; outline:none; }
.kf-site-row:last-child { border-bottom:none; }
.kf-site-row:hover { background:var(--bg3); }
.kf-site-row:focus-visible { box-shadow:inset 0 0 0 2px rgba(201,168,76,.55); }
.kf-site-row.active { background:rgba(201,168,76,.10); border-left-color:var(--gold); }
.kf-site-row-name { font-size:13px; font-weight:600; color:var(--text); }
.kf-site-row-sub { font-size:11px; color:var(--text-muted); margin-top:2px; }
.kf-site-row-chips { display:flex; flex-wrap:wrap; gap:5px; margin-top:4px; }
.kf-site-chip { font-size:9.5px; font-weight:700; letter-spacing:.7px; padding:1px 7px; border-radius:20px; text-transform:uppercase; background:rgba(46,204,113,.14); color:var(--green); border:1px solid rgba(46,204,113,.28); }
.kf-site-chip.stock { background:rgba(201,168,76,.14); color:var(--gold-light); border-color:rgba(201,168,76,.28); }
.kf-sites-list-empty { padding:12px; font-size:12px; color:var(--text-muted); }
#kf-sites .kf-site-card { display:none; }
#kf-sites .kf-site-card.sel { display:block; }
.kf-sites-detail-empty { border:1px dashed rgba(255,255,255,.13); border-radius:8px; padding:16px; font-size:12.5px; color:var(--text-muted); }
.settings-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.settings-panel-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.settings-section { padding: 20px; border-bottom: 1px solid var(--border); }
.settings-section:last-child { border-bottom: none; }
.settings-section-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; gap: 16px; }
.settings-row-label { font-size: 13px; color: var(--text); }
.settings-row-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.toggle { width: 36px; height: 20px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle.on { background: var(--gold-dark); border-color: var(--gold); }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--text-muted); transition: all .2s; }
.toggle.on::after { left: 18px; background: var(--gold-light); }

/* ══════════════════════════════
   SCROLLBAR
══════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ══════════════════════════════
   VIEW VISIBILITY
══════════════════════════════ */
.view { display: none; }
.view.active { display: block; }

/* ══════════════════════════════
   TOAST
══════════════════════════════ */
#toast {
  position: fixed;
  bottom: 22px; right: 22px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  transition: all .25s;
  pointer-events: none;
  z-index: 999;
  max-width: 320px;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════
   TRADING SPECIFIC
══════════════════════════════ */
.trade-layout { display: grid; grid-template-columns: 1fr 340px; gap: 16px; }
.trade-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.trade-panel-header { padding: 13px 18px; border-bottom: 1px solid var(--border); font-size: 13.5px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.trade-tabs { display: flex; border-bottom: 1px solid var(--border); }
.trade-tab { flex: 1; padding: 10px; text-align: center; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; transition: all .13s; }
.trade-tab:hover { color: var(--text); }
.trade-tab.buy.active  { color: var(--green); border-bottom-color: var(--green); }
.trade-tab.sell.active { color: var(--red);   border-bottom-color: var(--red); }
.trade-form { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.form-row { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; }
.form-price-display { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.form-price-big { font-size: 22px; font-weight: 700; }
.form-price-sub { font-size: 11px; color: var(--text-muted); }
.submit-buy  { width: 100%; padding: 11px; background: linear-gradient(135deg,#1a7a42,var(--green)); border: none; color: #fff; border-radius: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: opacity .13s; }
.submit-sell { width: 100%; padding: 11px; background: linear-gradient(135deg,#7a1a1a,var(--red)); border: none; color: #fff; border-radius: 8px; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: opacity .13s; }
.submit-buy:hover, .submit-sell:hover { opacity: .88; }

.orderbook { display: grid; grid-template-columns: 1fr 1fr; }
.orderbook-side { padding: 10px 0; }
.orderbook-header { padding: 4px 12px; font-size: 9.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; display: grid; grid-template-columns: 1fr 1fr; }
.ob-row { padding: 3px 12px; display: grid; grid-template-columns: 1fr 1fr; font-size: 11.5px; position: relative; }
.ob-row-bg { position: absolute; top: 0; bottom: 0; right: 0; opacity: .12; border-radius: 2px; }
.ob-buy .ob-row-bg  { background: var(--green); left: auto; }
.ob-sell .ob-row-bg { background: var(--red);   right: auto; }
.ob-buy  .ob-price { color: var(--green); font-weight: 600; }
.ob-sell .ob-price { color: var(--red);   font-weight: 600; }
.ob-spread { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 5px 12px; text-align: center; font-size: 11px; color: var(--text-muted); background: var(--bg3); }

/* ══════════════════════════════
   COMPLIANCE SPECIFIC
══════════════════════════════ */
.compliance-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 22px; }
.timeline-item { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: none; }
.timeline-marker { display: flex; flex-direction: column; align-items: center; gap: 0; flex-shrink: 0; width: 20px; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.timeline-line { flex: 1; width: 1px; background: var(--border); margin-top: 3px; }
.timeline-content { flex: 1; min-width: 0; padding-bottom: 4px; }
.timeline-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.timeline-desc  { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.timeline-meta  { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* ══════════════════════════════
   MONITORING SPECIFIC
══════════════════════════════ */
.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 12px; margin-bottom: 22px; }
.monitor-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }
.monitor-card.alert-border { border-color: rgba(231,76,60,.4); }
.monitor-card.warn-border  { border-color: rgba(230,126,34,.4); }
.monitor-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .7px; margin-bottom: 6px; }
.monitor-count { font-size: 28px; font-weight: 700; }
.monitor-sub   { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════════════════════
   BIQ-62 P3 · OPERATIVES DASHBOARD
══════════════════════════════════════════════════════════════════════════ */
.sr-only { position:absolute!important; left:0!important; top:0!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; clip-path:inset(50%)!important; white-space:nowrap!important; border:0!important; }
.db-op { margin: 16px 0 24px; min-width: 0; }
.db-op-source { display:inline-flex; align-items:center; min-height:28px; padding:4px 9px; border:1px solid var(--border); border-radius:20px; color:var(--text-muted); font-size:10.5px; background:var(--bg2); }
.db-op-source.is-live { border-color:rgba(46,204,113,.38); color:var(--green); }
.db-op-source.is-demo { border-color:rgba(230,126,34,.45); color:var(--orange); }
.db-op-source.is-stale { border-color:rgba(230,126,34,.45); color:var(--orange); }
.db-op-link,.db-op-action,.db-op-row-action,.db-op-approval-card { font:inherit; color:inherit; }
.db-op-state { display:none; min-height:112px; padding:24px; margin-bottom:14px; border:1px solid var(--border); border-radius:12px; background:var(--bg2); color:var(--text-muted); align-items:center; justify-content:center; text-align:center; line-height:1.55; }
.db-op-state.show { display:flex; }
.db-op-state strong { display:block; margin-bottom:4px; color:var(--text); font-size:14px; }
.db-op-state button { min-height:40px; margin-top:12px; padding:7px 12px; border:1px solid var(--gold-dark); border-radius:8px; background:rgba(201,168,76,.12); color:var(--gold-light); cursor:pointer; }
.db-op-section-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:14px 0 9px; }
.db-op-section-head-today { margin-top:18px; }
.db-op-section-head h2,.db-op-panel-head h2 { margin:0; color:var(--text); font-size:12.5px; font-weight:700; letter-spacing:.25px; }
.db-op-section-head p,.db-op-panel-head p { margin:2px 0 0; color:var(--text-muted); font-size:10.5px; }
.db-op-today-heading { display:flex; align-items:baseline; gap:7px; min-width:0; }
.db-op-today-heading span { color:var(--text-muted); font-size:10.5px; white-space:nowrap; }
.db-op-range-tools { display:flex; align-items:center; gap:8px; min-width:0; }
.db-op-range-note { color:var(--text-muted); font-size:9px; white-space:nowrap; }
.db-op-date-range { flex:0 0 auto; }
.db-op-quick { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.db-op-action { min-height:52px; display:flex; align-items:center; justify-content:center; gap:10px; border:1px solid var(--border); border-radius:10px; background:var(--bg2); cursor:pointer; font-size:12px; font-weight:700; letter-spacing:.1px; transition:border-color .15s,background .15s,transform .15s; }
.db-op-action:hover { transform:translateY(-1px); }
.db-op-action:disabled { opacity:.42; cursor:not-allowed; transform:none; }
.db-op-action .db-op-action-icon { font-size:18px; line-height:1; }
.db-op-action-buy { border-color:rgba(46,204,113,.48); background:rgba(46,204,113,.06); color:var(--green); }
.db-op-action-buy:hover { background:rgba(46,204,113,.12); }
.db-op-action-sell { border-color:rgba(231,76,60,.48); background:rgba(231,76,60,.06); color:var(--red); }
.db-op-action-sell:hover { background:rgba(231,76,60,.12); }
.db-op-action-relocation { border-color:rgba(52,152,219,.48); background:rgba(52,152,219,.06); color:var(--blue); }
.db-op-action-relocation:hover { background:rgba(52,152,219,.12); }
html[data-theme="light"] .db-op-action-buy { border-color:#239a57; background:#edf9f2; color:#176b3a; }
html[data-theme="light"] .db-op-action-buy:hover { background:#dff4e8; }
html[data-theme="light"] .db-op-action-sell { border-color:#c2473a; background:#fff1ef; color:#962d22; }
html[data-theme="light"] .db-op-action-sell:hover { background:#ffe3df; }
html[data-theme="light"] .db-op-action-relocation { border-color:#2c7fb3; background:#eef7fd; color:#1f6089; }
html[data-theme="light"] .db-op-action-relocation:hover { background:#deeffa; }
.db-op-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.db-op-kpi { position:relative; min-height:112px; padding:14px 15px; overflow:hidden; border:1px solid var(--border); border-radius:11px; background:var(--bg2); }
.db-op-kpi::before { content:""; position:absolute; inset:0 auto 0 0; width:3px; background:var(--border); }
.db-op-kpi.buy::before { background:var(--green); }.db-op-kpi.sell::before { background:var(--red); }.db-op-kpi.relocation::before { background:var(--blue); }.db-op-kpi.volume::before { background:var(--gold); }
.db-op-kpi-label { color:var(--text-muted); font-size:10px; font-weight:700; letter-spacing:.65px; text-transform:uppercase; }
.db-op-kpi-value { margin-top:9px; color:var(--text); font-size:25px; line-height:1; font-weight:750; font-variant-numeric:tabular-nums; }
.db-op-kpi-sub { margin-top:7px; color:var(--text-muted); font-size:11px; line-height:1.35; }
.db-op-kpi-note { display:block; margin-top:4px; color:var(--orange); font-size:9.5px; }
.db-op-columns { display:grid; grid-template-columns:minmax(0,2fr) minmax(280px,1fr); gap:12px; margin-top:14px; align-items:start; }
.db-op-panel { min-width:0; border:1px solid var(--border); border-radius:12px; background:var(--bg2); overflow:hidden; }
.db-op-panel-head { min-height:58px; padding:13px 15px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--border); }
.db-op-link { min-height:40px; padding:5px 8px; border:0; background:transparent; color:var(--gold-light); cursor:pointer; font-size:10.5px; }
.db-op-signals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; padding:11px 12px; border-bottom:1px solid var(--border); }
.db-op-signal { min-height:60px; width:100%; padding:9px 10px; text-align:left; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:inherit; font:inherit; }
button.db-op-signal { cursor:pointer; }
button.db-op-signal:hover { border-color:var(--gold); }
.db-op-signal strong { display:block; color:var(--text); font-size:19px; font-variant-numeric:tabular-nums; }
.db-op-signal span { display:block; margin-top:3px; color:var(--text-muted); font-size:9.5px; line-height:1.25; }
.db-op-signal.danger strong { color:var(--red); }.db-op-signal.warn strong { color:var(--orange); }
.db-op-table-wrap { width:100%; overflow-x:auto; }
.db-op-table { width:100%; min-width:620px; border-collapse:collapse; }
.db-op-table th { padding:8px 12px; text-align:left; color:var(--text-muted); font-size:9px; text-transform:uppercase; letter-spacing:.45px; border-bottom:1px solid var(--border); }
.db-op-table td { padding:9px 12px; color:var(--text); font-size:10.5px; border-bottom:1px solid rgba(42,48,69,.62); vertical-align:middle; }
.db-op-table tr:last-child td { border-bottom:0; }
.db-op-priority { display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border-radius:20px; background:var(--bg3); font-size:9.5px; font-weight:700; white-space:nowrap; }
.db-op-priority::before { content:""; width:6px; height:6px; border-radius:50%; background:var(--text-muted); }
.db-op-priority.red { color:var(--red); }.db-op-priority.red::before { background:var(--red); }.db-op-priority.yellow { color:var(--orange); }.db-op-priority.yellow::before { background:var(--orange); }
.db-op-ref { font-weight:700; }.db-op-meta { display:block; margin-top:2px; color:var(--text-muted); font-size:9.5px; }
.db-op-row-action { min-width:40px; min-height:40px; border:1px solid var(--border); border-radius:7px; background:var(--bg3); color:var(--gold-light); cursor:pointer; }
.db-op-row-action:hover { border-color:var(--gold); }
.db-op-empty { padding:24px!important; text-align:center; color:var(--text-muted)!important; }
.db-op-approval-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; padding:12px; }
.db-op-approval-card { min-height:92px; padding:11px; text-align:left; border:1px solid var(--border); border-radius:9px; background:var(--bg3); cursor:pointer; }
.db-op-approval-card:hover { border-color:var(--purple); }
.db-op-approval-card:disabled { cursor:not-allowed; opacity:.72; }
.db-op-approval-card strong { display:block; color:var(--text); font-size:22px; font-variant-numeric:tabular-nums; }
.db-op-approval-card b { display:block; margin-top:3px; color:var(--text); font-size:10.5px; }
.db-op-approval-card span { display:block; margin-top:5px; color:var(--text-muted); font-size:9px; line-height:1.3; }
.db-op-approval-card.forbidden { border-style:dashed; }
/* BIQ-98 Nachtrag (Uli-Feedback nach Live-Blick auf testing): rein optische Rueckmeldung, welche
   Kachel gerade die Inline-Liste darunter bestimmt (fgOverviewMarkActive, js/freigaben.js) --
   generisch gehalten, das Dashboard setzt diese Klasse nie (dashboardOpenApproval kennt sie nicht). */
.db-op-approval-card.active { border-color:var(--gold); background:rgba(201,168,76,.08); }
/* BIQ-98 Nachtrag (Uli-Feedback: "Kacheln aktuell zu gross"): Scope bewusst NUR auf
   #fg-overview-grid (Freigaben-Nav) -- das Dashboard (#db-op-approval-grid) bleibt unveraendert,
   Uli kritisiert ausdruecklich nur die Nav-Kacheln. */
#fg-overview-grid { grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:6px; padding:10px; }
#fg-overview-grid .db-op-approval-card { min-height:60px; padding:8px; }
#fg-overview-grid .db-op-approval-card strong { font-size:17px; }
#fg-overview-grid .db-op-approval-card b { margin-top:2px; font-size:9.5px; }
#fg-overview-grid .db-op-approval-card span { margin-top:3px; font-size:8px; }
.db-op-secondary-title { margin-top:26px; }
.header-op-refresh:focus-visible,.db-op-link:focus-visible,.db-op-action:focus-visible,.db-op-row-action:focus-visible,.db-op-approval-card:focus-visible,.db-op-signal:focus-visible,.db-op-state button:focus-visible,.oe-quickstart-dialog button:focus-visible,.db-workitems-dialog button:focus-visible,.db-workitems-table-wrap:focus-visible,.db-op-table-wrap:focus-visible { outline:2px solid var(--gold-light); outline-offset:2px; }

/* P4: vollständige operative Arbeitslisten */
#db-workitems-modal { position:fixed; inset:0; z-index:1210; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(5,7,12,.8); }
#db-workitems-modal.show { display:flex; }
/* BIQ-98 Nachtrag (Uli-Vorgabe): dasselbe Popup fuer Dashboard- UND Freigaben-Nav-Einstieg (EINE
   Komponente, s. index.html #db-workitems-modal) -- "insgesamt etwas groesser" (920->980) UND
   STABIL: min-height haengt NICHT von der Zeilenzahl der aktuellen Arbeitsliste ab, siehe
   .db-workitems-table-wrap darunter. */
.db-workitems-dialog { width:min(980px,100%); min-height:min(680px,calc(100vh - 40px)); max-height:min(820px,calc(100vh - 40px)); display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--border); border-radius:13px; background:var(--bg2); box-shadow:0 20px 60px rgba(0,0,0,.58); }
.db-workitems-head { padding:16px 18px 12px; display:flex; align-items:flex-start; justify-content:space-between; gap:16px; border-bottom:1px solid var(--border); }
.db-workitems-head h2 { margin:0 0 5px; font-size:16px; }
.db-workitems-head p { margin:0; color:var(--text-muted); font-size:11px; }
.db-workitems-close { width:44px; height:44px; flex:0 0 auto; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:var(--text); cursor:pointer; font-size:20px; line-height:1; }
.db-workitems-tabs { padding:11px 14px; display:flex; gap:7px; overflow-x:auto; border-bottom:1px solid var(--border); }
.db-workitems-tab { min-height:44px; padding:7px 11px; flex:0 0 auto; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:var(--text-muted); cursor:pointer; font:inherit; font-size:10.5px; }
.db-workitems-tab[aria-selected="true"] { border-color:var(--gold); color:var(--gold-light); background:rgba(201,168,76,.08); }
.db-workitems-tab span { margin-left:5px; opacity:.7; font-variant-numeric:tabular-nums; }
.db-workitems-status { min-height:36px; padding:9px 14px; color:var(--text-muted); font-size:10.5px; border-bottom:1px solid var(--border); }
.db-workitems-status.error { color:var(--red); }
/* BIQ-98 Nachtrag: FESTE (nicht nur minimale) Hoehe -- vorher wuchs/schrumpfte der gesamte Dialog
   mit der Zeilenzahl der jeweiligen Arbeitsliste ("sprunghaft flexibel", Uli-Screenshot-Befund).
   clamp() haelt die Hoehe unabhaengig vom Inhalt konstant und bleibt zugleich viewport-vertraeglich. */
.db-workitems-table-wrap { height:clamp(230px,46vh,420px); overflow:auto; }
.db-workitems-table { min-width:680px; }
.db-workitems-footer { min-height:60px; padding:9px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--border); color:var(--text-muted); font-size:10.5px; }
.db-workitems-pager { display:flex; gap:8px; }
.db-workitems-pager button { min-height:44px; padding:7px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:var(--text); cursor:pointer; }
.db-workitems-pager button:disabled { opacity:.45; cursor:not-allowed; }
.db-op-target-flash { outline:2px solid var(--gold); outline-offset:3px; box-shadow:0 0 0 6px rgba(201,168,76,.12); }

/* Sicherer Schnellstart-Dialog */
#oe-quickstart-modal { position:fixed; inset:0; z-index:1220; display:none; align-items:center; justify-content:center; padding:20px; background:rgba(5,7,12,.76); }
#oe-quickstart-modal.show { display:flex; }
.oe-quickstart-dialog { width:min(510px,100%); border:1px solid var(--border); border-radius:13px; background:var(--bg2); box-shadow:0 20px 60px rgba(0,0,0,.55); }
.oe-quickstart-dialog-head { padding:17px 18px 10px; }
.oe-quickstart-dialog-head h2 { font-size:16px; margin:0 0 6px; }.oe-quickstart-dialog-head p { margin:0; color:var(--text-muted); font-size:11.5px; line-height:1.5; }
.oe-quickstart-error { display:none; margin:0 18px 4px; padding:9px 10px; border:1px solid rgba(231,76,60,.45); border-radius:8px; background:rgba(231,76,60,.09); color:var(--red); font-size:11px; }
.oe-quickstart-error.show { display:block; }
.oe-quickstart-dialog-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:12px 18px 18px; }
.oe-quickstart-dialog button { min-height:44px; padding:8px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg3); color:var(--text); cursor:pointer; font-size:11.5px; font-weight:650; }
.oe-quickstart-dialog button:hover { border-color:var(--gold); }.oe-quickstart-dialog button.primary { border-color:var(--gold); color:#17130a; background:var(--gold); }.oe-quickstart-dialog button.cancel { grid-column:1/-1; background:transparent; color:var(--text-muted); }
.oe-quickstart-dialog button:disabled { opacity:.6; cursor:wait; }


@media (max-width:1279px) {
  .db-op-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .db-op-columns { grid-template-columns:1fr; }
  #view-dashboard > .chart-grid { grid-template-columns:1fr!important; }
  #view-dashboard .chart-card { min-width:0; overflow:hidden; }
  #view-dashboard .chart-card canvas { max-width:100%!important; }
  #view-dashboard .table-card { overflow-x:auto; }
  #content:has(> #view-dashboard.active) { overflow-x:hidden; }
}
@media (max-width:1199px) {
  header { padding:0 14px; gap:8px; }
  .header-right { gap:8px; }
  .global-search-categories { gap:3px; padding:4px; }
  .global-search-categories label { padding:5px 6px; font-size:11px; }
  .global-search-categories input { width:14px; height:14px; }
  header .icon-btn[title="Benachrichtigungen"],
  header .icon-btn[title="Hilfe"],
  header .icon-btn[title^="Mandant:"],
  header .export-btn { display:none; }
}
@media (max-width:920px) {
  header { height:64px; padding:0 10px; }
  .header-center { display:none; }
  .header-right { gap:6px; }
  header .icon-btn[title="Hell-/Dunkelmodus"] { display:none; }
  #content { overflow-x:hidden; padding:16px; }
  .db-op-section-head-today { align-items:flex-start; flex-direction:column; }
  .db-op-range-tools { max-width:100%; flex-wrap:wrap; }
  .db-op-date-range { max-width:100%; overflow-x:auto; }
  .db-op-quick,.db-op-kpis,.db-op-signals,.db-op-approval-grid { grid-template-columns:1fr; }
  .db-op-action { justify-content:flex-start; padding-left:18px; }
  .db-op-kpi { min-height:96px; }
  .db-op-panel-head { align-items:flex-start; }
  .oe-quickstart-dialog-actions { grid-template-columns:1fr; }
  .oe-quickstart-dialog button.cancel { grid-column:auto; }
  #db-workitems-modal { padding:8px; }
  .db-workitems-dialog { min-height:min(680px,calc(100vh - 16px)); max-height:calc(100vh - 16px); }
  .db-workitems-head { padding:13px 12px 10px; }
  .db-workitems-footer { align-items:stretch; flex-direction:column; }
  .db-workitems-pager { display:grid; grid-template-columns:1fr 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .db-op-action,#toast { transition:none; }
}
body.auth-locked #sidebar,
body.auth-locked #main {
  display: none !important;
}


/* BIQ-Freigabe: Stueckelungen-Zeilen-Diff (Neu/Entfernt/Geaendert farbig, unveraenderte eingeklappt) */
.fg-stk-diff { display:grid; gap:4px; }
.fg-stk-summary { color:var(--text-muted); font-size:.75rem; margin-bottom:2px; }
.fg-stk-row { display:flex; gap:8px; align-items:baseline; padding:3px 7px; border-radius:6px; }
.fg-stk-badge { flex:0 0 auto; font-size:.66rem; font-weight:700; text-transform:uppercase; letter-spacing:.4px; padding:1px 7px; border-radius:999px; border:1px solid var(--border); }
.fg-stk-body { display:flex; flex-wrap:wrap; gap:2px 10px; align-items:baseline; }
.fg-stk-line { font-weight:600; }
.fg-stk-detail { color:var(--text-muted); font-size:.78rem; display:flex; flex-wrap:wrap; gap:2px 10px; }
.fg-stk-add { background:rgba(46,204,113,.10); }
.fg-stk-add .fg-stk-badge { color:var(--green); border-color:rgba(46,204,113,.40); }
.fg-stk-del { background:rgba(231,76,60,.10); }
.fg-stk-del .fg-stk-badge { color:var(--red); border-color:rgba(231,76,60,.40); }
.fg-stk-del .fg-stk-line { text-decoration:line-through; }
.fg-stk-chg { background:rgba(230,126,34,.10); }
.fg-stk-chg .fg-stk-badge { color:var(--orange); border-color:rgba(230,126,34,.40); }
.fg-stk-same .fg-stk-badge { color:var(--text-muted); }
.fg-stk-none { color:var(--text-muted); font-style:italic; }
.fg-stk-more { margin-top:2px; justify-self:start; background:none; border:1px solid var(--border); color:var(--text-muted); border-radius:6px; padding:3px 9px; font-size:.75rem; cursor:pointer; }
.fg-stk-more:hover { color:var(--text); }
.fg-stk-unchanged { display:grid; gap:4px; margin-top:3px; }

/* BIQ-84: Carriergrundlage in der bestehenden /app-SPA */
.car-foundation-section { max-width:1040px; }
.car-foundation-state { margin:10px 0; padding:9px 11px; border:1px solid var(--border); border-radius:7px; background:var(--bg3); color:var(--text-muted); font-size:11px; line-height:1.4; }
.car-foundation-state.loading { color:var(--gold-light); }
.car-foundation-state.ready { border-color:rgba(46,204,113,.35); color:var(--green); }
.car-foundation-state.pending { border-color:rgba(230,126,34,.45); background:rgba(230,126,34,.08); color:var(--orange); }
.car-foundation-state.error { border-color:rgba(231,76,60,.45); background:rgba(231,76,60,.08); color:var(--red); }
.car-foundation-state.empty,.car-foundation-state.info { color:var(--text-muted); }
.car-table-wrap { max-width:100%; overflow:auto; margin-bottom:12px; }
.car-foundation-table { min-width:620px; }
.car-foundation-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; align-items:end; margin-top:12px; }
.car-foundation-form label { display:flex; min-width:0; flex-direction:column; gap:4px; }
.car-foundation-form label > span { color:var(--text-muted); font-size:11px; }
.car-foundation-form .car-wide { grid-column:span 2; }
.car-foundation-form textarea { min-height:70px; resize:vertical; }
.car-form-actions { display:flex; align-items:flex-end; }
.car-foundation-badge { display:inline-flex; align-items:center; min-height:22px; padding:2px 8px; border:1px solid var(--border); border-radius:999px; color:var(--text-muted); background:var(--bg3); font-size:10px; font-weight:650; white-space:nowrap; }
.car-foundation-badge.ok { border-color:rgba(46,204,113,.4); color:var(--green); background:rgba(46,204,113,.08); }
.car-foundation-badge.warn { border-color:rgba(230,126,34,.45); color:var(--orange); background:rgba(230,126,34,.08); }
.car-foundation-badge.off { border-color:rgba(231,76,60,.3); color:var(--text-muted); }
.car-foundation-badge.draft,.car-foundation-badge.info { border-color:rgba(52,152,219,.35); color:#6cb9e8; background:rgba(52,152,219,.07); }
.car-profile-list { display:grid; gap:10px; }
.car-profile-card { padding:12px; border:1px solid var(--border); border-radius:9px; background:var(--bg3); }
.car-profile-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.car-profile-head > div { display:flex; align-items:center; gap:8px; }
.car-profile-facts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px 14px; margin:12px 0 0; }
.car-profile-facts div { min-width:0; }
.car-profile-facts dt { color:var(--text-muted); font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; }
.car-profile-facts dd { margin:3px 0 0; overflow-wrap:anywhere; color:var(--text); font-size:11px; }
.car-profile-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.car-profile-draft { margin-top:12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:rgba(255,255,255,.015); }
.car-profile-draft summary { color:var(--gold-light); cursor:pointer; font-size:11.5px; font-weight:650; }
.car-activation-form { grid-template-columns:minmax(280px,520px); }
.car-capability-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.car-capability-item { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:42px; padding:8px 10px; border:1px solid var(--border); border-radius:7px; background:var(--bg3); color:var(--text-muted); font-size:10.5px; }
.car-capability-profile { grid-column:1/-1; overflow-wrap:anywhere; padding:8px 10px; color:var(--text-muted); font-size:10px; }
.car-danger { border-color:var(--red)!important; color:var(--red)!important; }

@media (max-width:920px) {
  .car-foundation-form,.car-capability-grid { grid-template-columns:1fr; }
  .car-foundation-form .car-wide,.car-capability-profile { grid-column:auto; }
  .car-profile-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .car-profile-head { align-items:flex-start; flex-direction:column; }
}
/* BIQ-84 Welle F: operativer Tourwechsel im Auftragskontext. */
.b84f-panel{margin-top:14px;padding:18px;border:1px solid var(--border);border-left:4px solid var(--gold);border-radius:12px;background:var(--bg2)}
.b84f-panel[hidden]{display:none}
.b84f-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:16px}
.b84f-head h2{margin:3px 0 5px;font-size:17px;color:var(--text)}
.b84f-head p{margin:0;max-width:760px;font-size:12.5px;line-height:1.5;color:var(--text-muted)}
.b84f-kicker{font-size:10px;font-weight:700;letter-spacing:.55px;text-transform:uppercase;color:var(--gold-light)}
.b84f-audit{flex:none;padding:4px 9px;border:1px solid rgba(212,175,55,.35);border-radius:20px;background:rgba(212,175,55,.08);color:var(--gold-light);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.35px}
.b84f-fields{display:grid;grid-template-columns:minmax(250px,1fr) minmax(250px,1fr);gap:13px}
.b84f-field{display:flex;min-width:0;flex-direction:column;gap:6px;font-size:11px;font-weight:700;letter-spacing:.25px;text-transform:uppercase;color:var(--text-muted)}
.b84f-field-reason{grid-column:1/-1}
.b84f-field textarea{resize:vertical;min-height:74px;font:inherit;text-transform:none;letter-spacing:normal}
.b84f-field small{font-size:10.5px;font-weight:400;line-height:1.4;text-transform:none;letter-spacing:normal;color:var(--text-muted)}
.b84f-field input:focus-visible,.b84f-field select:focus-visible,.b84f-field textarea:focus-visible,.b84f-confirm input:focus-visible,.b84f-actions button:focus-visible{outline:2px solid var(--gold-light);outline-offset:2px}
.b84f-confirm{display:flex;align-items:flex-start;gap:9px;margin-top:14px;padding:11px 12px;border:1px solid var(--border);border-radius:9px;background:var(--bg3);font-size:12px;line-height:1.45;color:var(--text)}
.b84f-confirm input{margin-top:2px;accent-color:var(--gold)}
.b84f-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.b84f-state{margin-top:12px;padding:10px 12px;border:1px solid var(--border);border-radius:9px;background:var(--bg3);font-size:12px;line-height:1.45;color:var(--text-muted)}
.b84f-state.loading{border-color:rgba(52,152,219,.4);background:rgba(52,152,219,.08);color:var(--blue)}
.b84f-state.applied{border-color:rgba(46,204,113,.4);background:rgba(46,204,113,.09);color:var(--green)}
.b84f-state.pending{border-color:rgba(243,156,18,.45);background:rgba(243,156,18,.09);color:var(--orange)}
.b84f-state.rejected,.b84f-state.blocked,.b84f-state.error{border-color:rgba(231,76,60,.4);background:rgba(231,76,60,.08);color:var(--red)}
@media(max-width:760px){
  .b84f-head{flex-direction:column}
  .b84f-fields{grid-template-columns:1fr}
  .b84f-field-reason{grid-column:auto}
  .b84f-actions{align-items:stretch;flex-direction:column}
}
/* /BIQ-84 Welle F */
/* BIQ-128 F0: additive, standardmäßig unsichtbare Kundenkontextleiste. */
.customer360-context{position:sticky;top:0;z-index:30;isolation:isolate;display:grid;grid-template-columns:minmax(180px,.9fr) minmax(280px,1.8fr) minmax(180px,.8fr) auto;gap:12px;align-items:center;width:100%;max-width:100%;margin:0 0 18px;padding:10px 14px;border:1px solid var(--border);border-bottom-width:2px;border-left:4px solid var(--gold);border-radius:10px;background-color:var(--bg2);box-shadow:0 10px 24px rgba(15,17,23,.24)}
.customer360-context[hidden]{display:none}
.customer360-context[data-state="blocked"]{border-left-color:var(--red)}
.customer360-identity{display:flex;flex-direction:column;gap:2px;min-width:0}
.customer360-identity strong,.customer360-identity span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.customer360-context-facts{display:flex;align-items:center;gap:8px 14px;min-width:0;flex-wrap:wrap}.customer360-context-fact{display:flex;flex-direction:column;min-width:0;max-width:280px;font-size:11px;color:var(--text)}.customer360-context-fact small{font-size:9px;line-height:1.2;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted)}.customer360-context-fact b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer360-kyc-link{width:max-content;max-width:100%;padding:0;border:0;background:transparent;color:var(--blue);font:inherit;font-weight:650;text-align:left;text-decoration:underline;cursor:pointer}.customer360-context-pending{padding:3px 7px;border:1px solid var(--gold);border-radius:999px;background:var(--bg3);color:var(--text);font-size:10px;font-weight:650;white-space:nowrap}
.customer360-eyebrow{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted)}
.customer360-status{font-size:12px;color:var(--text-muted)}
.customer360-status[data-kind="error"]{color:var(--red)}
.customer360-status[data-kind="success"]{color:var(--green)}
.customer360-actions,.customer360-discard-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.customer360-discard-dialog{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:20px;background:rgba(3,6,13,.72)}
.customer360-discard-dialog[hidden]{display:none}
.customer360-discard-card{width:min(560px,100%);padding:22px;border:1px solid var(--border);border-radius:12px;background:var(--bg2);box-shadow:0 24px 60px rgba(0,0,0,.45)}
.customer360-discard-card h2{margin:0 0 10px;font-size:18px}
.customer360-discard-card p{color:var(--text-muted);line-height:1.5}
@media(max-width:1040px){.customer360-context{grid-template-columns:minmax(180px,.8fr) minmax(260px,1.6fr) 1fr}.customer360-actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:800px){.customer360-context{grid-template-columns:1fr}.customer360-actions{grid-column:auto;justify-content:flex-start}.customer360-context-facts{gap:7px 12px}}
@media(max-width:420px){.customer360-context{position:sticky;top:0;padding:8px;gap:8px}.customer360-context-facts{display:grid;grid-template-columns:1fr 1fr}.customer360-context-fact{max-width:100%}.customer360-context-pending{grid-column:1/-1;width:max-content;max-width:100%;white-space:normal}.customer360-status{display:none}.customer360-actions{gap:5px}.customer360-actions button{padding:5px 7px;white-space:normal}.customer360-discard-actions{display:grid;grid-template-columns:1fr}.customer360-discard-actions button{width:100%;white-space:normal}.customer360-discard-dialog{align-items:start;overflow:auto;padding:10px}.customer360-discard-card{padding:16px;max-height:calc(100vh - 20px);overflow:auto}}

/* ══════════════════════════════════════════════════════════════════════════════════════════════
   BIQ-116 P26 / Vera Kap. L.5 (F-212…F-216): AUSHANG „Ankaufskurse".
   Zwei Einstiege, EINE Darstellung (js/aushang.js) — Schaltersicht unter „Übersicht" und
   Pflegevorschau in Einstellungen → Systemartikel.
   ══════════════════════════════════════════════════════════════════════════════════════════════ */
.aush-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.aush-sheet { border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; background: var(--card); }
.aush-head { border-bottom: 2px solid var(--border); padding-bottom: 10px; margin-bottom: 14px; }
.aush-firma { font-size: 15px; font-weight: 600; color: var(--text); }
.aush-titel { font-size: 22px; font-weight: 700; color: var(--gold-light); margin-top: 2px; }
/* F-214: Der Kursstand ist Pflichtbestandteil — am Bildschirm wie im Druck. */
.aush-stand { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.aush-blocks { display: flex; flex-wrap: wrap; gap: 22px; }
.aush-metal { min-width: 210px; flex: 1 1 210px; break-inside: avoid; page-break-inside: avoid; }
.aush-metal-name { font-size: 17px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 4px; margin-bottom: 6px; }
.aush-table { width: 100%; border-collapse: collapse; }
.aush-table td { padding: 4px 0; font-size: 15px; }
.aush-punze { color: var(--text); font-weight: 600; }
.aush-preis { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.aush-leer { padding: 10px 0; color: var(--text-muted); }
.aush-luecke { margin-top: 12px; font-size: 12px; color: var(--orange); }
.aush-fuss { margin-top: 10px; font-size: 11.5px; color: var(--text-muted); }

/* F-216: Druckbild über @media print, NICHT über eine zweite Ansicht — eine zweite Ansicht wäre
   eine zweite Wahrheit über denselben Preis.
     1. hell drucken (die SPA ist dunkel; ein dunkler Ausdruck ist unlesbar und leert die Patrone)
     2. Sidebar, Kopfleiste, Knöpfe, Reiter und Aktualisieren ausblenden
     3. große Schrift — das Blatt hängt hinter Glas und wird aus zwei Metern gelesen
     4. ein Block je Metall, break-inside: avoid
     5. keine Interaktionsspuren */
@media print {
  @page { margin: 14mm; }
  body, #main, #content { background: #fff !important; color: #000 !important; overflow: visible !important; height: auto !important; }
  #sidebar, header, .aush-no-print, .aush-actions, .kurs-risiko-leiste, #customer360-context { display: none !important; }
  .view { display: none !important; }
  .view.active { display: block !important; }
  .aush-sheet { border: none !important; background: #fff !important; padding: 0 !important; }
  .aush-head { border-bottom: 2px solid #000 !important; }
  .aush-firma { color: #000 !important; font-size: 20pt; }
  .aush-titel { color: #000 !important; font-size: 30pt; }
  .aush-stand { color: #000 !important; font-size: 12pt; }
  .aush-metal-name { color: #000 !important; border-bottom-color: #000 !important; font-size: 22pt; }
  .aush-table td { color: #000 !important; font-size: 16pt; }
  .aush-fuss { color: #000 !important; font-size: 10pt; }
  .aush-blocks { gap: 26px; }
  a, button, .filter-btn, .primary-btn { display: none !important; }
}

/* BIQ-128 C1: bankartig kompakt, ueber die zentralen BullionIQ-Theme-Tokens. */
.customer360-dashboard[hidden]{display:none}
.customer360-dashboard{display:grid;gap:16px;color:var(--text);font-family:"Segoe UI",Arial,sans-serif}
.customer360-dashboard-head,.customer360-panel-head,.customer360-products-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
.customer360-dashboard-head h1{margin:2px 0 0;font-size:22px;line-height:1.25;font-weight:650}
.customer360-panel{min-width:0;padding:18px;border:1px solid var(--border);border-radius:10px;background:var(--bg2);box-shadow:0 3px 12px rgba(0,0,0,.12)}
.customer360-panel h2{margin:0;font-size:15px;font-weight:650;color:var(--text)}
.customer360-panel-head p{margin:4px 0 0;font-size:11px;color:var(--text-muted)}
.customer360-section-state{font-size:11px;color:var(--text-muted)}
.customer360-facts{display:grid;grid-template-columns:minmax(100px,.7fr) minmax(0,1.3fr);gap:8px 16px;margin:16px 0 0;font-size:12px}
.customer360-facts dt{color:var(--text-muted)}.customer360-facts dd{min-width:0;margin:0;overflow-wrap:anywhere;color:var(--text);font-weight:550}
.customer360-pending{margin-top:16px;padding:12px;border-left:3px solid var(--gold);background:var(--bg3);color:var(--text)}
.customer360-pending>strong{font-size:11px}.customer360-pending .customer360-facts{margin-top:9px}
.customer360-section-message{margin-top:16px;font-size:12px;line-height:1.55;color:var(--text-muted)}
.customer360-panel-action{margin-top:14px}.customer360-products{padding:0;overflow:hidden}
.customer360-products-head{padding:16px 18px;border-bottom:1px solid var(--border)}
.customer360-add-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.customer360-connection-group+.customer360-connection-group{border-top:1px solid var(--border)}
.customer360-group-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 18px;background:var(--bg3)}
.customer360-group-head h3{margin:0;font-size:12px;font-weight:650}.customer360-group-head span{font-size:11px;color:var(--text-muted)}
.customer360-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.customer360-table th,.customer360-table td{padding:11px 18px;border-top:1px solid var(--border);text-align:left;vertical-align:middle;overflow-wrap:anywhere}
.customer360-table th{font-size:10px;letter-spacing:.03em;text-transform:uppercase;color:var(--text-muted);background:var(--bg2)}
.customer360-table td:first-child{font-weight:650;color:var(--text)}.customer360-table td:last-child{text-align:right}
.customer360-row-action{white-space:normal}.customer360-group-message{margin:0;padding:15px 18px;font-size:12px;color:var(--text-muted)}
.customer360-history-toggle{margin:8px 18px 14px}
.customer360-unavailable-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}
.customer360-unavailable-grid>div{display:flex;flex-direction:column;gap:4px;padding:12px;background:var(--bg);border-radius:7px}
.customer360-unavailable-grid strong{font-size:12px}.customer360-unavailable-grid span{font-size:11px;color:var(--text-muted)}
@media(max-width:980px){.customer360-products-head{align-items:flex-start;flex-direction:column}.customer360-add-actions{justify-content:flex-start}}
@media(max-width:680px){.customer360-dashboard-head{align-items:flex-start;flex-direction:column}.customer360-dashboard-head .primary-btn{width:100%}.customer360-panel{padding:14px}.customer360-products{padding:0}.customer360-add-actions{display:grid;grid-template-columns:1fr;width:100%}.customer360-add-actions button{width:100%;white-space:normal}.customer360-table,.customer360-table tbody,.customer360-table tr,.customer360-table td{display:block}.customer360-table thead{display:none}.customer360-table tr{padding:10px 14px;border-top:1px solid var(--border)}.customer360-table td{display:grid;grid-template-columns:110px minmax(0,1fr);gap:8px;padding:4px 0;border:0;text-align:left}.customer360-table td::before{content:attr(data-label);font-size:10px;text-transform:uppercase;color:var(--text-muted)}.customer360-table td:last-child{text-align:left}.customer360-unavailable-grid{grid-template-columns:1fr}.customer360-facts{grid-template-columns:1fr;gap:3px}.customer360-facts dd+dt{margin-top:7px}}
.mobile-nav-toggle,.mobile-nav-overlay{display:none}
@media(max-width:620px){body{display:block;min-width:0;overflow:hidden}#sidebar{display:flex;position:fixed;inset:0 auto 0 0;z-index:10002;width:min(286px,calc(100vw - 40px));max-width:none;transform:translateX(-102%);transition:transform .2s ease;box-shadow:16px 0 40px rgba(3,6,13,.3)}#sidebar.mobile-nav-open{transform:translateX(0)}.mobile-nav-toggle{display:inline-flex}.mobile-nav-overlay{display:block;position:fixed;inset:0;z-index:10001;width:100%;height:100%;padding:0;border:0;background:rgba(3,6,13,.55)}.mobile-nav-overlay[hidden]{display:none}body.mobile-nav-active{overflow:hidden}#main{width:100%;height:100vh;min-width:0}header{height:auto;min-height:96px;display:grid;grid-template-columns:minmax(0,1fr) auto;padding:8px 10px}.header-center{display:flex;grid-column:1/-1;grid-row:2;width:100%}.global-search,.global-search:focus-within{width:100%;max-width:none}.global-search .shortcut{display:none}.global-search-categories{flex:0 0 100%;flex-wrap:wrap;border-left:0;border-top:1px solid var(--border)}.global-search-categories label{flex:1 1 calc(50% - 4px)}.header-right{grid-column:2;grid-row:1}.header-op-refresh{display:none}#content{width:100%;min-width:0;padding:10px;overflow-x:hidden}.customer360-context{margin-bottom:10px}.customer360-dashboard{width:100%;min-width:0}.customer360-group-head{padding:10px 14px}}
@media(max-width:620px){.customer-search-result{grid-template-columns:52px minmax(0,1fr);gap:8px;align-items:start}.customer-search-result .global-search-result-title,.customer-search-result .global-search-result-sub,.customer-search-result .global-search-result-birthdate{display:block;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}.customer-search-result .global-search-result-birthdate{margin-top:2px}.customer-search-result .global-search-result-birthdate::before{content:''}}
@media(max-width:420px){.global-search-categories label{flex:1 1 calc(50% - 4px)}.global-search-results{left:0;transform:none;width:100%;max-height:calc(100vh - 220px)}.global-search-result{grid-template-columns:72px minmax(0,1fr)}.global-search-result-title,.global-search-result-sub{overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere}}
@media(prefers-reduced-motion:reduce){#sidebar{transition:none}}

/* BIQ-142: gemeinsamer zweizeiliger Header; Kurs/Risiko nur in der Orderansicht. */
#app-header{height:auto;min-height:64px;padding:0;display:block}
.app-header-row{min-height:64px;padding:0 26px;display:flex;align-items:center;justify-content:space-between;gap:16px}
#app-header>#oe-krl{display:none;width:100%;padding:10px 26px;border-bottom:1px solid var(--border);background:var(--bg2)}
#app-header.order-view-active>#oe-krl{display:grid}

/* BIQ-142: additive progressive Komposition aus den kanonischen Fachhosts. */
#oe-cockpit{--oe-active-top-offset:12px}
/* BD-3-P2 (progressive-only): der Darstellungs-Umschalter (.oe-view-switch) ist entfernt; der Fokusring
   bleibt an den progressiven Kontrollen (Reopen/Edit, Dialog-Buttons). */
.oe-progress-edit:focus-visible,.oe-progress-dialog button:focus-visible{outline:2px solid var(--gold-light);outline-offset:2px}
.oe-progress-root{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:18px;align-items:start}
.oe-progress-root[hidden]{display:none}
.oe-progress-flow{display:grid;gap:10px;list-style:none;min-width:0}
.oe-progress-step{border:1px solid var(--border);border-left:4px solid var(--oe-accent,var(--border));border-radius:12px;padding:13px 15px;background:var(--bg2);min-width:0;scroll-margin-top:var(--oe-active-top-offset)}
.oe-progress-step[aria-current="step"]{border-color:var(--oe-accent,var(--gold));box-shadow:0 0 0 1px var(--oe-accent,var(--gold))}
.oe-progress-step[aria-current="step"]>.oe-progress-step-head{position:sticky;top:var(--oe-active-top-offset);z-index:3;margin:-13px -15px 0;padding:13px 15px 10px;border-radius:12px 12px 10px 10px;background:linear-gradient(to right,color-mix(in srgb,var(--oe-accent,transparent) 13%,var(--bg2)),var(--bg2) 55%);box-shadow:0 8px 18px rgba(15,17,23,.22)}
.oe-progress-step[aria-disabled="true"]{opacity:.65}.oe-progress-step-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:-13px -15px 10px;padding:11px 15px;background:linear-gradient(to right,color-mix(in srgb,var(--oe-accent,transparent) 11%,transparent),transparent 55%);border-radius:8px 8px 0 0}
.oe-progress-step-head h2{font-size:14px;color:var(--text)}.oe-progress-step-head span{color:var(--text-muted);font-size:11px}
.oe-progress-active{margin-top:12px}.oe-progress-summary{margin-top:7px;color:var(--text-muted);font-size:12.5px;line-height:1.45}
.oe-progress-edit{border:0;background:transparent;color:var(--gold-light);font:inherit;font-size:11px;font-weight:600;cursor:pointer;padding:2px 8px;white-space:nowrap}
.oe-progress-reopen{display:inline-flex;align-items:center;justify-content:center;min-height:0;padding:2px 8px;border:1px solid var(--gold);border-radius:7px;background:transparent;color:var(--gold-light);font-size:11px}
.oe-progress-reopen:hover{background:rgba(212,175,55,.16);color:var(--text)}
.oe-progress-aside{position:sticky;top:12px;border:1px solid var(--border);border-radius:12px;padding:14px;background:var(--bg2)}
.oe-progress-aside h2{font-size:14px;margin-bottom:10px}.oe-progress-aside section{padding:9px 0;border-top:1px solid var(--border);color:var(--text-muted);font-size:12px;overflow-wrap:anywhere}
.oe-progress-aside h3{color:var(--text);font-size:12px;margin-bottom:4px}
.oe-progress-dialog{max-width:min(520px,calc(100vw - 32px));border:1px solid var(--border);border-radius:12px;padding:20px;color:var(--text);background:var(--bg2)}
.oe-progress-dialog::backdrop{background:rgba(0,0,0,.62)}.oe-progress-dialog h2{font-size:18px;margin-bottom:10px}.oe-progress-dialog p{color:var(--text-muted);line-height:1.5}
.oe-progress-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:18px;flex-wrap:wrap}
@media (min-width:1180px){.oe-progress-root{grid-template-columns:minmax(0,1fr) 280px}}
@media (max-width:1179px){.oe-progress-root{grid-template-columns:1fr}.oe-progress-aside{position:static}}
@media (max-width:760px){#oe-cockpit{--oe-active-top-offset:8px}.app-header-row{padding:0 16px;flex-wrap:wrap}#app-header>#oe-krl{padding:8px 16px}.oe-progress-root{display:block}.oe-progress-root[hidden]{display:none}.oe-progress-aside{margin-top:12px}}
@media (max-width:620px){#app-header{min-height:96px}.app-header-row{min-height:96px;display:grid;grid-template-columns:minmax(0,1fr) auto;padding:8px 10px}}
@media (max-width:320px){.app-header-row,#app-header>#oe-krl{padding-left:8px;padding-right:8px}.oe-progress-step{padding:10px}.oe-progress-dialog-actions>*{width:100%}}
@media (prefers-reduced-motion:reduce){#oe-cockpit *,#oe-cockpit *::before,#oe-cockpit *::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
