/* B2B Fullscale prototype styles — dense admin / internal portal */

html, body { background: var(--bg); }
[data-style="confident"] html, [data-style="confident"] body { background: #fafaf8; }

/* ============ SHELL ============ */
.b2b {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.b2b__rail {
  background: var(--ink-900);
  color: var(--ink-200);
  padding: 16px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.b2b__brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}
.b2b__brand .ks-logo { color: white; }
.b2b__brand .ks-logo__type span:first-child { color: white; }

.b2b__perspective {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
  position: relative;
  margin-bottom: 12px;
}
.b2b__perspective:hover { background: rgba(255,255,255,0.08); }
.b2b__perspective .role {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
}
.b2b__perspective .name { font-weight: 500; font-size: 14px; margin-top: 2px; color: white; }
.b2b__perspective .caret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }

.b2b__perspective-pop {
  position: absolute; left: 14px; right: 14px; top: 76px;
  background: var(--ink-900);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  padding: 4px;
  z-index: 30;
  max-height: 70vh;
  overflow-y: auto;
}
.b2b__pers-note {
  padding: 10px 12px 14px;
  margin: 0 4px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  line-height: 1.4;
}
.b2b__pers-note b { color: white; }
.b2b__pers-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink-200);
}
.b2b__pers-opt:hover { background: rgba(255,255,255,0.08); color: white; }
.b2b__pers-opt.is-active { background: var(--ks-red); color: white; }
.b2b__pers-opt .role-tag { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; opacity: 0.7; margin-left: auto; }

.b2b__rail-section {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-400);
  padding: 14px 10px 6px;
}

.b2b__navitem {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink-200);
  cursor: pointer;
  text-decoration: none;
}
.b2b__navitem:hover { background: rgba(255,255,255,0.06); color: white; }
.b2b__navitem.is-active { background: rgba(255,255,255,0.1); color: white; }
.b2b__navitem .badge {
  margin-left: auto;
  background: var(--ks-red);
  color: white;
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.b2b__navitem svg { flex-shrink: 0; opacity: 0.85; }

.b2b__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}

/* ============ TOPBAR ============ */
.b2b__top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky; top: 0; z-index: 20;
  height: 60px;
}
.b2b__crumb { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); }
.b2b__crumb b { color: var(--text); }
.b2b__top-spacer { flex: 1; }
.b2b__top-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2);
  border-radius: 8px;
  padding: 0 12px;
  height: 36px;
  width: 320px;
  font-size: 13px;
  color: var(--text-muted);
}
.b2b__top-search input { flex: 1; border: 0; background: transparent; outline: 0; font-size: 13px; }
.b2b__top-search kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 4px; border: 1px solid var(--border); border-radius: 3px; color: var(--text-faint); background: white; }

.b2b__top-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: transparent;
  border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer; position: relative;
}
.b2b__top-icon:hover { background: var(--surface-2); color: var(--text); }
.b2b__top-icon .dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: var(--ks-red); border-radius: 50%; }

.b2b__top-user {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  cursor: pointer;
}
.b2b__top-user:hover { background: var(--surface-2); }
.b2b__top-user .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ks-red); color: white; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }

/* === TOPBAR DROPDOWNS === */
.topbar-dd {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 360px;
  background: var(--surface-elev);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  overflow: hidden;
  animation: topbarDdIn .18s ease both;
}
@keyframes topbarDdIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.topbar-dd__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.topbar-dd__body { max-height: 380px; overflow-y: auto; padding: 6px; }
.topbar-dd__item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
}
.topbar-dd__item:hover { background: var(--surface-2); }
.topbar-dd__item.is-unread { background: rgba(219,0,0,0.04); }
.topbar-dd__icon {
  width: 32px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.topbar-dd__foot {
  display: block; padding: 12px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}
.topbar-dd__foot:hover { background: var(--surface-2); color: var(--ks-red); }

/* ============ CONTENT ============ */
.b2b__content { padding: 24px 28px 60px; max-width: 1640px; width: 100%; }

.b2b__pagehead { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 24px; flex-wrap: wrap; }
.b2b__pagehead h1 { font-size: 30px; letter-spacing: -0.02em; font-weight: 500; margin: 0; }
.b2b__pagehead .meta { color: var(--text-muted); font-size: 13px; font-family: var(--font-mono); margin-top: 4px; }
.b2b__pagehead-actions { display: flex; gap: 8px; }

/* KPI tiles */
.kpi-row { display: grid; gap: 12px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
}
.kpi__k {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.kpi__v {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi__delta {
  font-family: var(--font-mono);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.kpi__delta.up   { color: var(--ok); }
.kpi__delta.down { color: var(--ks-red); }
.kpi__delta.flat { color: var(--text-muted); }
.kpi__ctx { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 4px; }
.kpi__spark { position: absolute; right: 12px; top: 12px; bottom: 12px; width: 80px; opacity: 0.4; }

/* Tables — dense, internal */
.tbl {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  background: var(--bg);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tbl tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: var(--bg); }
.tbl tbody tr.is-active { background: var(--ks-red-50); }
.tbl .num, .tbl td.num, .tbl th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tbl .mono { font-family: var(--font-mono); }
.tbl tbody td.actions { width: 1px; white-space: nowrap; }

.status {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--surface-2);
  color: var(--text);
}
.status.ok      { background: #e6f5ee; color: var(--ok); }
.status.warn    { background: #faf0d6; color: var(--warn); }
.status.bad     { background: var(--ks-red-50); color: var(--ks-red-600); }
.status.info    { background: #e3edfa; color: var(--info); }
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Action button compact */
.btn-link { background: transparent; border: none; color: var(--ks-red); cursor: pointer; font: inherit; font-weight: 500; padding: 0; }
.btn-link:hover { text-decoration: underline; }

/* ============ Approval cards ============ */
.appr-list { display: flex; flex-direction: column; gap: 8px; }
.appr {
  display: grid;
  grid-template-columns: 4px 1fr auto;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  align-items: stretch;
}
.appr__strip { background: var(--ink-400); }
.appr.urgent .appr__strip { background: var(--ks-red); }
.appr__body { padding: 14px 0 14px 4px; min-width: 0; }
.appr__head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.appr__nr { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.appr__user { font-weight: 500; font-size: 14px; }
.appr__user-role { color: var(--text-muted); font-size: 12px; }
.appr__time { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; margin-left: auto; }
.appr__reason { font-size: 13px; color: var(--text); margin-top: 4px; }
.appr__site { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.appr__total {
  padding: 14px 20px;
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  background: var(--bg);
  gap: 8px;
  min-width: 220px;
}
.appr__total .v { font-size: 22px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.appr__total .l { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; }
.appr__actions { display: flex; gap: 6px; }

/* ============ Pricing breakdown ============ */
.pb {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.pb__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.pb__row:last-child { border-bottom: none; }
.pb__row.is-stage {
  background: linear-gradient(to right, transparent, var(--ink-50));
}
.pb__row.is-total { background: var(--ink-900); color: white; padding: 18px 20px; }
.pb__label { font-weight: 500; }
.pb__label .pb__sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pb__row.is-total .pb__label .pb__sub { color: var(--ink-300); }
.pb__delta { font-family: var(--font-mono); color: var(--ok); font-size: 13px; }
.pb__row.is-total .pb__delta { color: white; }
.pb__val { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 16px; font-weight: 500; text-align: right; }
.pb__row.is-total .pb__val { font-size: 22px; }

/* Stages strip */
.stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.stages .stage {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px;
}
.stages .stage .h { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stages .stage .v { font-family: var(--font-mono); font-size: 20px; font-weight: 600; margin-top: 2px; letter-spacing: -0.02em; }
.stages .stage .ctx { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.stages .stage.is-active { background: var(--ks-red); color: white; border-color: var(--ks-red); }
.stages .stage.is-active .h, .stages .stage.is-active .ctx { color: rgba(255,255,255,0.7); }

/* ============ CRM 360 split layout ============ */
.crm-split { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: flex-start; }
.crm-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; max-height: 80vh; overflow-y: auto; }
.crm-list__head { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.crm-list__head input { flex: 1; border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; font-size: 13px; }
.crm-row {
  display: grid; grid-template-columns: 1fr auto; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.crm-row:hover { background: var(--bg); }
.crm-row.is-active { background: var(--ks-red-50); border-left: 3px solid var(--ks-red); padding-left: 11px; }
.crm-row .name { font-weight: 500; font-size: 13px; }
.crm-row .meta { color: var(--text-muted); font-size: 11px; font-family: var(--font-mono); }
.crm-row .class-tag { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; border-radius: 3px; background: var(--surface-2); color: var(--text); align-self: flex-start; }
.crm-row .class-tag.A { background: var(--ks-red); color: white; }
.crm-row .class-tag.B { background: var(--ink-900); color: white; }
.crm-row .rev { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); align-self: flex-end; }

.crm-detail { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; }
.crm-detail__head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.crm-detail__name { font-size: 28px; letter-spacing: -0.02em; font-weight: 500; margin: 0; }
.crm-detail__sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.crm-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 20px 0; }
.crm-tab { padding: 10px 16px; border-bottom: 2px solid transparent; cursor: pointer; font-size: 13px; color: var(--text-muted); }
.crm-tab.is-active { border-bottom-color: var(--ks-red); color: var(--ks-red); font-weight: 500; }

/* Timeline */
.tl { display: flex; flex-direction: column; gap: 0; position: relative; padding-left: 20px; }
.tl::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.tl__item { padding: 10px 0; position: relative; }
.tl__item::before {
  content: ""; position: absolute; left: -20px; top: 14px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--text-faint);
}
.tl__item.is-mail::before  { border-color: var(--info); }
.tl__item.is-call::before  { border-color: var(--warn); }
.tl__item.is-order::before { border-color: var(--ks-red); }
.tl__item.is-doc::before   { border-color: var(--ok); }
.tl__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.tl__t { font-weight: 500; font-size: 13px; margin-top: 2px; }
.tl__b { font-size: 13px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

/* ============ Auftragsbearbeitung — quote→AB→Rechnung ============ */
.workflow-stages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.wf-stage {
  padding: 16px 20px;
  border-right: 1px solid var(--border);
  position: relative;
}
.wf-stage:last-child { border-right: none; }
.wf-stage.is-done .stage-icon { background: var(--ok); color: white; }
.wf-stage.is-current .stage-icon { background: var(--ks-red); color: white; }
.wf-stage.is-future .stage-icon { background: var(--surface-2); color: var(--text-faint); }
.wf-stage::after {
  content: ""; position: absolute; right: -1px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transform: translateY(-50%) rotate(45deg);
  z-index: 2;
}
.wf-stage:last-child::after { display: none; }
.stage-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 13px;
  margin-bottom: 6px;
}
.wf-stage .t { font-weight: 500; font-size: 14px; }
.wf-stage .d { color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; margin-top: 2px; }

/* ============ Einkauf forecast ============ */
.forecast-cell { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.forecast-bar { width: 80px; height: 6px; background: var(--surface-2); border-radius: 3px; position: relative; }
.forecast-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ok); border-radius: 3px; }
.forecast-bar .fill.warn { background: var(--warn); }
.forecast-bar .fill.bad  { background: var(--ks-red); }
.forecast-bar .marker { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink-900); }

/* ============ Pipeline kanban ============ */
.pipe { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pipe__col { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.pipe__col-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.pipe__col-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.pipe__col-val { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-bottom: 8px; }
.pipe__card { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 6px; font-size: 12px; cursor: grab; }
.pipe__card:hover { border-color: var(--text); }
.pipe__card .pc-name { font-weight: 500; font-size: 13px; }
.pipe__card .pc-meta { font-family: var(--font-mono); color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.pipe__card .pc-amount { font-family: var(--font-mono); font-weight: 600; font-size: 13px; margin-top: 4px; }

/* ============ Lexikon CMS ============ */
.lex-cms { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: flex-start; }
.lex-cms__editor { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0; overflow: hidden; }
.lex-cms__editor-head { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.lex-cms__editor-tabs { display: flex; gap: 4px; padding: 8px 18px 0; border-bottom: 1px solid var(--border); }
.lex-cms__tab { padding: 6px 12px; font-size: 12px; border-radius: 4px 4px 0 0; cursor: pointer; color: var(--text-muted); }
.lex-cms__tab.is-active { background: var(--surface); border: 1px solid var(--border); border-bottom-color: var(--surface); color: var(--text); font-weight: 500; }
.lex-cms__editor-body { padding: 20px 24px; }
.lex-cms__editor-body h1 { font-size: 30px; letter-spacing: -0.025em; margin: 0 0 8px; font-weight: 500; }
.lex-cms__editor-body input.title { font-size: 30px; letter-spacing: -0.025em; font-weight: 500; border: none; width: 100%; padding: 0; background: transparent; }
.lex-cms__editor-body input.title:focus { outline: none; }
.lex-cms__field { margin-bottom: 16px; }
.lex-cms__field .label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.lex-cms__field textarea {
  width: 100%; min-height: 120px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; resize: vertical;
}

.lex-cms__side {
  display: flex; flex-direction: column; gap: 12px;
}
.lex-cms__side .card { padding: 16px; }
.lex-cms__side .card h4 { font-size: 13px; font-weight: 500; margin: 0 0 10px; }
.lex-cms__linked { display: flex; flex-wrap: wrap; gap: 4px; }
.lex-cms__linked .chip { cursor: pointer; }

/* ============ Forecast / charts ============ */
.chart {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.chart__title { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.chart__svg { width: 100%; height: 240px; display: block; }

/* ============ ORDER DETAIL MODAL ============ */
.odm {
  position: fixed; inset: 0; z-index: 100;
  display: flex; justify-content: flex-end;
  animation: odmFade .2s ease both;
}
@keyframes odmFade { from { opacity: 0; } to { opacity: 1; } }
.odm__bg {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
.odm__panel {
  position: relative;
  width: min(920px, 96vw);
  height: 100dvh;
  background: var(--surface-elev);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 60px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  animation: odmSlide .35s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes odmSlide { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

.odm__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
}
.odm__close {
  background: transparent; border: 0; cursor: pointer;
  width: 36px; height: 36px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.odm__close:hover { background: var(--surface-2); color: var(--text); }

.odm__body { flex: 1; overflow-y: auto; padding: 24px 32px; }
.odm__section { margin-bottom: 28px; }

.odm__timeline { display: flex; flex-direction: column; padding-left: 16px; position: relative; margin-top: 8px; }
.odm__timeline::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: 12px; width: 1px; background: var(--border); }
.odm__tl-step { display: flex; gap: 14px; padding: 8px 0; position: relative; align-items: flex-start; }
.odm__tl-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface-elev);
  border: 2px solid var(--border-strong);
  margin-left: -16px; margin-top: 3px;
  flex-shrink: 0;
  z-index: 1;
}
.odm__tl-step.is-done .odm__tl-dot { background: var(--ok); border-color: var(--ok); }
.odm__tl-step.is-current .odm__tl-dot { background: var(--ks-red); border-color: var(--ks-red); box-shadow: 0 0 0 4px var(--ks-red-50); }

.odm__meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
  margin-bottom: 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.odm__totals {
  background: var(--surface-2);
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
  max-width: 320px;
  margin-left: auto;
}
.odm__totals-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.odm__totals-row.is-total { padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--border); font-size: 16px; font-weight: 600; }

.odm__foot {
  display: flex; gap: 8px; align-items: center;
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.b2b-login {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-900);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.b2b-login__card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative; z-index: 2;
}
.b2b-login__bg { position: absolute; inset: 0; opacity: 0.06; }
