:root {
  --bg: #f5f5f2;
  --surface: #ffffff;
  --surface-2: #eeeee9;
  --text: #1c1d1f;
  --muted: #6b6d70;
  --border: #e0e0da;
  --accent: #5fb39b;
  --accent-text: #0d1f1a;
  --accent-soft: #e1eeea;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 2px 8px rgb(0 0 0 / 0.04);
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141518;
    --surface: #1e2024;
    --surface-2: #2a2c31;
    --text: #ececea;
    --muted: #9a9ca0;
    --border: #33363b;
    --accent: #5fb39b;
    --accent-text: #0d1f1a;
    --accent-soft: #1f3530;
    --danger: #f08b84;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }

/* ---------- Seitenrahmen ---------- */

.page { min-height: 100dvh; }
/* Mit Umgebungs-Banner (Test/Entwicklung): Seite füllt nur den Platz darunter – sonst wäre sie immer scrollbar */
body:has(> .env-banner) { display: flex; flex-direction: column; min-height: 100dvh; }
body:has(> .env-banner) > #app { flex: 1; display: flex; flex-direction: column; }
body:has(> .env-banner) .page { min-height: 0; flex: 1; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar h1 {
  flex: 1;
  min-width: 0;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions { display: flex; gap: 4px; }
.title-icon { margin-right: 8px; }

/* Gleiche Gestaltung wie das Favicon (public/icon.svg) */
.logo {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.icon-btn {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }

.content {
  max-width: 760px;
  margin: 0 auto;
  padding: 16px 16px calc(env(safe-area-inset-bottom) + 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Hinweisleiste für Test- und Entwicklungsumgebung */
.env-banner {
  padding: calc(env(safe-area-inset-top) + 4px) 16px 4px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #f2c94c;
  color: #2b2200;
}
.env-banner.development { background: #8ab4f8; color: #0b1e3d; }
.env-banner + #app .topbar { padding-top: 10px; }

/* ---------- Startseite ---------- */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.module-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 12px;
  text-align: center;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.module-tile:hover { border-color: var(--accent); }
.module-tile.placeholder { opacity: 0.55; box-shadow: none; }
.module-icon { font-size: 2.2rem; line-height: 1; }

/* ---------- Bausteine ---------- */

.section { display: flex; flex-direction: column; gap: 10px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; }
.section-head h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 44px; /* feste Höhe, damit alle Buttons in jedem Browser gleich hoch sind */
  padding: 0 16px;
  line-height: 1;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* Alle Knöpfe als gefüllte Flächen ohne sichtbaren Rahmen – so wirken sie gleich groß */
.btn.secondary { background: var(--surface-2); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger.ghost { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.btn.small { height: 36px; padding: 0 12px; font-size: 0.9rem; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* ---------- Lager ---------- */

.stack { display: flex; flex-direction: column; gap: 18px; }

.search-input {
  flex: 1;
  min-width: 0;
  max-width: 360px;
  height: 36px;
  padding: 0 12px 0 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23888' stroke-width='2'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E") no-repeat 10px center / 16px;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* verhindert Zoom auf iOS */
}
.search-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
/* Suche in der Kopfzeile: Feld nimmt den freien Platz, Titel behält seine Breite */
.topbar:has(.search-input) h1 { flex: none; }
.topbar-actions:has(.search-input) { flex: 1; min-width: 0; justify-content: flex-end; align-items: center; gap: 6px; }
.topbar-actions .btn { flex: none; }


.list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.row-card { display: flex; align-items: center; gap: 12px; padding: 10px 8px 10px 16px; min-height: 56px; }
.row-card + .row-card { border-top: 1px solid var(--border); }
a.row-card:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-main strong, .thing-name { overflow-wrap: anywhere; }
.row-meta { font-size: 0.88rem; color: var(--muted); }
.chev { color: var(--muted); font-size: 1.3rem; padding-right: 8px; }
.icon-btn.small { font-size: 1.1rem; color: var(--muted); }

/* Gegenstand-Zeile: Link zur Ansicht + Stift zum Bearbeiten */
.list .thing-row { padding: 0; gap: 0; min-height: 48px; }
.row-link {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  align-self: stretch;
  padding: 8px 0 8px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.row-edit {
  flex: none;
  align-self: stretch;
  width: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 1.05rem;
  cursor: pointer;
}
.row-link:hover, .row-edit:hover { background: var(--surface-2); }
/* Statt Umrandung (passt nicht zu den runden Ecken): Hintergrund hervorheben */
.row-link:focus, .row-edit:focus { outline: none; }
.row-link:focus-visible, .row-edit:focus-visible { background: var(--accent-soft); }
.thing-name { font-size: 0.95rem; overflow-wrap: anywhere; }

.detail .detail-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; }
.detail .detail-row + .detail-row { border-top: 1px solid var(--border); }
.detail-label { font-size: 0.8rem; color: var(--muted); }
.detail-value { font-size: 1rem; overflow-wrap: anywhere; }

/* Räume als Spalten nebeneinander; passen sie nicht auf den Bildschirm, wird seitlich gewischt */
.content.wide { max-width: none; }
.content.wide .results { width: 100%; max-width: 760px; margin: 0 auto; }
.room-columns {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
  margin: 0 -16px;
  padding: 0 16px 8px;
}
.room-group {
  flex: 1 0 280px;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  scroll-snap-align: start;
}
@media (max-width: 600px) {
  .room-group { flex-basis: 82vw; }
}
/* Ruhige Abstufung: Raum etwas größer, Lagerort und Gegenstand gleich groß, Lagerort halbfett */
.room-title { font-size: 1.1rem; font-weight: 700; }
.place-group { display: flex; flex-direction: column; gap: 6px; }
.place-title { font-size: 0.95rem; font-weight: 600; }
.place-title::before { content: "📦 "; }

.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---------- Dialoge & Formulare ---------- */

.dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
}
.dialog.small { width: min(400px, calc(100vw - 24px)); }
.dialog::backdrop { background: rgb(0 0 0 / 0.45); }

@media (max-width: 600px) {
  .dialog:not(.small) {
    width: 100vw;
    max-width: 100vw;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
}

/* Formular füllt den Innenraum des Dialogs (ohne Rahmen) – so scrollt nie der ganze Dialog */
.dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.dialog-form { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.dialog-head h2 { font-size: 1.15rem; }
.dialog-body { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 14px; overflow-y: auto; } /* unten so viel Abstand wie zwischen den Elementen */
.dialog-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px calc(env(safe-area-inset-bottom) + 14px);
  border-top: 1px solid var(--border);
}
.push-left { margin-right: auto; }
.foot-start { display: flex; align-items: center; gap: 8px; margin-right: auto; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
/* Feldname bricht nie um; Hinweis/Fehler bleiben rechts in derselben Zeile und kürzen sich notfalls */
.field-head .field-label { flex: none; white-space: nowrap; }
.field-head .field-error, .field-head .field-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.field-label { font-size: 0.85rem; font-weight: 600; }
.required-star { color: var(--danger); }
.field-error { font-size: 0.8rem; font-weight: 600; color: var(--danger); }
.field-error:empty { display: none; }
.field-note { font-size: 0.8rem; color: var(--muted); }
.field.invalid .field-note { display: none; }
.field.invalid input,
.field.invalid select { border-color: var(--danger); }
.field.invalid :focus { outline-color: var(--danger); }
.field-hint { font-size: 0.8rem; color: var(--muted); }
.field input,
.field select,
.field textarea,
.own-rights select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* verhindert Zoom auf iOS */
}
.field textarea { resize: vertical; }
/* Eigener Pfeil, damit er auf allen Geräten mit Abstand zum Rand sitzt */
.field select,
.own-rights select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field :focus,
.own-rights select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.grid-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.grid-2.even { grid-template-columns: 1fr 1fr; }

@media (max-width: 600px) {
  .dialog-foot .btn { flex: 1 1 0; min-width: 0; }
  .dialog-foot .push-left, .dialog-foot .foot-start, .dialog-foot .foot-start .btn { flex: 0 0 auto; }
}


/* Eingabe mit eigener Vorschlagsliste (Raum, Lagerort) */
.combo { display: flex; flex-direction: column; gap: 6px; }
.combo-field { position: relative; }
.field .combo-input { padding-right: 44px; }
.combo-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 44px;
  border: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat center;
  cursor: pointer;
}
.combo-list {
  display: flex;
  flex-direction: column;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.combo-option {
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.combo-option + .combo-option { border-top: 1px solid var(--border); }
.combo-option:hover, .combo-option.active { background: var(--accent-soft); }
.combo-option.selected { font-weight: 600; }
.combo-hint { padding: 10px 14px; font-size: 0.9rem; color: var(--muted); }
/* Räume sortieren */
.sort-list { list-style: none; margin: 0; padding: 0; }
.sort-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px 4px 14px; }
.sort-row + .sort-row { border-top: 1px solid var(--border); }
.sort-pos { width: 1.5em; color: var(--muted); font-size: 0.85rem; }
.sort-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sort-btn-move {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}
.sort-btn-move:hover:not(:disabled) { background: var(--surface-2); }
.sort-btn-move:disabled { opacity: 0.25; cursor: default; }
/* Sortier-Button: gleiche Höhe und Rahmen wie Suchfeld, Symbol als SVG in Textfarbe */
.sort-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.sort-btn:hover { color: var(--text); border-color: var(--muted); }
.sort-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 20V4M3 8l4-4 4 4M17 4v16M13 16l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 20V4M3 8l4-4 4 4M17 4v16M13 16l4 4 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Der Hinweistext unter dem Feld ist überflüssig, wenn die Vorschlagsliste offen ist … */
/* … und sobald etwas eingetippt ist */
.field:has(.combo-list:not([hidden])) .field-hint,
.field:has(.combo-input:valid) .field-hint { display: none; } /* Pflichtfeld: „gültig“ = etwas eingetragen */

/* ---------- Toast ---------- */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 20px);
  z-index: 100;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 500;
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.2);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
  pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.error { background: var(--danger); color: #fff; }

/* ---------- Anmeldung & Passwort ---------- */

.auth-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(env(safe-area-inset-bottom) + 24px);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 20px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.auth-stack { display: flex; flex-direction: column; gap: 16px; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; } /* 16 px Abstand + 8 px = so viel wie oben */
.auth-text { color: var(--muted); }
.auth-text strong { color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.wide-btn { width: 100%; height: 48px; }
a.wide-btn { display: inline-flex; }
.form-error { color: var(--danger); font-weight: 600; font-size: 0.9rem; }
.link-btn {
  align-self: center;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.95rem;
  padding: 6px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Konto-Button oben rechts (Initialen) */
.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.avatar-btn:hover { border-color: var(--accent); }
.home-subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 8px; }

/* ---------- Benutzerverwaltung ---------- */

.user-row { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.user-row:hover { background: var(--surface-2); }
.user-row.locked { cursor: default; }
.user-row.locked:hover { background: transparent; }
.lock { font-size: 0.9rem; opacity: 0.6; padding-right: 6px; }
.user-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.badge { padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: color-mix(in srgb, #f2c94c 25%, transparent); color: #b08300; }
@media (prefers-color-scheme: dark) { .badge.warn { color: #f2c94c; } }
.rights, .access { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px solid var(--border); }
.rights-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 8px; }
.detail-inline { display: flex; align-items: baseline; gap: 8px; }
.thing-row .row-link:last-child { padding-right: 14px; }

/* ---------- Postausgang (Entwicklung) ---------- */

.mail-head { display: flex; flex-direction: column; gap: 2px; }
.mail-text { margin: 0; white-space: pre-wrap; font: inherit; font-size: 0.92rem; overflow-wrap: anywhere; }
.mail-link { color: var(--accent); text-decoration: underline; }

/* ---------- Tickets ---------- */

.tabs { display: flex; gap: 6px; overflow-x: auto; }
.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.tab-count { font-size: 0.8rem; opacity: 0.75; }

.ticket-row { width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ticket-row:hover { background: var(--surface-2); }
.ticket-title { font-weight: 600; overflow-wrap: anywhere; }
.ticket-preview {
  font-size: 0.88rem;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.dialog.wide { width: min(760px, calc(100vw - 24px)); }
.ticket-meta { display: flex; flex-direction: column; gap: 6px; }
.ticket-meta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.status-line { display: flex; align-items: center; gap: 8px; }
.convo { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg); }
.msg.out { background: var(--accent-soft); border-color: transparent; }
.msg.note { background: color-mix(in srgb, #f2c94c 14%, var(--surface)); border-color: color-mix(in srgb, #f2c94c 50%, transparent); }
.msg-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 0.88rem; }
.msg-head strong { overflow-wrap: anywhere; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.95rem; }
.msg-quote summary { cursor: pointer; font-size: 0.85rem; color: var(--muted); }
.msg-quote .msg-body { margin-top: 6px; padding-left: 10px; border-left: 2px solid var(--border); font-size: 0.88rem; }
.check { display: flex; align-items: center; gap: 8px; font-size: 0.92rem; }

.ticket-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ticket-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.ticket-meta .ticket-code { color: var(--text); }

/* Status-Badges: gleiche Form, Farbe je Zustand */
.status-badge { padding: 1px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status-badge.s-new { background: color-mix(in srgb, #4f8df5 22%, transparent); color: #4f8df5; }
.status-badge.s-in_progress { background: var(--accent-soft); color: var(--accent); }
.status-badge.s-waiting,
.status-badge.s-waiting_third { background: color-mix(in srgb, #f2c94c 25%, transparent); color: #b08300; }
@media (prefers-color-scheme: dark) {
  .status-badge.s-waiting, .status-badge.s-waiting_third { color: #f2c94c; }
}

/* Anhänge */
.composer { display: flex; flex-direction: column; gap: 8px; }
.attach-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.attach-chips:empty { display: none; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 0.85rem; overflow-wrap: anywhere; }
.attach-chip.busy { opacity: 0.6; padding-right: 10px; }
.attach-remove { border: 0; background: transparent; color: var(--muted); font: inherit; cursor: pointer; width: 24px; height: 24px; border-radius: 50%; }
.attach-remove:hover { background: var(--border); color: var(--text); }
.msg-files { display: flex; flex-direction: column; gap: 4px; }
.file-link { display: inline-flex; align-items: baseline; gap: 8px; color: var(--accent); font-size: 0.92rem; overflow-wrap: anywhere; }
.file-link:hover { text-decoration: underline; }

/* „⋯“-Menü: schwebt über dem Inhalt */
.dialog-head-actions { display: flex; align-items: center; gap: 2px; }
.menu { position: relative; }
.menu-toggle:focus { outline: none; }
.icon-btn.menu-toggle:focus-visible, .icon-btn.menu-toggle[aria-expanded='true'] { background: var(--surface-2); }
.menu-dots {
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='4' cy='10' r='1.8'/%3E%3Ccircle cx='10' cy='10' r='1.8'/%3E%3Ccircle cx='16' cy='10' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='4' cy='10' r='1.8'/%3E%3Ccircle cx='10' cy='10' r='1.8'/%3E%3Ccircle cx='16' cy='10' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 160px; /* Breite nach Inhalt – kein leerer Rand */
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.28);
}
.menu-item {
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item.danger { color: var(--danger); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--border); }


/* Zufriedenheitsabfrage */
.rating-options { display: flex; flex-direction: column; gap: 8px; }
.rating-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rating-option:hover { border-color: var(--muted); }
.rating-option.selected { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.rating-emoji { font-size: 1.4rem; }
.auth-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  resize: vertical;
}

/* Ticket: Bewertung und automatische Mails im Verlauf */
.rating-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rating-comment { font-size: 0.9rem; color: var(--muted); font-style: italic; }
.msg.auto { padding: 8px 14px; background: transparent; border-style: solid; }
.msg.auto summary { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; cursor: pointer; font-size: 0.88rem; color: var(--muted); list-style: none; }
.msg.auto summary::-webkit-details-marker { display: none; }
.msg.auto[open] summary { margin-bottom: 8px; }

.ticket-description { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.ticket-description .rights-title { padding-top: 0; }

.menu-list.align-right { right: 0; }
.menu-list.align-left { left: 0; }

/* Status-Knopf im Ticket: farbige Pille mit Pfeil, öffnet die passenden Schritte */
.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  justify-content: center;
  min-width: 72px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.status-toggle:focus { outline: none; }
.status-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-toggle .menu-caret { width: 10px; height: 7px; opacity: 0.8; }
.status-toggle[aria-expanded='true'] .menu-caret { transform: rotate(180deg); }
.status-toggle.s-new { background: color-mix(in srgb, #4f8df5 22%, transparent); color: #4f8df5; }
.status-toggle.s-in_progress { background: var(--accent-soft); color: var(--accent); }
.status-toggle.s-waiting, .status-toggle.s-waiting_third { background: color-mix(in srgb, #f2c94c 25%, transparent); color: #b08300; }
@media (prefers-color-scheme: dark) { .status-toggle.s-waiting, .status-toggle.s-waiting_third { color: #f2c94c; } }
.ticket-meta-row .status-badge { padding: 7px 14px; font-size: 0.9rem; }

/* Ticket: Angaben als ruhige Liste (Kontakt, E-Mail, Herkunft, Erstellt, Bewertung) */
.ticket-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 4px 0 0; font-size: 0.92rem; }
.ticket-info .info-row { display: contents; }
.ticket-info .info-row[hidden] { display: none; }
.ticket-info dt { color: var(--muted); }
.ticket-info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ticket-info a { color: inherit; }
.ticket-meta { gap: 10px; }
.convo > .rights-title { padding-top: 4px; }
.dialog-head-actions .status-line { margin-right: 6px; }
.dialog-head h2 { min-width: 0; overflow-wrap: anywhere; }
.msg.auto:not([open]) { gap: 0; }
/* Knöpfe im Dialogfuß: alle gleich breit und gleich gestaltet (Rahmen bzw. Füllung) */
@media (min-width: 601px) { .dialog-foot > .btn:not(.push-left) { min-width: 120px; } }
/* Ticket-Liste: Betreff + Status | Kontakt · Nummer + Zeit | Vorschau */
.ticket-summary { gap: 3px; }
.ticket-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ticket-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-top .ticket-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-top .badge, .ticket-rating { flex: 0 0 auto; }
.ticket-sub { font-size: 0.88rem; color: var(--muted); }
.ticket-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-when { flex: 0 0 auto; }
/* Fester Bereich unter dem scrollbaren Dialoginhalt (Ticket: Antwortfeld) */
.dialog-bottom { padding: 12px 16px 16px; border-top: 1px solid var(--border); }
.composer textarea { resize: none; }
/* Antwortfeld: 📎 links, „Senden“ rechts; Auswahl öffnet nach oben */
.composer-actions { margin-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.composer-actions .menu { margin-left: auto; }
.send-toggle { min-width: 120px; }
.menu-list.drop-up { top: auto; bottom: calc(100% + 6px); }

/* Scrollbalken: schmal, abgerundet, in den App-Farben */
/* Chrome/Safari: eigene Gestaltung über ::-webkit-scrollbar (die Standard-Eigenschaften würden sie dort abschalten) */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--muted) 45%, transparent); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--muted) 70%, transparent); }
.btn.primary.send-toggle[aria-expanded='true'] { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); }
/* Fester Bereich über dem scrollbaren Dialoginhalt (Ticket: Angaben + Beschreibung) */
.dialog-top { display: flex; flex-direction: column; gap: 14px; padding: 4px 16px 10px; border-bottom: 1px solid var(--border); }
.dialog-top .convo-title { padding-top: 4px; }
.dialog-top + .dialog-body { padding-top: 14px; }
.dialog-top .ticket-description .msg-body { max-height: 6.5em; overflow-y: auto; } /* lange Beschreibung scrollt in sich */

/* Kundenportal und Kunden */
.status-toggle.static { cursor: default; }
.status-toggle.s-resolved, .status-toggle.s-closed { background: var(--surface-2); color: var(--muted); }
.sub-section { display: flex; flex-direction: column; gap: 8px; }
.sub-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sub-head .rights-title { padding-top: 0; }
.form-card { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.form-actions { display: flex; justify-content: flex-end; }
.form-actions .btn { min-width: 120px; }

/* Portal: Erledigt + Senden nebeneinander, Bewertung mit Gesichtern */
.composer-buttons { display: flex; gap: 8px; margin-left: auto; }
.composer-buttons .btn { min-width: 120px; }
.rating-question { font-weight: 600; }
.rating-choices { display: flex; gap: 8px; }
.rating-choice { width: 48px; height: 48px; border-radius: 12px; border: 1px solid transparent; background: var(--surface-2); font-size: 1.5rem; cursor: pointer; }
.rating-choice.active { border-color: var(--accent); background: var(--accent-soft); }

/* Rechte: Rollen zum Ankreuzen */
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.check-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.access .btn.small { align-self: flex-start; }

/* Rechte: zusätzliche Rechte als Liste (Modul · Recht · ✕) */
.own-rights { display: flex; flex-direction: column; gap: 8px; }
.own-right { display: grid; grid-template-columns: 1fr minmax(0, 1.4fr) auto; align-items: center; gap: 8px; }
.own-right-name { font-weight: 600; }

.menu-heading { padding: 6px 12px 2px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.own-rights > .menu { align-self: flex-start; }
.btn.secondary.small.menu-toggle[aria-expanded='true'] { background: var(--surface-2); }

.link-btn.inline { padding: 0; min-height: 0; font-size: inherit; }

.pending-box { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, #f2c94c 14%, var(--surface)); border: 1px solid color-mix(in srgb, #f2c94c 50%, transparent); }
.pending-box .rights-title { padding-top: 0; }

/* Schmale Bildschirme (Kundenportal fürs Handy): Betreff darf umbrechen, Status rückt bei Bedarf darunter */
@media (max-width: 600px) {
  .ticket-top { flex-wrap: wrap; row-gap: 4px; }
  .ticket-top .ticket-title { white-space: normal; overflow-wrap: anywhere; }
}

/* Schmale Bildschirme: Status nie umbrechen; im Dialog scrollt der ganze Inhalt am Stück –
   nur Kopfzeile oben und Antwortfeld unten bleiben stehen (sonst bliebe für den Verlauf kaum Platz) */
.status-toggle { white-space: nowrap; }
@media (max-width: 600px) {
  .dialog-form:has(.dialog-top) { overflow-y: auto; }
  .dialog-form:has(.dialog-top) .dialog-body { flex: none; overflow: visible; }
  .dialog-form:has(.dialog-top) .dialog-head { position: sticky; top: 0; z-index: 2; background: var(--surface); }
  .dialog-form:has(.dialog-top) .dialog-bottom { position: sticky; bottom: 0; z-index: 2; background: var(--surface); }
  .dialog-head h2 { font-size: 1.05rem; }
  .composer textarea { min-height: 88px; }
}

.nowrap { white-space: nowrap; }
@media (max-width: 600px) {
  .grid-2.even { grid-template-columns: 1fr; } /* z. B. E-Mail/Telefon, Vor-/Nachname untereinander */
  .ticket-sub { white-space: normal; overflow-wrap: anywhere; }
}

/* Schmale Bildschirme: bei Modulen nur das Symbol in der Kopfzeile – so passt die Suche in dieselbe Zeile;
   Reiter umbrechen statt abschneiden */
@media (max-width: 600px) {
  .topbar h1:has(.title-icon) .title-text {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  .topbar h1:has(.title-icon) .title-icon { margin-right: 0; font-size: 1.4rem; }
  .tabs { flex-wrap: wrap; overflow-x: visible; }
}
@media (max-width: 600px) {
  .dialog.wide { width: 100vw; max-width: 100vw; } /* auch breite Dialoge (Ticket) als Blatt von unten wie alle anderen */
}

/* ---------- Einkaufsliste ---------- */
.shop-add { display: grid; grid-template-columns: 1fr 150px 130px auto; gap: 8px; align-items: end; }
.shop-add .btn { min-width: 120px; }
@media (max-width: 600px) {
  .shop-add { grid-template-columns: 1fr 1fr; }
  .shop-add > .field:first-child, .shop-add .btn { grid-column: 1 / -1; }
}
.shop-suggestions { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-suggestions:empty { display: none; }
.shop-chip { display: inline-flex; align-items: center; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.shop-chip button { border: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.9rem; cursor: pointer; }
.shop-chip-add { padding: 6px 4px 6px 12px; }
.shop-chip-remove { padding: 6px 10px 6px 6px; color: var(--muted) !important; font-size: 0.8rem !important; }
.shop-chip-add:hover { color: var(--accent); }
.shop-chip-remove:hover { color: var(--danger) !important; }

/* Menge mit − / + */
.stepper { display: flex; align-items: center; gap: 2px; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.stepper .icon-btn { width: 40px; height: 40px; font-size: 1.2rem; }
.field .stepper input.stepper-value { flex: 1; min-width: 0; min-height: 0; height: 40px; padding: 0; border: 0; background: transparent; text-align: center; }
.field .stepper input.stepper-value:focus { outline: none; }
.stepper.small { height: auto; border: 0; background: transparent; gap: 0; flex: none; }
.stepper.small .icon-btn { width: 34px; height: 34px; font-size: 1.1rem; }
.stepper.small .shop-quantity { min-width: 64px; text-align: center; }
.shop-item { display: flex; align-items: center; gap: 4px; padding-right: 6px; }
.shop-item + .shop-item { border-top: 1px solid var(--border); }
.shop-check { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.shop-box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); color: var(--accent-text); font-size: 0.85rem; font-weight: 700; }
.shop-item.done .shop-box { background: var(--accent); border-color: var(--accent); }
.shop-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shop-quantity { flex: none; color: var(--muted); font-size: 0.9rem; }
.shop-item.done .shop-label { text-decoration: line-through; color: var(--muted); }
/* Offene und erledigte Einträge mit normalem Seitenabstand; Überschrift bündig mit dem Knopf */
.shop-lists { display: flex; flex-direction: column; gap: 18px; }
.shop-done .sub-head .home-subtitle { margin-top: 0; }
.shop-delete { color: var(--muted); }
.shop-delete:hover { color: var(--danger); }

/* ---------- Rechnungen ---------- */
.positions { display: flex; flex-direction: column; gap: 10px; }
.position { display: grid; grid-template-columns: 20px 90px 110px minmax(0, 1fr) 100px 36px; gap: 8px; align-items: end; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.position > .field:nth-of-type(1) { grid-column: 2 / -1; } /* Beschreibung über die ganze Breite */
.position textarea { resize: vertical; min-height: 44px; }
.position-no { align-self: start; padding-top: 30px; color: var(--muted); font-size: 0.85rem; grid-row: 1 / 3; }
.position-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.position-totals { display: flex; flex-direction: column; gap: 4px; align-self: flex-end; min-width: 220px; }
.position-totals > div { display: flex; justify-content: space-between; gap: 16px; }
.position-totals .strong { font-weight: 700; border-top: 1px solid var(--border); padding-top: 4px; }
@media (max-width: 600px) {
  .position { grid-template-columns: 1fr 1fr 36px; }
  .position-no { display: none; }
  .position > .field:nth-of-type(1) { grid-column: 1 / -1; }
}
.ticket-title.wrap { white-space: normal; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.settings-form { display: flex; flex-direction: column; gap: 16px; }
.settings-form .home-subtitle { margin-top: 0; }
.row-card.inactive { opacity: 0.6; }
.customer-pick { min-height: 44px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }
.doc-row .row-main { color: inherit; text-decoration: none; }

/* PDF-Vorschau im Dialog */
.pdf-dialog { height: calc(100dvh - 24px); }
.pdf-dialog .dialog-body { padding: 0; flex: 1; overflow: hidden; }
.pdf-frame { width: 100%; height: 100%; min-height: 60dvh; border: 0; background: #fff; }

/* Offener Dialog: Seite im Hintergrund scrollt nicht mit */
html:has(dialog[open]), body:has(dialog[open]) { overflow: hidden; overscroll-behavior: none; }

/* Zeiterfassung */
.timer { display: flex; flex-direction: column; gap: 12px; }
.timer-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.timer-clock { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.timer-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }
.times-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.times-filter input, .times-filter select { min-height: 40px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; }

.plain-btn { border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 0; }
.link-title { font-size: 1.2rem; }

/* Startseite anpassen: Favoriten und Reihenfolge */
.home-edit .list { margin-bottom: 8px; }
.home-edit-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.home-edit-name { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.module-icon.small { font-size: 1.2rem; }
.icon-btn.star { color: var(--muted); font-size: 1.15rem; }
.icon-btn.star.on { color: #e5a50a; }
.home-edit-row .icon-btn:disabled { opacity: 0.3; cursor: default; }

/* Durchsuchbare Auswahl – sieht aus wie ein Auswahlfeld */
.search-select { position: relative; }
.field .search-select-input {
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  text-overflow: ellipsis;
}
.search-select-list { z-index: 1000; }
.search-select-list .menu-item { white-space: normal; flex-shrink: 0; }
.search-select-list .menu-item.active { background: var(--surface-2); }
.search-select-list .menu-item.selected { font-weight: 600; }
.search-select-empty { padding: 8px 12px; color: var(--muted); font-size: 0.95rem; }
