/* Schriften lokal eingebunden (Source Serif 4 + Mulish, SIL Open Font License) – kein Abruf bei Google */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/source-serif-4-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Mulish"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/mulish-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Mulish"; font-style: normal; font-display: swap; font-weight: 200 1000;
  src: url(fonts/mulish-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
/* ================= Slow Compounding – Design-Tokens =================
   "Paper & Forest": Creme-Papier, Evergreen-Marke, warme Tinte.
   Hell = Standard aus dem Design System; Dunkel = Evergreen-Fläche mit Creme-Schrift. */
:root {
  --page: #F5E9D9; --surface: #FBF3E7; --sunken: #EFE0CC;
  --ink: #2B2823; --ink-2: #5A534A; --muted: #756C62;
  --grid: #E9DAC4; --axis: #D6C3A8; --border: #E4D3BB; --wash: rgba(43,40,35,0.05); --band: rgba(120,92,52,0.07);
  --brand: #0A3D2E; --brand-ink: #16432F; --brand-hover: #1C5A41; --on-brand: #F3EEE4;
  --accent: #2E6B51; --link: #2E6B51; --link-hover: #16432F;
  --btn-bg: #16432F; --btn-fg: #F3EEE4; --btn-hover: #1C5A41;
  --buy: #2E9A3B; --sell: #9E2B90; --buy-text: #1F6E2A; --sell-text: #8A2480;
  --ok: #2E6B51; --err: #A33A2F; --star: #B7861B;
  --shadow-sm: 0 1px 3px rgba(43,40,35,0.08), 0 1px 2px rgba(43,40,35,0.04);
  --shadow-md: 0 4px 14px rgba(43,40,35,0.10);
  --focus: 0 0 0 3px rgba(46,107,81,0.35);
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Mulish", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.4,0,0.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0C211A; --surface: #122B22; --sunken: #0E251D;
    --ink: #F3EEE4; --ink-2: #CFC6B8; --muted: #A39A8E;
    --grid: #1D3A2F; --axis: #2D4A3E; --border: rgba(243,238,228,0.12); --wash: rgba(243,238,228,0.06); --band: rgba(243,238,228,0.045);
    --brand: #0A3D2E; --brand-ink: #8FB6A4; --brand-hover: #A9C8BA; --on-brand: #F3EEE4;
    --accent: #8FB6A4; --link: #8FB6A4; --link-hover: #CFE0D7;
    --btn-bg: #F3EEE4; --btn-fg: #0A3D2E; --btn-hover: #E4D3BB;
    --buy: #33A040; --sell: #C24DB3; --buy-text: #6CCB76; --sell-text: #E08AD3;
    --ok: #8FB6A4; --err: #E8857A; --star: #E2B34A;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.30); --shadow-md: 0 6px 18px rgba(0,0,0,0.35);
    --focus: 0 0 0 3px rgba(143,182,164,0.40);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #0C211A; --surface: #122B22; --sunken: #0E251D;
  --ink: #F3EEE4; --ink-2: #CFC6B8; --muted: #A39A8E;
  --grid: #1D3A2F; --axis: #2D4A3E; --border: rgba(243,238,228,0.12); --wash: rgba(243,238,228,0.06); --band: rgba(243,238,228,0.045);
  --brand: #0A3D2E; --brand-ink: #8FB6A4; --brand-hover: #A9C8BA; --on-brand: #F3EEE4;
  --accent: #8FB6A4; --link: #8FB6A4; --link-hover: #CFE0D7;
  --btn-bg: #F3EEE4; --btn-fg: #0A3D2E; --btn-hover: #E4D3BB;
  --buy: #33A040; --sell: #C24DB3; --buy-text: #6CCB76; --sell-text: #E08AD3;
  --ok: #8FB6A4; --err: #E8857A; --star: #E2B34A;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.30); --shadow-md: 0 6px 18px rgba(0,0,0,0.35);
  --focus: 0 0 0 3px rgba(143,182,164,0.40);
  color-scheme: dark;
}
* { box-sizing: border-box; }
.sw { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:6px; }
body { margin: 0; background: var(--page); color: var(--ink);
  font: 15px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; transition: background-color .32s var(--ease), color .32s var(--ease); }
a { color: var(--link); } a:hover { color: var(--link-hover); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 24px 16px 48px; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
h1 { font-family: var(--font-serif); font-size: 30px; font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
h2 { font-family: var(--font-serif); font-size: 20px; font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: -0.005em; }
.meta { color: var(--muted); font-size: 13px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
input[type=text], input[type=date], select {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis);
  border-radius: 8px; padding: 6px 10px; height: 36px; min-width: 0; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
input[type=text] { width: 220px; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }
.seg { display: inline-flex; border: 1px solid var(--axis); border-radius: 8px; overflow: hidden; height: 36px; background: var(--surface); }
.seg button { font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--ink-2); padding: 0 10px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--axis); }
.seg button[aria-pressed=true] { background: var(--sunken); color: var(--ink); font-weight: 700; box-shadow: inset 0 -2px 0 var(--brand-ink); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; width: 100%; padding-top: 4px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink-2); cursor: pointer; }
input[type=checkbox] { accent-color: var(--brand-ink); width: 16px; height: 16px; }
.btn { font: inherit; font-size: 14px; font-weight: 600; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--axis); transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease);
  background: var(--surface); color: var(--ink); cursor: pointer; }
.btn:hover { background: var(--sunken); }
.btn:active { transform: scale(.985); }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.kpi .label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi .val { font-family: var(--font-serif); font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; margin: 4px 0 2px; }
.kpi .sub { font-size: 12px; color: var(--muted); }
.buy-t { color: var(--buy-text); } .sell-t { color: var(--sell-text); }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
#chart { position: relative; }
#chart svg { display: block; width: 100%; height: auto; }  /* Höhe aus dem viewBox (chart(): 380 px, schmal 274 px) */
.tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12); border-radius: 6px; padding: 8px 10px; font-size: 12px; white-space: nowrap; display: none; z-index: 2; }
.tip b { font-weight: 600; }
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-size: 11px; padding: 8px; border-bottom: 1px solid var(--axis);
  white-space: nowrap; cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--surface); }
th.num, td.num { text-align: right; }
th[aria-sort]::after { content: ""; margin-left: 4px; }
th[aria-sort=descending]::after { content: "↓"; } th[aria-sort=ascending]::after { content: "↑"; }
td { padding: 9px 8px; border-bottom: 1px solid var(--grid); vertical-align: top; }
tbody tr:hover { background: var(--wash); }
td .s { color: var(--muted); font-size: 12px; }
.link { color: inherit; text-decoration: underline; text-decoration-color: var(--axis); cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-align: left; }
.link:hover { text-decoration-color: var(--ink); }
.tag { display: inline-block; font-size: 11px; color: var(--ink-2); border: 1px solid var(--axis); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
.tag.tag-hot { color: var(--buy-text); border-color: currentColor; font-weight: 700; }
.empty { color: var(--muted); padding: 24px 8px; text-align: center; }
.more { margin-top: 12px; display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } input[type=text] { width: 100%; } .inline > .field, .filters > .field { flex: 1 1 160px; } }

/* ---------- App-Rahmen */
.topbar { background: var(--page); border-bottom: 1px solid var(--border); }
.topbar .in { max-width: 1280px; margin: 0 auto; padding: 0 16px; height: 64px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; border-radius: 8px; display: block; box-shadow: 0 0 0 1px var(--border); }
.brand .bt { display: flex; flex-direction: column; line-height: 1.1; }
.brand .bn { font-family: var(--font-serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.brand .bs { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav { display: flex; gap: 20px; flex: 1; min-width: 0; overflow-x: auto; align-self: stretch; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 0 2px; font-size: 15px; white-space: nowrap; display: flex; align-items: center; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s var(--ease), border-color .2s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a[aria-current=page] { color: var(--ink); font-weight: 700; border-bottom-color: var(--brand-ink); }
.who { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.who form { margin: 0; }
.flash { border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; font-size: 14px; border: 1px solid var(--border); background: var(--surface); }
.flash.ok { border-left: 3px solid var(--ok); }
.flash.error { border-left: 3px solid var(--err); }
.narrow { max-width: 420px; margin: 64px auto; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack input[type=text], .stack input[type=email], .stack input[type=password], .stack input[type=number] { width: 100%; }
input[type=email], input[type=password], input[type=number] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--axis); border-radius: 6px; padding: 6px 8px; height: 32px; min-width: 0; }
.btn.primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.btn.primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.danger { color: var(--err); }
.hint { font-size: 12px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } .who span { display: none; } .topbar .in { gap: 12px; } }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.list li:last-child { border-bottom: 0; }
.list form { margin: 0; }
.star { background: none; border: 0; padding: 0 2px; margin-left: 4px; cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; vertical-align: 0; }
.star:hover { color: var(--ink); }
.star[aria-pressed=true] { color: var(--star); }
.pill { display: inline-block; font-size: 11px; border-radius: 999px; padding: 1px 8px; border: 1px solid var(--axis); color: var(--ink-2); }
.pill.ok { border-color: var(--ok); color: var(--ok); } .pill.err { border-color: var(--err); color: var(--err); }
.progress { height: 6px; background: var(--grid); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); }
label.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }

/* ---------- Vorschlagsliste */
.sg-wrap { position: relative; width: 100%; }
.sg-wrap > input { width: 100%; }
.sg-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 320px; overflow-y: auto; width: max(100%, 360px); max-width: calc(100vw - 32px); right: auto; }
.sg-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 7px 8px; border-radius: 6px; font-size: 14px; }
.sg-list li[role=option] { cursor: pointer; }
.sg-list li[aria-selected=true] { background: var(--wash); }
.sg-list mark { background: none; color: inherit; font-weight: 600; }
.sg-name { flex: 1 1 auto; }
.sg-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sg-empty, .sg-more { color: var(--muted); font-size: 13px; cursor: default; }
.sg-status { font-size: 12px; margin-top: 6px; min-height: 18px; }
.sg-status.ok { color: var(--ink-2); }
.sg-status.warn { color: var(--err); }
@media (max-width: 600px) { .sg-list { width: 100%; max-width: none; } }
.hint a, .flash a { color: inherit; text-decoration: underline; }

/* ---------- Ladebalken (alle Seiten) */
.loadbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.loadbar .in { max-width: 1280px; margin: 0 auto; padding: 10px 16px 8px; display: flex; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 13px; }
.lb-text { color: var(--ink); font-weight: 500; }
.lb-num { color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-track { height: 4px; background: var(--grid); overflow: hidden; position: relative; }
.lb-fill { height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }
.loadbar.indet .lb-fill { width: 30% !important; position: absolute; animation: lb-slide 1.4s ease-in-out infinite; }
@keyframes lb-slide { from { left: -30%; } to { left: 100%; } }
.loadbar.done .lb-fill { background: var(--ok); }
.loadbar.err .lb-fill { background: var(--err); }
.loadbar.err .lb-text { color: var(--err); }
@media (prefers-reduced-motion: reduce) { .loadbar.indet .lb-fill { animation: none; left: 0; width: 100% !important; opacity: .5; } }

/* ---------- Theme-Schalter */
.theme { display: inline-flex; border: 1px solid var(--axis); border-radius: 999px; padding: 2px; gap: 2px; background: var(--surface); }
.theme button { width: 30px; height: 30px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 0; transition: background-color .2s var(--ease), color .2s var(--ease); }
.theme button:hover { color: var(--ink); }
.theme button[aria-pressed=true] { background: var(--sunken); color: var(--ink); }
.theme svg { width: 16px; height: 16px; }
.who { gap: 12px; }
/* Login */
.login-logo { display: block; width: 96px; height: 96px; border-radius: 16px; margin: 0 auto 16px; box-shadow: var(--shadow-md); }
.login-title { text-align: center; }
.login-sub { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 20px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .brand .bt { display: none; } .nav { gap: 14px; } }

/* ---------- Zusammensetzung eines Balkens */
.dt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 860px) { .dt-grid { grid-template-columns: 1fr; gap: 24px; } }
.dt-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dt-total { font-family: var(--font-serif); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dt-total small { font-family: var(--font-sans); font-size: 12px; font-weight: 400; color: var(--muted); }
.dt-row { padding: 12px 0; border-bottom: 1px solid var(--grid); }
.dt-row:last-child { border-bottom: 0; }
.dt-head { display: flex; align-items: baseline; gap: 4px; }
.dt-iss { font-weight: 700; color: var(--ink); }
.dt-val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.dt-bar { height: 4px; background: var(--grid); border-radius: 2px; margin: 6px 0 6px; overflow: hidden; }
.dt-bar span { display: block; height: 100%; border-radius: 2px; }
.dt-bar .buy { background: var(--buy); } .dt-bar .sell { background: var(--sell); }
.dt-persons { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.dt-persons li { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; color: var(--ink-2); }
.dt-persons .link { color: var(--ink-2); }
.dt-pos { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.dt-v { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt-col { min-width: 0; }
.dt-title { flex-wrap: wrap; }
.dt-head .link { min-width: 0; overflow-wrap: anywhere; text-align: left; }
#detail .row-head .inline { flex-wrap: wrap; }

/* ---------- Dashboard-Kopf: zeigt die aktuelle Auswahl */
.dash-head { align-items: flex-end; }
.dash-head h1 { margin-top: 4px; overflow-wrap: anywhere; }
.dash-head h1 .star { font-size: 22px; vertical-align: 4px; margin-left: 8px; }
.dash-sub { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
.dash-count { font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--muted); vertical-align: 5px; margin-left: 4px; }
.dash-sep { color: var(--muted); font-weight: 400; }

.chart-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.seg-sm { height: 30px; } .seg-sm button { font-size: 13px; padding: 0 10px; }
.seg button:disabled { color: var(--axis); cursor: not-allowed; }

/* ---------- Seitennavigation Einzelmeldungen */
.pager-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pg { font: inherit; font-size: 14px; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--axis);
  background: var(--surface); color: var(--ink-2); cursor: pointer; font-variant-numeric: tabular-nums; transition: background-color .2s var(--ease); }
.pg:hover:not(:disabled) { background: var(--sunken); color: var(--ink); }
.pg[aria-current=page] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); font-weight: 700; }
.pg:disabled { opacity: .4; cursor: default; }
.pg-gap { color: var(--muted); padding: 0 4px; }
/* Menü: keine Scrollleiste (nur bei sehr schmalen Fenstern wischbar) */
.nav { overflow-y: hidden; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.sg-list li.sg-head { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 4px; cursor: default; }
td.role { color: var(--ink-2); font-size: 13px; max-width: 220px; }
.nw { white-space: nowrap; }
.who-cell { min-width: 200px; }

td.src a { font-size: 12px; font-weight: 700; white-space: nowrap; text-decoration: none; padding: 3px 7px; border: 1px solid var(--axis); border-radius: 6px; color: var(--link); }
td.src a:hover { background: var(--sunken); color: var(--link-hover); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.field > span.hint { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; color: var(--muted); }
/* Vorschläge: Umschalter Alle / Watchlist */
.sg-list li.sg-tabs { display: flex; justify-content: flex-start; gap: 6px; padding: 4px 4px 6px; margin-bottom: 4px; border-bottom: 1px solid var(--border); cursor: default; position: sticky; top: -4px; background: var(--surface); z-index: 1; }
.sg-tab { font: inherit; font-size: 13px; border: 1px solid var(--axis); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.sg-tab[aria-pressed=true] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); font-weight: 700; }
.sg-tab .sg-n { opacity: .75; font-weight: 400; font-variant-numeric: tabular-nums; margin-left: 2px; }
.sg-star { color: var(--star); font-size: 12px; }
/* Ansicht-Umschalter mit drei Buttons: auf schmalen Bildschirmen zweizeilige Beschriftung zulassen */
#scope { height: auto; min-height: 36px; }
#scope button { line-height: 1.2; padding: 6px 10px; }

/* Land und Ticker */
.ctry { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted); border: 1px solid var(--axis); border-radius: 4px; padding: 0 4px; margin-left: 6px; line-height: 15px; vertical-align: 1px; }
.tick { margin-left: 4px; }
body.busy #main { opacity: .7; transition: opacity .2s .15s; }

/* Summenzeile Kumuliert */
#agg tfoot td { font-weight: 700; border-top: 2px solid var(--axis); position: sticky; bottom: 0; background: var(--surface); }
#agg tfoot .s { font-weight: 400; }

/* Länder-Auswahl (Dropdown mit Häkchen) */
.dd { position: relative; }
.dd-btn { font: inherit; font-size: 14px; height: 36px; min-width: 150px; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 10px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; }
.dd-caret { color: var(--muted); font-size: 11px; }
.dd-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; background: var(--surface); border: 1px solid var(--axis);
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column; }
.dd-menu[hidden] { display: none; }
.dd-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; white-space: nowrap; }
.dd-menu label:hover { background: var(--sunken); }
.dd-all { border-bottom: 1px solid var(--grid); border-radius: 6px 6px 0 0 !important; margin-bottom: 2px; font-weight: 700; }
/* Von – Bis in einer Zeile */
.range { display: flex; align-items: center; gap: 6px; }
.range span { color: var(--muted); }
@media (max-width: 600px) { .range { width: 100%; } .range input { min-width: 0; width: 0; flex: 1 1 0; } .dd-btn { width: 100%; } }

/* Admin: Historie je Land */
.loaded { font-size: 14px; font-weight: 700; padding: 8px 10px; background: var(--sunken); border-radius: 8px; }
.grid2 > .card { align-self: start; }
.hist-panel[hidden] { display: none !important; }
@media (max-width: 400px) { .who .btn { padding-left: 10px; padding-right: 10px; } }

/* Bestände der Insider (USA): Farben je Person, geprüft auf beiden Hintergründen */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s0: #CDBFAB; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s0: #3A5248; } }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s0: #3A5248; }
#hold-chart { position: relative; }
#hold-chart svg { display: block; width: 100%; height: auto; }  /* Höhe aus dem viewBox (renderHold(): 420 px, schmal 300 px) */
#hold-legend { flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
#hold-legend i { width: 14px; height: 3px; border-radius: 2px; vertical-align: 3px; }
.hb-row { display: grid; grid-template-columns: minmax(140px, 260px) 1fr minmax(0, 340px); gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--grid); }
.hb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-name .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-track { height: 10px; background: var(--sunken); border-radius: 0 4px 4px 0; }
.hb-track span { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.hb-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hb-val .s { display: block; white-space: normal; }
.hb-val .s > span + span::before { content: " · "; }
@media (max-width: 600px) { .hb-row { grid-template-columns: 1fr auto; } .hb-track { grid-column: 1 / -1; order: 3; } #hold-legend { max-width: 100%; justify-content: flex-start; } }
.hb .s { font-size: 12px; color: var(--muted); }
.dd-right { left: auto; right: 0; max-height: 320px; overflow-y: auto; }
.dd-menu .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex: none; }
.hb-row.off { opacity: .45; }
/* Bestandsgrafik: Bedienelemente bleiben oben rechts; ein längerer Untertitel bricht stattdessen um
   (nur wenn für den Titel keine ~300 px bleiben, rutschen sie in eine eigene Zeile – dann rechtsbündig) */
#hold .row-head { align-items: flex-start; }
#hold .row-head > div:first-child { flex: 1 1 300px; min-width: 0; }
#hold .row-head > .inline { flex: none; margin-left: auto; justify-content: flex-end; }
.btn-icon { width: 30px; height: 30px; padding: 0; display: inline-grid; place-items: center; color: var(--ink-2); background: var(--surface); }
#cl td:last-child { min-width: 300px; }

/* Datenprüfung (Admin) */
.grid2 > .card.eq { align-self: stretch; }  /* Historie und E-Mail-Versand gleich hoch */
.pill.warn { border-color: var(--sell-text); color: var(--sell-text); }
.audit-check { border-top: 1px solid var(--grid); padding: 10px 0; }
.audit-check summary { cursor: pointer; list-style-position: outside; }
.audit-t { margin-top: 8px; font-size: 13px; }
.audit-ex { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.audit-ex li { margin: 2px 0; overflow-wrap: anywhere; }

/* Kleine Landesflaggen (als Grafik – Flaggen-Emojis zeigt Windows nur als Buchstaben) */
.flag { display: inline-block; width: 16px; height: 11px; margin-left: 6px; vertical-align: -1px; border-radius: 2px;
  background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.flag-SE { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect width='16' height='10' fill='%23006AA7'/%3E%3Crect x='5' width='2' height='10' fill='%23FECC00'/%3E%3Crect y='4' width='16' height='2' fill='%23FECC00'/%3E%3C/svg%3E"); }
.flag-US { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 19 13'%3E%3Crect width='19' height='13' fill='%23B22234'/%3E%3Cpath d='M0 1.5h19M0 3.5h19M0 5.5h19M0 7.5h19M0 9.5h19M0 11.5h19' stroke='%23fff' stroke-width='1'/%3E%3Crect width='7.6' height='7' fill='%233C3B6E'/%3E%3C/svg%3E"); }
.flag-NL { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect width='9' height='6' fill='%2321468B'/%3E%3Crect width='9' height='4' fill='%23fff'/%3E%3Crect width='9' height='2' fill='%23AE1C28'/%3E%3C/svg%3E"); }
.flag-BE { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6'%3E%3Crect width='3' height='6' fill='%23000'/%3E%3Crect x='3' width='3' height='6' fill='%23FDDA24'/%3E%3Crect x='6' width='3' height='6' fill='%23EF3340'/%3E%3C/svg%3E"); }
#country-menu label .flag { margin-left: -2px; }  /* Abstand kommt schon vom gap des Eintrags */

/* Kumuliert: Namen dürfen umbrechen (statt die Tabelle zu verbreitern) */
#agg td.cell-wrap { white-space: normal; }
#agg td.who-cell.cell-wrap { min-width: 170px; max-width: 260px; }
#agg td.iss-cell { min-width: 150px; max-width: 230px; }
#agg td .s { white-space: nowrap; }

/* Erklärung beim Darüberfahren (sofort, ohne die Verzögerung des Browser-Tooltips) */
.has-tip { position: relative; }
/* Hinweise an Filtern (data-tip) und alle title-Angaben zeigt jetzt das gemeinsame Infofeld (static/tooltip.js, .app-tip) */
.has-tip { cursor: help; }
.has-tip input, .has-tip select { cursor: pointer; }
.ctry + .flag { margin-left: 4px; }

#metrics .metrics-grid { margin: 0; }

/* Eingabefeld mit Einheit (Mindestbetrag in der gewählten Währung) */
.input-unit { position: relative; display: inline-flex; align-items: center; }
.input-unit input { width: 150px; padding-right: 46px; }
.input-unit .unit { position: absolute; right: 10px; font-size: 13px; color: var(--muted); pointer-events: none; }
.sg-meta .flag { margin-left: 0; }

/* Filterbereich oben farblich von den Ergebnissen absetzen (grünliche Fläche in Hausfarbe, Akzent links) */
:root { --filter-bg: #E6EEE3; --filter-border: #C3D3BF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --filter-bg: #21503F; --filter-border: #3D725C; } }
:root[data-theme="dark"] { --filter-bg: #21503F; --filter-border: #3D725C; }
.card.filter-card { background: var(--filter-bg); border-color: var(--filter-border); border-left: 4px solid var(--brand-ink); }

/* Zusammensetzung des Bestands je Insider (aufklappbar, volle Breite unter der Zeile) */
.hb-parts { grid-column: 1 / -1; margin: 2px 0 6px; }
.hb-parts[hidden] { display: none; }
.hb-pt { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); cursor: pointer; }
.hb-pt::before { content: "▸ "; }
.hb-pt[aria-expanded="true"]::before { content: "▾ "; }
.hb-pt:hover { color: var(--ink-2); text-decoration: underline; }
.hb-parts-t { font-size: 13px; }
.hb-parts-t td, .hb-parts-t th { padding-top: 4px; padding-bottom: 4px; }
.hb-parts-t tr.off td { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--axis); }

/* Hinweis gemeinsame Bestände (gut sichtbar) und Vermerk je Besitzweg */
.note-shared { margin: 0 0 12px; padding: 8px 12px; font-size: 13px; line-height: 1.45; color: var(--ink-2);
  background: var(--filter-bg); border-left: 3px solid var(--brand-ink); border-radius: 0 6px 6px 0; }
.shared-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; padding: 1px 8px 1px 6px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--shared-ink); background: var(--shared-bg); border: 1px solid var(--shared-line); white-space: nowrap; }
.shared-tag::before { content: ""; width: 12px; height: 12px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.6-3.6 3.2-5.5 6.5-5.5s5.9 1.9 6.5 5.5'/%3E%3Ccircle cx='17' cy='9' r='2.8'/%3E%3Cpath d='M16 14.6c3 0 5 1.7 5.5 5.4'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2.5 20c.6-3.6 3.2-5.5 6.5-5.5s5.9 1.9 6.5 5.5'/%3E%3Ccircle cx='17' cy='9' r='2.8'/%3E%3Cpath d='M16 14.6c3 0 5 1.7 5.5 5.4'/%3E%3C/svg%3E") center / contain no-repeat; }
.hb-val .shared-tag { margin: 3px 0 0; white-space: normal; text-align: left; }
.hb-parts-t .shared-tag { display: flex; width: max-content; max-width: 100%; white-space: normal; }
.hb-val .s > span.shared-tag::before { content: ""; }
.hb-val .s > span + span.shared-tag { margin-left: 6px; }
:root { --shared-ink: #8A5A00; --shared-bg: #FBEBC7; --shared-line: #EBCB86; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shared-ink: #F1C871; --shared-bg: rgba(226,179,74,0.14); --shared-line: rgba(226,179,74,0.35); } }
:root[data-theme="dark"] { --shared-ink: #F1C871; --shared-bg: rgba(226,179,74,0.14); --shared-line: rgba(226,179,74,0.35); }

/* Einzelmeldungen: Art als Etikett – Kauf grün mit ▲, Verkauf violett mit ▼, sonstige neutral */
.side-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px;
  line-height: 1.35; font-weight: 600; color: var(--ink-2); background: var(--wash); border: 1px solid var(--border); white-space: nowrap; }
.side-pill.buy { color: var(--buy-text); background: var(--buy-bg); border-color: var(--buy-line); font-weight: 700; }
.side-pill.sell { color: var(--sell-text); background: var(--sell-bg); border-color: var(--sell-line); font-weight: 700; }
.side-pill.buy::before, .side-pill.sell::before { content: ""; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; flex: none; }
.side-pill.buy::before { border-bottom: 6px solid currentColor; }
.side-pill.sell::before { border-top: 6px solid currentColor; }
#tx td .side-pill + .s { margin-top: 3px; }
:root { --buy-bg: rgba(46,154,59,0.11); --buy-line: rgba(46,154,59,0.35); --sell-bg: rgba(158,43,144,0.09); --sell-line: rgba(158,43,144,0.32); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --buy-bg: rgba(108,203,118,0.14); --buy-line: rgba(108,203,118,0.4); --sell-bg: rgba(224,138,211,0.14); --sell-line: rgba(224,138,211,0.4); } }
:root[data-theme="dark"] { --buy-bg: rgba(108,203,118,0.14); --buy-line: rgba(108,203,118,0.4); --sell-bg: rgba(224,138,211,0.14); --sell-line: rgba(224,138,211,0.4); }

/* Filter Nahestehende: Auswahl in der Haken-Zeile */
.inline-select { display: inline-flex; align-items: center; gap: 8px; }
.inline-select select { width: auto !important; min-width: 0; max-width: 190px; padding: 4px 28px 4px 10px; min-height: 0; }

/* Signale (Heute / Cluster) */
.sg-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sg-explain { padding-top: 12px; padding-bottom: 12px; }
.sg-explain summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sg-explain p { margin: 10px 0 0; max-width: 90ch; color: var(--ink-2); font-size: 14px; line-height: 1.55; }
.sg-explain .sg-disclaimer { color: var(--ink); font-weight: 700; }
.sg-i { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
        border: 1.5px solid currentColor; font-size: 12px; font-weight: 700; font-style: italic; font-family: var(--font-serif); flex: none; }
.tag.sg-role { color: var(--muted); }
.tag.sg-active { color: var(--buy-text); border-color: currentColor; font-weight: 700; margin-left: 0; }
.sg-names { margin-top: 3px; max-width: 46ch; }
@media (max-width: 860px) { .sg-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.filters [hidden], .sg-kpis[hidden] { display: none !important; }
.sg-strip { display: block; } .sg-strip.buy rect { fill: var(--buy); } .sg-strip.sell rect { fill: var(--sell); }
.sg-tabs { display: flex; gap: 4px; margin: 0 0 14px; border-bottom: 1px solid var(--axis); }
.sg-tabs a { padding: 8px 16px; color: var(--ink-2); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 0; }
.sg-tabs a:hover { color: var(--ink); }
.sg-tabs a[aria-current=page] { color: var(--ink); border-bottom-color: var(--brand-ink); }
#sg-filters .seg button { white-space: nowrap; }
/* Signale: aufklappbare Zusammensetzung */
tr.sg-row { cursor: pointer; }
tr.sg-row:hover td { background: var(--sunken); }
tr.sg-row.open td { background: var(--sunken); border-bottom-color: transparent; }
.sg-tg { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0 6px 0 0; transition: transform .15s; display: inline-block; }
tr.sg-row.open .sg-tg { transform: rotate(90deg); color: var(--ink); }
tr.sg-dt > td { background: var(--sunken); padding-top: 0; }
.sg-dt-box { border-left: 3px solid var(--brand-ink); padding: 8px 4px 8px 14px; }
.sg-dt-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sg-dt-head .btn { margin-left: auto; }
.sg-dt-t { width: 100%; }
.sg-dt-t th, .sg-dt-t td { background: transparent !important; padding-top: 6px; padding-bottom: 6px; }
.sg-dt-t td:first-child { min-width: 220px; }
.sg-dt-name { display: flex; flex-direction: column; min-width: 0; }
.sg-dt-name .dt-pos { flex: none; white-space: normal; }
.sg-dt-t .dt-bar { margin: 5px 0 0; max-width: 260px; }
/* Signale: Knöpfe, Dropdown und Betragsfeld nicht auf Breite der (längeren) Überschrift strecken */
#sg-filters .field > .seg, #sg-filters .field > .dd, #sg-filters .field > .input-unit { align-self: flex-start; }
.sg-dt-scroll { max-height: 420px; overflow-y: auto; }
.sg-dt-t tfoot td { border-top: 2px solid var(--axis); }
/* Hauptmenü: Untermenü „Signale“ (Heute / Cluster / Serien) beim Darüberfahren bzw. per Tastatur */
.nav-dd { position: relative; display: flex; align-self: stretch; }
.nav-caret { font-size: 10px; margin-left: 5px; color: var(--muted); }
.nav-dd-menu { display: none; position: absolute; top: 100%; left: -10px; z-index: 50; min-width: 150px; padding: 6px;
               background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { display: block; }
.nav .nav-dd-menu a { display: block; padding: 8px 12px; border: 0; margin: 0; border-radius: 6px; font-weight: 400; }
.nav .nav-dd-menu a:hover, .nav .nav-dd-menu a:focus-visible { background: var(--sunken); color: var(--ink); }
@media (min-width: 861px) { .nav { overflow: visible; } }
@media (max-width: 860px) { .nav-dd-menu { display: none !important; } .nav-caret { display: none; } }
/* Signale: Sektoren-Kacheln */
/* 12 Branchen: 4 × 3, mittelbreit 3 × 4, schmal 2 × 6 – Zeilen immer voll */
.sg-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .sg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .sg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sg-tile { display: flex; flex-direction: column; gap: 4px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
           background: var(--sunken); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; transition: filter .15s; }
/* Hintergrund nach Richtung: mehr Käufe = grün, mehr Verkäufe = pink (Farben wie Kauf/Verkauf im ganzen Tool) */
.sg-tile.buy { background: color-mix(in srgb, var(--buy) 24%, var(--surface)); border-color: color-mix(in srgb, var(--buy) 55%, transparent); }
.sg-tile.sell { background: color-mix(in srgb, var(--sell) 22%, var(--surface)); border-color: color-mix(in srgb, var(--sell) 55%, transparent); }
.sg-tile:hover { filter: brightness(1.08); }
.sg-tile.on { outline: 3px solid var(--ink); outline-offset: 1px; }
.sg-tile-l { font-weight: 700; font-size: 14px; }
.sg-tile-v { font-family: var(--font-serif); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sg-tile-bars { display: flex; flex-direction: column; gap: 2px; margin: 2px 0; }
.sg-tile-bars i { display: block; height: 4px; border-radius: 2px; min-width: 2px; }
.sg-tile-bars i.buy { background: var(--buy); } .sg-tile-bars i.sell { background: var(--sell); }
/* Dashboard-Kopf: Branche eines US-Unternehmens (SIC der SEC) */
.sector-tag { font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--ink-2); text-decoration: none; vertical-align: 6px; margin-left: 10px; padding: 2px 10px; border: 1px solid var(--axis); border-radius: 999px; white-space: nowrap; }
.sector-tag:hover { color: var(--ink); border-color: var(--ink-2); }
/* Sektoren: Überblick als Schmetterlingsdiagramm (Verkäufe links, Branche Mitte, Käufe rechts) */
.sg-bars { display: flex; flex-direction: column; gap: 4px; }
.sg-bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px minmax(0, 1fr); align-items: center; gap: 10px; width: 100%;
              font: inherit; color: var(--ink); background: none; border: 1px solid transparent; border-radius: 8px; padding: 4px 6px; cursor: pointer; text-align: left; }
.sg-bar-row:hover { background: var(--sunken); }
.sg-bar-row.on { border-color: var(--ink-2); background: var(--sunken); }
.sg-bar-l { text-align: center; font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-bar-side { display: flex; align-items: center; gap: 8px; height: 22px; min-width: 0; }
.sg-bar-side.sell { justify-content: flex-end; }
.sg-bar-side i { display: block; height: 18px; min-width: 0; border-radius: 3px; }
.sg-bar-side.sell i { background: var(--sell); border-radius: 3px 0 0 3px; }
.sg-bar-side.buy i { background: var(--buy); border-radius: 0 3px 3px 0; }
.sg-bar-v { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
@media (max-width: 760px) { .sg-bar-row { grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1fr); } .sg-bar-v { font-size: 11px; } }
/* Signale: Heatmap (Kachelkarte je Land) */
.sg-heat { position: relative; width: 100%; overflow: hidden; border-radius: 8px; background: var(--sunken); }
.sg-hg { position: absolute; border: 1px solid var(--border); border-radius: 4px; box-sizing: border-box; pointer-events: none; }
.sg-hg-l { position: absolute; pointer-events: auto; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; left: 6px; top: 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 12px); }
.sg-hg-l:hover { color: var(--ink); text-decoration: underline; }
.sg-ht { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden;
         border-radius: 3px; text-decoration: none; color: var(--ink); line-height: 1.15; text-align: center; padding: 1px 3px; }
.sg-ht:hover { outline: 2px solid var(--ink); outline-offset: -1px; z-index: 2; }
.sg-ht-n { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sg-ht-v { font-size: .82em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; opacity: .9; }
.sg-ht.n0, .sg-heat-legend .n0 { background: color-mix(in srgb, var(--muted) 30%, var(--surface)); }
.sg-ht.b1, .sg-heat-legend .b1 { background: color-mix(in srgb, var(--buy) 30%, var(--surface)); }
.sg-ht.b2, .sg-heat-legend .b2 { background: color-mix(in srgb, var(--buy) 50%, var(--surface)); }
.sg-ht.b3, .sg-heat-legend .b3 { background: color-mix(in srgb, var(--buy) 70%, var(--surface)); }
.sg-ht.b4, .sg-heat-legend .b4 { background: color-mix(in srgb, var(--buy) 92%, var(--surface)); }
.sg-ht.s1, .sg-heat-legend .s1 { background: color-mix(in srgb, var(--sell) 30%, var(--surface)); }
.sg-ht.s2, .sg-heat-legend .s2 { background: color-mix(in srgb, var(--sell) 50%, var(--surface)); }
.sg-ht.s3, .sg-heat-legend .s3 { background: color-mix(in srgb, var(--sell) 70%, var(--surface)); }
.sg-ht.s4, .sg-heat-legend .s4 { background: color-mix(in srgb, var(--sell) 92%, var(--surface)); }
.sg-ht.b3, .sg-ht.b4, .sg-ht.s3, .sg-ht.s4 { color: #fff; }
.sg-heat-legend { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.sg-heat-legend i { display: inline-block; width: 18px; height: 12px; border-radius: 2px; }
.sg-heat-legend > span:first-child { margin-right: 4px; } .sg-heat-legend > span:nth-child(11) { margin-left: 4px; }
#sg-heat-country button { white-space: nowrap; }
/* Heatmap: Infofeld beim Darüberfahren */
.sg-tip { position: absolute; z-index: 20; pointer-events: none; min-width: 230px; max-width: 320px; padding: 12px 14px;
          background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
          box-shadow: 0 10px 30px rgba(0,0,0,.28); font-size: 13px; line-height: 1.4; }
.sg-tip[hidden] { display: none; }
.sg-tip-h { font-weight: 700; font-size: 14.5px; margin-bottom: 2px; }
.sg-tip-h .tick { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.sg-tip-s { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.sg-tip-g { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; align-items: baseline; }
.sg-tip-g span { color: var(--ink-2); }
.sg-tip-g b { text-align: right; font-variant-numeric: tabular-nums; }
.sg-tip-net { font-size: 15px; padding-top: 2px; }
.sg-tip-bar { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 9px 0 7px; background: var(--grid); }
.sg-tip-bar i { display: block; height: 100%; } .sg-tip-bar .buy { background: var(--buy); } .sg-tip-bar .sell { background: var(--sell); }
.sg-tip-f { color: var(--muted); font-size: 11.5px; }
/* Gemeinsames Infofeld für die ganze App (static/tooltip.js) – gleicher Stil wie das Infofeld der Heatmap */
.app-tip { position: fixed; z-index: 1000; pointer-events: none; max-width: 340px; padding: 10px 13px;
           background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px;
           box-shadow: 0 10px 30px rgba(0,0,0,.28); font-size: 12.5px; line-height: 1.5; font-weight: 400; text-align: left;
           letter-spacing: normal; text-transform: none; white-space: normal; }
.app-tip[hidden] { display: none; }
.app-tip-h { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.app-tip-b { color: var(--ink-2); }
.app-tip-h + .app-tip-b { color: var(--ink-2); }
.app-tip:not(:has(.app-tip-h)) .app-tip-b { color: var(--ink); }
/* Auffällig: aufgeklappte Geschäfte – Signal-Zeitraum hervorgehoben, Trennzeile zur Vorgeschichte */
.sg-dt-t tr.sg-dt-hi td { background: color-mix(in srgb, var(--accent, var(--buy)) 8%, transparent); }
.sg-dt-t tr.sg-dt-sep td { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
                            padding-top: 10px; border-top: 1px dashed var(--border); }
/* Konten: Zwei-Faktor-Einrichtung und Nutzerverwaltung */
.totp-qr { background: #fff; padding: 8px; border-radius: 8px; line-height: 0; }
.totp-qr svg { display: block; }  /* Originalgröße – nicht skalieren */
.totp-key { font-size: 15px; letter-spacing: .08em; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; user-select: all; }
.users-t tr.u-off td { color: var(--muted); }
.u-act { position: relative; display: inline-block; text-align: left; }
.u-act > summary { list-style: none; cursor: pointer; }
.u-act > summary::-webkit-details-marker { display: none; }
.u-act-pop { margin-top: 6px; min-width: 210px; padding: 6px;
             display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border);
             border-radius: 8px; }
.u-act-pop form { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.u-act-pop .btn { width: 100%; justify-content: flex-start; text-align: left; white-space: nowrap; }
/* Datenschutzerklärung */
.privacy h1 { margin: 0 0 4px; }
.privacy h2 { font-size: 16px; margin: 12px 0 0; }
.privacy p, .privacy ul { margin: 0; line-height: 1.55; }
.privacy ul { padding-left: 20px; }
/* Fußzeile mit Impressum/Datenschutz (auf jeder Seite erreichbar) */
.site-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 24px 16px 32px; }
.site-foot a { color: var(--muted); }
/* Testversion auf dem PC (insider/mode.py) */
.test-bar { background: #B5452C; color: #fff; font: 700 12.5px/1.3 var(--font-sans); letter-spacing: .02em; text-align: center; padding: 6px 16px; position: sticky; top: 0; z-index: 100; }
/* Menü für schmale Bildschirme: Knopf „Menu“ statt seitlich scrollender Leiste */
.mnav-btn { display: none; margin-left: auto; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--axis); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 700 14px/1 var(--font-sans); cursor: pointer; }
.mnav-btn svg { width: 18px; height: 18px; }
.mnav-btn[aria-expanded=true] { background: var(--sunken); }
.mnav { border-top: 1px solid var(--border); padding: 8px 16px 16px; display: grid; gap: 2px; }
.mnav[hidden] { display: none; }
.mnav > a, .mnav-sub a { display: block; color: var(--ink-2); text-decoration: none; padding: 11px 12px; border-radius: 8px; font-size: 16px; }
.mnav a[aria-current=page] { color: var(--ink); font-weight: 700; background: var(--sunken); }
.mnav-group { padding: 6px 0; border-block: 1px solid var(--border); margin: 4px 0; }
.mnav-h { display: block; padding: 6px 12px 2px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.mnav-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mnav-sub a { font-size: 15px; padding: 10px 12px; }
.mnav-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 12px 0; color: var(--muted); font-size: 13px; }
.mnav-foot form { margin: 0 0 0 auto; }
.mnav-mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) {
  .topbar .nav, .topbar .who { display: none; }
  .mnav-btn { display: inline-flex; }
  .brand .bt { display: flex; }
}
@media (min-width: 861px) { .mnav { display: none !important; } }
/* Karten: auf dem Handy wird jede Tabellenzeile (table.cards) zu einer Karte – das Wichtigste oben, Details klein darunter,
   kein seitliches Scrollen. Spalten tragen Klassen c-…; data-l liefert die Beschriftung kleiner Angaben. */
.c-only { display: none; }
@media (max-width: 640px) {
  table.cards, table.cards tbody { display: block; }
  table.cards thead { display: none; }
  table.cards tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 2px; border-bottom: 1px solid var(--grid); }
  table.cards td { display: block; border: 0; padding: 0; text-align: left; }
  table.cards td[colspan], table.cards td.empty, table.cards td.hint { flex: 1 1 100%; }
  table.cards .c-only { display: inline; }
  table.cards td[data-l]::before { content: attr(data-l); margin-right: 5px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
  table.cards .c-iss { order: 1; flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 15px; }
  table.cards .c-v { order: 2; margin-left: auto; font-weight: 700; font-size: 16px; white-space: nowrap; }
  table.cards .c-per { order: 3; flex: 1 1 100%; }
  table.cards .c-nat { order: 4; }
  table.cards .c-nat .s { display: inline; margin-left: 6px; }
  table.cards .c-vol, table.cards .c-px { order: 5; font-size: 13px; }
  table.cards .c-px { order: 6; }
  table.cards .c-in { order: 7; flex: 1 1 100%; font-size: 13px; color: var(--ink-2); }
  table.cards .c-in .s { display: none; }
  table.cards .c-t, table.cards .c-p { order: 8; font-size: 12px; color: var(--ink-2); }
  table.cards .c-p { order: 9; }
  table.cards .c-src { order: 10; margin-left: auto; }
  table.cards .c-buy { color: var(--buy-text); } table.cards .c-sell { color: var(--sell-text); }
  /* aufgeklappte Zusammensetzung (Signale): volle Breite, innere Tabelle darf seitlich scrollen */
  table.cards tr.sg-dt { display: block; padding: 0 0 12px; }
  table.cards tr.sg-dt > td { display: block; }
  table.cards .sg-dt-box { overflow-x: auto; }
}
/* Dashboard-Filter: ein Raster mit vier Spalten – alle Felder stehen in Spalten untereinander, gleich hoch, ohne Lücken
   Zeile 1: View · Issuer · Person (2 Spalten) · Zeile 2: Period · From–To · Country · Currency · Zeile 3: Type · Role · Minimum · Reset */
.filters.fgrid { display: grid; grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 1fr)); gap: 14px 18px; align-items: end; }
.fgrid .frow { display: contents; }
.fgrid .field { min-width: 0; }
.fgrid .frow-what .f-grow:nth-child(2) { grid-column: span 2; }  /* Issuer breit, Person schmal */
.fgrid .seg { display: flex; width: 100%; height: 38px; }
.fgrid .seg button { flex: 1 1 0; padding: 0 6px; white-space: nowrap; }
.fgrid .frow input[type=text], .fgrid .frow select, .fgrid .frow .dd, .fgrid .frow .dd-btn, .fgrid .frow .input-unit, .fgrid .frow .input-unit input { width: 100%; min-width: 0; height: 38px; }
.fgrid .range { width: 100%; } .fgrid .range input { flex: 1 1 0; min-width: 0; width: 0; height: 38px; }
.fgrid .f-reset { height: 38px; width: 100%; font-weight: 700; background: var(--reset-bg); color: var(--reset-ink); border-color: var(--reset-bg); }
.fgrid .f-reset:hover { background: var(--reset-hover); border-color: var(--reset-hover); }
.fgrid .checks { grid-column: 1 / -1; border-top: 1px dashed var(--axis); padding-top: 12px; gap: 10px 22px; }
:root { --reset-bg: #B5742A; --reset-hover: #9A6223; --reset-ink: #FFF8EC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --reset-bg: #E3A94B; --reset-hover: #F0BC66; --reset-ink: #1E1606; } }
:root[data-theme="dark"] { --reset-bg: #E3A94B; --reset-hover: #F0BC66; --reset-ink: #1E1606; }
@media (max-width: 1000px) {
  .filters.fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgrid .frow-what .field:first-child { grid-column: 1 / -1; }
  .fgrid .frow-what .f-grow:nth-child(2) { grid-column: auto; }
}
@media (max-width: 560px) {
  .filters.fgrid { grid-template-columns: minmax(0, 1fr); }
}
/* Glocke (Seite „Alerts“) oben rechts */
.bell { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--axis); color: var(--ink-2); background: var(--surface); }
.bell svg { width: 18px; height: 18px; }
.bell:hover { color: var(--ink); }
.bell[aria-current=page] { background: var(--sunken); color: var(--ink); border-color: var(--brand-ink); }
.bell-m { display: none; }
@media (max-width: 860px) { .bell-m { display: inline-grid; margin-left: auto; width: 40px; height: 40px; } .bell-m + .mnav-btn { margin-left: 8px; } }
.alert-mail .sent { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: var(--sunken); border: 1px solid var(--axis); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.alert-mail .sent svg { width: 14px; height: 14px; }
/* Alerts: gleiche Spaltenbreiten in allen Mail-Blöcken */
@media (min-width: 641px) {
  table.alerts-t { table-layout: fixed; }
  table.alerts-t td, table.alerts-t th { overflow-wrap: anywhere; }
  table.alerts-t th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (max-width: 420px) { .topbar .brand .bt { display: none; } }  /* Handy: nur Logo, damit Glocke und Menü Platz haben */
