/* Hamsterrad – schlichtes Werkstatt-Design.
   Farben passen sich automatisch Hell/Dunkel an; auf dem Handy gibt es unten eine Menueleiste. */
:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #efece4;
  --text: #1f1e1b;
  --muted: #6b675e;
  --border: #dcd7cb;
  --accent: #c2410c;        /* Kettenblatt-Orange */
  --accent-text: #ffffff;
  --accent-soft: #fbe7dc;
  --ok: #2f6b3a;   --ok-bg: #e2f0e4;
  --warn: #8a5a00; --warn-bg: #fbefd0;
  --bad: #a3261c;  --bad-bg: #f8e1de;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --tap: 44px;              /* Mindestgroesse fuer Tippflaechen */
  --tabbar-h: 58px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181a;
    --surface: #212225;
    --surface-2: #2a2b2f;
    --text: #ecebe6;
    --muted: #a19d93;
    --border: #36373b;
    --accent: #f08a4b;
    --accent-text: #1a1206;
    --accent-soft: #3a2619;
    --ok: #8fd19a;   --ok-bg: #1f3324;
    --warn: #f1c46a; --warn-bg: #3a2f14;
    --bad: #f2a39d;  --bad-bg: #3d1f1c;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-left: var(--safe-left); padding-right: var(--safe-right);
}
h1 { font-size: 1.6rem; line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 .75rem; }
a { color: var(--accent); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }

/* ---------- Kopfleiste ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .5rem 1.5rem;
  padding: calc(.5rem + var(--safe-top)) 1rem .5rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand {
  display: flex; align-items: center; gap: .5rem; min-height: var(--tap);
  font-weight: 700; color: var(--text); text-decoration: none; font-size: 1.1rem;
}
.mainnav { display: flex; gap: .25rem; flex: 1; }
.mainnav a {
  display: flex; align-items: center; gap: .45rem; min-height: 40px;
  color: var(--text); text-decoration: none; padding: .35rem .7rem; border-radius: 8px;
}
.mainnav a:hover { background: var(--surface-2); }
.mainnav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.mainnav svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.usermenu { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.usermenu form { margin: 0; }
.who { color: var(--muted); }

/* ---------- Inhalt ---------- */
.container { max-width: 64rem; margin: 2rem auto; padding: 0 1rem; }
.container.narrow { max-width: 28rem; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.card-highlight { border-color: var(--accent); }
.card.empty { text-align: center; padding: 2.5rem 1.25rem; }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.grid-2 .card { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }

.login-head { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; }
.login-head h1 { margin: 0; }
.login-head p { margin: 0; }

/* ---------- Formulare ---------- */
.stack { display: grid; gap: .9rem; margin-top: 1rem; }
label { display: block; font-weight: 600; font-size: .95rem; }
label > input, label > select, label > textarea, label > .with-unit { margin-top: .3rem; }
label > a.small { display: inline-block; margin-top: .3rem; font-weight: 400; }
label .muted { font-weight: 400; }
input[type=text], input[type=password] {
  width: 100%; min-height: var(--tap); padding: .6rem .75rem;
  font: inherit; font-size: 16px;  /* 16px: sonst zoomt das iPhone beim Antippen hinein */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
  -webkit-appearance: none; appearance: none;
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.code-input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .15em; font-size: 1.2rem !important; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: var(--tap); padding: .55rem 1.1rem;
  font: inherit; font-weight: 600; color: var(--accent-text); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 10px; cursor: pointer;
  text-decoration: none; text-align: center; touch-action: manipulation;
}
button:hover, .button:hover { filter: brightness(1.07); }
button:active, .button:active { transform: translateY(1px); }
.button.block { display: flex; width: 100%; }
button.secondary { background: transparent; color: var(--accent); }
button.link {
  min-height: 36px; background: none; border: none; padding: .3rem .4rem; color: var(--accent);
  font-weight: 500; text-decoration: underline; text-underline-offset: 2px;
}
button.link.danger { color: var(--bad); }
.inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: .75rem; }
.inline-form label { flex: 1 1 14rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.copy-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.copy-row input { flex: 1 1 14rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.copy-row input.secret { font-size: 16px; letter-spacing: .05em; }
.offscreen { position: fixed; left: -9999px; top: 0; }

/* ---------- Meldungen ---------- */
.flash { padding: .7rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.flash-info { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ---------- 2FA ---------- */
.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: .35rem; }
.qr-box { display: flex; justify-content: center; margin: 1rem 0; }
.qr-box img { background: #fff; border-radius: 8px; padding: 6px; max-width: 100%; height: auto; }
details { margin-bottom: 1rem; }
summary { cursor: pointer; color: var(--accent); min-height: 32px; padding: .25rem 0; }
.codes {
  list-style: none; padding: 0; margin: 1rem 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem;
}
.codes li { background: var(--surface-2); padding: .55rem; border-radius: 8px; text-align: center; font-size: 1.05rem; }

/* Am Handy (Touch) den passenden Weg zeigen: Knopf statt QR-Code */
.only-mobile { display: none; }
@media (pointer: coarse), (max-width: 40rem) {
  .only-mobile { display: block; }
  .only-desktop { display: none; }
}

/* ---------- Tabellen und Kennzeichen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; gap: .25rem .5rem; }
.row-actions form { margin: 0; }
.pills { display: flex; flex-wrap: wrap; gap: .3rem; }
.pill {
  display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
  background: var(--surface-2); color: var(--muted);
}
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-bad { background: var(--bad-bg); color: var(--bad); }

/* ============ Handy ============ */
@media (max-width: 40rem) {
  h1 { font-size: 1.4rem; }
  .container { margin: 1rem auto; padding: 0 .75rem; }
  .container.narrow { max-width: none; }
  .card { padding: 1rem; border-radius: 14px; }
  .grid-2 { grid-template-columns: 1fr; gap: 1rem; }
  .codes { grid-template-columns: 1fr 1fr; }
  .inline-form { display: grid; }
  .inline-form button, .stack button, .copy-row button { width: 100%; }
  .actions > * { flex: 1 1 100%; }

  /* Kopfleiste schlank: Logo links, Abmelden rechts */
  .topbar { padding-left: .75rem; padding-right: .75rem; gap: .5rem; }
  .who { display: none; }

  /* Menue als Leiste unten – wie bei einer App */
  .has-tabbar { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
  .mainnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; justify-content: space-around; gap: 0;
    padding: 0 var(--safe-right) var(--safe-bottom) var(--safe-left);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .mainnav a {
    flex: 1; flex-direction: column; gap: .1rem; justify-content: center;
    min-height: var(--tabbar-h); padding: .35rem .25rem; border-radius: 0;
    font-size: .72rem; font-weight: 600; color: var(--muted);
  }
  .mainnav a:hover { background: none; }
  .mainnav a[aria-current="page"] { background: none; color: var(--accent); }
  .mainnav svg { width: 24px; height: 24px; }

  /* Tabellen werden zu Karten: jede Zeile ein Kaertchen, Spaltenname vor dem Wert */
  .table-wrap { overflow: visible; }
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards thead { display: none; }
  table.cards tr {
    border: 1px solid var(--border); border-radius: 12px;
    padding: .65rem .85rem; margin-bottom: .75rem; background: var(--bg);
  }
  table.cards td { border: none; padding: .2rem 0; text-align: left; }
  table.cards td[data-label] { display: flex; justify-content: space-between; gap: 1rem; }
  table.cards td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .85rem; }
  table.cards td.card-title { font-size: 1.05rem; padding-bottom: .35rem; }
  table.cards td.card-actions { border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .4rem; }
  .row-actions { gap: 0 .25rem; }
  .row-actions button.link { min-height: var(--tap); }
}

/* Als App vom Home-Bildschirm gestartet: kein Textmarkieren aus Versehen in Menues */
@media (display-mode: standalone) {
  .topbar, .mainnav { -webkit-user-select: none; user-select: none; }
}

/* ================= Bestand und Teile ================= */
select, textarea {
  width: 100%; min-height: var(--tap); padding: .55rem .75rem;
  font: inherit; font-size: 16px; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px;
}
select {
  -webkit-appearance: none; appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
textarea { resize: vertical; line-height: 1.45; }
input[type=search] {
  width: 100%; min-height: var(--tap); padding: .55rem .9rem; font: inherit; font-size: 16px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  -webkit-appearance: none; appearance: none;
}
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.req { color: var(--accent); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem; }
.page-head h1 { margin: 0; }
.only-desktop-inline { display: inline-flex; }

.searchbar { position: relative; display: flex; margin: .75rem 0; }
.searchbar input { padding-right: 3rem; }
.searchbar button {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  min-height: 36px; width: 40px; padding: 0; border-radius: 999px;
}
.filters { margin: 0 0 .5rem; }
.filters summary { display: inline-flex; align-items: center; gap: .4rem; }
.filter-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin-top: .5rem; }
.filter-actions { display: flex; align-items: end; gap: 1rem; }
.list-meta { margin: .25rem 0 .75rem; }
.pill-accent { background: var(--accent-soft); color: var(--accent); }
.pill-muted { background: var(--surface-2); color: var(--muted); }
.status-verbaut { background: #e3ebf8; color: #2b4f86; }
.status-reparatur { background: var(--warn-bg); color: var(--warn); }
.status-verkauft, .status-weg { background: var(--surface-2); color: var(--muted); }
.status-lager { background: var(--ok-bg); color: var(--ok); }
@media (prefers-color-scheme: dark) { .status-verbaut { background: #1d2a40; color: #9bbcf0; } }

.item-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.item-row {
  display: flex; align-items: center; gap: .85rem; padding: .6rem; min-height: 84px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.item-row:hover { border-color: var(--accent); }
.thumb { width: 72px; height: 72px; flex: none; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.thumb-empty {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 700; color: var(--muted);
}
.item-text { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.item-text strong, .item-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-pills { display: flex; flex-direction: column; align-items: end; gap: .3rem; }

/* Kategorie-Kacheln */
.tile-filter { margin: .5rem 0 1rem; }
.tiles { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.tiles a {
  display: flex; flex-direction: column; justify-content: center; gap: .15rem;
  min-height: 72px; padding: .75rem .9rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  color: var(--text); text-decoration: none; font-weight: 600;
}
.tiles a:hover, .tiles a[aria-current] { border-color: var(--accent); }
.tiles a[aria-current] { background: var(--accent-soft); }
.tiles .small { font-weight: 400; }

/* Formular */
.item-form .card h2 { margin-bottom: .9rem; }
.form-grid { display: grid; gap: .9rem 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); align-items: start; }
.field-wide { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; font-size: .95rem; padding: 0; margin-bottom: .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: .35rem .8rem;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  font-weight: 500; cursor: pointer;
}
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
label.check { display: flex; align-items: center; gap: .6rem; min-height: var(--tap); font-weight: 500; cursor: pointer; }
label.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.with-unit { display: flex; align-items: center; gap: .5rem; }
.with-unit .unit { color: var(--muted); font-weight: 500; white-space: nowrap; }
.notes { margin-top: .9rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1rem 0 2rem; }

.photo-input { margin-top: 1rem; }
.file-button { position: relative; cursor: pointer; font-weight: 600; color: var(--accent); background: transparent; }
.file-button input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.photo-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.photo-pick img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.photo-name { font-size: .8rem; padding: .3rem .5rem; background: var(--surface-2); border-radius: 6px; }
.photo-remove { position: relative; display: block; font-weight: 400; cursor: pointer; }
.photo-remove input { position: absolute; opacity: 0; }
.photo-remove span {
  position: absolute; left: 4px; right: 4px; bottom: 4px; text-align: center; font-size: .72rem;
  background: rgba(0, 0, 0, .55); color: #fff; border-radius: 6px; padding: .1rem;
}
.photo-remove:has(input:checked) img { opacity: .35; outline: 3px solid var(--bad); }
.photo-remove:has(input:checked) span { background: var(--bad); }

/* Detailseite */
.gallery {
  display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -1rem .5rem; padding: 0 1rem; -webkit-overflow-scrolling: touch;
}
.gallery img {
  flex: 0 0 auto; width: min(100%, 34rem); aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); scroll-snap-align: center; background: var(--surface-2);
}
.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: .45rem 1.25rem; margin: 0 0 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.notes-text { white-space: pre-wrap; }
.button-quiet { background: transparent; border-color: var(--border); color: var(--text); }
.button-quiet.danger { color: var(--bad); }
.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Lagerorte */
.tree { list-style: none; padding: 0; margin: 0; }
.tree li { border-bottom: 1px solid var(--border); }
.tree li:last-child { border-bottom: 0; }
.tree-row { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: var(--tap); padding: .3rem 0; }
.tree-name { font-weight: 600; flex: 1; }
.tree .level-1 .tree-row { padding-left: 1.25rem; }
.tree .level-2 .tree-row { padding-left: 2.5rem; }
.tree .level-3 .tree-row { padding-left: 3.75rem; }
.tree .level-4 .tree-row, .tree .level-5 .tree-row { padding-left: 5rem; }
.tree .level-1 .tree-name::before, .tree .level-2 .tree-name::before, .tree .level-3 .tree-name::before,
.tree .level-4 .tree-name::before, .tree .level-5 .tree-name::before { content: "└ "; color: var(--muted); font-weight: 400; }
.tree-menu { margin: 0; }
.tree-menu summary { font-size: .875rem; }
.tree-edit { flex-basis: 100%; display: grid; gap: .5rem; padding: .5rem 0; }
.tree-row details[open] { flex-basis: 100%; }

@media (max-width: 40rem) {
  .only-desktop-inline { display: none; }
  .gallery { margin: 0 -.75rem .5rem; padding: 0 .75rem; }
  .gallery img { width: 88%; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dt { font-size: .85rem; margin-top: .55rem; }
  .form-actions > * { flex: 1 1 100%; text-align: center; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .mainnav .nav-new svg { color: var(--accent); }
  .item-row { gap: .7rem; }
  .thumb { width: 64px; height: 64px; }
}

/* ================= Wühltruhe, Gesuche, Meldungen ================= */
.tabs { display: flex; gap: .25rem; margin: .5rem 0 1rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs a {
  padding: .6rem .9rem; min-height: var(--tap); display: flex; align-items: center; white-space: nowrap;
  color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.inline-filter { margin: 0 0 1rem; max-width: 20rem; }

.truhe-grid { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); }
.truhe-card {
  display: flex; flex-direction: column; height: 100%; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; box-shadow: var(--shadow);
}
.truhe-card:hover { border-color: var(--accent); }
.truhe-card img, .truhe-noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.truhe-noimg { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: var(--muted); }
.truhe-text { display: grid; gap: .1rem; padding: .6rem .7rem .7rem; }
.truhe-box { margin-top: 1rem; padding: .75rem .9rem; border-radius: 10px; background: var(--accent-soft); }
.truhe-box p { margin: .25rem 0 0; }

.lamp {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: 999px; color: var(--muted); text-decoration: none;
}
.lamp svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lamp:hover { background: var(--surface-2); }
.lamp-on { color: #b7791f; }
.lamp-on svg { fill: #fcd34d; stroke: #b7791f; filter: drop-shadow(0 0 6px rgba(252, 211, 77, .9)); }
.lamp-count {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: var(--accent-text);
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}

.note-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.note-list .card { margin-bottom: .75rem; }
.note-list .is-new { border-color: var(--accent); }
.note-list .pill { float: right; }
.contact { font-size: 1.05rem; }
.selectable { -webkit-user-select: all; user-select: all; overflow-wrap: anywhere; }
.note-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.note-foot form { margin: 0; }

.search-list { list-style: none; padding: 0; margin: 0; }
.search-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.search-list li:last-child { border-bottom: 0; }

@media (max-width: 40rem) {
  .truhe-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .inline-filter { max-width: none; }
  .mainnav a { font-size: .68rem; padding: .35rem .1rem; }
}
@media print { .mainnav, .topbar { display: none; } }

/* ================= Vitrine und Stapel-Upload ================= */
.progress-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.batch-errors { color: var(--bad); padding-left: 1.1rem; margin: .25rem 0 0; }
.drafts-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.drafts-banner .button { min-height: 36px; padding: .3rem .9rem; }
@media (max-width: 40rem) {
  .mainnav a.nav-desktop { display: none; }
}
