/* Kontor — Hausstil von mueller-power (app/static/css/app.css, Redesign):
 * weiße Karten auf gebrochenem Weiß, Geist, weiche Radien, schwarze
 * Hauptknöpfe, Holz-Müller-Grün nur als Akzent (Links, aktiv, Status).
 * Jede Farbe ist ein Token auf :root; Dunkel definiert nur die Tokens neu.
 * Gilt für Team-Kontor und Profi-Bereich. Ohne Build-Schritt. */
@font-face {
  font-family: "Geist";
  src: url("/static/vendor/fonts/geist-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/vendor/fonts/geist-mono-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- Tokens */
:root {
  /* surfaces */
  --bg: #f6f5f1;            /* page */
  --surface: #ffffff;       /* cards, sidebar, header */
  --surface-sunken: #f1efea; /* board columns, segmented controls */
  --surface-subtle: #faf9f6; /* table heads, inputs, quiet blocks */
  --hover: #eceae4;
  --row-hover: #faf9f6;
  /* text */
  --ink: #1c1b18;
  --ink-2: #3a3833;         /* body copy in secondary places */
  --ink-3: #57534b;         /* labels */
  --muted: #6b675e;         /* meta text */
  --faint: #8e8a80;         /* icons, placeholders */
  /* lines */
  --line: #e6e3dc;          /* card borders */
  --line-input: #d6d2c8;    /* buttons, inputs */
  --line-soft: #efede7;     /* row separators */
  --line-strong: #b9b5aa;   /* hover borders */
  --line-dashed: #b9b5aa;
  /* accent: green */
  --accent: #1f5130;
  --accent-hover: #123620;
  --accent-deep: #123620;   /* text on --accent-soft */
  --accent-soft: #e4eee6;
  --accent-light: #c5dccb;
  --accent-ink: #ffffff;    /* text on --accent */
  --link-hover: #123620;
  /* primary buttons: black */
  --primary: #1f5130;
  --primary-hover: #123620;
  --primary-ink: #ffffff;
  /* status */
  --ok: #0b6b3a;
  --ok-soft: #dcf3e3;
  --warn: #7a2e0e;
  --warn-dot: #dc6803;
  --warn-soft: #fef0c7;
  --danger: #912018;
  --danger-soft: #fee4e2;
  --tag-bg: #f1efea;
  --tag-ink: #3a3833;
  --avatar-bg: #eceae4;
  --add-bg: #e6f2e3;
  --add-ink: #1f4d14;
  --del-bg: #fdecea;
  --del-ink: #7a1f18;
  --overlay: rgba(250, 250, 248, 0.72);
  --backdrop: rgba(17, 17, 17, 0.35);
  /* shape */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.08);
  --shadow-menu: 0 8px 24px rgba(17, 17, 17, 0.1), 0 1px 3px rgba(17, 17, 17, 0.06);
  --focus: 0 0 0 3px rgba(31, 81, 48, 0.22);
  --sidebar-w: 248px;
  --header-h: 64px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --logo-plate: transparent;
  /* ältere Namen, in Vorlagen noch benutzt */
  --card: var(--surface);
  --card-muted: var(--surface-sunken);
  --shadow: none;
  --radius-card: var(--radius-lg);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121210;
    --surface: #1b1a17;
    --surface-sunken: #24231f;
    --surface-subtle: #201f1b;
    --hover: #2a2925;
    --row-hover: #201f1b;
    --ink: #edebe6;
    --ink-2: #d6d2c8;
    --ink-3: #b9b5aa;
    --muted: #a19d93;
    --faint: #827e75;
    --line: #2f2d29;
    --line-input: #3d3b36;
    --line-soft: #262521;
    --line-strong: #57534b;
    --line-dashed: #57534b;
    --accent: #7cc896;
    --accent-hover: #9bd8ae;
    --accent-deep: #b5e3c3;
    --accent-soft: #1c2d21;
    --accent-light: #2c4a35;
    --accent-ink: #0d1a11;
    --link-hover: #9bd8ae;
    --primary: #2f7a4a;
    --primary-hover: #38905a;
    --primary-ink: #ffffff;
    --ok: #6ce9a6;
    --ok-soft: #123222;
    --warn: #fec84b;
    --warn-dot: #f79009;
    --warn-soft: #3a2a0f;
    --danger: #fda29b;
    --danger-soft: #3b1714;
    --tag-bg: #2a2925;
    --tag-ink: #d6d2c8;
    --avatar-bg: #2a2925;
    --add-bg: #1d3420;
    --add-ink: #b8e6c0;
    --del-bg: #45231e;
    --del-ink: #f2b8ad;
    --overlay: rgba(14, 14, 13, 0.72);
    --backdrop: rgba(0, 0, 0, 0.55);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
    --focus: 0 0 0 3px rgba(124, 200, 150, 0.3);
    --logo-plate: #ffffff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121210;
  --surface: #1b1a17;
  --surface-sunken: #24231f;
  --surface-subtle: #201f1b;
  --hover: #2a2925;
  --row-hover: #201f1b;
  --ink: #edebe6;
  --ink-2: #d6d2c8;
  --ink-3: #b9b5aa;
  --muted: #a19d93;
  --faint: #827e75;
  --line: #2f2d29;
  --line-input: #3d3b36;
  --line-soft: #262521;
  --line-strong: #57534b;
  --line-dashed: #57534b;
  --accent: #7cc896;
  --accent-hover: #9bd8ae;
  --accent-deep: #b5e3c3;
  --accent-soft: #1c2d21;
  --accent-light: #2c4a35;
  --accent-ink: #0d1a11;
  --link-hover: #9bd8ae;
  --primary: #2f7a4a;
  --primary-hover: #38905a;
  --primary-ink: #ffffff;
  --ok: #6ce9a6;
  --ok-soft: #123222;
  --warn: #fec84b;
  --warn-dot: #f79009;
  --warn-soft: #3a2a0f;
  --danger: #fda29b;
  --danger-soft: #3b1714;
  --tag-bg: #2a2925;
  --tag-ink: #d6d2c8;
  --avatar-bg: #2a2925;
  --add-bg: #1d3420;
  --add-ink: #b8e6c0;
  --del-bg: #45231e;
  --del-ink: #f2b8ad;
  --overlay: rgba(14, 14, 13, 0.72);
  --backdrop: rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
  --focus: 0 0 0 3px rgba(124, 200, 150, 0.3);
  --logo-plate: #ffffff;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ Base */
* { box-sizing: border-box; }
html { font-size: 17px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--link-hover); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: 34px; line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code, pre, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--tag-bg); padding: 0.1em 0.35em; border-radius: 5px; }
pre { background: var(--surface-subtle); border: 1px solid var(--line); padding: 0.75rem 1rem; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Icons und Avatare */
.i { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.av, .avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--avatar-bg); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; letter-spacing: 0.01em;
}
.avatar { width: 30px; height: 30px; font-size: 13px; }
.av.dark, .avatar.dark { background: var(--primary); color: var(--primary-ink); }
.avatar.lg, .av.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 64px; height: 64px; font-size: 20px; }
.avatar.sm, .av.sm { width: 28px; height: 28px; font-size: 13px; }

/* ---------------------------------------------------------------- Layout */
.app { display: flex; min-height: 100vh; }
/* Die weiße Spalte der Seitenleiste (samt Rand) läuft auch auf langen Seiten bis unten. */
@media (min-width: 861px) {
  .app { background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--line) calc(var(--sidebar-w) - 1px), var(--line) var(--sidebar-w), transparent var(--sidebar-w)); }
}
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 24px; padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
/* Das PNG (300×105) hat rechts ~100 px Leerraum: abschneiden. */
.brand-logo { display: block; height: 40px; width: auto; aspect-ratio: 200 / 105; object-fit: cover; object-position: left center; background: var(--logo-plate); border-radius: 4px; }
.brand-word { display: block; font-size: 20px; font-weight: 700; line-height: 40px; letter-spacing: -0.01em; color: var(--accent); }
.brand-sep { width: 1px; height: 30px; background: var(--line-input); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.brand-text small { font-size: 12px; color: var(--muted); }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group.bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.nav-section { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.sidebar .nav {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-size: 16px; font-weight: 500; line-height: 1.25;
}
.sidebar .nav:hover { background: var(--hover); color: var(--ink); }
.sidebar .nav.active { background: var(--accent-soft); color: var(--accent-deep); font-weight: 600; }
.sidebar .nav .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--muted); font-family: var(--mono); }
.nav .sq { width: 8px; height: 8px; border-radius: 2px; background: var(--line-strong); margin: 0 5px; flex-shrink: 0; }
.nav.active .sq { background: var(--accent); }
.sidebar-backdrop { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 32px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-spacer { flex: 1; }
.online { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 6px; border-radius: var(--radius); cursor: default; }
.online-avatars { display: inline-flex; }
.online-avatars .av { width: 28px; height: 28px; font-size: 12px; border: 2px solid var(--surface); margin-left: -8px; position: relative; }
.online-avatars .av:first-child { margin-left: 0; }
.online-avatars .av::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.online-avatars .av.more::after { display: none; }
.online-avatars .av.more { background: var(--surface-sunken); color: var(--ink-3); }
.online-label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--muted); }
.search {
  flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line-input); border-radius: var(--radius); background: var(--surface-subtle); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.search input[type="search"] { border: 0; background: transparent; outline: none; box-shadow: none; flex: 1; min-width: 0; padding: 0; height: auto; font-size: 15px; color: var(--ink); }
.search input[type="search"]:focus { box-shadow: none; }
.kbd { font-family: var(--mono); font-size: 13px; border: 1px solid var(--line-input); border-radius: var(--radius-xs); padding: 2px 6px; color: var(--muted); background: var(--surface); line-height: 1.3; }
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; position: relative;
  border: 0; background: transparent; border-radius: var(--radius); color: var(--ink-2); cursor: pointer; padding: 0; flex-shrink: 0;
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn.outlined { border: 1px solid var(--line-input); background: var(--surface); }
.menu-btn { display: none; }
.theme-btn .theme-sun { display: none; }
:root[data-theme="dark"] .theme-btn .theme-sun { display: block; }
:root[data-theme="dark"] .theme-btn .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .theme-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .theme-moon { display: none; }
}
.user-menu { position: relative; }
.user-menu > summary { list-style: none; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.profile-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 4px; border-radius: var(--radius); font-size: 15px; font-weight: 500; color: var(--ink); }
.profile-btn:hover { background: var(--hover); }
.user-menu .menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-menu); padding: 6px; z-index: 40;
}
.user-menu .menu > a, .user-menu .menu > form > button, .user-menu .menu > form > .linklike {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: 15px; font-weight: 500;
}
.user-menu .menu > a:hover, .user-menu .menu > form > button:hover { background: var(--hover); color: var(--ink); }
.user-menu .menu .i { color: var(--muted); }
.menu-head { padding: 8px 10px 10px; font-size: 15px; border-bottom: 1px solid var(--line); margin-bottom: 6px; line-height: 1.4; }
.menu-head small { display: block; }
.menu-name { display: block; font-weight: 600; color: var(--ink); }

/* Füllt ein MacBook (bis 1728 px Bildschirm) ganz aus; breiter wird es nicht. */
.content { flex: 1; width: 100%; max-width: 1480px; padding: 40px 40px 64px; min-width: 0; }
.content.wide { max-width: none; }
.content.narrow { max-width: 1000px; }
.content.reading { max-width: 920px; }
.content-public { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.content-public > * { width: 100%; max-width: 420px; }


/* ------------------------------------------------------------ Components */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; min-width: 0; }
.card + .card { margin-top: 20px; }
.card > h2:first-child, .card > h3:first-child, .card-head h2 { margin-top: 0; }
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 14px; }
.card h3 { font-size: 15px; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .empty { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head a { font-size: 15px; font-weight: 500; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.stack > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 20px; }
/* Sonst würde eine lange <select>-Option die ganze Spalte verbreitern. */
.grid > * { min-width: 0; }
.grid > .card + .card { margin-top: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.grid-main-side { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.grid-main-aside { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.grid-doc { grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.sticky-side { position: sticky; top: calc(var(--header-h) + 24px); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.page-head > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { margin: 0; overflow-wrap: anywhere; }
.page-head .eyebrow, .eyebrow { font-size: 15px; color: var(--muted); font-weight: 500; }
.page-head .sub { color: var(--ink-3); margin: 0; font-size: 15px; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions > form { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: var(--radius);
  border: 1px solid var(--accent); background: var(--surface); color: var(--ink); cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 400; white-space: nowrap; line-height: 1; text-decoration: none;
}
.btn:hover { background: var(--accent-soft); color: var(--ink); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 500; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-soft); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 15px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 14px; border-radius: var(--radius-sm); }
.btn-icon { width: 40px; padding: 0; }
.btn-sm.btn-icon { width: 34px; }
.btn-block { width: 100%; }
.btn[disabled], .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn .i { width: 16px; height: 16px; }
.linklike { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--link-hover); text-decoration: underline; }
.linklike.quiet { color: var(--muted); font-size: 14px; }
.linklike.quiet:hover { color: var(--danger); }

input, select, textarea, button { font: inherit; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="date"], input[type="url"], input[type="number"], input[type="tel"], input[type="time"], input[type="datetime-local"], select, textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-input); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px;
}
select { padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a86' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
select[multiple] { height: auto; background-image: none; padding: 6px; }
textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; border-radius: var(--radius); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="file"] { font-size: 15px; color: var(--ink-3); }
input[type="file"]::file-selector-button { font: inherit; font-size: 15px; font-weight: 500; height: 32px; padding: 0 12px; margin-right: 10px; border: 1px solid var(--line-input); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
input[type="file"]::file-selector-button:hover { background: var(--hover); }
textarea.editor { min-height: 60vh; font-family: var(--mono); font-size: 15px; tab-size: 2; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; color: var(--ink-3); }
.field { margin-bottom: 16px; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > .field { flex: 1 1 160px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; }
.inline-form label { margin: 0; }
.help { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); margin: 0; cursor: pointer; }
.check input { margin: 0; width: 18px; height: 18px; }

.flash, .alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 15px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.flash { background: var(--accent-soft); border-color: transparent; color: var(--accent-deep); font-weight: 500; }
.flash-warn, .alert-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.flash-error, .alert-error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert { display: block; }
.alert.ok { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-xs);
  background: var(--tag-bg); color: var(--tag-ink); font-size: 14px; font-weight: 500; white-space: nowrap; vertical-align: middle; line-height: 1;
}
a.tag:hover { color: var(--ink); background: var(--hover); }
.tag.accent, .tag.ok { background: var(--accent-soft); color: var(--accent-deep); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.neutral { background: var(--tag-bg); color: var(--muted); }
.tag.solid { background: var(--primary); color: var(--primary-ink); }
.tag .i { width: 13px; height: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-input); background: var(--surface); font-size: 15px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
}
.chip.has-av { padding-left: 4px; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip.active .av { background: rgba(255, 255, 255, 0.18); color: inherit; }
.chip.sm { height: 30px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius); background: var(--surface-sunken); gap: 2px; }
.seg a, .seg button, .seg label {
  height: 34px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-sm); background: transparent;
  font-size: 15px; font-weight: 500; color: var(--ink-3); cursor: pointer; margin: 0; white-space: nowrap;
}
.seg a:hover, .seg button:hover, .seg label:hover { color: var(--ink); }
.seg .active, .seg input:checked + label { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg.full { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.seg.full label { height: 32px; padding: 0 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; }
.tabs a { padding: 10px 12px; font-size: 15px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-color: var(--ink); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 160px; }
.list .meta, .meta { font-size: 14px; color: var(--muted); }
.list .grow > a { color: var(--ink); font-weight: 500; }
.list .grow > a:hover { color: var(--accent); }

table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table th { font-size: 14px; font-weight: 500; color: var(--ink-3); background: var(--surface-subtle); border-bottom-color: var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; overflow-x: auto; background: var(--surface); }
.card .table-wrap { border-radius: var(--radius); }
.card > .table-wrap:first-child { margin-top: 0; }
.empty { color: var(--muted); padding: 4px 0; margin: 0; font-size: 15px; }
.empty-box { border: 1.5px dashed var(--line-dashed); border-radius: 12px; padding: 24px 14px; text-align: center; font-size: 15px; color: var(--muted); }
.progress { height: 4px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
details.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 10px; background: var(--surface); }
details.box > summary { cursor: pointer; font-weight: 500; font-size: 15px; list-style: none; display: flex; align-items: center; gap: 8px; }
details.box > summary::-webkit-details-marker { display: none; }
details.box > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); transition: transform 0.15s; margin-right: 2px; }
details.box[open] > summary::before { transform: rotate(45deg); }
details.box[open] > summary { margin-bottom: 12px; }
.due { font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.assignee { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.due.overdue { color: var(--danger); font-weight: 600; }
.due.soon { color: var(--warn); font-weight: 600; }
.doc-status-archived { opacity: 0.65; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--ink); }
.dot.ring { background: transparent; border: 1.5px solid var(--faint); }

/* Bitte warten (große Uploads, KI) */
.busy { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: var(--overlay); backdrop-filter: blur(3px); }
.busy-card { display: flex; align-items: center; gap: 16px; min-width: 300px; max-width: calc(100vw - 32px); padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-menu); }
.busy-card strong { display: block; font-size: 16px; font-weight: 600; color: var(--ink); }
.busy-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
.spinner { flex: none; width: 26px; height: 26px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Anmelden */
.login-card { padding: 32px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.login-card h1 { font-size: 24px; margin-bottom: 6px; }
.login-card .btn-primary { width: 100%; height: 44px; margin-top: 4px; }

/* Kennzahlen: eine Reihe Karten mit großer Zahl */
.kpi { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.kpi > .card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; color: var(--ink); }
.kpi > .card + .card { margin-top: 0; }
.kpi > a.card:hover { border-color: var(--line-strong); color: var(--ink); }
.kpi .num { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { font-size: 15px; color: var(--ink-3); }
.alert-ok { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }
.content-public > .card { padding: 32px; }
.brand-text strong { color: var(--ink); }
.profi .brand-text { display: flex; }

/* ------------------------------------------------------------- Responsiv */
@media (max-width: 1100px) {
  .grid-main-side, .grid-main-aside, .grid-doc { grid-template-columns: minmax(0, 1fr); }
  .sticky-side { position: static; }
}
@media (max-width: 960px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 28px 24px 48px; }
  .topbar { padding: 0 24px; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .hide-sm { display: none !important; }
  .topbar { padding: 0 12px; gap: 6px; }
  .search { height: 38px; }
  .content { padding: 20px 16px 48px; }
  h1 { font-size: 28px; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform 0.2s; box-shadow: none; }
  body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-menu); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: var(--backdrop); z-index: 45; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .user-name { display: none; }
  .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi > .card { padding: 14px; }
  .kpi .num { font-size: 24px; }
}

/* ---------------------------------------------------------------- Kontor */
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.row-muted td { color: var(--muted); }
.table tr.row-danger td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.mono { font-family: var(--mono); font-size: 0.88em; white-space: nowrap; }
.pager { display: flex; gap: 0.5rem; align-items: center; justify-content: flex-end; margin-top: 0.75rem; font-size: 0.85rem; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin-bottom: 1rem; }
.filters input[type="search"] { flex: 1 1 260px; width: auto; }
.filters label.check { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.filters label.check input { width: auto; }
.status-card { position: relative; color: var(--ink); }
a.status-card:hover { border-color: var(--line-strong); color: var(--ink); }
.status-card::before { content: ""; position: absolute; left: 24px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.status-card > label { padding-left: 16px; }
.status-card.ok::before { background: var(--accent); }
.status-card.warn::before { background: var(--warn-dot); }
.status-card.danger::before { background: var(--danger); }
.status-card .big { font-size: 16px; font-weight: 600; margin: 4px 0; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 500; font-family: var(--mono); background: var(--danger); color: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 15px; }
.kv dt { color: var(--ink-3); font-weight: 500; }
.kv dd { margin: 0; }
.invite-link { display: flex; gap: 0.5rem; }
.invite-link input { font-family: var(--mono); font-size: 0.85rem; }

/* Wissensbasis */
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.grid-main > div > .card + .card { margin-top: 1rem; }
.fact { padding: 14px 0 14px 14px; border-top: 1px solid var(--line-soft); box-shadow: inset 2px 0 0 var(--line); }
.card h2 + .fact { border-top: 0; }
.fact-entwurf { box-shadow: inset 2px 0 0 var(--warn-dot); }
.fact-freigegeben { box-shadow: inset 2px 0 0 var(--accent); }
.fact-verworfen { opacity: 0.6; }
.fact-head { display: flex; flex-wrap: wrap; gap: 0.3rem 0.4rem; align-items: center; margin-bottom: 0.35rem; }
.fact-product { font-weight: 600; margin-right: 0.3rem; }
.fact-vis { font-size: 0.75rem; margin-left: auto; }
.fact-statement { margin: 0 0 0.25rem; }
.fact-detail { margin: 0 0 0.25rem; font-size: 0.9rem; }
.fact-check { color: var(--warn); }
.fact-origin { margin: 0 0 0.45rem; font-size: 0.8rem; color: var(--muted); }
.fact-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: flex-start; }
.fact-actions form { margin: 0; }
.fact-edit { flex-basis: 100%; }
.fact-edit[open] { padding: 0.6rem 0; }
.fact-edit > summary { list-style: none; display: inline-flex; }
.fact-edit > summary::-webkit-details-marker { display: none; }
.fact-edit[open] > summary { margin-bottom: 0.6rem; }
.fact-actions .fact-edit { flex-basis: auto; }
.fact-actions .fact-edit[open] { flex-basis: 100%; }
select.select-sm { width: auto; height: 34px; padding: 0 30px 0 10px; font-size: 15px; }

/* Copilot */
.chat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1rem; align-items: start; }
.chat-list { position: sticky; top: 72px; max-height: calc(100vh - 96px); overflow-y: auto; }
.chat-list .list li { flex-direction: column; gap: 0.1rem; }
.chat-list a { color: var(--ink); font-size: 0.9rem; }
.chat-list a.active { color: var(--accent); font-weight: 600; }
.chat-thread { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1rem; }
.msg-user { align-self: flex-end; max-width: min(72ch, 85%); background: var(--primary); color: var(--primary-ink); padding: 12px 16px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; }
.msg-ai { background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 18px 22px; max-width: 90ch; }
.msg-ai .answer { white-space: pre-wrap; line-height: 1.55; }
.msg-ai sup a { font-size: 0.72rem; font-weight: 700; padding: 0 0.15rem; text-decoration: none; }
.msg-label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.refs { margin: 0.8rem 0 0; padding: 0.6rem 0 0; border-top: 1px solid var(--line-soft); font-size: 0.82rem; list-style: none; }
.refs li { margin: 0.15rem 0; }
.refs .n { display: inline-block; min-width: 1.6rem; font-weight: 700; color: var(--accent-deep); }
.msg-meta { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.6rem; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.msg-meta form { margin: 0; }
.chat-form textarea { min-height: 90px; }
.chat-form-top { margin-bottom: 1rem; }
.chat-thread .msg-user:not(:first-child) { margin-top: 1.5rem; }
.examples { display: flex; flex-direction: column; gap: 0.5rem; }
.search-hits { margin-bottom: 1rem; }
.hit-list { list-style: none; margin: 0.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.hit { border-top: 1px solid var(--line-soft); padding-top: 0.6rem; }
.hit:first-child { border-top: 0; padding-top: 0; }
.hit-head { font-weight: 600; margin-bottom: 0.2rem; }
.hit-text { font-size: 0.92rem; line-height: 1.5; overflow-wrap: anywhere; }
.msg-stock { margin-top: 0.8rem; padding-top: 0.6rem; border-top: 1px solid var(--line-soft); font-size: 0.88rem; }
.hit-group { font-size: 0.95rem; margin: 1rem 0 0.4rem; }
.hit-group:first-of-type { margin-top: 0.5rem; }
.hit-more { margin-top: 0.75rem; }
.hit-more summary { cursor: pointer; font-weight: 600; color: var(--accent-deep); }
.hit-more .hit-list { margin-top: 0.6rem; }
.examples button { text-align: left; white-space: normal; }
@media (max-width: 960px) {
  .grid-main, .chat-layout { grid-template-columns: 1fr; }
  .chat-list { position: static; max-height: 220px; order: 2; }
}

/* Wissensinterview — fürs Handy gebaut */
.interview { max-width: 720px; }
.interview-start { max-width: 720px; }
.interview-q { font-size: 1.25rem; font-weight: 600; line-height: 1.3; margin: 0.2rem 0 0.9rem; }
.interview-question textarea { min-height: 160px; font-size: 1.05rem; }
.interview-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: flex-end; align-items: center; margin-top: 0.6rem; }
.interview-actions form { margin: 0; }
.interview-actions .btn-primary { min-height: 44px; padding-left: 1.4rem; padding-right: 1.4rem; }
.dictate { min-height: 44px; }
.dictate.listening { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

/* Profi-Bereich — Handy zuerst, Navigation am Daumen */
body.profi { font-size: 16px; padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.profi-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.profi-top .brand { padding: 0; }
.profi-top .brand-logo { height: 34px; }
.profi-top .brand-word { font-size: 18px; line-height: 34px; }
.profi .brand-text { display: flex; }
.profi-signout { margin: 0; font-size: 0.8rem; }
.profi-main { max-width: 680px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.profi-main h1 { font-size: 26px; margin: 6px 0 14px; }
.profi-hello { margin-top: 0.2rem; }
.profi-main .card + .card, .profi-main form.card + .card, .profi-main .card + form.card { margin-top: 1rem; }
.profi-ask textarea { min-height: 110px; font-size: 1.05rem; }
.profi-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.profi-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 10px; font-size: 13px; font-weight: 500; color: var(--muted); text-decoration: none; }
.profi-nav a .i { width: 22px; height: 22px; }
.profi-nav a:hover { color: var(--ink); }
.profi-nav a.active { color: var(--accent); font-weight: 600; }
.btn-block { width: 100%; height: 48px; margin-top: 12px; }
.photo-btn { min-height: 44px; cursor: pointer; margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.photo-btn.has-files { border-color: var(--accent); color: var(--accent-deep); }
.msg-photo { display: block; max-width: 100%; max-height: 260px; margin-bottom: 8px; border-radius: var(--radius); }
.pickup-lines { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.5rem; }
.pickup-line { display: grid; grid-template-columns: minmax(0, 1fr) 5.5rem 5rem; gap: 0.4rem; }
.stock-results { margin-top: 0.5rem; }
.hint-card { background: var(--warn-soft); border-color: transparent; }
.hint-card > label { color: var(--warn); font-weight: 600; }
.pickup-status { display: flex; gap: 0.5rem; align-items: center; font-weight: 600; }
.pickup-angefragt { box-shadow: inset 3px 0 0 var(--danger); }
.pickup-bestaetigt { box-shadow: inset 3px 0 0 var(--warn-dot); }
.pickup-bereit { box-shadow: inset 3px 0 0 var(--accent); }
@media (max-width: 420px) {
  .pickup-line { grid-template-columns: minmax(0, 1fr) 4.5rem; }
  .pickup-line input[name="unit"] { grid-column: 2; }
  .profi .brand-text small { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

.showroom-teaser { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
.showroom-teaser:hover { border-color: var(--accent); color: var(--ink); }

.check-inline { display: inline-flex; gap: 8px; align-items: center; margin: 4px 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.check-inline input { width: auto; }
.path-question { position: relative; }
.path-delete { margin: 0.4rem 0 0; }
.path-options { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.path-options details.box summary .tag { margin-left: 0.3rem; }

/* Drucken */
@media print {
  .topbar, .sidebar, .sidebar-backdrop, .tabs, .actions, .flash, .no-print, .profi-top, .profi-nav { display: none !important; }
  .app { display: block; background: none; }
  .content { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; padding: 0; }
  body { background: #fff; color: #000; }
}

/* Reklamation */
.claim-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.5rem; }
.claim-photos figure { margin: 0; }
.claim-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.claim-photos figure form { text-align: center; margin-top: 0.2rem; }
.claim-photos figure .linklike { font-size: 0.8rem; }
.claim-photos-print { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.claim-photos-print img { aspect-ratio: auto; }
.claim-photos-print figcaption { font-size: 0.8rem; color: var(--muted); }
.checklist li .grow { line-height: 1.4; }
@media print { .claim-photos-print figure { break-inside: avoid; } }

/* Zuschnitt */
.cut-sheets { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.75rem; }
.cut-sheets-big { grid-template-columns: 1fr; }
.cut-sheet { margin: 0; }
.cut-sheet svg { width: 100%; height: auto; display: block; }
.cut-sheet figcaption { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }
.cut-raw { fill: var(--surface-sunken); }
.cut-usable { fill: var(--bg, #fff); }
.cut-piece { fill: #e9dcc4; stroke: #6b5536; stroke-width: 4; }
.cut-label { fill: #3b2f1e; text-anchor: middle; dominant-baseline: central; font-family: inherit; font-weight: 600; }
.cut-pieces td { vertical-align: top; }
textarea.cut-list { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; min-height: 160px; }
@media print { .cut-sheets { grid-template-columns: 1fr 1fr; } .cut-sheet { break-inside: avoid; } }
.cut-pieces td.num small { white-space: normal; display: inline-block; max-width: 14rem; }

/* Prüfen in einem Rutsch */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; background: var(--accent-soft); border-color: transparent; }
.bulk-bar .actions form { margin: 0; }

/* Häkchenliste */
.picker-row { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; margin: 0; font-size: 15px; font-weight: 400; color: var(--ink); }
.picker-row small { font-size: 0.8rem; }
.picker-row input { width: auto; margin-top: 0.25rem; }
.fetch-run progress { height: 6px; accent-color: var(--accent); }
.bulk-bar-inline { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line-soft); }

/* Quelltexte */
.page-text { white-space: pre-wrap; font-size: 0.92rem; line-height: 1.6; max-width: 80ch; }
.page-text mark, .snippet mark { background: var(--warn-soft); color: inherit; padding: 0 2px; border-radius: 3px; }
.search-hits .snippet { font-size: 0.88rem; color: var(--muted); }
.page-nav select { width: auto; }
.btn.disabled { opacity: 0.4; pointer-events: none; }
.grid-2-1 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid-2-1 { grid-template-columns: 2fr 1fr; } }

/* QR-Schilder */
.sign-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.sign-bar select { width: auto; }
.sign-edit { margin-top: .5rem; min-width: 240px; }
details > summary.btn { list-style: none; display: inline-block; }
details > summary.btn::-webkit-details-marker { display: none; }
/* Artikelpflege */
.article-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; }
.article-images figure { margin: 0; }
.article-images img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: var(--radius-sm); }
.article-images figcaption { font-size: .8rem; color: var(--muted); margin-top: .2rem; }
.thumb-empty { display: block; width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--surface-sunken); }
.spark { width: 100%; height: 60px; color: var(--accent); display: block; }

/* Quelle: Stand und genau ein nächster Schritt (sources/_knowledge.html) */
.next-step { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; padding: 18px 20px; margin: 0 0 8px; border-radius: var(--radius); background: var(--surface-sunken); }
.next-step .grow { flex: 1 1 16rem; min-width: 0; }
.next-step strong { font-size: 16px; font-weight: 600; }
.next-step p { margin: 0.2rem 0 0; color: var(--muted); }
.next-step.next-done { background: var(--accent-soft); }
.next-step.next-read_text, .next-step.next-run_ki, .next-step.next-review { background: var(--accent-soft); }
.next-step.next-nothing { background: transparent; border: 1px dashed var(--line-dashed); }
.next-check { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.step .grow { flex: 1 1 14rem; min-width: 0; }
.step p { margin: 0.1rem 0 0; }
.step-mark { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 14px; font-weight: 600; font-family: var(--mono); border: 1.5px solid var(--line-strong); color: var(--muted); }
.step.ok .step-mark { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.todo .step-mark, .step.stale .step-mark { border-color: var(--warn-dot); color: var(--warn); }
.step.failed .step-mark { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.step.running .step-mark { border-color: transparent; }
.step.off { opacity: 0.6; }
.step-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.step-history { margin-top: 0.5rem; }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }

/* Schilder: Vorschau am Artikel, Großansicht, Druckliste (signs/*.html) */
.sign-thumbs { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.sign-format { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-sunken); color: var(--ink-2); font-size: 14px; font-weight: 500; text-align: center; }
.sign-format:hover { border-color: var(--line-strong); color: var(--ink); }
.sign-format.active { border-color: var(--ink); background: var(--surface); color: var(--ink); }
.sign-format .sign-fit { width: 100%; }
.sign-thumbs .sign-format { flex: 0 0 auto; }
.sign-thumbs .sign-format:nth-child(-n+2) { width: 170px; }
.sign-thumbs .sign-format:nth-child(n+3) { width: 116px; }
.sign-view { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.sign-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 28px; border-radius: var(--radius-lg); background: var(--surface-sunken); }
.sign-formats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; align-items: end; }
.sign-formats .sign-format { padding: 8px 6px; font-size: 13px; line-height: 1.25; }
.sign-price { margin-top: 14px; }
.queue-group .list li { flex-wrap: nowrap; }
.queue-group .list form { margin: 0; }
@media (max-width: 1100px) {
  .sign-view { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sign-stage { padding: 14px; }
  .sign-thumbs { gap: 10px; }
  .sign-thumbs .sign-format:nth-child(-n+2) { width: calc(50% - 5px); }
  .sign-thumbs .sign-format:nth-child(n+3) { width: calc(33.33% - 7px); }
}

/* ======================================================== Listen-Seiten
 * Bausteine aus templates/_ui.html, nach docs/kontor-ux-redesign-brief.md:
 * Farbe heißt Bedeutung — Grün nur für Navigation, Primärknopf, Links;
 * Zustände immer mit Text. */
:root {
  --crit-fg: #912018; --crit-bg: #fee4e2; --crit-accent: #c4320a; --crit-num: #b42318; --crit-tint: #fef3f2;
  --att-fg: #7a2e0e; --att-bg: #fef0c7; --att-accent: #dc6803; --att-num: #93370d; --att-tint: #fffaeb;
  --info-fg: #1849a9; --info-bg: #eff6ff; --info-accent: #1570ef; --info-num: #1849a9; --info-tint: #eff6ff;
  --okc-fg: #0b6b3a; --okc-dot: #12a150;
  --neutral-fg: #3a3833; --neutral-bg: #f1efea;
  --rest-fg: #8a4a0b; --rest-bg: #fdebd3;
  --selected: #f3f7f4;
  --selbar-bg: #1c1b18; --selbar-ink: #ffffff; --selbar-muted: #d6d2c8; --selbar-line: #57534b; --selbar-field: #2b2925;
  --toast-bg: #dcf3e3; --toast-fg: #0b4a28; --toast-line: #a6ddb8;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --crit-fg: #fda29b; --crit-bg: #3b1714; --crit-accent: #f97066; --crit-num: #fda29b; --crit-tint: #2a1513;
    --att-fg: #fec84b; --att-bg: #3a2a0f; --att-accent: #f79009; --att-num: #fec84b; --att-tint: #2a210f;
    --info-fg: #84adff; --info-bg: #10224a; --info-accent: #528bff; --info-num: #84adff; --info-tint: #121c33;
    --okc-fg: #6ce9a6; --okc-dot: #32d583;
    --neutral-fg: #d6d2c8; --neutral-bg: #2a2925;
    --rest-fg: #f7b27a; --rest-bg: #3a2510;
    --selected: #1a2a1f;
    --selbar-bg: #33312c; --selbar-field: #24231f; --selbar-line: #6b675e;
    --toast-bg: #123222; --toast-fg: #a6f4c5; --toast-line: #1f5130;
  }
}
:root[data-theme="dark"] {
  --crit-fg: #fda29b; --crit-bg: #3b1714; --crit-accent: #f97066; --crit-num: #fda29b; --crit-tint: #2a1513;
  --att-fg: #fec84b; --att-bg: #3a2a0f; --att-accent: #f79009; --att-num: #fec84b; --att-tint: #2a210f;
  --info-fg: #84adff; --info-bg: #10224a; --info-accent: #528bff; --info-num: #84adff; --info-tint: #121c33;
  --okc-fg: #6ce9a6; --okc-dot: #32d583;
  --neutral-fg: #d6d2c8; --neutral-bg: #2a2925;
  --rest-fg: #f7b27a; --rest-bg: #3a2510;
  --selected: #1a2a1f;
  --selbar-bg: #33312c; --selbar-field: #24231f; --selbar-line: #6b675e;
  --toast-bg: #123222; --toast-fg: #a6f4c5; --toast-line: #1f5130;
}

/* Seitenkopf */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ph-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ph-crumb { font-size: 15px; color: var(--muted); }
.ph-title { margin: 0; font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ph-count { font-size: 24px; font-weight: 500; color: var(--faint); letter-spacing: -0.01em; }
.ph-sub { margin: 0; font-size: 16px; color: var(--ink-3); }
.ph-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Aufmerksamkeits-Kacheln */
.tiles-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.tiles-h { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.tile { --t-dot: var(--line-strong); --t-num: var(--ink); --t-tint: var(--surface); --t-accent: var(--line-strong);
  display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--line-strong); color: var(--ink); }
.tile.tone-crit { --t-dot: var(--crit-accent); --t-num: var(--crit-num); --t-tint: var(--crit-tint); --t-accent: var(--crit-accent); }
.tile.tone-warn { --t-dot: var(--att-accent); --t-num: var(--att-num); --t-tint: var(--att-tint); --t-accent: var(--att-accent); }
.tile.tone-info { --t-dot: var(--info-accent); --t-num: var(--info-num); --t-tint: var(--info-tint); --t-accent: var(--info-accent); }
.tile.tone-neutral { --t-dot: var(--faint); --t-num: var(--ink-2); --t-tint: var(--neutral-bg); --t-accent: var(--ink-3); }
.tile-label { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.tile-label .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--t-dot); flex: none; }
.tile-num { font-size: 40px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; color: var(--t-num); font-variant-numeric: tabular-nums; }
.tile-sub { font-size: 15px; color: var(--ink-3); }
.tile.is-active { background: var(--t-tint); border: 2px solid var(--t-accent); padding: 17px 19px; box-shadow: 0 6px 18px rgba(28, 27, 24, 0.08); }
.tile.is-quiet { opacity: 0.55; }
.tile.is-quiet .tile-num { color: var(--faint); }
.tile.is-quiet .dot { background: var(--line-strong); }

/* Filterzeile */
.filter-section { margin-bottom: 20px; }
.frow { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.fsearch { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; margin: 0;
  border: 1px solid var(--line-input); border-radius: 12px; background: var(--surface); color: var(--muted); cursor: text; }
.fsearch:focus-within { border-color: var(--accent); box-shadow: var(--focus); }
.fsearch input[type="search"] { flex: 1; min-width: 0; height: auto; padding: 0; border: 0; background: transparent; font-size: 17px; color: var(--ink); box-shadow: none; }
.fsearch input[type="search"]:focus { box-shadow: none; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--surface); color: var(--ink); font-size: 16px; font-weight: 400; white-space: nowrap; text-decoration: none; }
.fchip:hover { background: var(--accent-soft); color: var(--ink); }
.fchip .fchip-n { font-weight: 400; opacity: 0.65; font-variant-numeric: tabular-nums; }
.fchip.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.fchip.is-active:hover { color: var(--surface); }
.fchip.is-disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--line-input); }
.btn-pill { border-radius: 999px; }
.fmore > summary { list-style: none; }
.fmore > summary.btn { display: inline-flex; }
.fmore > summary::-webkit-details-marker { display: none; }
.fmore[open] > summary { background: var(--hover); }
.fmore { position: relative; }
.fmore-body { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-top: 12px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.fmore-body label { display: flex; flex-direction: column; gap: 6px; margin: 0; font-size: 15px; font-weight: 500; color: var(--ink-3); }
.fmore-body select { min-width: 240px; }
.frow:has(.fmore[open]) .fmore { flex-basis: 100%; }
.af { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 16px; color: var(--ink-3); }
.af strong { color: var(--ink); font-weight: 500; }
.af-reset { font-weight: 400; color: var(--accent); text-decoration: underline; }

/* Status und Alter — Farbe immer mit Text */
.sbadge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 15px; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; line-height: 1; }
.sbadge.tone-crit { background: var(--crit-bg); color: var(--crit-fg); }
.sbadge.tone-warn { background: var(--att-bg); color: var(--att-fg); }
.sbadge.tone-info { background: var(--info-bg); color: var(--info-fg); }
.sbadge.tone-ok { background: var(--ok-soft); color: var(--okc-fg); }
.sbadge.tone-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.sbadge.tone-rest { height: 22px; padding: 0 8px; font-size: 14px; background: var(--rest-bg); color: var(--rest-fg); }
.sbadge.age { height: 30px; font-size: 15px; }
.online-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 400; color: var(--okc-fg); }
.online-dot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--okc-dot); }

/* Menge */
.qty { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.qty-main { display: flex; align-items: baseline; gap: 6px; }
.qty-num { font-size: 24px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1.1; }
.qty-unit { font-size: 15px; color: var(--ink-3); }
.qty-bar { height: 6px; border-radius: 3px; background: var(--hover); overflow: hidden; max-width: 220px; }
.qty-bar > span { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }
.qty-sub { font-size: 15px; color: var(--muted); }
.qty.is-low .qty-num { color: var(--crit-num); }
.qty.is-low .qty-bar > span { background: var(--crit-accent); }

/* Gruppierte Tabelle */
.gtable-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.gtable { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 16px; }
.gtable thead th { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: 0.02em; white-space: nowrap; }
.gtable td { padding: 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.gtable tbody:not(.gt-head) tr:hover { background: var(--row-hover); }
.gtable tbody:not(.gt-head) tr:has(input[type="checkbox"]:checked) { background: var(--selected); }
.gtable .gt-check { width: 56px; padding-left: 20px; padding-right: 4px; }
.gtable input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; margin: 0; }
.gt-head th { padding: 0; border-bottom: 1px solid var(--line); background: var(--bg); }
.gt-toggle { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); text-align: left; }
.gt-toggle:hover { background: var(--hover); }
.gt-caret { display: inline-flex; transition: transform 0.15s; }
.gt-toggle[aria-expanded="false"] .gt-caret { transform: rotate(-90deg); }
.gt-n { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.gt-main { min-width: 260px; }
.gt-name { display: block; font-size: 18px; font-weight: 400; line-height: 1.3; color: var(--ink); }
.gt-name:hover { color: var(--accent); text-decoration: underline; }
.gt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.code { font-family: var(--mono); font-size: 15px; color: var(--muted); }
.code-chip { display: inline-block; font-family: var(--mono); font-size: 15px; color: var(--ink-2); padding: 4px 8px; border-radius: 6px; background: var(--neutral-bg); }
.code-chip:hover { color: var(--ink); background: var(--hover); }
.add-sign { display: inline-flex; align-items: center; height: 36px; padding: 0 12px; margin: 0; border-radius: 8px; border: 1px dashed var(--accent); background: var(--surface);
  font-size: 15px; font-weight: 400; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.add-sign:hover { background: var(--accent-soft); }
.gt-empty { padding: 56px 24px; margin: 0; text-align: center; font-size: 17px; color: var(--ink-3); }
.gt-empty a { font-weight: 400; text-decoration: underline; }
.results .pager { justify-content: center; margin-top: 16px; font-size: 15px; }

/* Auswahl-Leiste unten */
.selbar { position: sticky; bottom: 20px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 16px 14px 22px;
  border-radius: 16px; background: var(--selbar-bg); color: var(--selbar-ink); box-shadow: 0 12px 32px rgba(28, 27, 24, 0.28); }
.selbar[hidden] { display: none; }
.selbar-count { margin-right: auto; font-size: 17px; font-weight: 500; }
.selbar-clear { margin-left: 8px; border: 0; background: transparent; color: var(--selbar-muted); font: inherit; font-size: 15px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.selbar-field { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 500; color: var(--selbar-muted); }
.selbar-field[hidden] { display: none; }
.selbar-field select, .selbar-field input { width: auto; border-color: var(--selbar-line); background-color: var(--selbar-field); color: var(--selbar-ink); }
.selbar-field input { width: 72px; }
.selbar-check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; font-weight: 500; color: var(--selbar-ink); cursor: pointer; }
.selbar-check input { accent-color: #ffffff; }
.selbar .btn.selbar-ghost { background: transparent; border-color: var(--selbar-line); color: var(--selbar-ink); }
.selbar .btn.selbar-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.selbar .btn.selbar-main { background: #ffffff; border-color: #ffffff; color: #1c1b18; font-weight: 500; }
.selbar .btn.selbar-main:hover { background: #f1efea; }
.selbar-note { flex-basis: 100%; margin: 0; font-size: 15px; color: var(--line-strong); }

/* Bestätigung oben rechts */
.toast { position: fixed; top: 24px; right: 24px; z-index: 60; max-width: min(440px, calc(100vw - 32px)); display: flex; align-items: flex-start; gap: 12px; padding: 14px 18px;
  border-radius: 12px; background: var(--toast-bg); color: var(--toast-fg); border: 1px solid var(--toast-line); font-size: 16px; font-weight: 500; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.toast-close { margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; font: inherit; opacity: 0.7; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; }

@media (max-width: 860px) {
  .ph-title { font-size: 30px; }
  .ph-count { font-size: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { min-height: 0; padding: 14px; }
  .tile.is-active { padding: 13px; }
  .tile-num { font-size: 32px; }
  .selbar { bottom: 12px; padding: 12px 14px; gap: 10px; }
  .selbar-count { flex-basis: 100%; }
  .toast { top: 12px; right: 12px; }
}

/* Umschalter der Ansichten (Artikel: Auf Lager · Restposten · Alle) */
.seg-views { margin: -8px 0 24px; max-width: 100%; flex-wrap: wrap; }
.seg-views a { height: 40px; padding: 0 16px; font-size: 16px; font-weight: 400; color: var(--ink-2); text-decoration: none; }
.seg-views a.active { font-weight: 500; }
.seg-n { margin-left: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Sortierbare Spaltenköpfe */
.th-sort { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.th-sort:hover { color: var(--ink); }
.th-sort.is-on { color: var(--ink); }
.th-arrow { display: inline-flex; }
.th-arrow .i { width: 14px; height: 14px; }
.th-arrow .i.idle { opacity: 0; transition: opacity 0.15s; }
.th-sort:hover .i.idle, .th-sort:focus-visible .i.idle { opacity: 0.5; }
.th-arrow .i.down { transform: rotate(180deg); }

/* Herkunft eines Artikels (WaWi, Hersteller-Import, von Hand) */
.src { font-size: 14px; color: var(--muted); padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
.num-cell { font-variant-numeric: tabular-nums; }
.row-edit[open] { min-width: 300px; }
.row-edit > summary { list-style: none; }
.row-edit > summary::-webkit-details-marker { display: none; }
.row-edit .sign-edit { margin-top: 10px; }
/* Projekte: unbeantwortete Anfragen über der Liste */
.inbox { margin-bottom: 24px; border-color: var(--crit-accent); }
.inbox-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 16px 20px 4px; }
.inbox-head h2 { margin: 0; font-size: 18px; }
/* Start: Frag das Kontor und Abschnitte */
.ask-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 32px; }
.ask-box .fsearch { flex: 1 1 360px; }
.ask-box .btn { height: 48px; }
.ask-box .help { flex-basis: 100%; margin: 0; }
.home-section { margin-bottom: 28px; }
.home-section > .tiles-h { margin-bottom: 12px; }
.home-tiles .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .home-tiles .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===================================================== Ältere Bausteine
 * Seiten, die (noch) nicht aus templates/_ui.html gebaut sind, sehen so aus
 * wie die Listen-Seiten: großer Titel, ruhige Tabellen, Status als Pille. */
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.page-head .sub { font-size: 16px; color: var(--ink-3); max-width: 90ch; }
.page-head .actions { gap: 10px; }
table.table { font-size: 16px; }
.table th { font-size: 14px; background: transparent; padding: 14px 16px; letter-spacing: 0.02em; }
.table td { padding: 14px 16px; vertical-align: middle; }
.table tbody tr:hover { background: var(--row-hover); }
.table td a:not(.btn):not(.tag) { color: var(--ink); }
.table td a:not(.btn):not(.tag):hover { color: var(--accent); text-decoration: underline; }
.card > .table, .card > .table-wrap > .table { margin: 0; }
.tag { height: 26px; padding: 0 10px; border-radius: 999px; font-size: 14px; font-weight: 400; }
.tag.ok, .tag.accent { background: var(--ok-soft); color: var(--okc-fg); }
.tag.warn { background: var(--att-bg); color: var(--att-fg); }
.tag.danger { background: var(--crit-bg); color: var(--crit-fg); }
.tag.neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.card h2 { font-size: 18px; font-weight: 600; }
.status-card .big { font-size: 17px; }
.empty { font-size: 16px; padding: 12px 0; }
.list li { font-size: 16px; }
.list .meta, .meta { font-size: 14px; }
.btn.is-chosen { background: var(--ink); border-color: var(--ink); color: var(--surface); }
/* Bereitstellung: eine Karte je Anfrage, gruppiert nach Stand */
.pickup-group { margin: 24px 0 12px; }
.pickup-group:first-of-type { margin-top: 0; }
.pickup-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin-bottom: 12px; }
.pickup-when { font-size: 18px; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gap-q { font-size: 18px; font-weight: 500; margin: 6px 0; }

/* Profi-Bereich: dieselben Bausteine, Handy zuerst */
.profi-main { max-width: 760px; }
.profi-main .ph { margin-bottom: 20px; }
.profi-main .ph-title { font-size: 30px; }
.profi-main .home-tiles .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profi-main .tile { min-height: 0; padding: 14px 16px; }
.profi-main .tile.is-active { padding: 13px 15px; }
.profi-main .tile-num { font-size: 32px; }
.area-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.area-card { display: flex; align-items: flex-start; gap: 12px; color: var(--ink); text-decoration: none; padding: 16px 18px; }
.area-card + .area-card { margin-top: 0; }
.area-card:hover { border-color: var(--accent); color: var(--ink); }
.area-card .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.area-card strong { font-size: 16px; font-weight: 600; }
.area-card .muted { font-size: 14px; }
.area-icon { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.area-card.is-invite { margin-bottom: 16px; border-color: var(--accent); }
.profi-main .card + .card, .profi-main section.card { margin-top: 16px; }
.profi-main .home-tiles + .card, .profi-main .home-tiles + .area-card { margin-top: 0; }
@media (max-width: 560px) { .area-grid { grid-template-columns: 1fr; } }
/* Einträge in einfachen Listen sind Namen, keine Fließtext-Links: dunkel. */
.list a.grow { color: var(--ink); }
.list a.grow:hover { color: var(--accent); text-decoration: underline; }

/* Auswahllisten (Sitemap, Download-Seite): Leiste bleibt beim Scrollen oben. */
.picker-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; padding: 0.6rem 0; margin-bottom: 0.5rem; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.picker-bar input[type=search] { flex: 1 1 14rem; width: auto; }
.picker-bar .btn { margin-left: auto; }
