@font-face {
  font-family: "Archivo";
  src: url("archivo.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

/* ===================================================================== Farben
   Hell: kühles Grau mit Tannengrün als Arbeitsfarbe, Bernstein nur für Rabatte.
   Dunkel: dieselben Rollen, angepasst an dunklen Grund. */
:root {
  color-scheme: light;
  --bg: #f1f4f3;
  --surface: #ffffff;
  --raised: #f7f9f8;
  --line: #dde4e1;
  --line-strong: #c4cfca;
  --ink: #16241f;
  --muted: #5d6c67;
  --faint: #8a9893;
  --accent: #12715b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ec;
  --amber: #e9a516;
  --amber-ink: #241a00;
  --amber-soft: #fdf3dc;
  --ok: #1f7a4a;
  --ok-soft: #e4f3ea;
  --danger: #b4412f;
  --danger-soft: #fbece9;
  --warn-soft: #fdf5dd;
  --warn-ink: #6a5000;
  --violet: #5b48a6;
  --violet-soft: #efecf9;
  --grid: #e7ecea;
  --shadow: 0 1px 2px rgba(22, 36, 31, .05), 0 6px 20px rgba(22, 36, 31, .05);
  --r-sm: 6px;
  --r: 10px;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1614;
    --surface: #161f1c;
    --raised: #1b2622;
    --line: #26332e;
    --line-strong: #34443e;
    --ink: #e3ebe7;
    --muted: #97a7a1;
    --faint: #6f807a;
    --accent: #3cb893;
    --accent-ink: #062018;
    --accent-soft: #173229;
    --amber: #f0b43a;
    --amber-ink: #241a00;
    --amber-soft: #2d2512;
    --ok: #5ccf8f;
    --ok-soft: #153022;
    --danger: #ef7f6c;
    --danger-soft: #34201c;
    --warn-soft: #2e2810;
    --warn-ink: #f1d27a;
    --violet: #b3a5f0;
    --violet-soft: #252040;
    --grid: #22302b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1614;
  --surface: #161f1c;
  --raised: #1b2622;
  --line: #26332e;
  --line-strong: #34443e;
  --ink: #e3ebe7;
  --muted: #97a7a1;
  --faint: #6f807a;
  --accent: #3cb893;
  --accent-ink: #062018;
  --accent-soft: #173229;
  --amber: #f0b43a;
  --amber-ink: #241a00;
  --amber-soft: #2d2512;
  --ok: #5ccf8f;
  --ok-soft: #153022;
  --danger: #ef7f6c;
  --danger-soft: #34201c;
  --warn-soft: #2e2810;
  --warn-ink: #f1d27a;
  --violet: #b3a5f0;
  --violet-soft: #252040;
  --grid: #22302b;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

/* ===================================================================== Gerüst */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 16px; padding: 4px 8px; }
.mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a svg, .theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav a:hover { background: var(--raised); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.side-foot { margin-top: auto; display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.status { display: flex; gap: 10px; align-items: flex-start; padding: 0 6px; }
.status-text { display: grid; line-height: 1.3; font-size: 13px; }
.status-text b { font-weight: 650; }
.status-text span { color: var(--muted); font-size: 12.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--faint); margin-top: 5px; flex: none; }
.dot.idle { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.dot.run { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); animation: pulse 1.1s infinite alternate; }
.dot.pause { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
@keyframes pulse { to { opacity: .35; } }
.status-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.theme-toggle { display: flex; align-items: center; gap: 9px; font: inherit; font-size: 13px; color: var(--muted);
  background: none; border: 0; padding: 6px; border-radius: var(--r-sm); cursor: pointer; }
.theme-toggle:hover { color: var(--ink); background: var(--raised); }
.theme-toggle .i-moon { display: block; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
}

.main { padding: 30px 40px 60px; max-width: 1240px; width: 100%; }
.foot { margin-top: 56px; color: var(--faint); font-size: 12.5px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px;
    padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav { grid-auto-flow: column; overflow-x: auto; gap: 2px; order: 3; width: 100%; }
  .nav a span { white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; grid-auto-flow: column; align-items: center; }
  .status-actions { grid-template-columns: auto auto; }
  .main { padding: 20px 16px 48px; }
}

/* ===================================================================== Typografie */
h1 { font-size: 26px; font-weight: 750; letter-spacing: -.015em; margin: 0 0 4px; line-height: 1.2; }
h2 { font-size: 17px; font-weight: 700; margin: 36px 0 12px; }
.lead { color: var(--muted); margin: 0 0 22px; max-width: 72ch; }
.sub { color: var(--muted); font-size: 12.5px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head.section { align-items: center; margin: 36px 0 12px; }
.head.section h2 { margin: 0; }
.pos { color: var(--ok); }
.neg { color: var(--danger); }

/* ===================================================================== Bedienelemente */
.btn { font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 6px; padding: 8px 14px; border-radius: var(--r-sm); text-decoration: none;
  background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent); }
.btn:hover { filter: brightness(1.06); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--raised); filter: none; color: var(--ink); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); filter: none; color: var(--danger); }
.btn.small { padding: 5px 10px; font-size: 12.5px; }

.chip { font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-block;
  padding: 4px 10px; border-radius: var(--r-sm); line-height: 1.4; text-decoration: none;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip.done:hover { background: var(--danger-soft); color: var(--danger); }
.chip.quiet { border-color: transparent; background: transparent; color: var(--muted); font-weight: 500; }
.chip.quiet:hover { color: var(--ink); background: var(--raised); }
.chip.quiet.danger-hover:hover { color: var(--danger); background: var(--danger-soft); }
.chip.buy { border-color: var(--accent); color: var(--accent); }
.chip.buy:hover { background: var(--accent); color: var(--accent-ink); }

.pill { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--muted); }
.pill.on { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.pill.off { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.pill.warn { border-color: transparent; background: var(--amber-soft); color: var(--warn-ink); }
.pill.bought { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.pill.bundle-pill { border-color: transparent; background: var(--violet-soft); color: var(--violet); }
.pill.hidden-pill { border-style: dashed; }
.deal-off { font-weight: 700; color: var(--amber-ink); background: var(--amber); padding: 0 6px; border-radius: 4px;
  font-variant-numeric: tabular-nums; }

.tabs { display: flex; gap: 0; margin-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 550;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .count { font-weight: 600; margin-left: 4px; color: var(--faint); }

.filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.filter a { font-size: 13px; text-decoration: none; color: var(--muted); padding: 4px 11px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); }
.filter a b { color: var(--ink); font-weight: 650; margin-left: 4px; font-variant-numeric: tabular-nums; }
.filter a.on { border-color: var(--ink); color: var(--ink); }

.flash { padding: 10px 14px; border-radius: var(--r-sm); margin-bottom: 16px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-soft); color: var(--ok); }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* ===================================================================== Flächen */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.empty { padding: 28px; color: var(--muted); }
.empty strong { color: var(--ink); display: block; margin-bottom: 4px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--raised); }
th:first-child { border-top-left-radius: var(--r); }
th:last-child { border-top-right-radius: var(--r); }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--raised); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.actions form { margin: 0; }
table.deals td.when, table.trades td.when { white-space: nowrap; }
table.deals td.price { font-weight: 650; }
table.deals td.price .sub { font-weight: 400; }
table.deals td.ai { max-width: 280px; }
table.deals .actions { flex-wrap: nowrap; }
table.deals .bundle-calc { max-width: 220px; margin-left: auto; white-space: normal; }
table.deals tr.is-contacted td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
table.deals tr.is-hidden td:not(:last-child) { opacity: .45; }
table.deals tr.is-hidden td:first-child { box-shadow: inset 3px 0 0 var(--line-strong); }

.log { background: var(--raised); color: var(--muted); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; margin: 0; font-family: Consolas, "Cascadia Mono", monospace; font-size: 12.5px;
  line-height: 1.55; max-height: 320px; overflow: auto; white-space: pre-wrap; }

.export-bar { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin: -6px 0 10px; }

/* ===================================================================== Deal-Karten (Übersicht)
   Das Erkennungsmerkmal: der Preis als grosse, schmale Zahl, der Rabatt als Bernstein-Marke. */
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.tag-wrap { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; }
.tag { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 12px;
  color: var(--ink); text-decoration: none; border-left: 4px solid var(--amber); }
.tag:hover { background: var(--raised); color: var(--ink); }
.tag .t { font-size: 13.5px; font-weight: 550; line-height: 1.35; padding-right: 64px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tag .p { font-size: 38px; font-weight: 800; font-stretch: 68%; line-height: 1.05; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums; margin-top: 6px; }
.tag .p small { font-size: 14px; font-weight: 600; font-stretch: 100%; margin-right: 4px; color: var(--muted); }
.tag .row { display: contents; }
.tag .row > span:first-child { font-size: 12.5px; color: var(--muted); }
.tag s { color: var(--muted); }
.tag .off { position: absolute; top: 14px; right: 14px; background: var(--amber); color: var(--amber-ink);
  font-weight: 800; font-size: 14px; padding: 3px 8px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.tag .meta { font-size: 12.5px; color: var(--muted); margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.tag.auction { border-left-color: var(--danger); }
.tag.auction .off { background: var(--danger); color: #fff; }
.tag-actions { display: flex; gap: 4px; align-items: center; padding: 8px 10px; border-top: 1px solid var(--line);
  background: var(--raised); flex-wrap: wrap; }
.tag-actions form { margin: 0; }
.tag-actions .chip { font-size: 12.5px; padding: 4px 9px; }
.tag-actions .chip.quiet { padding: 4px 6px; }
.tag-wrap.contacted .tag { border-left-color: var(--ok); }
.tag-wrap.contacted .tag .p, .tag-wrap.contacted .tag .t { color: var(--muted); }
.tag-wrap.contacted .tag .off { background: var(--line-strong); color: var(--ink); }
.tags-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 14px 0 0; }
.tags-foot form { display: flex; align-items: center; gap: 10px; margin: 0; }

details.more { position: relative; }
details.more summary { list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: " ▾"; font-size: 10px; }
.more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 210px; padding: 4px;
  display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.tag-actions .more-menu { left: 0; right: auto; }
.more-menu form { margin: 0; }
.more-menu button, .more-menu a { font: inherit; font-size: 13.5px; text-align: left; width: 100%; display: block;
  cursor: pointer; background: none; border: 0; padding: 8px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.more-menu button:hover, .more-menu a:hover { background: var(--raised); }
.more-menu a.danger, .more-menu .danger-text { color: var(--danger); }

/* ===================================================================== Kennzahlen */
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0 20px; }
.stats > div { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 16px; min-width: 170px; max-width: 320px; }
.stats b { font-size: 24px; font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: 12.5px; }
.summary { display: flex; gap: 36px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 14px; }
.summary div { display: grid; }
.summary b { font-size: 24px; font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.summary span { color: var(--muted); font-size: 12.5px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.kpis.small .kpi b { font-size: 21px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi b { font-size: 28px; font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi small { color: var(--muted); font-size: 12px; }
.kpi.main { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } }
.top-flop h2 { margin-top: 30px; }
.panel.list { padding: 4px 0; }
.panel.list > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); }
.panel.list > div:last-child { border-bottom: 0; }
.panel.list > div.sub { display: block; }
.export { margin-top: 26px; }
.chart-box { padding: 18px; height: 380px; }

/* ===================================================================== Formulare */
form.card { padding: 24px; display: grid; gap: 22px; max-width: 860px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 14px; min-width: 0; }
legend { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; padding: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 720px) { .grid2, .grid4 { grid-template-columns: 1fr 1fr; } }
label { display: grid; align-content: start; gap: 5px; font-weight: 600; font-size: 13px; }
label .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=number], input[type=time], input[type=date], select, textarea {
  font: inherit; font-weight: 400; font-size: 14px; padding: 8px 10px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 13.5px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.form-foot { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 18px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }
.profit-preview { font-size: 16px; }
.profit-preview b { font-size: 22px; font-weight: 800; font-stretch: 80%; }

/* ===================================================================== Aufklappbare Abschnitte
   Für Einstellungen und Suchformular: Titel links, aktueller Stand rechts. */
.sections { display: grid; gap: 10px; max-width: 900px; }
details.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
details.section > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto 18px;
  gap: 12px; align-items: center; padding: 14px 18px; border-radius: var(--r); }
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary:hover { background: var(--raised); }
details.section > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; margin-top: -4px; transition: transform .15s; }
details.section[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.section[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0; }
.sum-title { font-weight: 650; font-size: 15px; }
.sum-title small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.sum-state { color: var(--muted); font-size: 12.5px; text-align: right; max-width: 340px; }
.section-body { padding: 18px; display: grid; gap: 16px; }
.group-label { margin: 18px 0 2px; font-weight: 650; color: var(--muted); font-size: 13px; }
.advanced-note { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft);
  color: var(--warn-ink); font-size: 13px; }
.savebar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  padding: 12px 18px; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow); max-width: 900px; }
.savebar .sub { margin-right: auto; }
form.sections-form { display: grid; gap: 10px; }

@media (prefers-reduced-motion: reduce) {
  .dot.run { animation: none; }
  details.section > summary::after { transition: none; }
}

/* ===================================================================== Anmeldung und Konto */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 28px; display: grid; gap: 16px; box-shadow: var(--shadow); }
.login-card .brand { padding: 0; }
.login-card h1 { font-size: 22px; margin: 4px 0 0; }
input[type=password] { font: inherit; font-weight: 400; font-size: 14px; padding: 8px 10px; width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
input[type=password]:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.userbox { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.userbox form { margin: 0; }
.userlink { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); min-width: 0; }
.userlink span:last-child { display: grid; line-height: 1.25; min-width: 0; }
.userlink b { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userlink small { color: var(--muted); font-size: 12px; }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; }
.inline-form { display: flex; gap: 6px; margin: 0; }
.inline-form input { max-width: 190px; padding: 5px 8px; font-size: 13px; }
