@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
:root { --ink: #1c2838; --muted: #6b7789; --green: #1a3054; --line: #e1e7ef; --bg: #f3f6fa; --lime: #d5e3f5; --panel: #fff; --button: #fff; --on-primary: #fff; --good: #1a3054; --bad: #a13e38; --bar: #c5d6ea; --focus: #1a3054; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 13px 'DM Sans', sans-serif; }
h1, h2, .brand { font-family: Manrope, sans-serif; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--button); border-radius: 8px; padding: 7px 12px; color: var(--ink); font-weight: 600; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
button:hover { filter: brightness(.97); }
button:disabled { cursor: not-allowed; opacity: .5; }
.primary { background: var(--green); border-color: var(--green); color: var(--on-primary); }
.danger { color: #a13e38; }
.muted, small { color: var(--muted); }
.brand { font-size: 17px; font-weight: 800; letter-spacing: -0.4px; display: flex; align-items: center; gap: 8px; }
.brand-mark { width: 32px; height: 32px; display: block; flex: none; border-radius: 8px; }
.brand-copy { display: grid; gap: 2px; min-width: 0; line-height: 1; }
.brand-copy small { font-family: 'DM Sans', sans-serif; font-size: 7px; font-weight: 700; letter-spacing: 0.01em; line-height: 1.25; color: #3a4146; }
html, body { width: 100%; min-height: 100%; }
#app { width: 100%; min-height: 100vh; }
.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  align-items: start;
}
.sidebar {
  position: sticky; top: 0; align-self: start;
  width: 220px; max-width: 220px; height: 100vh;
  background: #111316; border-right: 1px solid #23272d;
  padding: 16px 10px; display: flex; flex-direction: column; color: #f3f5f7;
  box-sizing: border-box; overflow: auto;
}
.sidebar a.brand { padding: 2px 6px; color: #f3f5f7; }
.sidebar .brand-copy small { color: #8b939c; }
.sidebar .main-nav { margin-top: 18px; display: grid; gap: 4px; align-content: start; padding: 6px; border: 1px solid #2a2f36; border-radius: 12px; background: #171a1e; }
.sidebar .util-nav { display: grid; gap: 2px; margin-bottom: 10px; padding-top: 10px; border-top: 1px solid #2a2f36; }
.subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.subtabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 12px; font-weight: 600; color: var(--muted); }
.subtabs a.active { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.books-actions { margin-bottom: 12px; }
.books-filters { margin-bottom: 12px; }
.books-list { grid-template-columns: minmax(0, 1.4fr) max-content max-content max-content; }
.books-warn { background: #fff8e8; border-color: #edd9a3; }
.books-log { margin: 0; padding-left: 18px; }
.books-log li { margin: 0 0 10px; }
.books-log small { color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
label.check input { margin-top: 2px; }

/* Eigenbelege – Premium layout */
.eigen-page { max-width: 920px; margin: 0 auto; }
.eigen-page .subtabs {
  gap: 0; margin: 0 0 32px; padding: 0; border-bottom: 1px solid var(--line);
  background: transparent;
}
.eigen-page .subtabs a {
  margin-bottom: -1px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: transparent; box-shadow: none;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.eigen-page .subtabs a:hover { color: var(--ink); }
.eigen-page .subtabs a.active {
  border-color: transparent; border-bottom-color: var(--green);
  color: var(--ink); box-shadow: none;
}
.eigen-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.eigen-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.eigen-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 44ch; }
.eigen-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.eigen-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.eigen-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.eigen-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.eigen-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.eigen-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.eigen-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.eigen-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; }
.eigen-toolbar input {
  min-width: 0; padding: 8px 11px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.eigen-toolbar input:focus { border-color: #b7c5d8; }
.eigen-list {
  padding: 0 16px; margin: 0;
  grid-template-columns: minmax(0, 1.6fr) 110px 110px 120px max-content;
}
.eigen-list .list-head { padding: 12px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.eigen-list .item-cell, .eigen-list .meta { padding: 14px 0; border-bottom: 1px solid #eef1f5; }
.eigen-list .item-cell b { font-size: 13px; }
.eigen-list .item-cell small { font-size: 12px; }
.eigen-list .meta { font-size: 13px; color: var(--ink); }
.eigen-list .actions {
  grid-column: auto; justify-content: flex-end; gap: 6px;
  padding: 14px 0; border-bottom: 1px solid #eef1f5;
}
.eigen-list .row-btn { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.eigen-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.eigen-table-empty p { margin: 0 0 10px; font-size: 13px; }
.eigen-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.eigen-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.eigen-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.eigen-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.eigen-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.eigen-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.eigen-empty p { margin: 0 auto 22px; max-width: 36ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.eigen-empty .primary { padding: 10px 16px; }
@media (max-width: 900px) {
  .eigen-page { max-width: none; }
  .eigen-header { flex-direction: column; align-items: stretch; }
  .eigen-header .primary { width: 100%; }
  .eigen-kpis { grid-template-columns: 1fr; }
  .eigen-toolbar { grid-template-columns: 1fr; }
  .eigen-list { grid-template-columns: 1fr; }
  .eigen-list .list-head { display: none; }
  .eigen-list .actions { justify-content: flex-start; }
}

/* Belege – Dokumentenzentrale */
.belege-page { max-width: 1100px; margin: 0 auto; }
.belege-page .subtabs {
  gap: 0; margin: 0 0 32px; padding: 0; border-bottom: 1px solid var(--line); background: transparent;
}
.belege-page .subtabs a {
  margin-bottom: -1px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: transparent; box-shadow: none;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.belege-page .subtabs a:hover { color: var(--ink); }
.belege-page .subtabs a.active {
  border-color: transparent; border-bottom-color: var(--green);
  color: var(--ink); box-shadow: none;
}
.belege-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.belege-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.belege-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 48ch; }
.belege-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.belege-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.belege-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.belege-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.belege-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.belege-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.belege-missing {
  margin-top: 16px; background: #fffaf0; border: 1px solid #ead9b0; border-radius: 12px; overflow: hidden;
}
.belege-missing-head { padding: 12px 16px; border-bottom: 1px solid #f0e4c4; display: flex; align-items: center; }
.belege-missing-head strong { display: block; font-size: 13px; margin-bottom: 2px; }
.belege-missing-head span { color: #8a7340; font-size: 12px; }
.belege-missing-list { display: grid; gap: 0; }
.belege-missing-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; border-top: 1px solid #f3e8c8;
}
.belege-missing-row:first-child { border-top: 0; }
.belege-missing-row b { display: block; font-size: 13px; }
.belege-missing-row small { display: block; margin-top: 2px; color: #8a7340; font-size: 12px; }
.belege-missing-more { margin: 0; padding: 8px 16px 10px; color: #8a7340; font-size: 12px; border-top: 1px solid #f0e4c4; }
.belege-footnote { margin: 14px 0 0; color: #8a96a6; font-size: 11px; line-height: 1.45; }

/* Ausgaben */
.ausgaben-toolbar {
  display: grid;
  grid-template-columns: minmax(160px, 1.5fr) repeat(2, 118px) repeat(3, minmax(0, 1fr));
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.ausgaben-toolbar input, .ausgaben-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.ausgaben-list { padding: 0 8px 8px; }
.ausgaben-list-head, .ausgaben-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1.5fr) 140px 96px 100px 110px max-content;
  gap: 8px; align-items: center; width: 100%;
}
.ausgaben-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.ausgaben-row {
  padding: 12px 8px; border-bottom: 1px solid #eef1f5;
}
.ausgaben-row .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.ausgaben-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.ausgaben-row .meta { font-size: 13px; color: var(--ink); white-space: nowrap; }
.ausgaben-row .actions { justify-content: flex-end; }
.ausgaben-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.ausgaben-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.ausgaben-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.ausgaben-import .primary { flex: none; white-space: nowrap; }
@media (max-width: 900px) {
  .ausgaben-toolbar { grid-template-columns: 1fr 1fr; }
  .ausgaben-toolbar input:first-child { grid-column: 1 / -1; }
  .ausgaben-list-head { display: none; }
  .ausgaben-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; align-items: start; }
  .ausgaben-row .item-cell { grid-column: 1 / -1; }
  .ausgaben-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .ausgaben-import { flex-direction: column; align-items: stretch; }
}

/* Einkäufe */
.purchases-page { max-width: 1100px; margin: 0 auto; }
.purchases-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.purchases-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.purchases-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.purchases-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.purchases-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.purchases-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.purchases-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.purchases-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 24px; letter-spacing: -0.6px; line-height: 1; }
.purchases-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.purchases-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.purchases-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.purchases-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.purchases-import .primary, .purchases-import .row-btn { flex: none; white-space: nowrap; }
.purchases-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.purchases-toolbar {
  display: grid; grid-template-columns: minmax(140px, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.purchases-toolbar input, .purchases-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.purchases-list { padding: 0 8px 8px; overflow-x: auto; }
.purchases-list-head, .purchases-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 88px 88px 84px 110px 110px 110px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 920px;
}
.purchases-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.purchases-row { padding: 10px 8px; border-bottom: 1px solid #eef1f5; }
.purchases-item {
  display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent;
  padding: 0; text-align: left; cursor: pointer; border-radius: 0; font-weight: 400;
}
.purchases-item:hover b { color: var(--green); }
.purchases-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 700;
}
.purchases-item .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.purchases-item .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.purchases-row .meta { font-size: 12px; color: var(--ink); }
.purchases-actions { display: flex; justify-content: flex-end; }
.purchases-menu { position: relative; }
.purchases-more { min-width: 34px; padding: 5px 8px; }
.purchases-menu-panel {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px;
  display: grid; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px #15203314;
}
.purchases-menu-panel[hidden] { display: none; }
.purchases-menu-panel button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink);
}
.purchases-menu-panel button:hover { background: #f3f6fa; }
.purchases-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.purchases-table-empty p { margin: 0 0 10px; font-size: 13px; }
.purchases-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.purchases-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.purchases-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.purchases-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.purchases-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.purchases-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.purchases-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.purchases-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.purchases-detail { display: grid; gap: 16px; }
.purchases-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.purchases-detail-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc; }
.purchases-detail-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.purchases-detail-grid b { display: block; margin-top: 6px; font-size: 15px; }
.purchases-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.purchases-side h3 { margin: 12px 0 8px; font-size: 13px; }
.purchases-side h3:first-child { margin-top: 0; }
.purchases-history { margin: 0; padding-left: 18px; }
.purchases-history li { margin: 0 0 8px; }
.purchases-history small { display: block; color: var(--muted); font-size: 11px; }
dialog:has(.purchases-detail) { width: min(760px, 94vw); }
@media (max-width: 900px) {
  .purchases-header { flex-direction: column; align-items: stretch; }
  .purchases-header .primary { width: 100%; }
  .purchases-kpis, .purchases-detail-grid, .purchases-side { grid-template-columns: 1fr 1fr; }
  .purchases-toolbar { grid-template-columns: 1fr 1fr; }
  .purchases-toolbar input:first-child { grid-column: 1 / -1; }
  .purchases-import { flex-direction: column; align-items: stretch; }
  .purchases-list-head { display: none; }
  .purchases-list-head, .purchases-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .purchases-row .purchases-item { grid-column: 1 / -1; }
  .purchases-row .purchases-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .purchases-kpis, .purchases-detail-grid, .purchases-side { grid-template-columns: 1fr; }
}

/* Wareneingang */
.inbound-page { max-width: 1100px; margin: 0 auto; }
.inbound-header { margin-bottom: 28px; }
.inbound-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.inbound-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.inbound-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.inbound-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.inbound-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.inbound-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.inbound-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.inbound-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.inbound-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.inbound-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.inbound-import .primary { flex: none; white-space: nowrap; }
.inbound-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.inbound-toolbar {
  display: grid; grid-template-columns: minmax(160px, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.inbound-toolbar input, .inbound-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.inbound-list { padding: 0 8px 8px; overflow-x: auto; }
.inbound-list-head, .inbound-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 88px 88px 88px 84px 120px 130px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 920px;
}
.inbound-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.inbound-row { padding: 12px 8px; border-bottom: 1px solid #eef1f5; }
.inbound-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.inbound-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 700;
}
.inbound-row .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.inbound-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.inbound-row .meta { font-size: 12px; color: var(--ink); }
.inbound-row .actions { justify-content: flex-end; }
.inbound-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.inbound-table-empty p { margin: 0 0 10px; font-size: 13px; }
.inbound-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.inbound-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.inbound-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.inbound-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.inbound-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inbound-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.inbound-empty p { margin: 0 auto 0; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.inbound-detail { display: grid; gap: 16px; }
.inbound-detail h3 { margin: 0 0 8px; font-size: 13px; }
.inbound-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.inbound-history { margin: 0; padding-left: 18px; }
.inbound-history li { margin: 0 0 8px; }
.inbound-history small { display: block; color: var(--muted); font-size: 11px; }
dialog:has(.inbound-detail) { width: min(760px, 94vw); }
@media (max-width: 900px) {
  .inbound-kpis, .inbound-side { grid-template-columns: 1fr; }
  .inbound-toolbar { grid-template-columns: 1fr; }
  .inbound-import { flex-direction: column; align-items: stretch; }
  .inbound-list-head { display: none; }
  .inbound-list-head, .inbound-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .inbound-row .inbound-item { grid-column: 1 / -1; }
  .inbound-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Inventar */
.inv-page { max-width: 1100px; margin: 0 auto; }
.inv-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.inv-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.inv-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.inv-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.inv-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.inv-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.inv-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.inv-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.inv-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.inv-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.inv-toolbar {
  display: grid; grid-template-columns: minmax(140px, 1.5fr) repeat(3, minmax(0, 1fr)) auto;
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc; align-items: center;
}
.inv-toolbar input, .inv-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.inv-toolbar .row-btn.active { border-color: var(--green); color: var(--green); }
.inv-list { padding: 0 8px 8px; overflow-x: auto; }
.inv-list-head, .inv-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.6fr) 70px 90px 100px 120px 120px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 860px;
}
.inv-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.inv-row { padding: 10px 8px; border-bottom: 1px solid #eef1f5; }
.inv-item {
  display: flex; align-items: center; gap: 10px; min-width: 0; border: 0; background: transparent;
  padding: 0; text-align: left; cursor: pointer; border-radius: 0; font-weight: 400;
}
.inv-item:hover b { color: var(--green); }
.inv-thumb {
  width: 40px; height: 40px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 14px; font-weight: 700;
}
.inv-item .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.inv-item .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.inv-row .meta { font-size: 12px; color: var(--ink); }
.inv-plat { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.inv-incomplete { color: #8a7340; font-weight: 600; }
.inv-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.inv-menu { position: relative; }
.inv-more { min-width: 34px; padding: 5px 8px; }
.inv-menu-panel {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 200px;
  display: grid; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 8px 24px #15203314;
}
.inv-menu-panel[hidden] { display: none; }
.inv-menu-panel button, .inv-menu-panel a {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--ink);
}
.inv-menu-panel button:hover, .inv-menu-panel a:hover { background: #f3f6fa; }
.inv-menu-panel .danger { color: #a13e38; }
.inv-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.inv-table-empty p { margin: 0 0 10px; font-size: 13px; }
.inv-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.inv-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.inv-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.inv-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.inv-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inv-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.inv-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.inv-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.inv-detail { display: grid; gap: 16px; }
.inv-detail-hero { display: flex; gap: 14px; align-items: flex-start; }
.inv-detail-hero .inv-thumb { width: 56px; height: 56px; font-size: 18px; }
.inv-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.inv-detail-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc; }
.inv-detail-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.inv-detail-grid b { display: block; margin-top: 6px; font-size: 15px; }
.inv-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.inv-side h3 { margin: 12px 0 8px; font-size: 13px; }
.inv-side h3:first-child { margin-top: 0; }
.inv-listing { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; background: #fafbfc; }
.inv-listing div { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 4px; }
.inv-listing small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.inv-history { margin: 0; padding-left: 18px; }
.inv-history li { margin: 0 0 6px; font-size: 12px; }
.inv-history small { display: block; color: var(--muted); font-size: 11px; }
dialog:has(.inv-detail) { width: min(780px, 94vw); }
@media (max-width: 900px) {
  .inv-header { flex-direction: column; align-items: stretch; }
  .inv-header .primary { width: 100%; }
  .inv-kpis, .inv-detail-grid, .inv-side { grid-template-columns: 1fr; }
  .inv-toolbar { grid-template-columns: 1fr 1fr; }
  .inv-toolbar input:first-child { grid-column: 1 / -1; }
  .inv-list-head { display: none; }
  .inv-list-head, .inv-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .inv-row .inv-item { grid-column: 1 / -1; }
  .inv-row .inv-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Verkäufe */
.sales-page { max-width: 1100px; margin: 0 auto; }
.sales-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.sales-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.sales-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.sales-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.sales-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.sales-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.sales-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.sales-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.sales-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.sales-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.sales-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.sales-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sales-import .primary, .sales-import .row-btn { flex: none; white-space: nowrap; }
.sales-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sales-toolbar {
  display: grid; grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(0, 1fr)) 118px 118px;
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.sales-toolbar input, .sales-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.sales-list { padding: 0 8px 8px; overflow-x: auto; }
.sales-list-head, .sales-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 88px 88px 88px 84px 110px 110px 110px 100px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 1020px;
}
.sales-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.sales-row {
  padding: 12px 8px; border: 0; border-bottom: 1px solid #eef1f5; background: transparent;
  text-align: left; border-radius: 0; font-weight: 400; cursor: pointer;
}
.sales-row:hover { background: #f8fafc; }
.sales-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sales-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 700;
}
.sales-row .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.sales-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.sales-row .meta { font-size: 12px; color: var(--ink); }
.sales-row .actions { justify-content: flex-end; }
.sales-incomplete { color: #8a7340; font-size: 12px; font-weight: 600; }
.sales-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.sales-table-empty p { margin: 0 0 10px; font-size: 13px; }
.sales-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.sales-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.sales-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.sales-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.sales-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sales-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.sales-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.sales-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sales-detail { display: grid; gap: 16px; }
.sales-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sales-detail-grid div { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc; }
.sales-detail-grid span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; }
.sales-detail-grid b { display: block; margin-top: 6px; font-size: 15px; }
.sales-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.sales-side h3 { margin: 12px 0 8px; font-size: 13px; }
.sales-side h3:first-child { margin-top: 0; }
.sales-missing, .sales-history { margin: 0; padding-left: 18px; }
.sales-missing li, .sales-history li { margin: 0 0 6px; font-size: 12px; }
.sales-history small { display: block; color: var(--muted); font-size: 11px; }
dialog:has(.sales-detail) { width: min(760px, 94vw); }
@media (max-width: 900px) {
  .sales-header { flex-direction: column; align-items: stretch; }
  .sales-header .primary { width: 100%; }
  .sales-kpis, .sales-detail-grid, .sales-side { grid-template-columns: 1fr; }
  .sales-toolbar { grid-template-columns: 1fr 1fr; }
  .sales-toolbar input:first-child { grid-column: 1 / -1; }
  .sales-import { flex-direction: column; align-items: stretch; }
  .sales-list-head { display: none; }
  .sales-list-head, .sales-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .sales-row .sales-item { grid-column: 1 / -1; }
  .sales-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Versand */
.shipping-page { max-width: 1100px; margin: 0 auto; }
.shipping-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.shipping-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.shipping-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.shipping-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.shipping-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.shipping-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.shipping-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.shipping-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.shipping-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.shipping-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.shipping-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.shipping-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.shipping-import .primary { flex: none; white-space: nowrap; }
.shipping-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.shipping-toolbar {
  display: grid; grid-template-columns: minmax(140px, 1.4fr) repeat(3, minmax(0, 1fr)) 118px 118px;
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.shipping-toolbar input, .shipping-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.shipping-list { padding: 0 8px 8px; overflow-x: auto; }
.shipping-list-head, .shipping-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 88px 88px 110px 120px 96px 130px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 920px;
}
.shipping-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.shipping-row { padding: 12px 8px; border-bottom: 1px solid #eef1f5; }
.shipping-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.shipping-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 700;
}
.shipping-row .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.shipping-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.shipping-row .meta { font-size: 12px; color: var(--ink); }
.shipping-row .actions { justify-content: flex-end; }
.shipping-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.shipping-table-empty p { margin: 0 0 10px; font-size: 13px; }
.shipping-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.shipping-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.shipping-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.shipping-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.shipping-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.shipping-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.shipping-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.shipping-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.shipping-detail { display: grid; gap: 16px; }
.shipping-detail h3 { margin: 0 0 8px; font-size: 13px; }
.shipping-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.shipping-history { margin: 0; padding-left: 18px; }
.shipping-history li { margin: 0 0 8px; }
.shipping-history small { display: block; color: var(--muted); font-size: 11px; }
.shipping-label-box {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc;
}
.shipping-label-box strong { display: block; font-size: 13px; }
.shipping-label-box small { display: block; margin: 4px 0 10px; color: var(--muted); font-size: 12px; }
.shipping-label-box .actions { justify-content: flex-start; gap: 8px; }
dialog:has(.shipping-detail) { width: min(720px, 94vw); }
@media (max-width: 900px) {
  .shipping-header { flex-direction: column; align-items: stretch; }
  .shipping-header .primary { width: 100%; }
  .shipping-kpis { grid-template-columns: 1fr; }
  .shipping-toolbar { grid-template-columns: 1fr 1fr; }
  .shipping-toolbar input:first-child { grid-column: 1 / -1; }
  .shipping-import { flex-direction: column; align-items: stretch; }
  .shipping-side { grid-template-columns: 1fr; }
  .shipping-list-head { display: none; }
  .shipping-list-head, .shipping-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .shipping-row .shipping-item { grid-column: 1 / -1; }
  .shipping-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Retouren */
.returns-page { max-width: 1100px; margin: 0 auto; }
.returns-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.returns-header h1 { font-size: 30px; letter-spacing: -0.9px; margin: 0 0 8px; line-height: 1.15; }
.returns-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; max-width: 52ch; }
.returns-header .primary { flex: none; padding: 10px 16px; font-size: 13px; border-radius: 8px; white-space: nowrap; }
.returns-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.returns-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.returns-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.returns-kpi strong { display: block; margin: 10px 0 4px; font-family: Manrope, sans-serif; font-size: 26px; letter-spacing: -0.6px; line-height: 1; }
.returns-kpi small { display: block; color: var(--muted); font-size: 11px; line-height: 1.35; }
.returns-import {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
}
.returns-import strong { display: block; font-size: 13px; margin-bottom: 2px; }
.returns-import span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.returns-import .primary { flex: none; white-space: nowrap; }
.returns-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.returns-toolbar {
  display: grid; grid-template-columns: minmax(160px, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.returns-toolbar input, .returns-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.returns-list { padding: 0 8px 8px; overflow-x: auto; }
.returns-list-head, .returns-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) 88px 88px 110px 110px 130px 130px 84px 88px max-content;
  gap: 8px; align-items: center; width: 100%; min-width: 980px;
}
.returns-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.returns-row { padding: 12px 8px; border-bottom: 1px solid #eef1f5; }
.returns-item { display: flex; align-items: center; gap: 10px; min-width: 0; }
.returns-thumb {
  width: 36px; height: 36px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: #eef3f8; border: 1px solid var(--line); color: var(--green); font-family: Manrope, sans-serif;
  font-size: 13px; font-weight: 700;
}
.returns-row .item-cell b { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; }
.returns-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.returns-row .meta { font-size: 12px; color: var(--ink); }
.returns-row .actions { justify-content: flex-end; }
.returns-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.returns-table-empty p { margin: 0 0 10px; font-size: 13px; }
.returns-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.returns-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.returns-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.returns-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.returns-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.returns-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.returns-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.returns-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.returns-detail { display: grid; gap: 16px; }
.returns-detail h3 { margin: 0 0 8px; font-size: 13px; }
.returns-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 8px; border-top: 1px solid var(--line); }
.returns-refund-list, .returns-history { margin: 0; padding-left: 18px; }
.returns-refund-list li, .returns-history li { margin: 0 0 8px; }
.returns-refund-list small, .returns-history small { display: block; color: var(--muted); font-size: 11px; }
dialog:has(.returns-detail) { width: min(720px, 94vw); }
@media (max-width: 900px) {
  .returns-header { flex-direction: column; align-items: stretch; }
  .returns-header .primary { width: 100%; }
  .returns-kpis { grid-template-columns: 1fr; }
  .returns-toolbar { grid-template-columns: 1fr 1fr; }
  .returns-toolbar input:first-child { grid-column: 1 / -1; }
  .returns-import { flex-direction: column; align-items: stretch; }
  .returns-side { grid-template-columns: 1fr; }
  .returns-list-head { display: none; }
  .returns-list-head, .returns-row { min-width: 0; grid-template-columns: 1fr 1fr; }
  .returns-row .returns-item { grid-column: 1 / -1; }
  .returns-row .actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Intelligence / Analysen */
.analytics-page,
.intel-page {
  width: 100%; max-width: 1600px; margin: 0;
  display: grid; gap: 28px; box-sizing: border-box; min-width: 0;
}
.analytics-header { display: grid; gap: 8px; }
.analytics-header h1 { font-size: 34px; letter-spacing: -1px; margin: 0; line-height: 1.1; }
.analytics-header > div > p:last-child {
  margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; max-width: 54rem;
}
.intel-eyebrow {
  display: inline-block; margin: 0 0 6px; color: var(--green);
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.analytics-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 14px 16px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px;
}
.analytics-filters .dash-filters { flex-wrap: wrap; margin: 0; }
.analytics-custom { display: flex; gap: 10px; flex-wrap: wrap; }
.analytics-custom label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.analytics-custom input {
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 13px;
}
.intel-section {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; min-width: 0; overflow: hidden;
}
.intel-section-head { margin-bottom: 18px; }
.intel-section-head h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -0.4px; }
.intel-section-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; max-width: 60rem; }
.intel-insights {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.intel-insight {
  display: grid; gap: 12px; align-content: space-between;
  padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: #f8fafc;
}
.intel-insight.tone-good { border-color: #cfe3d7; background: #f3faf6; }
.intel-insight.tone-warn { border-color: #ead9a8; background: #fffaf0; }
.intel-insight.tone-alert { border-color: #e7c8c4; background: #fdf6f5; }
.intel-insight.tone-info { border-color: #d5e0ec; background: #f5f8fc; }
.intel-insight strong { display: block; font-size: 15px; line-height: 1.35; }
.intel-insight p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.intel-insight-cta {
  justify-self: start; border: 0; background: transparent; color: var(--green);
  font-weight: 700; font-size: 13px; padding: 0; cursor: pointer;
}
.intel-insight-cta:hover { text-decoration: underline; }
.analytics-kpis,
.intel-kpis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0;
}
.analytics-kpi {
  width: 100%; text-align: left; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 18px 16px; min-width: 0; box-sizing: border-box;
}
button.analytics-kpi { cursor: pointer; font: inherit; color: inherit; }
button.analytics-kpi:hover { border-color: #c5d0dc; background: #f1f5f9; }
.analytics-kpi span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.analytics-kpi strong {
  display: block; margin: 12px 0 6px; font-family: Manrope, sans-serif;
  font-size: 30px; letter-spacing: -0.8px; line-height: 1;
}
.analytics-kpi strong.is-muted { font-size: 18px; letter-spacing: -0.3px; color: var(--muted); }
.analytics-kpi .delta { margin-top: 0; font-size: 12px; }
.analytics-kpi small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.analytics-page .analytics-chart,
.intel-section .chart-card {
  margin: 0; border: 0; padding: 0; background: transparent; box-shadow: none;
}
.analytics-panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 0 16px; margin-bottom: 16px; overflow: hidden;
}
.analytics-panel-body { min-width: 0; }
.analytics-empty {
  margin-top: 0; padding: 56px 28px; text-align: center; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px;
}
.analytics-empty-icon {
  width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center;
  background: #f0f4f8; border: 1px solid var(--line);
}
.analytics-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.analytics-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.analytics-empty p { margin: 0 auto 22px; max-width: 42ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.analytics-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.analytics-plat-chart {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
  padding: 4px 0 18px; min-height: 168px; align-items: end;
}
.analytics-plat-bar { display: grid; gap: 8px; justify-items: center; min-width: 0; }
.analytics-plat-bar .plot {
  width: 100%; max-width: 88px; height: 132px; display: flex; align-items: flex-end; justify-content: center;
  background: linear-gradient(#f7f9fc, #fff); border: 1px solid #eef1f5; border-radius: 10px; padding: 8px 10px 0;
}
.analytics-plat-bar .bar { width: 100%; border-radius: 6px 6px 0 0; background: var(--green); min-height: 0; }
.analytics-plat-bar b { font-size: 14px; }
.analytics-plat-bar small { color: var(--muted); font-size: 12px; }
.analytics-plat-table { overflow-x: auto; }
.analytics-plat-head, .analytics-plat-row {
  display: grid; grid-template-columns: 1.2fr repeat(7, minmax(0, 1fr)); gap: 8px; align-items: center;
  padding: 12px 4px; font-size: 13px; min-width: 720px;
}
.analytics-plat-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #7d8b9c;
  border-bottom: 1px solid #eef1f5;
}
button.analytics-plat-row {
  width: 100%; border: 0; border-bottom: 1px solid #eef1f5; background: transparent;
  text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 0;
}
button.analytics-plat-row:hover { background: #f3f7fb; }
.analytics-rank-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
}
.analytics-rank {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #f8fafc; min-width: 0;
}
.analytics-rank h3 { margin: 0 0 10px; font-size: 13px; }
.analytics-rank-row {
  width: 100%; display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 0; border: 0; border-top: 1px solid #eef1f5; background: transparent;
  text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 0;
}
.analytics-rank-row:first-of-type { border-top: 0; }
.analytics-rank-row:hover { color: var(--green); }
.analytics-rank-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.analytics-rank-row b { flex: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.analytics-inv-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.analytics-inv-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #f8fafc; min-width: 0;
}
.analytics-inv-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.analytics-inv-card strong {
  display: block; margin: 10px 0 6px; font-family: Manrope, sans-serif;
  font-size: 24px; letter-spacing: -0.5px;
}
.analytics-inv-card small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.analytics-note-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px;
}
.analytics-note-grid div {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #f8fafc; min-width: 0;
}
.analytics-note-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.analytics-note-grid b {
  display: block; margin: 10px 0 6px; font-family: Manrope, sans-serif;
  font-size: 22px; letter-spacing: -0.4px;
}
.analytics-note-grid small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.intel-section .belege-footnote { margin: 0; }
.intel-section .chart-note { margin: 12px 0 0; }
@media (max-width: 1100px) {
  .analytics-kpis, .intel-kpis, .analytics-inv-grid, .analytics-note-grid { grid-template-columns: 1fr 1fr; }
  .intel-insights, .analytics-rank-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .analytics-page, .intel-page { gap: 18px; }
  .analytics-header h1 { font-size: 28px; }
  .intel-section { padding: 18px; }
  .analytics-plat-head, .analytics-plat-row { grid-template-columns: 1.1fr repeat(3, minmax(0, 1fr)); min-width: 0; }
  .analytics-plat-head span:nth-child(n+5), .analytics-plat-row span:nth-child(n+5) { display: none; }
}
@media (max-width: 640px) {
  .analytics-kpis, .intel-kpis, .analytics-inv-grid, .analytics-note-grid, .analytics-plat-chart { grid-template-columns: 1fr; }
  .analytics-kpi strong { font-size: 26px; }
}

/* Exporte */
.export-page { max-width: 1040px; }
.export-filters, .export-check, .export-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.export-filters { padding: 16px; margin-bottom: 16px; }
.export-filters-head { margin-bottom: 14px; }
.export-filters-head strong { display: block; font-size: 14px; margin-bottom: 2px; }
.export-filters-head span { color: var(--muted); font-size: 12px; }
.export-filters-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px;
}
.export-filters-grid label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.export-filters-grid input, .export-filters-grid select {
  padding: 8px 10px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 500;
}
.export-checks { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 8px; }
.export-checks > span { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 110px; }
.export-checks .check { font-size: 12px; color: var(--ink); }
.export-check { padding: 16px; margin-bottom: 16px; }
.export-check.is-warn { background: #fffaf0; border-color: #ead9b0; }
.export-check.is-ok { background: #f4faf6; border-color: #cfe3d6; }
.export-check-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.export-check-head strong { display: block; font-size: 14px; margin-bottom: 2px; }
.export-check-head span { color: var(--muted); font-size: 12px; }
.export-check-head em {
  font-style: normal; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
  background: #e8eef5; color: var(--green);
}
.export-check.is-warn .export-check-head em { background: #f7e7c4; color: #8a7340; }
.export-check.is-ok .export-check-head em { background: #dcefe3; color: #1b7a4d; }
.export-check-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.export-check-grid div { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.72); border: 1px solid rgba(0,0,0,.04); }
.export-check-grid span { display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.export-check-grid b { display: block; font-family: Manrope, sans-serif; font-size: 22px; letter-spacing: -0.4px; }
.export-check-grid small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.export-check-grid .is-alert b { color: #997325; }
.export-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.export-card { padding: 18px 16px; display: grid; gap: 12px; align-content: start; }
.export-card h2 { font-size: 16px; letter-spacing: -0.2px; }
.export-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.export-card ul { margin: 0; padding-left: 18px; color: var(--ink); font-size: 12px; line-height: 1.55; }
.export-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.export-history, .export-audit { margin-bottom: 16px; }
.export-section-head { padding: 16px 16px 0; }
.export-section-head h2 { font-size: 15px; margin-bottom: 4px; }
.export-section-head p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.export-history-list { padding: 0 8px 8px; }
.export-history-head, .export-history-row {
  display: grid; grid-template-columns: 150px 1.1fr 1.2fr 110px max-content; gap: 8px; align-items: center;
  padding: 10px 8px; width: 100%;
}
.export-history-head {
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: #7d8b9c;
  border-bottom: 1px solid #eef1f5;
}
.export-history-row { border-bottom: 1px solid #eef1f5; font-size: 13px; }
.export-audit-body { padding: 0 16px 16px; }
@media (max-width: 980px) {
  .export-cards { grid-template-columns: 1fr; }
  .export-check-grid { grid-template-columns: 1fr 1fr; }
  .export-filters-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .export-history-head { display: none; }
  .export-history-row { grid-template-columns: 1fr 1fr; }
  .export-check-grid { grid-template-columns: 1fr; }
}
.belege-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.belege-workspace.has-detail { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.belege-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.belege-toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 1.4fr) repeat(2, 118px) repeat(4, minmax(0, 1fr));
  gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.belege-toolbar input, .belege-toolbar select {
  min-width: 0; width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.belege-list { padding: 0 8px 8px; }
.belege-list-head, .belege-row {
  display: grid;
  grid-template-columns: 88px 108px minmax(0, 1.5fr) 96px 88px 108px 100px;
  gap: 8px; align-items: center; width: 100%;
}
.belege-list-head {
  padding: 12px 8px 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: #7d8b9c; border-bottom: 1px solid #eef1f5;
}
.belege-row {
  border: 0; background: transparent; text-align: left; border-radius: 8px;
  padding: 12px 8px; border-bottom: 1px solid #eef1f5; cursor: pointer; color: inherit; font: inherit;
}
.belege-row:hover { background: #f7f9fc; }
.belege-row.is-active { background: #eef3f8; }
.belege-row .item-cell, .belege-row .meta { min-width: 0; }
.belege-row .item-cell b, .belege-desc { display: block; font-size: 13px; font-weight: 650; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.belege-row .item-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.belege-row .meta { font-size: 13px; color: var(--ink); white-space: nowrap; }
.belege-table-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.belege-table-empty p { margin: 0 0 10px; font-size: 13px; }
.belege-table-empty .text-btn { border: 0; background: transparent; color: var(--green); padding: 0; font-weight: 600; cursor: pointer; }
.belege-legal { margin: 0; padding: 12px 16px 14px; border-top: 1px solid var(--line); color: #8a96a6; font-size: 11px; line-height: 1.5; background: #fafbfc; }
.belege-empty { margin: 0; padding: 56px 28px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.belege-empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; background: #f0f4f8; border: 1px solid var(--line); }
.belege-empty-icon svg { width: 24px; height: 24px; stroke: var(--green); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.belege-empty h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.3px; }
.belege-empty p { margin: 0 auto 22px; max-width: 38ch; color: var(--muted); font-size: 14px; line-height: 1.55; }
.belege-empty-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.belege-detail {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  position: sticky; top: 16px; display: grid; gap: 14px;
}
.belege-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.belege-detail-head h2 { margin: 8px 0 4px; font-size: 18px; letter-spacing: -0.3px; }
.belege-detail-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.belege-detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.belege-detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.belege-detail-meta span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 2px; }
.belege-detail-meta b { display: block; font-size: 13px; font-weight: 650; word-break: break-word; }
.belege-preview {
  min-height: 180px; border: 1px solid var(--line); border-radius: 10px; background: #f7f9fc;
  overflow: hidden; display: grid; place-items: center;
}
.belege-preview img, .belege-preview iframe { width: 100%; height: 220px; border: 0; display: block; background: #fff; }
.belege-preview-empty { padding: 24px; color: var(--muted); font-size: 13px; text-align: center; }
.belege-detail-link {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fafbfc;
}
.belege-detail-link span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.belege-detail-link b { display: block; font-size: 13px; }
.belege-detail-link small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.belege-detail-link em { display: block; margin-top: 6px; font-style: normal; font-weight: 700; font-size: 13px; }
.belege-detail-link.is-empty { background: #fff; }
.belege-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.belege-detail-note { margin: 0; color: #8a96a6; font-size: 11px; line-height: 1.45; }
.origin-pill {
  display: inline-block; border-radius: 5px; padding: 2px 6px; font-size: 10px; font-weight: 700;
  background: #e8eef5; color: var(--green);
}
.origin-pill.origin-import { background: #e5f0fb; color: #1d4f91; }
.origin-pill.origin-eigen { background: #f3eef8; color: #5b4578; }
.origin-pill.origin-upload { background: #e8eef5; color: #1a3054; }
@media (max-width: 1100px) {
  .belege-workspace.has-detail { grid-template-columns: 1fr; }
  .belege-detail { position: static; }
}
@media (max-width: 900px) {
  .belege-page { max-width: none; }
  .belege-header { flex-direction: column; align-items: stretch; }
  .belege-header .primary { width: 100%; }
  .belege-kpis { grid-template-columns: 1fr; }
  .belege-toolbar { grid-template-columns: 1fr 1fr; }
  .belege-toolbar input:first-child { grid-column: 1 / -1; }
  .belege-list-head { display: none; }
  .belege-row {
    grid-template-columns: 1fr 1fr; gap: 6px 12px; align-items: start;
  }
  .belege-row .item-cell:nth-child(3) { grid-column: 1 / -1; }
  .belege-missing-row { flex-direction: column; align-items: stretch; }
}
.sidebar a { padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; color: #d7dce3; font-size: 13px; }
.sidebar a:hover { background: #22262c; color: #fff; }
.sidebar a.active { background: #2a2f36; color: #fff; font-weight: 700; }
.sidebar .nav-ico { width: 18px; height: 18px; display: grid; place-items: center; flex: none; }
.sidebar .nav-ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar .nav-group { display: grid; gap: 2px; }
.sidebar .subnav { display: grid; gap: 2px; padding-left: 10px; }
.sidebar .subnav a { padding: 6px 10px; font-size: 12px; align-items: center; gap: 6px; }
.nav-logo { height: 10px; width: auto; max-width: 38px; object-fit: contain; object-position: left center; filter: brightness(1.2); }
.sidebar .bottom { margin-top: auto; }
.sidebar .bottom button { width: 100%; background: #1b1f24; border-color: #2a2f36; color: #d7dce3; padding: 8px 10px; }
.main {
  margin: 0; width: auto; min-width: 0; max-width: none;
  box-sizing: border-box;
}
.content {
  width: 100%; max-width: none; margin: 0;
  padding: 24px clamp(16px, 2.2vw, 40px) 40px;
  box-sizing: border-box; min-width: 0;
}
/* Dashboard: volle Spaltenbreite neben der Sidebar, Deckel bei 1600px */
.dash-page {
  width: 100%;
  max-width: 1600px;
  margin: 0;
  display: grid;
  gap: 22px;
  box-sizing: border-box;
  justify-items: stretch;
  overflow-x: clip;
}
.dash-page > .heading,
.dash-page > .stats,
.dash-page > .split,
.dash-page > .card,
.dash-page > .pair,
.dash-page > .footnote {
  margin: 0; width: 100%; min-width: 0; max-width: 100%;
  box-sizing: border-box;
}
.dash-page .heading { align-items: flex-start; gap: 16px; margin-bottom: 0; }
.dash-page .heading h1 { font-size: 34px; letter-spacing: -1px; line-height: 1.1; }
.dash-page .heading p { font-size: 16px; line-height: 1.45; max-width: 52rem; color: var(--muted); }
.dash-page h2 { font-size: 19px; letter-spacing: -0.3px; }
.dash-page .card-lead { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.dash-page .card { padding: 22px 24px; overflow: hidden; }
.dash-page .stats.four,
.dash-page .dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
  width: 100%;
}
.dash-kpis .stat { padding: 22px 24px 20px; min-height: 142px; min-width: 0; box-sizing: border-box; }
.dash-kpis .stat-k { font-size: 13px; }
.dash-kpis .stat strong { margin: 14px 0 6px; font-size: 40px; letter-spacing: -1.2px; line-height: 1; }
.dash-kpis .stat strong.word { font-size: 26px; letter-spacing: -0.5px; }
.dash-kpis .kpi-hint { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.dash-kpis .delta { font-size: 13px; }
.dash-page .split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  align-items: stretch;
}
.dash-page .pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 0;
  width: 100%;
}
.dash-page .plats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  width: 100%;
}
.dash-page .plat { min-width: 0; box-sizing: border-box; overflow: hidden; }
.dash-page .split + .card { margin-top: 0; }
.dash-page .footnote { font-size: 13px; line-height: 1.5; }
.heading { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
h1 { margin: 0 0 2px; font-size: 22px; letter-spacing: -0.6px; }
h2 { margin: 0; font-size: 15px; }
.heading p { margin: 0; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.stats.five { grid-template-columns: repeat(5, 1fr); }
.stats.metrics { grid-template-columns: repeat(4, 1fr); }
.section-label { margin: 6px 0 10px; font-size: 15px; }
.stat, .card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; }
button.stat { width: 100%; text-align: left; }
.stat-k { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.01em; }
.delta { display: block; margin-top: 1px; font-size: 11px; font-weight: 600; }
.delta.good { color: #1b7a4d; }
.delta.bad { color: var(--bad); }
.delta.flat { color: var(--muted); font-weight: 500; }
.stats.metrics .stat { padding: 10px 12px 8px; }
.stats.metrics .stat strong { font-size: 18px; margin: 4px 0 2px; }
.stats.metrics .stat small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; font-size: 11px; }
.skeleton span, .skeleton strong { display: block; height: 12px; margin-top: 8px; border-radius: 5px; background: var(--lime); }
.skeleton strong { height: 22px; width: 60%; }
.stat strong { display: block; margin: 6px 0 2px; font-family: Manrope, sans-serif; font-size: 20px; }
.stat small { display: block; font-size: 11px; line-height: 1.35; }
.grid { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; }
.card + .card, .stack { margin-top: 12px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions .text-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; font-weight: 600; }
.list { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content max-content; column-gap: 20px; align-items: center; }
.list-head { padding: 8px 0; font-size: 10px; color: #7d8b9c; border-bottom: 1px solid #e6ebf2; white-space: nowrap; }
.item-cell, .meta { padding: 10px 0 4px; white-space: nowrap; }
.item-cell { min-width: 0; white-space: normal; }
.item-cell b { display: block; line-height: 1.4; font-weight: 650; font-size: 13px; }
.item-cell small { display: block; margin-top: 2px; line-height: 1.3; font-size: 11px; }
.list .actions { grid-column: 1 / -1; justify-content: flex-end; padding: 0 0 10px; border-bottom: 1px solid #e6ebf2; }
.list.plain .item-cell, .list.plain .meta { padding: 10px 0; border-bottom: 1px solid #e6ebf2; }
.pill { display: inline-block; border-radius: 5px; background: #e8eef5; padding: 2px 6px; font-size: 10px; font-weight: 700; color: var(--green); }
.pill.green { background: #e5f4ec; color: #1b7a4d; }
.pill.off { background: #f8ecea; color: var(--bad); }
.pill.flat { background: #eef2f6; color: #5b6b7c; }
.dash-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-filters select { padding: 6px 10px; font-size: 12px; font-weight: 600; }
.kpi { position: relative; }
.kpi svg { position: absolute; top: 12px; right: 12px; width: 15px; height: 15px; stroke: #8b97a8; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.stat strong.word { font-size: 17px; line-height: 1.25; }
.inventory h2, .card > h2 { margin-bottom: 2px; }
.dash-page .inv-row { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border: 0; border-top: 1px solid var(--line); background: transparent; text-align: left; font-size: 15px; border-radius: 0; }
.dash-page .inv-row:first-of-type { margin-top: 8px; }
.dash-page .inv-row:hover { color: var(--green); }
.dash-page .inv-row b { font-size: 16px; font-variant-numeric: tabular-nums; }
.plats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.plat { display: block; width: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; color: inherit; text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
a.plat:hover, button.plat:hover { border-color: #c5d0dc; background: #f1f5f9; }
.plat-top { display: flex; align-items: center; gap: 10px; }
.plat-top img { width: 24px; height: 24px; object-fit: contain; }
.plat-top strong { display: block; font-size: 15px; }
.plat dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.plat dt { color: var(--muted); font-size: 11px; }
.plat dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; line-height: 1.25; }
.plat-cta { display: inline-block; margin-top: 12px; color: var(--green); font-size: 13px; font-weight: 700; }
.activity { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; align-items: flex-start; }
.activity:first-of-type { border-top: 0; padding-top: 10px; }
button.activity, a.activity { width: 100%; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }
button.activity:first-of-type, a.activity:first-of-type { border-top: 0; }
.activity-link:hover { color: var(--green); background: #f3f7fb; }
.activity strong { display: block; font-size: 15px; line-height: 1.35; }
.activity span { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.activity small { color: var(--muted); white-space: nowrap; font-size: 13px; }
.empty-inline { margin: 8px 0 0; }
.chart-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.chart-note { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.chart-box.sparse .chart { gap: 18px; min-height: 180px; justify-content: flex-start; }
.chart-box.sparse .barwrap { flex: 0 0 clamp(48px, 12%, 96px); max-width: 96px; }
.chart-box.sparse .barwrap .bar { width: 70%; min-width: 28px; }
.chart-box.sparse .barwrap small { font-size: 12px; }
.sync-error-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.sync-error-list li { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #f8fafc; }
.sync-error-list li div { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sync-error-list p { margin: 8px 0 4px; font-size: 13px; line-height: 1.4; }
.sync-error-list small { color: var(--muted); font-size: 12px; }
.chart.plain { background-image: linear-gradient(to top, transparent calc(100% - 1px), var(--line) 100%), linear-gradient(var(--line), var(--line)); background-size: 100% 100%, 100% 1px; background-position: 0 0, 0 50%; background-repeat: no-repeat; }
.barwrap.duo .plot { gap: 2px; }
.pill.yellow { background: #fff5dc; color: #997325; }
.row-btn, a.row-btn { padding: 5px 8px; font-size: 11px; white-space: nowrap; }
a.row-btn { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: var(--button); font-weight: 600; }
a.row-btn.primary { background: var(--green); border-color: var(--green); color: var(--on-primary); }
.trade { display: flex; gap: 6px; margin-bottom: 8px; }
.trade button { border-radius: 999px; padding: 5px 12px; background: var(--button); font-size: 12px; }
.trade button.active { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chips button { border-radius: 999px; padding: 5px 11px; background: var(--button); color: var(--ink); font-size: 12px; font-weight: 600; }
.chips button.active { border-color: var(--green); color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.pager button { min-width: 30px; padding: 5px 8px; }
.pager button.active { background: var(--green); border-color: var(--green); color: var(--on-primary); }
.filters { display: flex; gap: 8px; margin-bottom: 10px; }
input, select, textarea { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; background: var(--button); color: var(--ink); }
.filters input { flex: 1; }
.form, .formgrid { display: grid; gap: 10px; }
.formgrid { grid-template-columns: 1fr 1fr; }
.form label, .formgrid label { display: grid; gap: 4px; font-size: 11px; }
.wide { grid-column: 1 / -1; }
.error { color: #ac3939; }
.notice, .empty { background: #eef3f8; border: 1px solid #d5e0ec; border-radius: 8px; padding: 10px 12px; line-height: 1.45; font-size: 13px; }
.empty { text-align: center; color: var(--muted); }
.card-head .trade { margin: 0; }
.chart-card { min-height: 0; }
.chart-card .empty { padding: 28px 12px; }
.chart-box { display: grid; grid-template-columns: 44px 1fr; gap: 6px; }
.y-axis { display: flex; flex-direction: column; justify-content: space-between; color: var(--muted); font-size: 10px; padding-bottom: 16px; text-align: right; }
.chart { height: 148px; display: flex; align-items: flex-end; gap: 6px; margin: 0; }
.chart.dense { gap: 3px; }
.chart.dense small { font-size: 9px; }
.barwrap { position: relative; flex: 1; height: 100%; display: grid; grid-template-rows: 1fr 1fr auto; border: 0; background: transparent; padding: 0; align-items: center; }
.barwrap.plain { display: flex; flex-direction: column; justify-content: flex-end; }
.barwrap.plain .plot { flex: 1; width: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.barwrap .up, .barwrap .down { display: flex; min-height: 0; width: 100%; justify-content: center; }
.barwrap .up { align-items: flex-end; }
.barwrap .down { align-items: flex-start; }
.barwrap .bar { width: min(18px, 72%); background: var(--bar); border-radius: 4px 4px 0 0; min-height: 0; }
.barwrap .bar.now { background: var(--green); }
.barwrap .down .bar { border-radius: 0 0 4px 4px; }
.barwrap .bar.neg, .neg { color: var(--bad); }
.barwrap .bar.neg { background: var(--bad); }
.barwrap small { display: block; width: 100%; text-align: center; color: var(--muted); font-size: 9px; line-height: 1.2; margin-top: 4px; }
.barwrap .tip { display: none; position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2; background: var(--green); color: var(--on-primary); border-radius: 6px; padding: 6px 8px; white-space: nowrap; font-size: 11px; line-height: 1.35; text-align: left; box-shadow: 0 6px 16px #15203333; }
.barwrap .tip b { display: block; font-weight: 700; }
.barwrap:hover .tip, .barwrap:focus-visible .tip { display: block; }
.split { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(240px, 1fr); gap: 12px; margin-bottom: 0; align-items: stretch; }
.split + .card, .pair { margin-top: 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dash-page .task { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-top: 0; padding: 14px 6px; border: 0; border-top: 1px solid var(--line); text-align: left; background: transparent; font-size: 15px; cursor: pointer; border-radius: 8px; }
.dash-page .task:first-of-type { border-top: 0; }
.dash-page .task:hover { color: var(--green); background: #f3f7fb; }
.dash-page .task b { font-variant-numeric: tabular-nums; font-size: 16px; }
.share { display: grid; grid-template-columns: 1fr 1fr; }
.share > div + div { border-left: 1px solid var(--line); margin-left: 6px; padding-left: 16px; }
.share-row { display: block; width: 100%; margin-top: 12px; padding: 0; border: 0; background: transparent; text-align: left; }
.share-row b { display: block; font-family: Manrope, sans-serif; font-size: 20px; line-height: 1; letter-spacing: -0.03em; }
.share-row .rank-name { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 600; }
.share-row.many { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name amount" "bar bar"; gap: 4px 10px; align-items: baseline; margin-top: 0; padding: 8px 0; border-top: 1px solid var(--line); }
.share-row.many:first-of-type { border-top: 0; padding-top: 10px; }
.share-row.many b { grid-area: amount; font-size: 14px; letter-spacing: 0; }
.share-row.many .rank-name { grid-area: name; margin-top: 0; color: var(--ink); }
.share-row.many .track { grid-area: bar; }
.track { height: 8px; background: var(--lime); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; background: var(--green); }
.track span.neg { background: var(--bad); }
.list.bill { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) max-content; }
.footnote { color: var(--muted); font-size: 11px; margin: 12px 0 0; }
.quiet { max-width: 480px; margin: 20px auto; text-align: center; padding: 24px 20px; }
.quiet h2 { margin-bottom: 6px; }
.quiet p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
.quiet .actions { justify-content: center; }
.card-head select { padding: 4px 6px; font-size: 11px; }
.category-field { position: relative; }
.category-trigger { width: 100%; display: flex; justify-content: space-between; text-align: left; font-weight: 500; color: var(--muted); }
.category-trigger.chosen { color: var(--ink); font-weight: 600; }
.category-menu { display: grid; gap: 4px; margin-top: 4px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.category-menu[hidden] { display: none; }
.category-list { max-height: 200px; overflow: auto; }
.category-head { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; }
.category-head button, .category-option { border: 0; background: transparent; }
.category-option { width: 100%; display: flex; gap: 6px; align-items: center; color: var(--green); text-align: left; padding: 6px 8px; }
.category-option span:nth-child(2) { flex: 1; }
.category-option:hover { background: #f3f6fa; }
dialog { border: 1px solid var(--line); border-radius: 12px; width: min(560px, 94vw); padding: 18px; background: var(--panel); color: var(--ink); }
dialog::backdrop { background: #15203380; }
#toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); background: #1a3054; color: #fff; border-radius: 8px; padding: 10px 14px; display: none; font-size: 13px; }
.settings { max-width: 480px; display: grid; gap: 10px; }
.vinted-card { display: grid; gap: 10px; }
.vinted-row { display: flex; align-items: center; gap: 12px; }
.vinted-card .vinted-row + .vinted-row { padding-top: 8px; border-top: 1px solid var(--line); }
.vinted-card .muted { margin: 2px 0 0; font-size: 11px; }
.vinted-logo { height: 28px; width: auto; display: block; flex: none; }
.vinted-logo.brand-ebay { height: 14px; }
.vinted-logo.brand-kleinanzeigen { height: 11px; }
.vinted-meta { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vinted-meta strong { font-size: 13px; line-height: 1; }
.vinted-row .actions { margin-left: auto; }
.vinted-row .actions button { padding: 5px 8px; font-size: 11px; }
.settings .heading { margin-bottom: 0; }
.settings h1 { font-size: 20px; }
.settings h2 { font-size: 14px; margin-bottom: 8px; }
.settings .card { padding: 12px 14px; }
.settings .form { gap: 6px; }
.settings .form button, .settings .danger { width: auto; justify-self: start; padding: 6px 10px; font-size: 12px; }
.settings input { padding: 6px 8px; }
.settings .notice, .settings .hint { margin: 6px 0 0; padding: 0; background: none; border: 0; font-size: 11px; line-height: 1.4; color: var(--muted); }
.settings .actions { margin-top: 6px; }
.landing, .auth { max-width: 680px; margin: auto; padding: 22px; }
.hero { text-align: center; padding: 48px 0 22px; }
.hero h1 { font-size: 36px; letter-spacing: -1.4px; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero .actions, .landing header { display: flex; justify-content: center; gap: 8px; }
.landing header { justify-content: space-between; align-items: center; }
@media (max-width: 1440px) {
  .dash-page { max-width: 100%; }
}
@media (max-width: 1200px) {
  .content { padding: 16px 18px 24px; }
  .dash-page .split { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static; width: auto; max-width: none; height: auto;
    border-right: 0; border-bottom: 1px solid #23272d;
  }
  .sidebar .main-nav { display: flex; overflow: auto; }
  .main { margin: 0; width: 100%; max-width: none; }
  .stats, .grid, .formgrid, .split, .pair, .share, .plats { grid-template-columns: 1fr; }
  .share > div + div { border-left: 0; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
  .stats.four, .stats.five, .stats.metrics, .plats { grid-template-columns: 1fr 1fr; }
  .dash-page .stats.four,
  .dash-page .dash-kpis,
  .dash-page .plats { grid-template-columns: 1fr 1fr; }
  .dash-page .split,
  .dash-page .pair { grid-template-columns: 1fr; }
  .dash-page .heading { flex-direction: column; align-items: stretch; }
  .dash-page .heading h1 { font-size: 28px; }
  .dash-kpis .stat strong { font-size: 32px; }
  .wide { grid-column: auto; }
}
@media (max-width: 560px) {
  .stats.four, .stats.five, .stats.metrics, .plats,
  .dash-page .stats.four,
  .dash-page .dash-kpis,
  .dash-page .plats { grid-template-columns: 1fr; }
  .content { padding: 12px 14px 20px; }
  .dash-page { gap: 14px; max-width: 100%; }
  .dash-page .heading h1 { font-size: 24px; }
  .dash-kpis .stat { min-height: 0; }
  .dash-kpis .stat strong { font-size: 28px; }
  .activity { flex-direction: column; gap: 4px; }
  .activity small { white-space: normal; }
}
