/* B1 "Ledger Classic" components — ported 1:1 from the frozen mockup v3.4 (assets/app.css),
   without the dev-only parts (devbar, feedback overlay). Tokens live in tokens.css.
   Section "app components" at the end: shell parts that were page-local <style> blocks in the
   mockup, plus accessibility helpers. Contract: contracts/ui-components.md. */
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01", "ss03";
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.icon { width: 16px; height: 16px; flex: none; stroke-width: 1.75; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 18px; height: 18px; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
body:has(.app) {
  background: linear-gradient(to right, var(--surface) calc(var(--sidebar) - 1px), var(--border) calc(var(--sidebar) - 1px), var(--border) var(--sidebar), var(--bg) var(--sidebar)); }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 14px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: #0e1525; color: var(--accent-bright); font-weight: 800; font-size: 15px; letter-spacing: -.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
[data-theme="dark"] .brand-mark { background: var(--accent-bright); color: #0b0e13; }
.brand-name { font-weight: 650; font-size: 14px; letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--text-3); }
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3); cursor: pointer;
}
.search-btn kbd { margin-left: auto; }
kbd {
  font-family: var(--font); font-size: 11px; color: var(--text-3); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface);
}
.nav-group { margin-bottom: 18px; }
.nav-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 0 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--text-2); font-weight: 500; position: relative;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-strong); }
.nav-item.active .icon { color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav-item .count.alert { color: var(--red); background: var(--red-soft); padding: 0 6px; border-radius: 99px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.nav-sub { padding-left: 36px; display: grid; gap: 1px; margin: 2px 0 4px; }
.nav-sub a { padding: 5px 10px; border-radius: 6px; color: var(--text-2); font-size: 13px; }
.nav-sub a:hover { background: var(--surface-3); }
.nav-sub a.active { color: var(--text); font-weight: 550; background: var(--surface-3); }
.sidebar-foot { margin-top: auto; display: grid; gap: 10px; }
.period-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; background: var(--surface-2);
}
.period-card .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }
.period-card .val { font-weight: 600; color: var(--text); font-size: 13px; }
.progress { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; display: flex; }
.progress > span { display: block; height: 100%; }
.user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); }
.avatar {
  width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 650;
  background: linear-gradient(135deg, #d9f2bd, #9fd86a); color: #234d00; flex: none;
}
.avatar.b { background: linear-gradient(135deg, #dbe6ff, #a9c1ff); color: #1d3a8a; }
.avatar.c { background: linear-gradient(135deg, #ffe7c7, #ffc37a); color: #7a4300; }
.avatar.d { background: linear-gradient(135deg, #f1e3ff, #cfa8ff); color: #4b1f8a; }
.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--border); }
.crumbs { white-space: nowrap; display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; }
.crumbs b { color: var(--text); font-weight: 550; }
.topbar .spacer { flex: 1; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; position: relative;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 99px; background: var(--red); border: 2px solid var(--bg); }

.content { padding: 8px 32px 48px; max-width: 1360px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin: 10px 0 24px; }
.page-head h1 { font-size: 24px; line-height: 1.2; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- primitives ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 550; font-size: 13px;
  cursor: pointer; box-shadow: var(--shadow-sm); white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(47,105,0,.3), inset 0 1px 0 rgba(255,255,255,.15); }
.btn-primary:hover { background: var(--accent-strong); }
[data-theme="dark"] .btn-primary { color: #0b0e13; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: var(--surface); }
.btn-blue:hover { background: color-mix(in srgb, var(--blue) 85%, var(--text)); }
/* still to do (not "done" green): "Review cases" on Meine Meldung */
.btn-orange { background: var(--amber-dot); border-color: var(--amber-dot); color: #2b1800; box-shadow: 0 1px 2px rgba(184,110,0,.3), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-orange:hover { background: color-mix(in srgb, var(--amber-dot) 88%, #000); }
/* "New case" on the entity tiles: plum → pink gradient label; now and then a light runs
   through the letters only (background clipped to the text) */
.btn-spot { --spot-a: #5b1a8f; --spot-b: #b0279a; --spot-c: #ff3d9a; --spot-glow: rgba(255, 255, 255, .9); color: var(--spot-a); }
[data-theme="dark"] .btn-spot { --spot-a: #b98cff; --spot-b: #e05fd0; --spot-c: #ff7ab8; --spot-glow: rgba(255, 255, 255, .95); }
.btn-spot .spot-t { background-image: linear-gradient(100deg, transparent 40%, var(--spot-glow) 50%, transparent 60%), linear-gradient(90deg, var(--spot-a), var(--spot-b) 55%, var(--spot-c)); background-size: 300% 100%, 100% 100%; background-repeat: no-repeat; background-position: 100% 0, 0 0; -webkit-background-clip: text; background-clip: text; color: transparent; animation: spot-t 7s ease-in-out infinite; }
.btn-spot:hover { border-color: color-mix(in srgb, var(--spot-b) 45%, var(--border-strong)); }
@keyframes spot-t { 0%, 70% { background-position: 100% 0, 0 0; } 100% { background-position: 0 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .btn-spot .spot-t { animation: none; } }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border-radius: 8px; border: 1px solid var(--border); }
.seg button { white-space: nowrap; border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--border); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.card-h h2, .card-h h3 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: -.005em; }
.card-h .sub { font-size: 12.5px; color: var(--text-3); }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 20px 20px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 12px; font-weight: 550; white-space: nowrap; background: var(--gray-soft); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.blue { background: var(--blue-soft); color: var(--blue); }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-2); }
.badge.sq { border-radius: 6px; }

.delta { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--accent); background: var(--accent-soft); }
.delta.down { color: var(--red); background: var(--red-soft); }
.delta.neutral { color: var(--text-2); background: var(--gray-soft); }

/* likelihood meter: 5 ticks */
.lik { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lik .ticks { display: inline-flex; gap: 2px; }
.lik .ticks i { width: 5px; height: 12px; border-radius: 2px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); }
.lik .ticks i.on { box-shadow: none; }
.lik[data-r="0"] i.on, .lik[data-r="1"] i.on { background: #9aa3b2; }
.lik[data-r="2"] i.on { background: var(--amber-dot); }
.lik[data-r="3"] i.on, .lik[data-r="4"] i.on { background: var(--red); }
.lik span { font-size: 13px; color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 99px;
  border: 1px dashed var(--border-strong); color: var(--text-2); font-size: 12.5px; font-weight: 550; background: var(--surface); cursor: pointer;
}
.chip.set { border-style: solid; border-color: var(--border-strong); color: var(--text); background: var(--surface); }
.chip.set b { color: var(--accent); font-weight: 600; }
.chip .x { color: var(--text-3); }

.input, .select, textarea.input {
  height: 36px; width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 11px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; box-shadow: var(--shadow-sm); outline: none;
}
textarea.input { height: auto; padding: 9px 11px; resize: vertical; min-height: 84px; line-height: 1.5; }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a93a5' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 32px; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--border-strong); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 550; }
.input-group .input { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; text-align: right; font-variant-numeric: tabular-nums; }
.field { display: grid; gap: 6px; align-content: start; }
.field label, .lbl { font-size: 13px; font-weight: 550; color: var(--text); display: flex; align-items: center; gap: 6px; }
.field .help { font-size: 12.5px; color: var(--text-3); }
.req { color: var(--red); }

/* glossary term tooltip */
.term { border-bottom: 1px dotted var(--text-3); cursor: help; position: relative; }
.tip {
  position: absolute; z-index: 80; width: 320px; padding: 14px 16px; border-radius: 12px; background: #0e1525; color: #e8ebf1;
  box-shadow: var(--shadow-lg); font-size: 13px; line-height: 1.5; pointer-events: auto; text-align: left; font-weight: 400;
  text-transform: none; letter-spacing: 0; white-space: normal;
}
[data-theme="dark"] .tip { background: #232a36; box-shadow: var(--shadow-lg), 0 0 0 1px #2e3643; }
.tip h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 650; color: #fff; }
.tip .en { display: block; color: #8a93a5; font-weight: 500; font-size: 12px; margin-top: 1px; }
.tip p { margin: 0; color: #c5cbd6; }
.tip .chg { margin-top: 8px; padding: 7px 9px; border-radius: 7px; background: rgba(115,215,0,.12); color: #b9ef7a; font-size: 12px; }
.tip a { display: inline-flex; gap: 4px; align-items: center; margin-top: 10px; color: #9be14a; font-weight: 600; font-size: 12.5px; }
.tip.up::after { top: auto; bottom: -6px; }
.tip::after { content: ""; position: absolute; top: -6px; left: 22px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.t th {
  position: sticky; top: 0; z-index: 2; background: var(--surface-2); text-align: left; font-weight: 550; font-size: 12px;
  color: var(--text-2); padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tbody tr.sel td { background: var(--accent-soft); }
table.t tfoot td {
  position: sticky; bottom: 0; background: var(--surface); font-weight: 650; border-top: 1px solid var(--border-strong);
  border-bottom: 0; padding: 12px 12px; box-shadow: 0 -6px 12px -10px rgba(16,24,40,.18);
}
.cell-main { font-weight: 550; color: var(--text); }
.cell-sub { font-size: 12.5px; color: var(--text-3); margin-top: 1px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; letter-spacing: -.01em; }
.flag {
  display: inline-grid; place-items: center; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 4px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .03em; background: var(--surface-3); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border);
}

/* ---------- dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 18px 20px 14px; position: relative; overflow: hidden; }
.kpi .label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.kpi .value { font-size: 30px; font-weight: 650; letter-spacing: -.03em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .value small { font-size: 15px; font-weight: 550; color: var(--text-2); letter-spacing: -.01em; margin-left: 4px; }
.kpi .foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.kpi .spark { position: absolute; right: 14px; top: 16px; width: 96px; height: 36px; }
.grid-2 { display: grid; grid-template-columns: 1.65fr 1fr; gap: 16px; margin-bottom: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.chart { width: 100%; height: 280px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 20px; border-top: 1px solid var(--border); }
.attn li:first-child { border-top: 0; }
.attn .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.attn .ico.red { background: var(--red-soft); color: var(--red); }
.attn .ico.amber { background: var(--amber-soft); color: var(--amber); }
.attn .ico.violet { background: var(--violet-soft); color: var(--violet); }
.attn .ico.blue { background: var(--blue-soft); color: var(--blue); }
.attn .t1 { font-weight: 550; }
.attn .t2 { font-size: 12.5px; color: var(--text-3); }
.attn .go { margin-left: auto; align-self: center; color: var(--text-3); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; font-size: 13px; }
.bar-row .track { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-row .track span { display: block; height: 100%; border-radius: 99px; background: var(--text); opacity: .85; }
.bar-row:first-child .track span { background: var(--accent); opacity: 1; }

/* ---------- map ---------- */
.map svg { width: 100%; height: auto; display: block; }
.map path { fill: var(--map-empty); stroke: var(--surface); stroke-width: .4; transition: opacity .15s; }
.map path.st-delivered { fill: var(--accent-bright); }
.map path.st-nochange { fill: #8fb3ff; }
.map path.st-open { fill: var(--amber-dot); }
.map path.st-overdue { fill: var(--red); }
[data-theme="dark"] .map path.st-nochange { fill: #4d74c9; }
.map path.lvl-1 { fill: color-mix(in srgb, var(--accent-bright) 30%, var(--map-empty)); }
.map path.lvl-2 { fill: color-mix(in srgb, var(--accent-bright) 55%, var(--map-empty)); }
.map path.lvl-3 { fill: color-mix(in srgb, var(--accent) 80%, var(--map-empty)); }
.map path.lvl-4 { fill: var(--accent-strong); }
.map path[class]:hover { opacity: .8; cursor: pointer; }
.map path.hl { stroke: var(--text); stroke-width: 1.2; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(14, 21, 37, .16); z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 8px; right: 8px; bottom: 8px; width: 620px; z-index: 60; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); display: flex; flex-direction: column;
  transform: translateX(calc(100% + 16px)); transition: transform .28s cubic-bezier(.2,.8,.2,1);
}
.drawer.on { transform: none; }
.drawer-h { padding: 18px 22px 0; }
.drawer-b { overflow: auto; padding: 0 22px 24px; flex: 1; }
.drawer-f { padding: 12px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border); margin: 16px -22px 0; padding: 0 22px; }
.tabs a { padding: 10px 0; font-size: 13px; font-weight: 550; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 18px; }
.stat-row > div { padding: 12px 14px; border-left: 1px solid var(--border); }
.stat-row > div:first-child { border-left: 0; }
.stat-row .k { font-size: 12px; color: var(--text-3); }
.stat-row .v { font-size: 18px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.dl { display: grid; grid-template-columns: 170px 1fr; gap: 10px 16px; font-size: 13.5px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; }
.section-t { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 24px 0 12px; }
.explain { border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); padding: 12px 14px; font-size: 13px; }
.explain .eq { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-variant-numeric: tabular-nums; margin-top: 6px; }
.explain .eq b { font-weight: 650; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .node { width: 21px; height: 21px; border-radius: 99px; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-3); }
.timeline .node.update { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); color: var(--accent); }
.timeline .node.created { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.timeline .when { font-size: 12.5px; color: var(--text-3); }
.timeline .when b { color: var(--text); font-weight: 600; margin-right: 6px; }
.timeline .what { margin-top: 3px; }
.timeline .chg { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 2px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }

/* ---------- misc ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.views { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.views a { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 550; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.views a .n { font-size: 12px; background: var(--surface-3); color: var(--text-2); padding: 0 6px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.views a.on { color: var(--text); border-color: var(--text); }
.views a.on .n { background: var(--text); color: var(--surface); }
.views .add { color: var(--text-3); }
.pager { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: 12.5px; color: var(--text-3); border-top: 1px solid var(--border); }
.pager .right { margin-left: auto; display: flex; gap: 6px; }
.hr { height: 1px; background: var(--border); margin: 16px 0; }
.empty-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; }
.callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; }
.callout.green { background: var(--accent-soft); color: var(--accent-strong); }
.callout.amber { background: var(--amber-soft); color: var(--amber); }
.callout.blue { background: var(--blue-soft); color: var(--blue); }
.toggle { width: 34px; height: 20px; border-radius: 99px; background: var(--border-strong); position: relative; flex: none; display: inline-block; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.toggle.on { background: var(--accent); }
.toggle.on::after { left: 16px; }
.check { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--border-strong); display: inline-grid; place-items: center; background: var(--surface); flex: none; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- handler role ---------- */
.nav-item .count.warn { color: var(--amber); background: var(--amber-soft); padding: 0 6px; border-radius: 99px; font-weight: 600; }
.nav-item .count.ok { color: var(--accent); display: inline-flex; }
.tone-t { font-weight: 600; font-size: 12px; }
.tone-t.overdue { color: var(--red); } .tone-t.soon { color: var(--amber); } .tone-t.calm { color: var(--blue); } .tone-t.done { color: var(--accent); }

/* ---------- v3: dialogs, bell, questions, history, paid amounts ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(14,21,37,.4); z-index: 90; display: none; place-items: center; }
.modal-scrim.on { display: grid; }
.modal { width: 520px; max-width: calc(100vw - 32px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal .mh { padding: 20px 22px 0; display: flex; gap: 12px; }
.modal .mh h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.modal .mh p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.modal .mb { padding: 16px 22px; display: grid; gap: 12px; }
.modal .mf { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; align-items: center; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.bell-wrap { position: relative; }
.icon-btn .cnt { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.pop { position: absolute; right: 0; top: 40px; width: 340px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 70; display: none; overflow: hidden; }
.pop.on { display: block; }
.pop-h { display: flex; justify-content: space-between; padding: 12px 14px 8px; font-weight: 600; font-size: 13px; }
.pop-i { display: flex; gap: 10px; align-items: flex-start; padding: 9px 14px; border-top: 1px solid var(--border); font-size: 13px; }
a.pop-i:hover { background: var(--surface-2); }
.pop-i .t1 { font-weight: 550; } .pop-i .t2 { font-size: 12px; color: var(--text-3); }
.pop-f { padding: 9px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }
.qthread { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.qthread > li { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; background: var(--surface); }
.qthread .qh { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.qthread .qh b { color: var(--text); font-weight: 600; }
.qthread .qt { margin-top: 6px; }
.qthread .qa { margin-top: 10px; padding: 8px 10px; border-left: 3px solid var(--accent-bright); background: var(--surface-2); border-radius: 0 7px 7px 0; display: grid; gap: 3px; }
.ask-row { display: flex; gap: 6px; flex-wrap: wrap; }
.hist-banner { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: var(--radius); margin: 4px 0 18px; background: var(--blue-soft); color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent); font-size: 13.5px; }
.hist-banner b { font-weight: 650; }
.hist-banner .btn { margin-left: auto; }
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: 38px; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); z-index: 40; padding: 4px; display: none; }
.menu.on { display: block; }
.menu a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 7px; font-size: 13px; }
.menu a:hover { background: var(--surface-3); }
.menu a.on { color: var(--accent-strong); font-weight: 600; }
.menu .mlabel { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 6px 10px 4px; }
/* two-tone bars: estimated (light) vs. paid (solid) */
.bar-row .track.two { position: relative; }
.bar-row .track.two span { position: absolute; left: 0; top: 0; }
.bar-row .track.two .est { background: color-mix(in srgb, var(--text) 22%, transparent); opacity: 1; }
.bar-row .track.two .paid { background: var(--accent); opacity: 1; }
.bar-row:first-child .track.two .est { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.paid-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.paid-chip i { width: 10px; height: 8px; border-radius: 2px; display: inline-block; }

/* ---------- v3.1: language switch, handler top nav, highlighted cards, pastel status ---------- */
.brand .brand-name { font-weight: 650; font-size: 14.5px; letter-spacing: -.01em; }
.lang { display: inline-flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--surface-3); border: 1px solid var(--border); }
.lang button { display: inline-flex; align-items: center; gap: 5px; border: 0; background: transparent; padding: 3px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 650; color: var(--text-3); cursor: pointer; }
.lang button svg { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; }
.lang button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--border); }
.lang button:not(.on) svg { opacity: .55; filter: saturate(.6); }
body.no-side .app { grid-template-columns: 1fr; }
body.no-side:has(.app) { background: var(--bg); }
body.no-side .content { margin: 0 auto; }
.topnav { background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom-color: var(--border); gap: 10px; }
.topnav .brand { padding: 0; margin-right: 14px; }
.topnav .brand-mark { width: 26px; height: 26px; font-size: 13px; border-radius: 7px; }
.tnav { display: flex; gap: 2px; }
.tnav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 550; font-size: 13.5px; white-space: nowrap; }
.tnav a:hover { background: var(--surface-3); color: var(--text); }
.tnav a.active { background: var(--accent-soft); color: var(--accent-strong); }
.tnav .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tnav .count.alert { color: var(--red); background: var(--red-soft); padding: 0 6px; border-radius: 99px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.tnav .count.warn { color: var(--amber); background: var(--amber-soft); padding: 0 6px; border-radius: 99px; font-weight: 600; }
.tnav .count.ok { color: var(--accent); display: inline-flex; }
/* cards that need attention: tinted background, accent header */
.card.hot { background: linear-gradient(180deg, color-mix(in srgb, var(--red) 9%, var(--surface)), color-mix(in srgb, var(--amber) 5%, var(--surface)) 70%); border-color: color-mix(in srgb, var(--red) 32%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--red) 10%, transparent), var(--shadow); position: relative; overflow: hidden; }
.card.hot::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--red); }
.card.hot .card-h h2 { color: var(--red); display: inline-flex; align-items: center; gap: 8px; }
.card.hot .attn li { border-top-color: color-mix(in srgb, var(--red) 14%, var(--border)); }
.card.hot .attn .ico { background: var(--surface); box-shadow: 0 0 0 1px var(--border); }
/* pastel status fills */
.map path.st-delivered { fill: var(--st-delivered); } .map path.st-nochange { fill: var(--st-nochange); }
.map path.st-open { fill: var(--st-open); } .map path.st-overdue { fill: var(--st-overdue); }
[data-theme="dark"] .map path.st-nochange { fill: var(--st-nochange); }
.st-bg-delivered { background: var(--st-delivered); color: var(--st-delivered-t); } .st-bg-nochange { background: var(--st-nochange); color: var(--st-nochange-t); }
.st-bg-open { background: var(--st-open); color: var(--st-open-t); } .st-bg-overdue { background: var(--st-overdue); color: var(--st-overdue-t); }
.crumbs a:hover { color: var(--text); }
.menu.up { top: auto; bottom: 40px; right: 0; }
.icon-btn.on { background: var(--accent-soft); color: var(--accent-strong); }
.user { gap: 10px; }
.user .user-name, .user .user-role { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* =====================================================================================
   App components (W1). Shell parts and named components that were page-local <style>
   blocks in the mockup, plus accessibility helpers. No page may add its own <style>.
   ===================================================================================== */

/* ---------- accessibility ---------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible, .tnav a:focus-visible,
.lang button:focus-visible, .seg button:focus-visible, .seg a:focus-visible, .tabs a:focus-visible,
.views a:focus-visible, .chip:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
main:focus { outline: none; }
.icon-sprite { display: none; }

/* ---------- shell: sidebar search (GET form to the case list) ---------- */
form.search-btn { cursor: text; padding: 0 10px; height: 36px; }
.search-btn kbd { flex: none; }
form.search-btn:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.search-btn input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; outline: none; height: 100%; }
.search-btn input::placeholder { color: var(--text-3); }

/* ---------- shell: user block, profile badge, gear menu (<details> works without JS) ---------- */
.sidebar-foot { grid-template-columns: minmax(0, 1fr); }
.user .user-text { min-width: 0; flex: 1; }
.user .user-role { display: flex; align-items: center; gap: 6px; }
.user .user-role .role-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.user .user-role .profile-badge { flex: none; }
.profile-badge { height: 18px; padding: 0 6px; font-size: 10.5px; letter-spacing: .04em; font-weight: 700; }
.menu-wrap > summary { list-style: none; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
details.menu-wrap[open] > .menu { display: block; }
details.menu-wrap[open] > summary.icon-btn { background: var(--surface-3); color: var(--text); }
.menu a .mi { display: inline-flex; gap: 8px; align-items: center; }
.user .menu-wrap { margin-left: auto; }

/* ---------- shell: topbar controls ---------- */
.lang { margin: 0; }
.lang button img { width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); display: block; }
.lang button:not(.on) img { opacity: .55; filter: saturate(.6); }
form.inline { display: inline-flex; margin: 0; }
.icon-btn[aria-disabled="true"] { cursor: default; }
.topbar .btn-primary .icon { color: inherit; }
.today { font-size: 12.5px; white-space: nowrap; }
.topnav .user-chip { display: inline-flex; align-items: center; gap: 8px; }
.topnav .user-chip .user-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.logout-form { margin: 0; display: flex; }  /* shell logout button (ADR-0015) */
.sidebar .user { gap: 8px; }
.sidebar .user .icon-btn { width: 28px; height: 28px; flex: none; }
.sidebar .user .menu-wrap + .logout-form { margin-left: -4px; }

/* ---------- page head ---------- */
.page-head .actions:empty { display: none; }

/* ---------- KPI tile as a link (mockup uebersicht.html) ---------- */
.kpis.k3 { grid-template-columns: repeat(3, 1fr); }
a.kpi { display: block; color: inherit; transition: box-shadow .12s, border-color .12s; }
a.kpi:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
a.kpi .go { position: absolute; right: 14px; bottom: 12px; color: var(--text-3); }

/* ---------- money: local + EUR ---------- */
.money-pair { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money-pair .sep { color: var(--text-3); margin: 0 4px; }
.money-pair .money-eur { color: var(--text-2); }

/* ---------- status chip (country status: colour + icon + text) ---------- */
.status-chip { display: inline-flex; align-items: center; gap: 6px; }
.status-chip .icon { width: 13px; height: 13px; }
.badge.with-icon::before { display: none; }

/* ---------- segmented control / tabs as links ---------- */
.seg a { white-space: nowrap; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.seg a.on, .seg a[aria-current="page"], .seg a[aria-current="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--border); }
.tabs.page-tabs { margin: 0 0 16px; padding: 0; }
.tabs a[aria-current="page"], .tabs a[aria-current="true"] { color: var(--text); border-color: var(--accent); }

/* ---------- empty state ---------- */
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 32px 20px; text-align: center; color: var(--text-3); }
.empty-state .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.empty-state .t { font-weight: 600; color: var(--text); }
.empty-state .x { font-size: 13px; max-width: 46ch; }

/* ---------- glossary tooltip: CSS-only show on hover/focus; ui.js only flips it ---------- */
.term { display: inline; }
.term:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.term > .tip { display: none; top: calc(100% + 10px); left: -14px; }
.term:hover > .tip, .term:focus > .tip, .term:focus-within > .tip, .term.tip-on > .tip { display: block; }
.term > .tip.up { top: auto; bottom: calc(100% + 10px); }
.tip .tip-h { display: block; margin: 0 0 6px; font-size: 13.5px; font-weight: 650; color: #fff; }
.tip .tip-text { display: block; margin: 0 0 4px; color: #c5cbd6; }
.tip .tip-text.chg { margin-top: 8px; padding: 7px 9px; border-radius: 7px; background: rgba(115,215,0,.12); color: #b9ef7a; font-size: 12px; }
.tip .tip-link { display: inline-flex; gap: 4px; align-items: center; margin-top: 10px; color: #9be14a; font-weight: 600; font-size: 12.5px; }

/* ---------- drawer & dialog (native <dialog>) ---------- */
.drawer-h .x { margin-left: auto; }
dialog.modal { padding: 0; color: var(--text); }
dialog.modal::backdrop { background: rgba(14,21,37,.4); }
dialog.modal[open] { display: block; }

/* ---------- cut-off picker (mockup uebersicht.html #dateMenu) ---------- */
.stline { font-size: 17px; font-weight: 550; letter-spacing: -.01em; color: var(--text-2); }
.stline b { color: var(--text); font-weight: 650; }
.datepick { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; padding: 2px 6px; margin-left: -2px; border-radius: 7px; font: inherit; font-weight: 650; color: var(--text); cursor: pointer; box-shadow: inset 0 -1.5px 0 var(--border-strong); }
.datepick:hover, details[open] > .datepick { background: var(--surface-3); box-shadow: none; }
.cutoff-picker { display: inline-block; }
.cutoff-picker > .menu { left: 0; right: auto; top: 34px; min-width: 260px; font-size: 13px; font-weight: 500; }
.cutoff-picker .mgrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 0 2px 6px; }
.cutoff-picker .mgrid a { justify-content: center; padding: 6px 0; }
.cutoff-picker a.on, .cutoff-picker a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* ---------- deadline bar (mockup meine-meldung.html .dbar) ---------- */
.dbar .k { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; }
.dbar .k b { color: var(--text); }
.dbar .bar { position: relative; margin: 30px 0 0; padding: 0 1px; }
.dbar .track { position: relative; height: 16px; border-radius: 4px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.dbar .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; }
.dbar .fill.overdue { background: linear-gradient(90deg, color-mix(in srgb, var(--red) 45%, transparent), var(--red)); }
.dbar .fill.soon { background: linear-gradient(90deg, color-mix(in srgb, var(--amber-dot) 45%, transparent), var(--amber-dot)); }
.dbar .fill.calm { background: linear-gradient(90deg, color-mix(in srgb, var(--blue) 45%, transparent), var(--blue)); }
.dbar .fill.done { background: linear-gradient(90deg, color-mix(in srgb, var(--accent-bright) 45%, transparent), var(--accent-bright)); }
.dbar .cap { position: absolute; top: -6px; width: 3px; height: 28px; background: var(--text-2); border-radius: 2px; }
.dbar .cap.s { left: -1px; } .dbar .cap.e { right: -1px; background: var(--text); }
.dbar .cap.m { top: -6px; width: 3px; height: 28px; background: var(--text-2); }
.dbar .mark { position: absolute; top: -8px; width: 2px; height: 32px; background: var(--text); border-radius: 2px; box-shadow: 0 0 0 2px var(--bg); }
.dbar .now { position: absolute; top: -28px; font-size: 11.5px; font-weight: 650; color: var(--text); white-space: nowrap; transform: translateX(-50%); }
.dbar .now.l { transform: none; } .dbar .now.r { transform: translateX(-100%); }
.dbar .ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-top: 22px; }
.dbar .ends b { color: var(--text); font-weight: 650; }
.dbar .tick { position: absolute; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--text) 14%, transparent); }
.dbar .tick.mon { background: color-mix(in srgb, var(--text) 34%, transparent); width: 1.5px; }
.dbar .wkend { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--text) 6%, transparent); }
.dbar .dlbl { position: absolute; top: 20px; transform: translateX(-50%); font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dbar .midlbl { position: absolute; top: 20px; transform: translateX(-50%); font-size: 10.5px; color: var(--text-2); white-space: nowrap; }
.tones { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tone-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.tone-chip i { width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.tone-chip.overdue { color: var(--red); background: var(--red-soft); } .tone-chip.soon { color: var(--amber); background: var(--amber-soft); }
.tone-chip.calm { color: var(--blue); background: var(--blue-soft); } .tone-chip.done { color: var(--accent); background: var(--accent-soft); }

/* ---------- error pages (no navigation) ---------- */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.error-card { width: 100%; max-width: 36rem; padding: 28px 32px; }
.error-card .brand { padding: 0 0 18px; }
.error-card .code { margin: 0; font-size: 34px; font-weight: 650; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.error-card h1 { margin: 4px 0 10px; font-size: 20px; letter-spacing: -.015em; }
.error-card p { color: var(--text-2); }
.error-card a { color: var(--accent); font-weight: 600; }

/* ---------- footer ---------- */
.app-foot { margin-top: auto; padding: 16px 32px 20px; font-size: 12px; color: var(--text-3); }

@media print {
  .sidebar, .topbar, .app-foot, .skip-link { display: none !important; }
  .app { display: block; }
  body:has(.app) { background: none; }
}
.term.tip-hide > .tip { display: none !important; }

/* flash messages (django.contrib.messages) above the page content */
.shell-messages { display: grid; gap: 8px; margin-bottom: 16px; }
.shell-messages .callout { margin: 0; }

/* ---------- glossary page (B1 glossar.html, W6) ---------- */
.g-layout { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; }
.g-nav { position: sticky; top: 72px; display: grid; gap: 2px; }
.g-nav a { display: flex; justify-content: space-between; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; }
.g-nav a:hover { background: var(--surface-3); }
.g-nav a span { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.g-nav .sep { height: 1px; background: var(--border); margin: 10px 0; }
.g-search { position: relative; margin-bottom: 28px; }
.g-search > .icon { position: absolute; left: 14px; top: 13px; color: var(--text-3); }
.g-search > .input { width: 100%; height: 42px; padding-left: 40px; font-size: 14.5px; border-radius: 10px; }
.g-filters { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.g-filters .g-check { display: inline-flex; gap: 8px; align-items: center; }
.g-filters .g-check input { accent-color: var(--accent); width: 16px; height: 16px; }
/* checkbox drawn as the mockup .toggle switch (still a native checkbox: keyboard + forms) */
input.switch { appearance: none; -webkit-appearance: none; margin: 0; width: 34px !important; height: 20px !important; border-radius: 99px; background: var(--border-strong); position: relative; flex: none; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { left: 16px; }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.g-filters .g-stand { margin-left: auto; }
.g-sec { margin-bottom: 36px; scroll-margin-top: 72px; }
.g-sec h2 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; margin: 0 0 4px; }
.g-sec .desc { color: var(--text-3); margin: 0 0 14px; font-size: 13px; }
.g-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-card { padding: 16px 18px; scroll-margin-top: 80px; }
.g-card:target { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.g-card .hd { display: flex; align-items: flex-start; gap: 8px; }
.g-card h3 { font-size: 14.5px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.g-card .hd .badge { margin-left: auto; }
.g-card p { margin: 10px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.g-card .chg { margin-top: 10px; display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); font-size: 12.5px; }
.g-card .chg p { margin: 0; color: inherit; font-size: inherit; }
.matrix { margin-bottom: 12px; overflow: hidden; }
.matrix table { width: 100%; border-collapse: collapse; font-size: 13px; }
.matrix th, .matrix td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.matrix thead th { background: var(--surface-2); font-size: 12px; color: var(--text-2); font-weight: 550; }
.matrix tr:last-child td, .matrix tr:last-child th { border-bottom: 0; }
.matrix td b { font-weight: 600; }
.op { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: var(--surface-3); font-size: 12px; font-weight: 700; color: var(--text-2); margin: 0 4px; }
@media (max-width: 1000px) { .g-layout { grid-template-columns: 1fr; } .g-nav { position: static; } .g-cards { grid-template-columns: 1fr; } }

/* ---------- import & export (B1 import-export.html, W6) ---------- */
.ie-why { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 16px; }
.ie-why > div { padding: 14px 20px; border-left: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.ie-why > div:first-child { border-left: 0; }
.ie-why .k { display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 13.5px; }
.ie { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.ie-side { display: grid; gap: 16px; }
.isteps { display: flex; gap: 4px; padding: 14px 20px 0; margin: 0; list-style: none; }
.isteps li { flex: 1; display: flex; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.isteps .n { width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; box-shadow: inset 0 0 0 1.5px currentColor; flex: none; }
.isteps li.done { background: var(--accent-soft); color: var(--accent); }
.isteps li.done .n { background: var(--accent); color: #fff; box-shadow: none; }
.isteps li.cur { background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.drop { margin: 16px 20px 0; padding: 22px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius); text-align: center; color: var(--text-2); background: var(--surface-2); display: grid; gap: 6px; justify-items: center; }
.drop .drop-t { font-weight: 600; color: var(--text); }
.drop .faint { font-size: 12.5px; max-width: 46ch; }
.drop input[type="file"] { margin-top: 8px; max-width: 320px; height: auto; padding: 4px; font-size: 13px; color: var(--text-2); }
.drop input[type="file"]::file-selector-button { font: inherit; font-weight: 550; height: 28px; padding: 0 10px; margin-right: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.drop input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
.file { display: flex; gap: 12px; align-items: center; margin: 16px 20px 0; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.file .ic, .xopt .ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.counts { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px 20px 0; border: 1px solid var(--border); border-radius: var(--radius); }
.counts > div { padding: 12px 14px; border-left: 1px solid var(--border); }
.counts > div:first-child { border-left: 0; }
.counts .k { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; }
.counts .v { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.counts .s { font-size: 12px; color: var(--text-3); }
.ie-report { padding: 4px 20px 0; }
.ie-report h3 { font-size: 13.5px; font-weight: 650; margin: 18px 0 8px; }
.ie-report .table-wrap { border: 1px solid var(--border); border-radius: var(--radius); }
.ie-report .reconciliation { font-size: 13px; color: var(--text-2); margin: 14px 0 0; }
.ie-pad { margin: 16px 20px 0; }
.ifoot { display: flex; gap: 8px; align-items: center; padding: 14px 20px; margin-top: 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.ifoot .faint { font-size: 12.5px; margin-right: auto; display: flex; gap: 6px; align-items: center; }
.ifoot form { margin: 0; }
.ie-commit { display: grid; gap: 12px; }
.ie-commit .ifoot { margin: 4px -20px -20px; justify-content: flex-end; }
.xopts { display: grid; gap: 8px; }
.xopt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text); }
.xopt:hover { border-color: var(--accent); }
.xopt > div { flex: 1; }
.xopt .t { font-weight: 600; font-size: 13.5px; }
.xopt .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.xnote { font-size: 12.5px; margin: 4px 0 0; }
@media (max-width: 1100px) { .ie, .ie-why { grid-template-columns: 1fr; } .ie-why > div { border-left: 0; border-top: 1px solid var(--border); } .ie-why > div:first-child { border-top: 0; } .counts { grid-template-columns: repeat(2, 1fr); } }

/* ---- W2: uebersicht (mockup 1:1; every rule scoped to body.page-overview) ---- */
/* page head: static consolidated cut-off (no picker in Phase A) */
.page-overview .ph-compact { align-items: center; margin: 6px 0 18px; }
.page-overview .page-head h1.stline { font-size: 17px; font-weight: 550; letter-spacing: -.01em; color: var(--text-2); line-height: 1.45; }
.page-overview .stline .datepick.static { cursor: default; }
.page-overview .stline .datepick.static:hover { background: transparent; box-shadow: inset 0 -1.5px 0 var(--border-strong); }
/* row 2: Monatsmeldung | Braucht Aufmerksamkeit */
/* monthly report 3/4, attention 1/4 (human, 2026-11-11) */
.page-overview .grid-r2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.page-overview .mm-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 4px 20px 10px; font-size: 12.5px; color: var(--text-2); }
.page-overview .mm-count { display: inline-flex; align-items: center; gap: 6px; }
.page-overview .mm-count b { font-variant-numeric: tabular-nums; color: var(--text); }
.page-overview .mm-count .empty-dot { width: 10px; height: 10px; }
.page-overview .mm-rows { list-style: none; margin: 0; padding: 0 20px 6px; columns: 3 230px; column-gap: 24px; }
.page-overview .mm-row { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 0; border-top: 1px solid var(--border); break-inside: avoid; }
.page-overview .mm-c { display: flex; align-items: center; min-width: 0; padding-top: 1px; }
.page-overview .mm-c a { display: inline-flex; border-radius: 3px; }
.page-overview .mm-c a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.page-overview .mm-nc { color: var(--text-3); display: inline-flex; }
.page-overview .mm-row .echips { margin: 0; }
.page-overview .mm-legend { padding: 8px 20px 14px; font-size: 11.5px; }
.page-overview .grid-2e { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
.page-overview .card.mm { display: flex; flex-direction: column; }
.page-overview .card-h h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* grouped status chips */
.page-overview .sgroups { display: grid; grid-template-columns: 1fr .9fr 1fr 1.6fr; gap: 10px; padding: 14px 20px 20px; flex: 1; align-items: stretch; }
.page-overview .sgroups .g { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--surface-2); min-width: 0; }
.page-overview .sgroups .gh { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; margin: 0 0 8px; }
.page-overview .sgroups .gh .empty-dot { width: 10px; height: 10px; }
.page-overview .sgroups .gh b { margin-left: auto; font-variant-numeric: tabular-nums; }
.page-overview .sgroups .gcap { font-size: 11.5px; color: var(--text-3); margin: -4px 0 8px; }
.page-overview .sgroups .chips { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.page-overview .sgroups .chips a { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 7px; border-radius: 6px; }
.page-overview .sgroups .chips a:hover { text-decoration: underline; }
.page-overview .sgroups .none { font-size: 12px; color: var(--text-3); }
/* attention list: title is the link */
.page-overview .attn .t1 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.page-overview .attn .t2 a { font-weight: 600; color: var(--text-2); }
.page-overview .attn .t2 a:hover { color: var(--text); text-decoration: underline; }
/* provisions by country: CSS bars, each bar a drill-down link */
.page-overview .bars a.bar-row { color: inherit; border-radius: 6px; }
.page-overview .bars a.bar-row:hover .lbl { text-decoration: underline; }
.page-overview .bars .bar-row .track span, .page-overview .firm .bar-row .track span { background: color-mix(in srgb, var(--text) 22%, transparent); opacity: 1; }
.page-overview .bars .bar-row:first-child .track span, .page-overview .firm:first-child .bar-row .track span { background: var(--accent); }
.page-overview .bar-row .lbl { text-align: right; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-overview .bar-row .num small { font-size: 11.5px; color: var(--text-3); font-weight: 500; margin-left: 3px; }
/* costs by law firm: <details> per firm, expandable to its cases */
.page-overview .card-b.firms { padding-top: 8px; }
.page-overview .firm { border-top: 1px solid var(--border); }
.page-overview .firm .who { min-width: 0; }
.page-overview .firm .cell-main, .page-overview .firm .cell-sub { display: block; }
.page-overview .firm .cell-main { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-overview .firm .num { display: block; }
.page-overview .firm:first-child { border-top: 0; }
.page-overview .firm > summary { list-style: none; }
.page-overview .firm > summary::-webkit-details-marker { display: none; }
.page-overview .firm .bar-row { grid-template-columns: 16px minmax(120px, 190px) 1fr 118px; padding: 9px 0; cursor: pointer; }
.page-overview .firm .bar-row .chev { color: var(--text-3); transition: transform .15s; }
.page-overview .firm[open] .bar-row .chev { transform: rotate(90deg); color: var(--text); }
.page-overview .firm .num small { display: block; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.page-overview .firm .fcases { margin: 0 0 10px 28px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.page-overview .fcases > .fc:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.page-overview .fcases > .more { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.page-overview .fcases .fc { display: grid; grid-template-columns: 96px minmax(0, 1fr) 196px; gap: 10px; padding: 7px 10px; font-size: 12.5px; border-top: 1px solid var(--border); align-items: center; }
.page-overview .fcases .fc:first-child { border-top: 0; background: var(--surface-2); color: var(--text-3); font-weight: 550; font-size: 11.5px; }
.page-overview .fcases .fc .cp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.page-overview .fcases .fc a.mono:hover { text-decoration: underline; }
.page-overview .fcases .variants { padding: 7px 10px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); }
.page-overview .fcases .more { display: flex; justify-content: flex-end; gap: 4px; align-items: center; padding: 7px 10px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--surface-2); }
.page-overview .card-foot-note { padding: 0 20px 14px; font-size: 12px; color: var(--text-3); }
/* "Nach Gesellschaft": collapsible card with the per-entity table */
.page-overview details.card > summary.card-h { list-style: none; cursor: pointer; padding-bottom: 16px; }
.page-overview details.card > summary.card-h::-webkit-details-marker { display: none; }
.page-overview details.card > summary.card-h .chev { color: var(--text-3); transition: transform .15s; }
.page-overview details.card[open] > summary.card-h .chev { transform: rotate(90deg); color: var(--text); }
.page-overview details.card[open] > summary.card-h { padding-bottom: 0; }
.page-overview table.t.plain tbody tr { cursor: default; }
.page-overview table.t.plain th[scope="row"] { text-align: left; font-weight: 550; }
.page-overview table.t.plain a:hover { text-decoration: underline; }
.page-overview table.t.plain tfoot th, .page-overview table.t.plain tfoot td { font-weight: 650; border-top: 1px solid var(--border-strong); padding: 10px 12px; }
.page-overview .layout-note { display: flex; gap: 6px; align-items: center; margin: 20px 0 0; font-size: 12px; color: var(--text-3); }
@media (max-width: 1100px) { .page-overview .grid-r2, .page-overview .grid-2e { grid-template-columns: 1fr; } .page-overview .sgroups { grid-template-columns: 1fr 1fr; } }
/* ---- end W2 ---- */

/* ---- W4: neuer-fall (mockup 1:1) ---- */
/* Scoped to the page root .case-entry (form.html, wizard.html); unscoped generic error styles: .field.invalid .input/.select, .field .errorlist, .callout.red, .callout .errorlist.
   Mockup neuer-fall.html <style> block, ported 1:1 (stepper, sections, option cards, sticky summary),
   plus the states the app needs: stepper as <ol>/links, error states, radio option cards without JS. */
.case-entry .stepper { display: flex; align-items: center; gap: 0; margin: 0 0 24px; padding: 14px 18px; }
.case-entry .step { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 13px; color: var(--text-3); font-weight: 550; }
.case-entry .step .n { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 650; box-shadow: inset 0 0 0 1.5px var(--border-strong); color: var(--text-3); flex: none; }
.case-entry .step.done { color: var(--text-2); }
.case-entry .step.done .n { background: var(--accent); color: #fff; box-shadow: none; }
.case-entry .step.cur { color: var(--text); }
.case-entry .step.cur .n { box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent); background: var(--accent-soft); }
.case-entry .step .line { flex: 1; height: 1.5px; background: var(--border); margin: 0 14px; }
.case-entry .step.done .line { background: var(--accent); }
.case-entry .step small { display: block; font-weight: 500; color: var(--text-3); font-size: 12px; }
.case-entry .nf { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.case-entry .sec { padding: 22px 24px; margin-bottom: 16px; }
.case-entry .sec-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.case-entry .sec-h .n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-weight: 650; font-size: 12.5px; color: var(--text-2); flex: none; }
.case-entry .sec-h h2 { font-size: 15px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
.case-entry .sec-h p { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.case-entry .sec-h .badge { margin-left: auto; }
.case-entry .sec.done { opacity: .9; }
.case-entry .sec.cur { box-shadow: 0 0 0 1.5px var(--accent), var(--shadow); }
.case-entry .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.case-entry .g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.case-entry .opts { display: grid; gap: 8px; }
.case-entry .opts.cols-3 { grid-template-columns: repeat(3, 1fr); }
.case-entry .opts.cols-5 { grid-template-columns: repeat(5, 1fr); }
.case-entry .opts.cols-6 { grid-template-columns: repeat(5, 1fr); }
.case-entry .opt.none { grid-column: 1 / -1; padding: 7px 12px; }
.case-entry .opt.none .t { color: var(--text-2); font-weight: 550; }
.case-entry .opt { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; background: var(--surface); transition: box-shadow .12s, border-color .12s; }
.case-entry .opt:hover { border-color: var(--text-3); }
.case-entry .opt.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.case-entry .opt .t { font-weight: 600; font-size: 13px; }
.case-entry .opt .s { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.case-entry .opt .lik { margin-bottom: 6px; }
.case-entry .summary { position: sticky; top: 72px; }
.case-entry .summary .big { font-size: 30px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.case-entry .summary .rule { font-size: 12.5px; color: var(--text-2); }
.case-entry .sum-rows { display: grid; gap: 8px; margin-top: 14px; font-size: 13px; }
.case-entry .sum-rows > div { display: flex; justify-content: space-between; }
.case-entry .sum-rows span:last-child { font-variant-numeric: tabular-nums; font-weight: 550; }
.case-entry .checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.case-entry .checklist li { display: flex; gap: 8px; align-items: center; }
.case-entry .checklist .ok { color: var(--accent); }
.case-entry .checklist .no { color: var(--text-3); }
.case-entry .fx { font-size: 12px; color: var(--text-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.case-entry .collapsed-row { display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; }
.case-entry .collapsed-row span { color: var(--text-3); }
.case-entry .collapsed-row b { font-weight: 550; margin-left: 6px; }
/* app states (not in the mockup's static page) */
.case-entry .summary-derived .big { font-size: 30px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.case-entry .summary-derived .rule { font-size: 12.5px; color: var(--text-2); }
.case-entry ol.stepper { list-style: none; }
.case-entry .step > a, .case-entry .step > .lbl-t { display: flex; align-items: center; gap: 10px; color: inherit; }
.case-entry .step > a:hover { color: var(--text); }
.case-entry .step:last-child { flex: none; }
.case-entry .step.err { color: var(--red); }
.case-entry .step.err .n { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); background: var(--red-soft); }
.case-entry .stepper.dense { padding: 12px 14px; }
.case-entry .stepper.compact .step:not(.cur) .t-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.case-entry .stepper.compact .step.cur { flex: 2; }
.case-entry .stepper.dense .step { gap: 8px; font-size: 12.5px; line-height: 1.25; }
.case-entry .stepper.dense .step .line { margin: 0 8px; min-width: 8px; }
.case-entry .sec { scroll-margin-top: 72px; }
.case-entry .sec.invalid { box-shadow: 0 0 0 1.5px var(--red), var(--shadow); }
.case-entry .sec .span-all { grid-column: 1 / -1; }
.case-entry .sec .g2 + .g2, .case-entry .sec .g2 + .field, .case-entry .sec .fixed-row + .g2 { margin-top: 16px; }
.case-entry .sec-h .n .icon { width: 14px; height: 14px; }
.case-entry .sec.done .sec-h .n { background: var(--accent); color: #fff; }
.case-entry fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.case-entry fieldset.field > legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 550; color: var(--text); display: flex; gap: 6px; align-items: center; }
.case-entry .opt { position: relative; display: block; }
.case-entry .field label.opt { display: block; font-size: inherit; font-weight: inherit; }
.case-entry .opt .t, .case-entry .opt .s { display: block; }
.case-entry .opt > input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.case-entry .opt:has(> input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.case-entry .opt:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.field.invalid .input, .field.invalid .select, .case-entry .field.invalid .opt { border-color: var(--red); }
.field .errorlist { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--red); font-weight: 550; }
.callout.red { background: var(--red-soft); color: var(--red); }
.callout .errorlist { list-style: none; margin: 4px 0 0; padding: 0; }
.case-entry .summary-derived .why { font-size: 12px; color: var(--text-3); margin: -4px 0 0; }
.case-entry .callout.wizard-help { margin-bottom: 18px; }
.case-entry .callout.wizard-help p, .case-entry .callout.wizard-help ul { margin: 0; }
.case-entry .callout.wizard-help ul { padding-left: 18px; display: grid; gap: 4px; }
.case-entry .sec-f { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.case-entry .summary .lbl + .sum-rows { margin-top: 8px; }
.case-entry .summary-derived .why .mono, .case-entry .why-more .mono { font-size: 11.5px; white-space: nowrap; }
.case-entry .summary { max-height: calc(100vh - 88px); overflow: auto; }
.case-entry .why-more { margin-top: 12px; font-size: 12.5px; }
.case-entry .why-more > summary { cursor: pointer; font-weight: 550; color: var(--text-2); }
.case-entry .why-more dl { margin: 8px 0 0; display: grid; gap: 4px; }
.case-entry .why-more dt { font-weight: 550; color: var(--text-2); margin-top: 6px; }
.case-entry .why-more dd { margin: 0; color: var(--text-3); }
.case-entry .summary .actions-col { display: grid; gap: 8px; }
/* lead pixel round: summary spacing as the mockup (.lbl margin 14px 0 8px), one-line step labels */
.case-entry .summary [aria-live] > p:first-child { margin-top: 0; }
.case-entry .summary .card-b > .lbl { margin: 14px 0 8px; }
.case-entry .stepper.dense .step a > span:last-child { white-space: nowrap; }
.case-entry .summary .actions-col .btn { justify-content: center; }
.case-entry .summary .actions-col .btn-primary { height: 38px; }
.case-entry .fixed-row { margin-bottom: 16px; }
.case-entry > .callout { margin-bottom: 16px; }
@media (max-width: 1100px) {
  .case-entry .nf { grid-template-columns: 1fr; }
  .case-entry .summary { position: static; }
  .case-entry .opts.cols-5, .case-entry .opts.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .case-entry .stepper { flex-wrap: wrap; gap: 10px; }
  .case-entry .step .line { display: none; }
}
/* ---- end W4 ---- */

/* ---- W5: meine-meldung, laender (mockup 1:1) ---- */
/* Meine Meldung: urgency banner — colour + icon + text + position (sticky when overdue) */
.my-report-page .content { max-width: 1240px; padding-bottom: 96px; }
.ubanner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--radius); margin: 8px 0 20px; border: 1px solid; }
.ubanner .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ubanner .t { font-weight: 650; font-size: 15px; letter-spacing: -.01em; }
.ubanner .x { font-size: 13px; margin-top: 1px; }
.ubanner .cta { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.ubanner.soon { background: var(--amber-soft); border-color: color-mix(in srgb, var(--amber) 35%, transparent); color: var(--amber); }
.ubanner.soon .ic { background: var(--amber); color: #fff; }
.ubanner.overdue { background: var(--red); border-color: var(--red); color: #fff; position: sticky; top: 64px; z-index: 15; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--red) 50%, transparent); }
.ubanner.overdue .ic { background: rgba(255,255,255,.18); }
.ubanner.overdue .x { color: rgba(255,255,255,.88); }
.ubanner.overdue .btn { background: #fff; color: var(--red); border-color: #fff; }
.ubanner.info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); color: var(--blue); }
.ubanner.info .ic { background: var(--blue); color: #fff; }
.countdown { display: flex; gap: 6px; }
.countdown div { background: var(--surface); color: var(--amber); border-radius: 8px; padding: 4px 10px; text-align: center; min-width: 54px; box-shadow: var(--shadow-sm); }
.countdown b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.countdown span { font-size: 11px; }
/* heading + deadline bar */
.hello { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin: 10px 0 24px; }
.hello h1 { font-size: 28px; letter-spacing: -.025em; margin: 0; font-weight: 650; }
.hello p { margin: 6px 0 0; color: var(--text-2); }
/* entity tiles: 1 → full width (3 columns inside), more side by side; when they do not fit
   (an editor with many entities) the row scrolls horizontally instead of squeezing the tiles */
.cards { display: grid; grid-template-columns: repeat(var(--n), minmax(270px, 1fr)); gap: 16px; margin-bottom: 24px; overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain; padding: 2px 2px 10px; margin-inline: -2px; }
.cards > .ccard { scroll-snap-align: start; }
.hscroll { position: relative; }
.hscroll.more-r > .cards { mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.hscroll.more-l > .cards { mask-image: linear-gradient(to right, transparent, #000 56px); }
.hscroll.more-l.more-r > .cards { mask-image: linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent); }
.hscroll-btn { position: absolute; top: calc(50% - 22px); z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); font-size: 22px; line-height: 1; cursor: pointer; display: none; place-items: center; padding: 0 0 3px; }
.hscroll-btn:hover { border-color: var(--text-3); }
.hscroll-btn.prev { left: -12px; } .hscroll-btn.next { right: -12px; }
.hscroll.more-l .hscroll-btn.prev, .hscroll.more-r .hscroll-btn.next { display: grid; }
.ccard { padding: 18px 20px 16px; display: flex; flex-direction: column; border-top: 3px solid var(--border); }
.ccard.overdue { border-top-color: var(--red); } .ccard.soon { border-top-color: var(--amber-dot); } .ccard.done { border-top-color: var(--accent-bright); }
.ccard .hd { display: flex; align-items: flex-start; gap: 10px; }
.ccard .hd .badge { flex: none; margin-top: 1px; }
/* one line; a long name fades out before the status badge instead of wrapping */
.ccard .hd .nm { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; letter-spacing: -.015em; margin: 0; white-space: nowrap; overflow: hidden; }
.ccard .hd .nm.clipped { mask-image: linear-gradient(to left, transparent, #000 40px); }
.ccard .hd .nm a:hover { color: var(--accent); }
.ccard .hd .badge { margin-left: auto; }
.ccard .grow { flex: 1; }
.prog { margin-top: 16px; }
.prog .k { display: flex; justify-content: space-between; font-size: 13px; }
.prog .k b { font-weight: 650; }
.prog .k a:hover { color: var(--accent); }
.chg-note { display: flex; gap: 6px; align-items: center; margin-top: 8px; font-size: 12.5px; color: var(--blue); }
.ccard .money { display: grid; gap: 1px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.ccard .money b { font-size: 16px; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ccard .acts { display: grid; gap: 8px; margin-top: 16px; }
.ccard .acts form { margin: 0; display: grid; }
.ccard .acts .btn { justify-content: center; height: 38px; width: 100%; }
.ccard .acts .row2 { display: flex; flex-wrap: wrap; gap: 8px; }
.ccard .acts .row2 > * { flex: 1 1 auto; }
.ccard .acts .row2 .btn { height: 34px; }
.ccard .acts .row2 .btn-primary, .ccard .acts .row2 .btn-orange { height: 38px; } /* same height as the "No cases" button */
.ccard .acts > dialog:not([open]) { display: none; } /* no grid gap for the closed dialog */
.ccard.done .donebox { margin-top: 16px; padding: 12px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-strong); font-size: 13px; display: flex; gap: 10px; }
.donebox .sub { opacity: .8; font-size: 12px; }
.single .ccard { display: grid; grid-template-columns: 1.2fr 1fr 280px; gap: 28px; align-items: start; }
.single .ccard .acts { margin-top: 0; }
/* ADR-0013: confirmation per case — progress, handlers, sign-off, case rows */
.confirm-prog { font-size: 13px; color: var(--text-2); }
.confirm-prog b { color: var(--text); font-variant-numeric: tabular-nums; }
ul.handlers { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-2); }
ul.handlers li { display: inline-flex; gap: 4px; align-items: center; }
.amber-t { color: var(--amber); }
form.sign-off { display: grid; gap: 8px; margin: 8px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--accent-soft); }
form.sign-off.none { margin: 0; padding: 0; background: none; }
td.confirm-cell { text-align: right; }
td.confirm-cell form.inline { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 8px; align-items: center; vertical-align: middle; }
td.confirm-cell .btn { display: inline-flex; vertical-align: middle; white-space: nowrap; }
td.confirm-cell .chk { display: inline-flex; font-size: 12px; white-space: nowrap; }
details.others summary { cursor: pointer; padding: 8px 0; font-size: 13px; color: var(--text-2); font-weight: 500; }
.confirm-card { margin-bottom: 16px; }
.confirm-card__b { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.confirm-card__b h2.lbl { margin: 0 0 6px; }
.confirm-card__acts form { display: flex; gap: 10px; align-items: center; margin: 0; }
.status-row__progress { font-size: 13px; grid-column: 1 / 3; }
.status-row__progress ~ .status-row__form { grid-column: 3; grid-row: 1 / span 2; }
/* lower grid: attention | my open cases */
.lower { display: grid; grid-template-columns: 420px 1fr; gap: 16px; align-items: start; }
.attn li.attn-link:hover { background: var(--surface-2); }
.attn li.attn-link a.t1 { display: block; }
.attn li.attn-link a.t1:hover { color: var(--accent); }
.attn .ico.green { background: var(--accent-soft); color: var(--accent); }
.attn .t2 .mono { color: var(--text-2); }
.mine { overflow: hidden; }
.mine .card-h { padding-bottom: 12px; }
table.t.mini td, table.t.mini th[scope="row"] { padding: 8px 12px; border-bottom: 1px solid var(--border); }
table.t.mini th[scope="row"] { text-align: left; font-weight: 600; }
table.t.mini tbody th[scope="row"] { position: static; background: none; font-size: 12.5px; color: var(--text); white-space: nowrap; }
/* entity group header: a clear band per entity (tinted, accent edge, space above) */
table.t.mini tr.g th { position: static; background: color-mix(in srgb, var(--amber) 9%, var(--surface)); box-shadow: inset 3px 0 0 var(--amber-dot); border-top: 10px solid var(--surface); border-bottom: 1px solid color-mix(in srgb, var(--amber) 25%, var(--border)); padding: 10px 14px; text-align: left; }
table.t.mini tbody:first-of-type tr.g th { border-top: 0; }
table.t.mini tr.g.ok th { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent-bright); border-bottom-color: var(--border); }
table.t.mini tr.g .g-in { display: flex; align-items: center; gap: 10px; }
table.t.mini tr.g .g-nm { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--text); letter-spacing: -.01em; }
table.t.mini tr.g .g-nm a.flag:hover { color: var(--accent); }
table.t.mini tr.g .g-n { font-size: 12px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; }
table.t.mini tr.g .g-go { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--amber); }
table.t.mini tr.g .g-go:hover { text-decoration: underline; }
table.t.mini td .ellip { max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.t.mini tr.archive-row td { padding: 0; }
table.t.mini tr.archive-row:hover td { background: none; }
.archive { display: flex; justify-content: space-between; padding: 12px 16px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.archive span { display: inline-flex; gap: 6px; align-items: center; }
.archive a { color: var(--accent); font-weight: 600; }
/* success block (all countries reported) */
.success { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0; margin-bottom: 24px; overflow: hidden; }
.success .l { padding: 26px 28px; background: linear-gradient(135deg, var(--accent-soft), transparent 70%); }
.success .big { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--accent); color: #fff; margin-bottom: 14px; }
.success .big .icon { width: 26px; height: 26px; }
.success h1 { font-size: 26px; letter-spacing: -.025em; margin: 0; }
.success .l p { color: var(--text-2); margin: 6px 0 18px; }
.success .lines { display: grid; gap: 8px; }
.success .line { display: flex; gap: 10px; align-items: center; font-size: 13.5px; background: var(--surface); border: 1px solid var(--border); padding: 9px 12px; border-radius: 9px; }
.success .line .r { margin-left: auto; }
.success .rr { padding: 26px 28px; border-left: 1px solid var(--border); }
.success .next { margin-top: 18px; padding: 14px; border-radius: 10px; border: 1px dashed var(--border-strong); display: flex; gap: 12px; align-items: center; }
.success .next .faint { font-size: 12.5px; }
/* "Alles unverändert bestätigen" dialog body */
.modal .sum { border: 1px solid var(--border); border-radius: 10px; }
.modal .sum div { display: flex; justify-content: space-between; padding: 9px 12px; font-size: 13px; border-top: 1px solid var(--border); }
.modal .sum div:first-child { border-top: 0; }
.modal .sum span:first-child { color: var(--text-3); }
.modal .warnbox { border-radius: 10px; background: var(--amber-soft); color: var(--amber); padding: 12px 14px; font-size: 13px; display: flex; gap: 10px; }
.chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.chk input { margin-top: 2px; accent-color: var(--accent); }
@media (max-width: 1100px) {
  .hello, .lower, .success, .single .ccard { grid-template-columns: 1fr; }
  .cards.single { grid-template-columns: 1fr; }
}
/* Fälle durchgehen (B1 meine-meldung-review): step strip, case card, Unchanged / Change, case list */
.rhead { padding: 16px 20px; margin: 8px 0 20px; }
.rhead .r1 { display: flex; align-items: center; gap: 12px; }
.rhead h1 { font-size: 20px; margin: 0; letter-spacing: -.02em; }
.rhead .r1 .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.steps { display: flex; gap: 4px; margin-top: 14px; }
.steps a { flex: 1; min-width: 22px; height: 30px; border-radius: 7px; background: var(--surface-3); display: grid; grid-auto-flow: column; place-items: center; place-content: center; font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.steps a:hover { color: var(--text); }
.steps a.ok { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent-bright); }
.steps a.cur { background: var(--surface); color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-3); margin-top: 8px; }
.pmeta b { color: var(--text); }
.pmeta .r { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; }
.red-t { color: var(--red); font-weight: 600; }
.rgrid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.rgrid > div { display: grid; gap: 16px; }
.rcase { padding: 24px 26px; }
.rcase .no { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--text-3); }
.rcase .no a.mono { color: var(--text); font-weight: 600; }
.rcase h2 { font-size: 24px; letter-spacing: -.025em; margin: 8px 0 4px; }
.rcase .desc { color: var(--text-2); font-size: 14.5px; margin: 0; white-space: pre-line; }
.rfacts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; margin-top: 22px; padding-top: 4px; border-top: 1px solid var(--border); }
.rcase .q { margin-top: 20px; }
.rcase .q .t { font-weight: 650; font-size: 15px; }
.rcase .q .h { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.rcase .q form { margin: 0; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.choice { display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-radius: 12px; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.choice:hover { border-color: var(--text-3); }
.choice .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.choice.keep { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.choice.keep .ic { background: var(--accent-soft); color: var(--accent); }
.choice.edit .ic { background: var(--blue-soft); color: var(--blue); }
.choice .l { display: block; font-weight: 650; font-size: 15px; }
.choice .s { display: block; font-size: 12.5px; color: var(--text-3); }
.rcase .chk.sign { margin-top: 12px; }
.rnav { display: flex; gap: 8px; justify-content: space-between; align-items: center; margin-top: 14px; }
.rnav form { margin: 0; }
.rnav.pager { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.rside { overflow: hidden; position: sticky; top: 76px; }
.rside .card-h { padding-bottom: 12px; }
.rside .card-h h2 { font-size: 14px; margin: 0; }
.rside .row { display: flex; gap: 10px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text); }
.rside .row:hover { background: var(--surface-2); }
.rside .row.cur { background: var(--surface-3); font-weight: 600; }
.rside .row .mono { font-weight: 600; white-space: nowrap; }
.rside .row .ellip { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rside .row .r { margin-left: auto; flex: none; }
.rside .pad { padding: 0 16px 12px; margin: 0; }
.rside .foot { padding: 12px 16px; border-top: 1px solid var(--border); }
.rside .foot .btn { width: 100%; justify-content: center; }
.ok-t { color: var(--accent); }
.done-card { padding: 34px; text-align: center; }
.done-card .big { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent); color: #fff; margin: 0 auto 16px; }
.done-card h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.done-card .done-sign { max-width: 460px; margin: 16px auto 0; text-align: left; }
.done-card ul.handlers { justify-content: center; }
.done-acts { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
@media (max-width: 1100px) { .rgrid, .rfacts, .choices { grid-template-columns: 1fr; } .rside { position: static; } }

/* Länder page */
.month-sw { display: flex; align-items: center; gap: 6px; }
.month-sw .icon-btn[aria-hidden="true"] { opacity: .35; }
.rule-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 14px 20px; margin-bottom: 16px; }
.rule-card .t { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.rule-card ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13px; display: grid; gap: 2px; }
.rule-card .demo { display: grid; gap: 6px; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius); background: var(--surface-2); }
.rule-card .demo .faint { font-size: 11.5px; }
.rule-card .demo .btn { pointer-events: none; }
table.country-list .ctry { display: flex; gap: 10px; align-items: center; }
/* counter dots + bars use the mockup's solid status colours (laender.html COLORS), not the map tints */
.stats4 .st-bg-delivered { background: var(--accent-bright); } .stats4 .st-bg-nochange { background: #8fb3ff; }
.stats4 .st-bg-open { background: var(--amber-dot); } .stats4 .st-bg-overdue { background: var(--red); }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-bottom: 16px; }
.stats4 > .stats4-i { display: block; padding: 16px 20px; border-left: 1px solid var(--border); }
.stats4 > .stats4-i:first-child { border-left: 0; border-radius: var(--radius) 0 0 var(--radius); }
.stats4 > .stats4-i:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.stats4 > .stats4-i:hover, .stats4 > .stats4-i.on { background: var(--surface-2); }
.stats4 .k { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.stats4 .v { font-size: 26px; font-weight: 650; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stats4 .v small { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.map-card { margin-bottom: 16px; }
.map-card .card-h .seg { margin-left: auto; }
.unassigned-tile { display: flex; gap: 10px; align-items: center; padding: 12px 20px; margin-bottom: 16px; font-size: 13.5px; }
.unassigned-tile .go { margin-left: auto; color: var(--text-3); }
.unassigned-tile:hover { border-color: var(--border-strong); }
table.t.country-list tbody th[scope="row"] { position: static; background: none; text-align: left; font-size: 13.5px; color: var(--text); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: normal; }
table.t.country-list td.num a:hover, table.t.country-list th a:hover { color: var(--accent); }
table.t.country-list .row-actions { text-align: right; white-space: nowrap; }
.status-cell .cell-sub { white-space: nowrap; }
.hq-hints { margin-bottom: 16px; }
.hq-hints .attn li a { flex: 1; }
/* country page + status widget */
.country-grid { align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } /* status rows need the room (ADR-0010) */
.entity-list { list-style: none; margin: 0; padding: 8px 0 4px; }
.entity-list li { display: flex; gap: 12px; align-items: center; padding: 10px 20px; border-top: 1px solid var(--border); }
.entity-list li:first-child { border-top: 0; }
.entity-list .entity-counts { margin-left: auto; display: flex; gap: 14px; font-size: 12.5px; color: var(--text-3); }
.entity-list .entity-counts b { color: var(--text); font-weight: 650; }
.status-widget__body { display: grid; gap: 12px; }
/* one row per entity (ADR-0010): who · state · actions */
.status-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.status-row { display: grid; grid-template-columns: minmax(120px, .9fr) minmax(130px, 1fr) minmax(0, 2.4fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--border); }
.status-row:first-child { border-top: 0; padding-top: 0; }
.status-row__state .cell-sub { margin-top: 4px; }
.status-row__form { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 8px; align-items: start; }
.status-row__form .callout, .status-row__form .chk { grid-column: 1 / -1; }
.status-row__form .input-sm { height: 30px; font-size: 12.5px; }
.status-widget__actions { display: flex; gap: 6px; flex-wrap: wrap; }
.status-widget__month { margin-left: auto; }
@media (max-width: 1200px) { .country-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .status-row, .status-row__form { grid-template-columns: 1fr; } }
.status-widget .section-t { margin: 8px 0 0; }
.status-hints li { padding: 8px 0; }
.country-cases .card-b { padding-top: 12px; }
.confirm-page { max-width: 720px; display: grid; gap: 16px; }
/* ---- end W5 ---- */

/* ---- W3: faelle (mockup faelle.html page style, 1:1 where possible) ---- */
/* case table (mockup #tbl / td.ent / td.cp / .wo) */
table.case-table { font-size: 13px; }
table.case-table td, table.case-table th { padding-left: 10px; padding-right: 10px; }
table.case-table td:first-child, table.case-table th:first-child { padding-left: 16px; }
table.case-table td.ent { max-width: 160px; }
table.case-table td.ent .mono { white-space: nowrap; }
table.case-table td.ent .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
table.case-table td.cp { max-width: 192px; }
table.case-table td.cp .cell-main, table.case-table td.cp .cell-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.case-table td.num .cell-sub { white-space: nowrap; font-size: 11.5px; }
table.case-table .lik span { font-size: 12.5px; }
table.case-table tfoot td { white-space: nowrap; }
table.case-table th .term { border-bottom: 0; margin-left: 2px; color: var(--text-3); }
table.case-table th a[aria-current] { color: var(--text); }
/* toolbar: right-aligned group (mockup inline style) */
.toolbar-right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.toolbar form[role="search"] .input { height: 32px; width: 240px; }
/* filter popover (plain <details>, opens without JS) */
.menu.filter-menu { width: min(760px, 80vw); padding: 0; }
.menu.filter-menu .grid-3 { gap: 12px; }
.menu.filter-menu select[multiple] { width: 100%; min-height: 112px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; padding: 4px; }
.menu.filter-menu .toolbar { border-bottom: 0; padding: 12px 0 0; }
/* vertical stack of cards with the page gap */
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
/* list cards: the table sits flush in the card (mockup .list-card) */
.list-card { overflow: hidden; }
.list-card > .card-h + .table-wrap { margin-top: 12px; }
/* board approval banner (mockup .board-banner) */
.callout.violet { background: var(--violet-soft); color: var(--violet); }
.callout.violet b { font-weight: 650; }
.callout.red { background: var(--red-soft); color: var(--red); }
/* drawer case header (mockup .drawer .case-no / h2 / .meta) */
.drawer-case .case-no { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.drawer-case h2 { font-size: 20px; letter-spacing: -.02em; margin: 8px 0 4px; font-weight: 650; }
.drawer-case .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--text-2); font-size: 13px; margin-top: 8px; }
.drawer-case .meta span { display: inline-flex; align-items: center; gap: 6px; }
.drawer-case .drawer-f { margin: 24px -22px -24px; position: sticky; bottom: -24px; background: var(--surface); }
/* stat row: long "local · EUR" pairs wrap instead of overflowing */
.stat-row .v .money-pair { white-space: normal; }
.stat-row .v .money-pair .money-eur { display: block; font-size: 13px; font-weight: 550; }
/* "Why?" tooltip on table values */
.term.why { border-bottom-style: dotted; }
.term.why code, .tip code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: #9be14a; }
/* history timeline: change rows */
.history-changes > div { font-size: 13px; }
.history-email { color: var(--text-3); }
.drawer-h-row { display: flex; }
/* drawer: close button sits in the case-number row (mockup .drawer .close) */
.drawer > .drawer-h { position: absolute; top: 0; right: 0; z-index: 3; padding: 18px 22px 0; }
.drawer > .drawer-b { padding-top: 18px; }
.drawer-case .case-no { padding-right: 42px; min-height: 34px; }
.drawer-case .case-no .icon-btn { width: 34px; height: 34px; }
.drawer-case h2 + .muted { margin: 0; }
.stat-row .v.acc { color: var(--accent-strong); }
/* case page: the first section in a card starts at the card padding */
.card-b > .section-t:first-child, .card-b > .case-history:first-child > .section-t:first-child { margin-top: 0; }
.drawer-case .callout.violet { padding: 10px 12px; }
.drawer-case .drawer-f .spacer { flex: 1; }
/* lead pixel round: mockup faelle.html list card, search, write-off, totals, columns menu */
.cases-card .table-wrap, .list-card .table-wrap { max-height: calc(100vh - 318px); }
.search { position: relative; width: 220px; }
.search .icon { position: absolute; left: 10px; top: 10px; color: var(--text-3); pointer-events: none; }
.toolbar form[role="search"] .search .input { padding-left: 32px; height: 32px; width: 100%; }
table.case-table td.nowrap { white-space: nowrap; }
table.case-table td.wo { white-space: nowrap; }
table.case-table td.wo-due { color: var(--red); font-weight: 550; }
table.case-table td.wo-due .icon { vertical-align: -2px; }
table.case-table .tfoot-l { display: flex; align-items: center; gap: 10px; font-weight: 550; }
table.case-table .tfoot-l .faint { font-weight: 500; }
table.case-table tfoot td.acc { color: var(--accent-strong); }
/* "Why?" values look like plain figures (mockup); the dotted cue appears on hover/focus */
table.case-table .term.why { border-bottom-color: transparent; }
table.case-table .term.why:hover, table.case-table .term.why:focus-visible { border-bottom-color: currentColor; }
.menu.cols-menu { min-width: 240px; padding: 6px; }
.menu.cols-menu .cols-opt { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; }
.menu.cols-menu .cols-opt:hover { background: var(--surface-3); }
.menu.cols-menu .cols-actions { display: flex; justify-content: flex-end; padding: 6px 4px 2px; border-top: 1px solid var(--border); margin-top: 4px; }
/* ---- end W3 ---- */

/* ---------- Übersicht: "Nach Gesellschaft" compact table (lead, pixel round) ---------- */
.page-overview .ent-card > summary.card-h { padding-bottom: 14px; }
.page-overview .ent-card[open] > summary.card-h { padding-bottom: 12px; }
.page-overview .ent-wrap { border-top: 1px solid var(--border); }
.page-overview table.ent-table { font-size: 12.5px; table-layout: auto; }
.page-overview table.ent-table th, .page-overview table.ent-table td { padding: 8px 10px; }
.page-overview table.ent-table thead th { font-size: 11.5px; position: static; }
.page-overview table.ent-table thead tr.grp th.g { text-align: center; color: var(--text-3); font-weight: 550; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; border-left: 1px solid var(--border); }
.page-overview table.ent-table thead tr.grp th.g-total { text-align: right; vertical-align: bottom; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--text-2); }
.page-overview table.ent-table thead th.g-first { border-left: 1px solid var(--border); }
.page-overview table.ent-table th.c-ent { position: sticky; left: 0; z-index: 1; text-align: left; background: var(--surface); min-width: 180px; max-width: 220px; }
.page-overview table.ent-table thead th.c-ent { background: var(--surface-2); vertical-align: bottom; z-index: 3; }
.page-overview table.ent-table tbody th.c-ent { font-weight: 550; font-size: 12.5px; color: var(--text); border-bottom: 1px solid var(--border); padding-left: 20px; }
.page-overview table.ent-table thead th.c-ent { padding-left: 20px; }
.page-overview table.ent-table .ent-name { display: block; max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.page-overview table.ent-table .ent-name:hover { color: var(--accent); }
.page-overview table.ent-table td.zero a { color: var(--text-3); }
.page-overview table.ent-table td a { color: inherit; }
.page-overview table.ent-table td a:hover { color: var(--accent); text-decoration: underline; }
.page-overview table.ent-table td.sum { font-weight: 550; }
.page-overview table.ent-table tbody tr:hover th.c-ent { background: var(--surface-2); }
.page-overview table.ent-table tfoot th, .page-overview table.ent-table tfoot td { position: static; background: var(--surface-2); font-weight: 650; border-top: 1px solid var(--border-strong); border-bottom: 0; box-shadow: none; padding: 10px; }
.page-overview table.ent-table tfoot th.c-ent { background: var(--surface-2); padding-left: 20px; }
.page-overview .ent-foot { padding: 10px 20px 14px; margin: 0; }

/* ---------- Wechselkurse (mockup v3.6 wechselkurse.html, lead) ---------- */
.page-fx .fixbox { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: start; padding: 16px 20px; margin-bottom: 16px; border-left: 4px solid var(--accent); }
.page-fx .fixbox .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.page-fx .fixbox h2 { margin: 0; font-size: 15px; font-weight: 650; display: flex; gap: 8px; align-items: center; }
.page-fx .fixbox p { margin: 6px 0 0; color: var(--text-2); font-size: 13px; max-width: 900px; }
.page-fx .fixbox .facts { display: grid; gap: 4px; font-size: 12.5px; color: var(--text-2); min-width: 260px; }
.page-fx .fixbox .facts b { color: var(--text); font-weight: 600; }
.page-fx .fxchips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 0; }
.page-fx .fxchips a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-size: 12px; font-weight: 600; }
.page-fx .fxchips a:hover { color: var(--text); }
.page-fx .fxchips a.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.page-fx .fxwrap { margin: 12px 20px 0; max-height: 560px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.page-fx table.fxt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.page-fx table.fxt th, .page-fx table.fxt td { padding: 7px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.page-fx table.fxt thead th { position: sticky; top: 0; z-index: 3; background: var(--surface-2); font-weight: 600; color: var(--text-2); }
.page-fx table.fxt thead th a { color: inherit; }
.page-fx table.fxt thead th a:hover { color: var(--accent); }
.page-fx table.fxt th:first-child, .page-fx table.fxt td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); text-align: left; box-shadow: 1px 0 0 var(--border); font-weight: 400; color: var(--text); }
.page-fx table.fxt thead th:first-child { z-index: 4; background: var(--surface-2); font-weight: 600; color: var(--text-2); }
.page-fx table.fxt tbody th b { font-weight: 600; }
.page-fx table.fxt tr.cur td { background: var(--accent-soft); }
.page-fx table.fxt tr.cur th:first-child { background: color-mix(in srgb, var(--accent-soft) 100%, var(--surface)); }
.page-fx table.fxt td.sel, .page-fx table.fxt th.sel { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.page-fx table.fxt tbody tr:last-child th, .page-fx table.fxt tbody tr:last-child td { border-bottom: 0; }
.page-fx table.fxt .badge { height: 18px; font-size: 11px; margin-left: 4px; }
.page-fx .fxfoot { padding: 10px 20px 16px; font-size: 12px; color: var(--text-3); margin: 0; }
.page-fx .fxgrid { display: grid; grid-template-columns: 1fr 360px; gap: 16px; align-items: start; }
.page-fx .fxgrid > * { min-width: 0; }
.page-fx .fxchart-card { position: sticky; top: 72px; }
.page-fx .fxchart-card .card-h form { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.page-fx .fxchart { height: 280px; padding: 0 8px; }
.page-fx .sel-sm { height: 30px; width: auto; font-size: 12.5px; padding: 0 30px 0 10px; max-width: 170px; }
@media (max-width: 1100px) { .page-fx .fxgrid { grid-template-columns: 1fr; } .page-fx .fxchart-card { position: static; } .page-fx .fixbox { grid-template-columns: auto 1fr; } .page-fx .fixbox .facts { grid-column: 1 / -1; } }

/* ---- W12 glossary (IDEA-0012): intro card and per-term meta, scoped to the glossary page ---- */
.page-glossary .g-intro { padding: 16px 18px; margin-bottom: 20px; }
.page-glossary .g-intro h2 { font-size: 14.5px; font-weight: 650; margin: 0; letter-spacing: -.01em; }
.page-glossary .g-intro p { margin: 8px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
.page-glossary .g-intro p.faint { color: var(--text-3); font-size: 12.5px; }
.page-glossary .g-meta { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); display: grid; gap: 4px; font-size: 12.5px; }
.page-glossary .g-meta > div { display: grid; grid-template-columns: 120px 1fr; gap: 8px; }
.page-glossary .g-meta dt { color: var(--text-3); }
.page-glossary .g-meta dd { margin: 0; color: var(--text-2); }
.page-glossary .g-meta code { font-size: 11.5px; white-space: nowrap; }
.page-glossary .g-meta dd a + a { margin-left: 4px; }
.page-glossary tr[id] { scroll-margin-top: 80px; }
.page-glossary tr[id]:target { background: var(--surface-3); }
/* ---- end W12 ---- */
.case-table tbody tr:has([data-testid="case-link"]) { cursor: pointer; } /* row click opens the case (ui.js) */
/* import report: long detail lists collapsed (click-through 2026-11-11), errors stay open */
.ie-sec { margin: 12px 0; border-top: 1px solid var(--border); padding-top: 8px; }
.ie-sec > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.ie-sec > summary::marker { color: var(--text-3); }
.ie-sec > summary h3 { display: inline; margin: 0; }
/* narrow screens (tablet portrait / phone): the sidebar becomes a top block, the page uses
   the full width (click-through 2026-11-11 — at 390 px the sidebar took half the screen) */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  body:has(.app) { background: var(--bg); }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 12px; }
  .sidebar .brand { padding-bottom: 10px; }
  .sidebar .nav-group { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
  .sidebar .nav-label { display: none; }
  .sidebar .nav-item { padding: 6px 10px; }
  .sidebar .search-btn { margin-bottom: 10px; }
  .sidebar-foot { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .topbar { height: auto; min-height: 56px; padding: 8px 16px; flex-wrap: wrap; }
  .content { padding: 8px 16px 40px; }
  .page-head { flex-wrap: wrap; align-items: flex-start; }
  .page-head .actions { margin-left: 0; }
  .app-foot { padding: 12px 16px 16px; }
  .period-card .row { gap: 12px; }
  .kpis, .kpis.k3 { grid-template-columns: minmax(0, 1fr); }
  .views { overflow-x: auto; }
}
.status-widget__month .sel-sm { height: 30px; width: auto; font-size: 12.5px; padding: 0 30px 0 10px; }
/* entity chips of the monthly report (ADR-0010): short label + status colour + icon */
.echips { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.echip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.echip:hover { filter: brightness(.96); text-decoration: none; }
.echip-ic { font-family: var(--font); font-weight: 700; opacity: .8; }
/* new / changed cases in the period: orange count (chip, tabs, hint) and highlighted case rows */
.echip-n, .chg-n { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--chg); color: var(--chg-t); font-size: 10.5px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.echip-n { margin-left: -3px; }
.chg-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; color: var(--text-2); }
table.t tbody tr.chg td { background: var(--chg-soft); }
table.t tbody tr.chg td:first-child { box-shadow: inset 3px 0 0 var(--chg); }
table.t tbody tr.chg:hover td { background: color-mix(in srgb, var(--chg) 14%, var(--surface)); }
.chg-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--chg); color: var(--chg-t); font-family: var(--font); font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
/* Gesellschaften: flat compact list, flag + name, filter bar on top (human, 2026-11-12) */
[data-testid="entity-list"] .toolbar .search .input { padding-left: 32px; height: 32px; width: 100%; }
[data-testid="entity-list"] .toolbar .sel-sm { height: 32px; width: auto; font-size: 12.5px; padding: 0 30px 0 10px; max-width: 200px; }
table.entity-table td, table.entity-table tbody th[scope="row"] { padding: 6px 12px; }
table.entity-table tbody th[scope="row"] { position: static; z-index: auto; background: none; text-align: left; font-size: 13.5px; color: var(--text); border-bottom: 1px solid var(--border); white-space: normal; }
table.entity-table tbody tr:hover th[scope="row"] { background: var(--surface-2); }
table.entity-table .ent { display: inline-flex; align-items: center; gap: 10px; }
table.entity-table .ent-flag { display: inline-flex; width: 20px; justify-content: center; flex: none; color: var(--text-3); }
table.entity-table .status-chip { padding-top: 1px; padding-bottom: 1px; }
table.entity-table tr.empty td { text-align: center; padding: 24px 12px; cursor: default; }
.flag-img { display: inline-block; width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(16,24,40,.12); vertical-align: middle; object-fit: cover; }
.period-bar .pb-done { background: var(--accent-bright); } .period-bar .pb-late { background: var(--red); } .period-bar .pb-open { background: var(--amber-dot); opacity: .55; }
.period-card .row > span { white-space: nowrap; }
/* local instance: switch user menu */
.menu form { margin: 0; }
.menu .menu-item { display: flex; width: 100%; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.menu .menu-item:hover { background: var(--surface-3); }
.menu .menu-item.on { color: var(--accent-strong); font-weight: 600; }
.local-switch > .menu { min-width: 260px; max-height: 60vh; overflow: auto; }
/* Kosten nach Kanzlei: Geschätzt / Bezahlt / Beides (IDEA-0014) */
.page-overview .fcases .fc.fc4 { grid-template-columns: 96px minmax(0, 1fr) 150px 130px; }
.page-overview .firm-legend { display: flex; align-items: center; gap: 14px; padding: 0 20px 6px; font-size: 12px; color: var(--text-2); }
.page-overview .firm-legend .right-hint { margin-left: auto; }
.paid-chip i.sw-est { background: color-mix(in srgb, var(--text) 22%, transparent); }
.paid-chip i.sw-paid { background: var(--accent); }
.bar-row .track .paid-solid { background: var(--accent); opacity: 1; }
/* FX page: provisional fixing (amber, mockup) vs fixed (green); live ECB tiles */
.page-fx .fixbox.prov { border-left-color: var(--amber-dot); }
.page-fx .fixbox.prov .ic { background: var(--amber-soft); color: var(--amber); }
.page-fx .fixbox .tone-prov { color: var(--amber); } .page-fx .fixbox .tone-ok { color: var(--accent); }
.page-fx .fixbox .fix-form { margin-top: 6px; }
.page-fx .live-card { margin-bottom: 16px; }
.page-fx .live-card .live-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.page-fx .live { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; padding: 14px 20px 18px; }
.page-fx .rate { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; position: relative; background: var(--surface); }
.page-fx .rate .hd { display: flex; gap: 8px; align-items: baseline; }
.page-fx .rate .cc { font-weight: 700; font-size: 13.5px; letter-spacing: .02em; }
.page-fx .rate .v { font-size: 17px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.page-fx .rate .v small { font-size: 12px; color: var(--text-3); font-weight: 500; }
/* "Cut-off rates" view (ADR-0014): month switcher; a month without rates greys every tile */
.page-fx .live-card .card-h { flex-wrap: wrap; gap: 10px 14px; }
.page-fx #fx-live, .page-fx #fx-history { scroll-margin-top: 76px; } /* below the sticky topbar */
.page-fx .rate.off { background: var(--surface-2); color: var(--text-3); border-style: dashed; }
.page-fx .rate.off .cc, .page-fx .rate.off .v { color: var(--text-3); }
.seg span.off { white-space: nowrap; padding: 4px 10px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-3); opacity: .5; cursor: not-allowed; }
.page-fx tr.ref th b { font-weight: 550; color: var(--text-2); }
.page-fx .rate .ft { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); margin-top: 2px; min-height: 16px; }
.page-fx .rate .spark { position: absolute; right: 10px; top: 12px; }
/* cut-off rates per currency (ADR-0017): proposals, values by hand, official rate beside them */
.page-fx #fx-cutoff-rates { margin-bottom: 16px; scroll-margin-top: 76px; }
.page-fx table.fxcr tbody tr { cursor: default; }
.page-fx table.fxcr tbody th { position: static; background: none; font-weight: 650; color: var(--text); text-transform: none; letter-spacing: .02em; font-size: 13.5px; }
.page-fx table.fxcr tbody tr:hover td { background: none; }
.page-fx table.fxcr .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.page-fx table.fxcr .rate-in { width: 130px; height: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.page-fx table.fxcr .badge { height: 20px; font-size: 11.5px; }
.page-fx .fxcr-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px 14px; }
.page-fx .fxcr-foot .fxfoot { padding: 0; margin: 0; }
.page-fx .fxlog { padding: 0 20px 14px; font-size: 12.5px; }
.page-fx .fxlog summary { cursor: pointer; color: var(--text-2); font-weight: 550; padding: 6px 0; }
.page-fx .fxlog ul { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 3px; }
/* source of a value that is not from the ECB (NBU, NBS, BCCh — ADR-0017); full name in the title */
.page-fx .src { font-size: 10.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; line-height: 15px; }
.chg-up { color: var(--red); } .chg-down { color: var(--accent); }

/* ---------- Übersicht over time (ADR-0012, mockup uebersicht.html) ---------- */
.cutoff-picker .mgrid .off { display: flex; justify-content: center; padding: 6px 0; color: var(--text-3); opacity: .5; cursor: default; border-radius: 6px; }
.hist-banner .hist-sub { font-size: 12.5px; opacity: .9; }
.seg .off { white-space: nowrap; padding: 4px 10px; font-size: 12.5px; font-weight: 550; color: var(--text-3); opacity: .45; cursor: default; }
.seg-sm a, .seg-sm .off { padding: 3px 10px; font-size: 12px; }
.page-overview .grid-2 { align-items: stretch; }
.page-overview .card.prov { display: flex; flex-direction: column; }
.page-overview .provsub { display: flex; align-items: center; gap: 10px; padding: 10px 20px 0; }
.page-overview .provsel { display: flex; align-items: center; gap: 2px; margin: 0; }
.page-overview .provsel .icon-btn { width: 28px; height: 28px; }
.page-overview .provsel .icon-btn.off { opacity: .35; pointer-events: none; }
.page-overview .trend-sub { font-size: 12.5px; padding: 4px 20px 0; }
.page-overview .trend-stats { display: flex; gap: 28px; padding: 14px 20px 0; }
.page-overview .trend-stats .k { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.page-overview .trend-stats .k i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.page-overview .trend-stats .k i.round { border-radius: 99px; }
.page-overview .trend-stats .v { font-size: 18px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sw-accent { background: var(--accent); } .sw-muted { background: var(--text-3); } .sw-amber { background: var(--amber-dot); }
.sw-total { background: var(--text-2); } .sw-up { background: var(--red); } .sw-down { background: var(--accent); }
.page-overview .prov-chart { flex: 1; min-height: 300px; padding: 0 12px 4px; }
.page-overview .topcases { border-top: 1px solid var(--border); padding: 12px 20px 16px; }
.page-overview .topcases .h { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.page-overview .topcases .h b { color: var(--text); }
.page-overview .topcases .row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.page-overview .topcases .row > a, .page-overview .topcases .row > .tc { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px; display: grid; gap: 1px; background: var(--surface); color: inherit; min-width: 0; }
.page-overview .topcases .row > a:hover { border-color: var(--text-3); }
.page-overview .topcases .mono { font-weight: 600; }
.page-overview .topcases .cp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-overview .topcases .n { font-weight: 650; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.page-overview .topcases .bar { height: 4px; border-radius: 99px; background: var(--surface-3); margin-top: 5px; overflow: hidden; }
.page-overview .topcases .bar i { display: block; height: 100%; background: var(--accent); }
.page-overview .firm.frozen .bar-row { cursor: default; }
/* paid settlements */
.page-overview .settle-head { display: flex; align-items: flex-end; gap: 16px; }
.page-overview .settle-head .badge { margin-left: auto; }
.page-overview .settle-head .faint { font-size: 12.5px; margin-top: 4px; }
.page-overview .settle-big { font-size: 30px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.page-overview .settle-big small { font-size: 15px; font-weight: 550; color: var(--text-2); margin-left: 4px; }
.page-overview .settle-stack { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin: 14px 0 6px; }
.page-overview .settle-stack span { display: block; height: 100%; }
.page-overview .settle-stack .lead { background: var(--accent); }
.page-overview .settle-stack .rest { background: var(--text-3); opacity: .55; }
.page-overview .srow { display: grid; grid-template-columns: minmax(0, 1fr) 70px 150px 18px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13px; color: inherit; }
.page-overview .srow.lead { background: var(--accent-soft); margin: 0 -20px; padding: 9px 20px; border-top-color: transparent; }
.page-overview .srow .who { display: flex; gap: 8px; align-items: center; min-width: 0; }
.page-overview .srow .cp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-overview .srow .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.page-overview .srow .num .faint { font-weight: 500; font-size: 12px; }
.page-overview .srow .go { color: var(--text-3); }
.page-overview a.srow:hover .cell-main, .page-overview a.srow:hover .mono { text-decoration: underline; }
.page-overview .settle-lbl { margin: 18px 0 6px; font-size: 12px; color: var(--text-3); }
.nf-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); margin: 4px 0 0; }
.page-overview .kpi .spark { top: 18px; }
@media (max-width: 1100px) {
  .page-overview .topcases .row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ie .snap-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.ie .snap-form .input { flex: 1 1 220px; }

/* ---------- messages (IDEA-0015, mockup app.js thread / askDialog / msgDialog) ---------- */
.qthread .qlink { display: block; color: inherit; }
.qthread > li:has(.qlink):hover { border-color: var(--border-strong); }
.qthread > li.unread { border-left: 3px solid var(--blue); }
.qthread .kind { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.qthread .when { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.qthread .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--blue); display: inline-block; }
.qthread .qt { color: var(--text); }
.qthread .pre, .qthread .qt.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.qthread.posts > li.from-other { background: var(--surface-2); }
.qempty { font-size: 13px; margin: 0 0 12px; }
.case-messages .qthread { margin-bottom: 10px; }
.case-messages .ask-row { margin-top: 4px; }
.qr { display: grid; gap: 8px; margin-top: 14px; }
.qr-f { display: flex; align-items: center; gap: 10px; justify-content: space-between; font-size: 12px; }
.rchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 99px; font-size: 12.5px; background: var(--surface-2); }
.rchip.pick { cursor: pointer; display: inline-flex; flex-wrap: nowrap; font-weight: 500; }
.rchip .nm { white-space: nowrap; font-weight: 600; }
.rchip.pick:has(input:checked) { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.form-card { max-width: 760px; }
.form-card .form-grid { display: grid; gap: 16px; }
.form-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-card legend, .form-card .field > label, .form-card .field > .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-card legend .faint, .form-card .lbl .faint { font-weight: 500; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.form-foot > .faint:first-child { margin-right: auto; font-size: 12px; }
.seg .seg-opt { white-space: nowrap; padding: 4px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--text-2); cursor: pointer; }
.seg .seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg .seg-opt:has(input:checked) { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 0 0 1px var(--border); }
.seg .seg-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.lower-l { display: grid; gap: 16px; align-content: start; }
.bell-wrap > summary { list-style: none; position: relative; }
.bell-wrap > summary::-webkit-details-marker { display: none; }
.bell-wrap .pop-menu { width: 340px; padding: 0; overflow: hidden; }
.bell-wrap .pop-menu .pop-i { border-radius: 0; color: inherit; justify-content: flex-start; }
.bell-wrap .pop-menu .pop-i > span:last-child { display: grid; }
.bell-wrap .pop-menu a.pop-f { display: flex; gap: 4px; align-items: center; justify-content: flex-start; border-radius: 0; font-weight: 600; color: var(--accent); }
.form-card .seg { justify-self: start; }
.ie .snap-date { flex-basis: 100%; font-size: 12.5px; }
.ie .snap-date > summary { cursor: pointer; }
.ie .snap-date[open] { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.ie .snap-date[open] > summary { flex-basis: 100%; }
.ie .snap-howto { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; margin: 10px 0 0; }
