/* ═══════════════════════════════════════════════════════════════════════════
   TechWaWi – Design-System v2.2
   Eine Designsprache für Hell und Dunkel: Systemschrift, neutrale Flächen,
   eine Akzentfarbe, feine Linien, Linien-Icons statt Emojis in der Bedienung,
   sofortiges Feedback und ruhige Übergänge.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── MARKENSCHRIFT (lokal, funktioniert offline) ───────────────────────── */
@font-face { font-family: "Outfit"; font-weight: 300; font-style: normal; font-display: swap; src: url("/fonts/outfit-latin-300-normal.woff2") format("woff2"), url("/fonts/outfit-latin-300-normal.woff") format("woff"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/outfit-latin-600-normal.woff2") format("woff2"), url("/fonts/outfit-latin-600-normal.woff") format("woff"); }

/* ─── TOKENS: DUNKEL (Standard) ─────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1c1c1e;
  --surface2: #2c2c2e;
  --surface3: #3a3a3c;
  --surface-hover: #232325;
  --material: rgba(28, 28, 30, 0.72);
  --material-strong: rgba(28, 28, 30, 0.9);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --separator: rgba(84, 84, 88, 0.5);
  --fill: rgba(118, 118, 128, 0.2);
  --fill-strong: rgba(118, 118, 128, 0.32);

  --text: #f5f5f7;
  --text-bright: #ffffff;
  --text-dim: #d1d1d6;
  --text-muted: #98989f;
  --on-accent: #ffffff;

  --accent: #0a84ff;
  --accent-hover: #3d9bff;
  --accent-text: #4aa3ff;
  --accent-soft: rgba(10, 132, 255, 0.16);

  --green: #30d158;   --green-text: #5fdc7e;   --green-soft: rgba(48, 209, 88, 0.15);
  --orange: #ff9f0a;  --orange-text: #ffb340;  --orange-soft: rgba(255, 159, 10, 0.16);
  --red: #ff453a;     --red-text: #ff6961;     --red-soft: rgba(255, 69, 58, 0.15);
  --indigo: #5e5ce6;  --indigo-text: #8e8cff;  --indigo-soft: rgba(94, 92, 230, 0.18);
  --violet: #bf5af2;  --cyan: #64d2ff;         --pink: #ff375f;

  --shadow-card: none;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.65);
  --log-bg: #0b0b0c; --log-text: #a8e6b8;
  --scrim: rgba(0, 0, 0, 0.55);
}

/* ─── TOKENS: HELL ───────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface2: #f2f2f7;
  --surface3: #e5e5ea;
  --surface-hover: #fafafc;
  --material: rgba(249, 249, 251, 0.78);
  --material-strong: rgba(255, 255, 255, 0.92);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --separator: rgba(60, 60, 67, 0.18);
  --fill: rgba(118, 118, 128, 0.12);
  --fill-strong: rgba(118, 118, 128, 0.2);

  --text: #1d1d1f;
  --text-bright: #000000;
  --text-dim: #3a3a3c;
  --text-muted: #6e6e73;

  --accent: #007aff;
  --accent-hover: #0066d6;
  --accent-text: #0066d6;
  --accent-soft: rgba(0, 122, 255, 0.1);

  --green: #34c759;   --green-text: #1f7a36;   --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #ff9500;  --orange-text: #b25000;  --orange-soft: rgba(255, 149, 0, 0.14);
  --red: #ff3b30;     --red-text: #c4170c;     --red-soft: rgba(255, 59, 48, 0.12);
  --indigo: #5856d6;  --indigo-text: #3f3dbf;  --indigo-soft: rgba(88, 86, 214, 0.12);
  --violet: #af52de;  --cyan: #0094cc;         --pink: #ff2d55;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
  --log-bg: #1d1d1f; --log-text: #b7f0c5;
  --scrim: rgba(0, 0, 0, 0.3);
}

/* Gemeinsame Tokens + Aliasse für ältere Bezeichnungen */
:root {
  --emerald: var(--green); --amber: var(--orange); --rose: var(--red);
  --indigo-light: var(--indigo-text); --indigo-dark: var(--indigo);
  --success: var(--green); --warning: var(--orange); --danger: var(--red);
  --status-available: var(--green); --status-checkedout: var(--orange); --status-incase: var(--indigo);

  --radius: 14px;
  --radius-md: 12px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-sheet: cubic-bezier(0.32, 0.72, 0, 1);
  --transition: 180ms var(--ease-out);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Outfit", "Avenir Next", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --nav-height: 62px;
  --sidebar-width: 244px;
}

/* ─── SEITENWECHSEL & THEMENWECHSEL (ruhig, ohne Sprünge) ────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: var(--ease-out); }
.theme-switching, .theme-switching * , .theme-switching *::before, .theme-switching *::after {
  transition: background-color 260ms var(--ease-out), border-color 260ms var(--ease-out), color 260ms var(--ease-out), fill 260ms, stroke 260ms !important;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh; min-height: 100dvh;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; color: inherit; touch-action: manipulation; }
input, select, textarea { font-family: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ─── ICONS ──────────────────────────────────────────────────────────────── */
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; display: inline-block; vertical-align: -0.2em; }
i[data-icon] { display: inline-flex; font-style: normal; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.main-content {
  margin-left: calc(var(--sidebar-width) * var(--ui, 1));
  flex: 1; min-width: 0;
  padding: 36px 44px 56px;
  max-width: 1360px;
}

/* ─── SIDEBAR ───────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--material);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 100;
  padding-top: env(safe-area-inset-top);
  transition: transform 320ms var(--ease-sheet);
  zoom: var(--ui, 1); /* Menü skaliert mit Bildschirmgröße (app.js setzt --ui) */
  height: calc(100vh / var(--ui, 1)); bottom: auto;
}
.sidebar-logo { padding: 22px 18px 16px; }
.logo-mark { display: flex; align-items: center; gap: 11px; }
.logo-icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: block; object-fit: contain;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.logo-icon .icon { width: 19px; height: 19px; }
.logo-icon-lg { width: 60px; height: 60px; border-radius: 15px; }
.logo-icon-lg .icon { width: 32px; height: 32px; }
.logo-text { font-size: 17px; line-height: 1.1; color: var(--text); }
/* Wortmarke: Tech Light, WaWi SemiBold, eng gesetzt (Brand-Guide) */
.wordmark { font-family: var(--font-brand); letter-spacing: -0.02em; white-space: nowrap; }
.wordmark i { font-style: normal; font-weight: 300; }
.wordmark b { font-weight: 600; }
.logo-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 1px; overflow-y: auto; }
.nav-label { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-muted); padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 11px; border-radius: 8px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  transition: background var(--transition), color var(--transition), transform 100ms var(--ease-out);
}
.nav-item:active { transform: scale(0.98); }
.nav-item.active { background: var(--accent); color: var(--on-accent); }
.nav-item.active .nav-icon { color: var(--on-accent); }
.nav-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.nav-item:hover .nav-icon { color: var(--text-dim); }
.nav-icon .icon { width: 18px; height: 18px; }
.nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}
.nav-item.active .nav-badge { background: rgba(255, 255, 255, 0.25); }

.sidebar-bottom { padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-text { flex: 1; min-width: 0; line-height: 1.25; }
.sidebar-user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11.5px; color: var(--text-muted); }

.avatar-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; }
.avatar-emoji { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }

/* ─── TOPBAR ─────────────────────────────────────────────────────────────── */
.topbar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.page-title { font-size: 30px; font-weight: 600; line-height: 1.12; letter-spacing: -0.026em; }
.page-subtitle { font-size: 15px; color: var(--text-muted); margin-top: 6px; line-height: 1.4; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; }

/* ─── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 8px 15px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition), opacity var(--transition), transform 100ms var(--ease-out), box-shadow var(--transition);
  white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  text-decoration: none;
}
.btn .icon { width: 16px; height: 16px; }
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-hover); box-shadow: var(--shadow-card); }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-danger { background: var(--red-soft); color: var(--red-text); }
.btn-success { background: var(--green-soft); color: var(--green-text); }
.btn-warning { background: var(--orange-soft); color: var(--orange-text); }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
  .btn-secondary:hover:not(:disabled) { background: var(--surface2); }
  .btn-ghost:hover:not(:disabled) { background: var(--accent-soft); }
  .btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--red) 24%, transparent); }
  .btn-success:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 24%, transparent); }
  .btn-warning:hover:not(:disabled) { background: color-mix(in srgb, var(--orange) 24%, transparent); }
  .nav-item:hover:not(.active) { background: var(--fill); color: var(--text); }
}
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { min-height: 46px; padding: 11px 22px; font-size: 15.5px; border-radius: 12px; }
.btn-icon { padding: 6px; min-width: 32px; }
.btn-full { width: 100%; }

/* ─── KARTEN ─────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.card-sm { padding: 16px; border-radius: var(--radius-md); }
.card-link { transition: background var(--transition), transform 120ms var(--ease-out); cursor: pointer; }
.card-link:active { transform: scale(0.99); }
@media (hover: hover) { .card-link:hover { background: var(--surface-hover); } }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.card-title .icon { color: var(--text-muted); }
.card-action { font-size: 13px; font-weight: 600; color: var(--accent-text); }
@media (hover: hover) { .card-action:hover { text-decoration: underline; } }
.glass-card { background: var(--material); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border: 1px solid var(--border); border-radius: var(--radius); }
.user-card { border-left: 3px solid var(--user-color, var(--accent)); }

/* ─── KENNZAHLEN ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
  color: inherit;
  transition: background var(--transition), transform 120ms var(--ease-out);
}
a.stat-card:active { transform: scale(0.985); }
@media (hover: hover) { a.stat-card:hover { background: var(--surface-hover); } }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--fill); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.stat-icon .icon { width: 17px; height: 17px; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; margin-top: 6px; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-meter { height: 4px; border-radius: 2px; background: var(--fill); overflow: hidden; margin-top: 4px; }
.stat-meter > span { display: block; height: 100%; background: var(--tint, var(--accent)); border-radius: 2px; transition: width 600ms var(--ease-out); }

/* ─── DASHBOARD ──────────────────────────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
.quick-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bar-list { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; font-size: 13.5px; }
.bar-row .bar-track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; display: flex; }
.bar-row .bar-fill { height: 100%; background: var(--accent); }
.bar-row .bar-fill.out { background: var(--orange); }
.bar-row .bar-value { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 0; }
.date-chip {
  width: 44px; flex-shrink: 0; text-align: center; border-radius: 9px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border); line-height: 1.1;
}
.date-chip-month { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #fff; background: var(--red); padding: 2px 0; letter-spacing: 0.03em; }
.date-chip-day { font-size: 18px; font-weight: 700; padding: 3px 0 4px; font-variant-numeric: tabular-nums; }
.empty-inline { font-size: 13.5px; color: var(--text-muted); padding: 6px 0; }
.thumb {
  width: 40px; height: 40px; border-radius: 9px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden; font-size: 19px;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

/* ─── ARTIKEL-KARTEN ─────────────────────────────────────────────────────── */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.item-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; cursor: pointer; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; color: inherit;
  transition: background var(--transition), border-color var(--transition), transform 120ms var(--ease-out), box-shadow var(--transition);
}
.item-card:active { transform: scale(0.99); }
@media (hover: hover) { .item-card:hover { background: var(--surface-hover); border-color: var(--border-hover); } }
.item-card-top { display: flex; gap: 12px; align-items: flex-start; }
.item-card-img {
  width: 56px; height: 56px; border-radius: 10px; flex-shrink: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.item-card-img img { width: 100%; height: 100%; object-fit: contain; }
.item-card-img.placeholder { background: var(--surface2); }
.item-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.item-category-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--fill); color: var(--text-dim); max-width: 100%;
}
.item-name { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; line-height: 1.3; }
.item-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.item-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
.item-meta { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.item-meta .icon { width: 13px; height: 13px; margin-right: 3px; }
.item-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }

/* ─── STATUS & BADGES ────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.status-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.status-available { background: var(--green-soft); color: var(--green-text); }
.status-checkedout { background: var(--orange-soft); color: var(--orange-text); }
.status-incase { background: var(--indigo-soft); color: var(--indigo-text); }
.status-fixed { background: var(--red-soft); color: var(--red-text); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--fill); color: var(--text-dim); }
.badge-success { background: var(--green-soft); color: var(--green-text); }
.badge-info { background: var(--accent-soft); color: var(--accent-text); }
.badge-warning { background: var(--orange-soft); color: var(--orange-text); }
.badge-danger { background: var(--red-soft); color: var(--red-text); }
.badge-subtle { background: var(--fill); color: var(--text-muted); }
.condition-badge { font-size: 12.5px; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.condition-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.condition-neu { color: var(--green-text); } .condition-gut { color: var(--accent-text); }
.condition-okay { color: var(--orange-text); } .condition-defekt { color: var(--red-text); }
.cond-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 3px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cond-seg { gap: 6px; padding: 4px; }
.cond-seg button { border: 0; background: transparent; border-radius: calc(var(--radius-sm) - 3px); min-height: 42px; padding: 8px 12px; white-space: nowrap; cursor: pointer; font: inherit; display: flex; align-items: center; justify-content: center; }
.cond-seg button .condition-badge { font-size: 13px; }
.cond-seg button.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.cond-seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ─── NUTZER-CHIPS ───────────────────────────────────────────────────────── */
.user-chip {
  --chip-color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px 3px 5px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--chip-color) 15%, transparent);
  color: color-mix(in srgb, var(--chip-color) 75%, var(--text));
  white-space: nowrap;
}
.user-avatar, .user-avatar-lg { border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.user-avatar { width: 24px; height: 24px; font-size: 13px; }
.user-avatar-lg { width: 40px; height: 40px; font-size: 20px; }

/* ─── SUCHE & FILTER ─────────────────────────────────────────────────────── */
.search-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.search-input-wrapper { position: relative; flex: 1; min-width: 220px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; display: flex; }
.search-icon .icon { width: 17px; height: 17px; }
.search-input, .filter-select, .form-input, .form-select, .form-textarea {
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.modal .form-input, .modal .form-select, .modal .form-textarea, .card .form-input, .card .form-select, .card .form-textarea { background: var(--surface2); border-color: transparent; }
.search-input { width: 100%; padding: 9px 14px 9px 37px; min-height: 40px; }
.filter-select { padding: 9px 34px 9px 13px; min-height: 40px; cursor: pointer; }
.search-input:focus, .filter-select:focus, .form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-input::placeholder, .form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
select.filter-select, select.form-select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238e8e93' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.filter-select option, .form-select option { background: var(--surface); color: var(--text); }

/* ─── FORMULARE ──────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-dim); }
.form-hint { font-size: 12.5px; color: var(--text-muted); }
.form-input, .form-select, .form-textarea { padding: 10px 13px; width: 100%; min-height: 42px; }
.form-textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
input[type="color"].form-input { padding: 5px; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
.check-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-row-text { min-width: 0; }
.switch-row-title { font-size: 14px; font-weight: 600; }
.switch-row-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span {
  position: absolute; inset: 0; border-radius: 999px; background: var(--fill-strong);
  transition: background 200ms var(--ease-out); cursor: pointer;
}
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 260ms var(--ease-sheet);
}
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── MODAL / SHEET ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: var(--scrim);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 240ms var(--ease-out), visibility 0s linear 240ms;
}
.modal-overlay.open { opacity: 1; visibility: visible; transition: opacity 240ms var(--ease-out), visibility 0s; }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  padding: 24px; width: 100%; max-width: 480px;
  max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(0.98);
  transition: transform 320ms var(--ease-sheet);
}
.modal-overlay.open .modal { transform: none; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--fill); border: none; color: var(--text-muted);
  font-size: 19px; line-height: 1; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--transition), transform 100ms var(--ease-out);
}
.modal-close:active { transform: scale(0.92); }
@media (hover: hover) { .modal-close:hover { background: var(--fill-strong); color: var(--text); } }
.modal-form { display: flex; flex-direction: column; gap: 16px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* ─── NUTZER-AUSWAHL ─────────────────────────────────────────────────────── */
.user-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; margin-top: 4px; }
.user-select-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text); font-size: 14px; font-weight: 600;
  transition: background var(--transition), border-color var(--transition), transform 100ms var(--ease-out);
}
.user-select-btn:active { transform: scale(0.96); }
@media (hover: hover) { .user-select-btn:hover { border-color: var(--user-color, var(--accent)); background: var(--surface3); } }

/* ─── HINWEISE ───────────────────────────────────────────────────────────── */
.notice { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; line-height: 1.45; background: var(--surface2); border: 1px solid var(--border); }
.notice-title { font-weight: 600; margin-bottom: 3px; }
.notice-text { color: var(--text-muted); font-size: 13px; }
.notice-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.notice-success { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); color: var(--green-text); }
.notice-warning { background: var(--orange-soft); border-color: color-mix(in srgb, var(--orange) 30%, transparent); color: var(--orange-text); }
.notice-danger { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); color: var(--red-text); }

/* ─── QR-CODE ────────────────────────────────────────────────────────────── */
.qr-container { background: #fff; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 240px; border: 1px solid var(--border); }
.qr-container img { width: 190px; height: 190px; }
.qr-label { font-size: 11px; font-weight: 600; color: #1d1d1f; text-align: center; font-family: var(--font-mono); word-break: break-all; }

/* ─── TABELLEN ───────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface); border-bottom: 1px solid var(--separator); white-space: nowrap; }
td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
@media (hover: hover) { tbody tr:hover td { background: var(--surface-hover); } }
.group-row td { background: var(--surface2) !important; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 7px 16px; }
.table-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
@media (hover: hover) { a.table-link:hover { color: var(--accent-text); } }
.link { color: var(--accent-text); }
.link-plain { color: inherit; display: block; }
@media (hover: hover) { .link:hover, .link-plain:hover { text-decoration: underline; } }
.mono { font-family: var(--font-mono); }

/* ─── LISTEN ─────────────────────────────────────────────────────────────── */
.list-group { display: flex; flex-direction: column; background: var(--surface2); border-radius: var(--radius-md); overflow: hidden; }
.card .list-group.flush { background: transparent; border-radius: 0; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: none; background: transparent; width: 100%; color: inherit; font-size: 14px; text-align: left; }
.list-group.flush .list-row { padding: 10px 0; }
.list-row + .list-row { border-top: 1px solid var(--border); }
.list-row-icon { font-size: 19px; flex-shrink: 0; display: inline-flex; color: var(--text-muted); }
.list-row-main { flex: 1; min-width: 0; display: block; color: inherit; }
.list-row-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-sub { font-size: 12.5px; color: var(--text-muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.list-row-button, a.list-row { cursor: pointer; transition: background var(--transition); }
.list-row-button:active, a.list-row:active { background: var(--fill); }
@media (hover: hover) { .list-row-button:hover, a.list-row:hover { background: var(--fill); } }
.list-group.flush a.list-row:hover { background: transparent; }
.list-group.flush a.list-row:hover .list-row-title { color: var(--accent-text); }

/* ─── LEERE ZUSTÄNDE ─────────────────────────────────────────────────────── */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 52px 20px; text-align: center; gap: 12px; }
.empty-icon { font-size: 40px; opacity: 0.55; color: var(--text-muted); display: inline-flex; }
.empty-icon .icon { width: 40px; height: 40px; }
.empty-title { font-size: 17px; font-weight: 600; }
.empty-text { font-size: 14px; color: var(--text-muted); max-width: 320px; }

/* ─── TOAST ──────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; top: calc(16px + env(safe-area-inset-top)); right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  background: var(--material-strong); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-hover); border-radius: 14px; padding: 11px 16px 11px 12px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text);
  box-shadow: var(--shadow-lg); pointer-events: auto; max-width: min(380px, calc(100vw - 32px));
  animation: toastIn 320ms var(--ease-sheet);
}
.toast.leaving { animation: toastOut 220ms var(--ease-out) forwards; }
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; flex-shrink: 0; color: #fff; background: var(--accent); }
.toast.success .toast-icon { background: var(--green); }
.toast.error .toast-icon { background: var(--red); }
.toast.warning .toast-icon { background: var(--orange); }
.toast-text { line-height: 1.35; overflow-wrap: anywhere; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-8px) scale(0.98); } }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-muted); margin-bottom: 18px; min-width: 0; }
.breadcrumb a { color: var(--accent-text); }
.breadcrumb-sep { opacity: 0.5; }
.breadcrumb-current { color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── DETAILSEITEN ───────────────────────────────────────────────────────── */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.detail-header { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.detail-type-icon { width: 60px; height: 60px; border-radius: 15px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 30px; flex-shrink: 0; overflow: hidden; }
.detail-type-icon.has-image { background: #fff; border: 1px solid var(--border); }
.detail-type-icon img { width: 100%; height: 100%; object-fit: contain; }
.detail-title { font-size: 26px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; margin-bottom: 6px; overflow-wrap: anywhere; }
.detail-sub { font-size: 14px; color: var(--text-muted); margin: -2px 0 8px; }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; }
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-row-block { flex-direction: column; align-items: flex-start; gap: 4px; }
.info-row-block .info-val { text-align: left; white-space: pre-line; }
.info-key { font-size: 14px; color: var(--text-muted); flex-shrink: 0; }
.info-val { font-size: 14px; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ─── PRODUKTDATEN ───────────────────────────────────────────────────────── */
.product-hero { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; }
.product-hero img { width: 100%; height: 100%; object-fit: contain; }
.spec-table { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; font-size: 13.5px; }
.spec-table > div { padding: 8px 0; border-top: 1px solid var(--border); }
.spec-table > div:nth-child(-n+2) { border-top: none; }
.spec-key { color: var(--text-muted); padding-right: 12px; }
.spec-val { font-weight: 500; overflow-wrap: anywhere; }
.spec-sources { font-size: 12px; color: var(--text-muted); margin-top: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.spec-sources a { color: var(--accent-text); }
.suggest-card { border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.image-picker { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.image-option {
  width: 84px; height: 84px; border-radius: 10px; background: #fff; border: 2px solid var(--border);
  padding: 4px; cursor: pointer; transition: border-color var(--transition), transform 100ms var(--ease-out);
}
.image-option:active { transform: scale(0.96); }
.image-option.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.image-option img { width: 100%; height: 100%; object-fit: contain; }
.image-option.none { display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--text-muted); background: var(--surface2); text-align: center; }
.searching-pulse { display: inline-flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 14px; }

/* ─── SCANNER ────────────────────────────────────────────────────────────── */
#reader { border-radius: var(--radius) !important; overflow: hidden; }
#reader video { border-radius: var(--radius) !important; }

/* ─── TAB-LEISTE (Smartphone) ────────────────────────────────────────────── */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--material); -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 200; justify-content: space-around; gap: 2px;
}
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 4px; border-radius: var(--radius-sm); background: none; border: none;
  color: var(--text-muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; text-decoration: none;
  transition: color var(--transition), transform 100ms var(--ease-out); min-width: 0;
}
.mobile-nav-item:active { transform: scale(0.94); }
.mobile-nav-item .nav-icon { width: auto; height: 26px; color: inherit; }
.mobile-nav-item .nav-icon .icon { width: 24px; height: 24px; }
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-label { white-space: nowrap; }
.mobile-nav-scan .nav-icon { background: var(--accent); color: #fff !important; width: 46px; height: 28px; border-radius: 999px; }
.mobile-nav-scan .nav-icon .icon { width: 19px; height: 19px; }

/* ─── CASES ──────────────────────────────────────────────────────────────── */
.case-list { display: flex; flex-direction: column; gap: 10px; }
.case-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow-card);
  display: flex; gap: 14px; align-items: center;
  transition: background var(--transition), border-color var(--transition), transform 120ms var(--ease-out);
}
.case-card:active { transform: scale(0.995); }
@media (hover: hover) { .case-card:hover { background: var(--surface-hover); border-color: var(--border-hover); } }
.case-icon-wrap { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 23px; flex-shrink: 0; }
.case-info { flex: 1; min-width: 0; }
.case-name { font-size: 15.5px; font-weight: 600; margin-bottom: 3px; overflow-wrap: anywhere; }
.case-desc { font-size: 13.5px; color: var(--text-muted); margin-bottom: 8px; overflow-wrap: anywhere; }
.case-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.case-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ─── SEGMENTED CONTROL ──────────────────────────────────────────────────── */
.segmented { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill); border-radius: 9px; max-width: 100%; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.segmented::-webkit-scrollbar { display: none; }
#settings-tabs .segmented-item { flex: 1 0 auto; }
.segmented-item {
  border: none; background: transparent; color: var(--text-dim);
  padding: 6px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.segmented-item .icon { width: 15px; height: 15px; }
.segmented-item.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.04); }
:root[data-theme="dark"] .segmented-item.active { background: var(--surface3); }
.theme-switch { display: flex; width: 100%; }
.theme-switch .segmented-item { flex: 1; padding: 6px 4px; }

/* ─── KALENDER ───────────────────────────────────────────────────────────── */
.timeline-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 14px; background: var(--surface2); border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  transition: background var(--transition), transform 120ms var(--ease-out);
}
.timeline-project { border-left-color: var(--pink); }
.timeline-event { border-left-color: var(--accent); }
.timeline-reservation { border-left: 4px dashed var(--orange); background: transparent; outline: 1px dashed var(--border); outline-offset: -1px; }
.timeline-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.timeline-convert { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.timeline-month-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 4px 0 8px; text-transform: none; position: sticky; top: 0; }
.timeline-month + .timeline-month { margin-top: 12px; }
@media (max-width: 640px) { .timeline-row { flex-direction: column; align-items: stretch; } .timeline-actions { justify-content: flex-start; } }
.timeline-project:active { transform: scale(0.995); }
@media (hover: hover) { .timeline-project:hover { background: var(--surface3); } }
.timeline-row.is-past { opacity: 0.55; }
.timeline-title { font-weight: 600; font-size: 15px; margin-bottom: 3px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.timeline-meta { font-size: 12.5px; color: var(--text-muted); }
.timeline-notes { font-size: 13px; margin-top: 5px; color: var(--text-dim); white-space: pre-line; }
.timeline-chevron { color: var(--text-muted); display: inline-flex; }

/* ─── EINSTELLUNGEN ──────────────────────────────────────────────────────── */
.pill {
  --pill-color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 7px 6px 12px;
  background: color-mix(in srgb, var(--pill-color) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--pill-color) 22%, var(--border));
  border-radius: 999px;
}
.pill-action {
  width: 26px; height: 26px; border-radius: 50%; border: none; background: var(--fill);
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted);
  transition: background var(--transition), transform 100ms var(--ease-out);
}
.pill-action .icon { width: 14px; height: 14px; }
.pill-action:active { transform: scale(0.9); }
.pill-action-danger { color: var(--red-text); }
@media (hover: hover) { .pill-action:hover { background: var(--fill-strong); } .pill-action-danger:hover { background: var(--red-soft); } }
.backup-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border-radius: var(--radius-sm); font-size: 12.5px; }
.dropzone {
  border: 2px dashed var(--border-hover); border-radius: var(--radius-md); padding: 26px 20px; text-align: center;
  background: var(--surface2); cursor: pointer; color: var(--text-muted);
  transition: border-color var(--transition), background var(--transition), transform 160ms var(--ease-out);
}
.dropzone .icon { width: 30px; height: 30px; margin-bottom: 6px; }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.01); }
@media (hover: hover) { .dropzone:hover { border-color: var(--accent); } }
.log-view { background: var(--log-bg); color: var(--log-text); padding: 14px; border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 12px; line-height: 1.5; max-height: 280px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; border: 1px solid var(--border); }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px; }

/* ─── ABSCHNITTE ─────────────────────────────────────────────────────────── */
.section { margin-bottom: 30px; }
.section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-title { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }

/* ─── LADEN ──────────────────────────────────────────────────────────────── */
.loading-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--fill-strong); border-top-color: var(--text-muted); border-radius: 50%; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; align-items: center; justify-content: center; padding: 52px; gap: 12px; color: var(--text-muted); font-size: 14px; }
.skeleton { background: linear-gradient(90deg, var(--fill) 0%, var(--fill-strong) 50%, var(--fill) 100%); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ─── ANMELDUNG ──────────────────────────────────────────────────────────── */
.login-page { background: radial-gradient(1100px 560px at 50% -12%, var(--accent-soft), transparent 62%), var(--bg); }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.login-card {
  width: 100%; max-width: 420px; background: var(--material);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid var(--border); border-radius: 22px; padding: 32px 28px; box-shadow: var(--shadow-lg);
}
.login-page { position: relative; overflow-x: hidden; }
/* Twin Beams als Markenfläche: zwei Lichtkegel steigen hinter der Karte auf */
.login-page::before, .login-page::after { content: ""; position: fixed; bottom: -4vh; width: min(62vw, 720px); height: 108vh; pointer-events: none; z-index: 0; opacity: .24; }
.login-page::before { left: calc(50% - min(62vw, 720px) * .46); background: linear-gradient(to top, #F59E0B, transparent 88%); clip-path: polygon(34% 100%, 0 0, 69% 0); }
.login-page::after { left: calc(50% - min(62vw, 720px) * .22); background: linear-gradient(to top, #0EA5E9, transparent 88%); clip-path: polygon(34% 100%, 0 0, 69% 0); }
.login-wrap { position: relative; z-index: 1; flex-direction: column; gap: 22px; }
.login-brand .logo-icon-lg { width: 76px; height: 76px; border-radius: 19px; box-shadow: 0 6px 22px rgba(14,23,38,.28); }
.login-brand .login-title { font-size: 40px; margin-top: 16px; }
.login-tag { font-size: 14px; color: var(--text-muted); margin-top: 6px; letter-spacing: .01em; }
.powered { text-align: center; font-size: 12px; color: var(--text-muted); }
.powered b { font-weight: 600; color: var(--text-secondary, var(--text-muted)); }
.brand-foot { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 28px 0 8px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.brand-foot img { width: 22px; height: 22px; border-radius: 6px; display: block; }
.brand-foot .wordmark { font-size: 15px; color: var(--text); }
.login-brand { text-align: center; margin-bottom: 26px; display: flex; flex-direction: column; align-items: center; }
.login-title { font-size: 30px; line-height: 1.1; margin-top: 14px; }
.login-sub { font-size: 15px; color: var(--text-muted); margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-user-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.login-user {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 14px 6px 12px;
  background: var(--surface2); border: 1.5px solid transparent; border-radius: var(--radius-md);
  transition: border-color var(--transition), background var(--transition), transform 100ms var(--ease-out);
}
.login-user:active { transform: scale(0.96); }
.login-user.active { border-color: var(--user-color, var(--accent)); background: color-mix(in srgb, var(--user-color, var(--accent)) 12%, var(--surface2)); }
.login-user-name { font-size: 14px; font-weight: 600; }
@media (hover: hover) { .login-user:hover:not(.active) { background: var(--surface3); } }
.success-check { width: 56px; height: 56px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); font-size: 28px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }

/* ─── MENÜ-SCHALTER ──────────────────────────────────────────────────────── */
.hamburger { display: none !important; }
.sidebar-overlay { position: fixed; inset: 0; background: var(--scrim); z-index: 99; opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease-out), visibility 0s linear 260ms; }
body.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; transition: opacity 260ms var(--ease-out), visibility 0s; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .span-8, .span-7, .span-6, .span-5, .span-4 { grid-column: span 12; }
}
@media (max-width: 900px) {
  :root { --ui: 1 !important; }
  .sidebar { transform: translateX(-100%); box-shadow: none; z-index: 300; background: var(--material-strong); }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-overlay { z-index: 250; }
  .main-content {
    margin-left: 0;
    padding: calc(20px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(var(--nav-height) + 28px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }
  .mobile-nav { display: flex; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .spec-layout { grid-template-columns: 1fr !important; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; margin-bottom: 20px; }
  .topbar-actions { justify-content: flex-start; }
  .page-title { font-size: 28px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid > .dash-slot:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .item-grid { grid-template-columns: minmax(0, 1fr); }
  .toast-container { left: 16px; right: 16px; align-items: stretch; }
  .toast { max-width: none; }
  .search-input, .filter-select, .form-input, .form-select, .form-textarea { font-size: 16px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-width: none; border-radius: 20px 20px 0 0;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top));
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .modal-overlay.open .modal { transform: none; }
  .modal::before { content: ''; display: block; width: 36px; height: 5px; border-radius: 3px; background: var(--fill-strong); margin: -8px auto 14px; }
  .modal-footer .btn { flex: 1; }
  .case-card { flex-wrap: wrap; }
  .case-actions { width: 100%; justify-content: flex-end; }
  table { font-size: 13px; }
  th, td { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .stats-grid { gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 26px; }
  .card { padding: 18px; }
  .user-select-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .login-card { padding: 26px 20px; }
}

/* ─── ANIMATIONEN ────────────────────────────────────────────────────────── */
.fade-in { animation: fadeIn 320ms var(--ease-out) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: fadeIn 360ms var(--ease-out) both; }
.stagger > *:nth-child(2) { animation-delay: 30ms; } .stagger > *:nth-child(3) { animation-delay: 60ms; }
.stagger > *:nth-child(4) { animation-delay: 90ms; } .stagger > *:nth-child(5) { animation-delay: 120ms; }
.stagger > *:nth-child(n+6) { animation-delay: 150ms; }
.pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.gradient-text { color: var(--accent-text); }

/* ─── QR-DRUCK ───────────────────────────────────────────────────────────── */
.qr-print-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.qr-print-card { background: #fff; border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2px solid var(--border); cursor: pointer; transition: border-color var(--transition), transform 120ms var(--ease-out); }
.qr-print-card:active { transform: scale(0.98); }
@media (hover: hover) { .qr-print-card:hover { border-color: var(--accent); } }
.qr-print-card img { width: 160px; height: 160px; }
.qr-print-name { font-size: 12.5px; font-weight: 700; color: #1d1d1f; text-align: center; }
.qr-print-sub { font-size: 10px; color: #6e6e73; font-family: var(--font-mono); }

/* ─── BARRIEREFREIHEIT ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .modal, .modal-overlay.open .modal { transform: none !important; }
  .btn:active, .item-card:active, .case-card:active { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .mobile-nav, .toast, .login-card, .glass-card { background: var(--surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
}
@media (prefers-contrast: more) {
  :root, :root[data-theme="dark"], :root[data-theme="light"] { --border: color-mix(in srgb, var(--text) 30%, transparent); --border-hover: color-mix(in srgb, var(--text) 45%, transparent); }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .hamburger, .toast-container, .btn, nav { display: none !important; }
  .main-content { margin-left: 0; padding: 0; }
  .qr-print-card { border: 1px solid #ccc; page-break-inside: avoid; }
}
/* Markenzeile: Handy und Seiten ohne Seitenleiste */
.brandline { display: none; align-items: center; gap: 9px; margin: 0 0 14px; color: var(--text); text-decoration: none; width: max-content; }
.brandline img { width: 26px; height: 26px; border-radius: 7px; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.brandline .wordmark { font-size: 18px; line-height: 1; }
@media (max-width: 900px) { .brandline { display: flex; } }
body.no-sidebar .brandline { display: flex; }
.logo-ver { display: block; font-size: 11px; opacity: .7; margin-top: 1px; }
.pub-brand { display: flex; align-items: center; gap: 10px; padding-top: 4px; margin-bottom: 14px; }
.pub-brand img { width: 30px; height: 30px; border-radius: 8px; display: block; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pub-brand .wordmark { font-size: 20px; line-height: 1; }
.pub-powered { margin: 18px 0 10px; }
@media print { .brandline, .pub-brand, .pub-powered { display: none !important; } }
/* Marke als Wasserzeichen im Druck: klein, grau, auf jeder Seite unten rechts */
.tw-printfoot { display: none; }
@media print {
  .tw-printfoot { display: flex; align-items: center; gap: 5px; position: fixed; right: 6mm; bottom: 4mm; z-index: 9999; color: #8e8e93; font-size: 9pt; line-height: 1; opacity: .85; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tw-printfoot img { height: 4mm; width: auto; display: block; }
}

.image-check { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,0.25); color: #fff; font-size: 12px; line-height: 16px; text-align: center; box-shadow: 0 0 0 1px rgba(0,0,0,0.2); }
.image-check.on { background: var(--accent); }
.image-option { overflow: visible; }

/* Artikel-Ansichten (seit 3.6): große Symbole, Liste */
.item-grid-big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.item-big { cursor: pointer; text-align: center; padding: 8px; border-radius: var(--radius-md); border: 1px solid transparent; outline: none; }
@media (hover: hover) { .item-big:hover { background: var(--surface-hover); border-color: var(--border); } }
.item-big:focus-visible { border-color: var(--accent); }
.item-big-img { position: relative; aspect-ratio: 1; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 54px; }
.item-big-img img { width: 100%; height: 100%; object-fit: contain; }
.item-big-img .status-dot { position: absolute; top: 8px; right: 8px; width: 12px; height: 12px; padding: 0; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.item-big-img .status-dot.status-available { background: var(--green); }
.item-big-img .status-dot.status-checkedout { background: var(--orange); }
.item-big-img .status-dot.status-incase { background: var(--indigo); }
.item-big-img .status-dot.status-fixed { background: var(--red-text); }
.item-big-name { font-weight: 600; font-size: 13.5px; margin-top: 8px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-big-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.item-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.item-row { display: flex; align-items: center; gap: 12px; padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--border); outline: none; }
.item-row:last-child { border-bottom: 0; }
@media (hover: hover) { .item-row:hover { background: var(--surface-hover); } }
.item-row:focus-visible { background: var(--surface-hover); }
.item-row-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row-cat { flex: 0 0 150px; font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
@media (max-width: 700px) { .item-row-cat { display: none; } #view-switch { max-width: 100%; } }

.zoom-ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.zoom-ctl input[type=range] { width: 110px; accent-color: var(--accent); }
.zoom-val { min-width: 42px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .zoom-ctl { display: none; } }

/* ─── Artikelseite (seit 3.8): eine Leiste, Chips, zusammengefasste Produkte ─── */
.items-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.items-search { flex: 1 1 160px; min-width: 0; }
.items-toolbar .filter-select { flex: 0 0 auto; }
.view-switch .segmented-item { padding: 7px 10px; }
.view-switch .segmented-item .icon { width: 17px; height: 17px; }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chip-row-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chip-row-scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; white-space: nowrap; transition: background var(--transition), border-color var(--transition); }
@media (hover: hover) { .chip:hover { border-color: var(--border-hover); background: var(--surface-hover); } }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-count { font-size: 11.5px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.chip.active .chip-count { color: rgba(255, 255, 255, 0.85); }
.items-subbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; font-size: 13px; color: var(--text-muted); }
.items-group-toggle { font-size: 13px; }
.items-subbar #reset-filters { margin-left: auto; }
.count-badge { position: absolute; left: -6px; top: -6px; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--surface2); color: var(--text-dim); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.item-row .count-badge, td .count-badge, .case-name .count-badge { position: static; margin-left: 6px; height: 20px; min-width: 24px; box-shadow: none; vertical-align: 1px; }
.item-big-img .count-badge { left: 8px; top: 8px; background: var(--surface); color: var(--text-dim); font-size: 13px; opacity: 1; box-shadow: 0 0 0 1px var(--border); }
.status-partial { background: var(--accent-soft); color: var(--accent-text); }
.item-big-img .status-dot.status-partial { background: var(--accent); }
.item-row-main { flex: 1; min-width: 0; }
.item-row-sub { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row-act { flex: 0 0 auto; min-width: 0; }
.item-card .item-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-card .item-meta { display: flex; gap: 10px; flex-wrap: wrap; min-width: 0; }
@media (max-width: 700px) {
  .items-toolbar .filter-select { flex: 1 1 40%; }
  .items-subbar .zoom-ctl { display: none; }
}

/* Produktseite: Exemplare mit QR-Code und Ort */
.product-head-img { width: 88px; height: 88px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }
.product-head-img img { object-fit: contain; }
.unit-list { display: flex; flex-direction: column; }
.unit-row { display: grid; grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr) auto auto; gap: 12px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--border); cursor: pointer; border-radius: 8px; outline: none; }
.unit-row:first-child { border-top: none; }
@media (hover: hover) { .unit-row:hover { background: var(--surface-hover); } }
.unit-row:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.unit-qr { width: 52px; height: 52px; padding: 3px; border-radius: 8px; background: #fff; border: 1px solid var(--border); cursor: zoom-in; }
.unit-qr img { width: 100%; height: 100%; display: block; }
.unit-name { font-weight: 600; font-size: 14.5px; }
.unit-sub, .unit-since { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit-since { margin-top: 3px; }
.unit-place { font-size: 13px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }
/* Produktseite mit Mehrfachauswahl (seit 3.45) */
.unit-row.open { background: var(--surface2); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.unit-detail { margin: 0 0 6px; background: var(--surface2); border-radius: 0 0 10px 10px; display: grid; grid-template-rows: 1fr; }
.ud-clip { min-height: 0; }
.ud-inner { padding: 14px 12px 16px; display: flex; flex-direction: column; gap: 14px; }
/* Aufklappen: Höhe + sanftes Einblenden, Apple-typische Feder-Kurve */
.unit-detail.anim { animation: udOpen .46s cubic-bezier(.32,.72,0,1); }
.unit-detail.anim .ud-clip { overflow: hidden; }
.unit-detail.anim .ud-inner { animation: udFade .46s cubic-bezier(.32,.72,0,1); }
@keyframes udOpen { from { grid-template-rows: 0fr; opacity: 0; } to { grid-template-rows: 1fr; opacity: 1; } }
@keyframes udFade { from { transform: translateY(-10px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .unit-detail.anim, .unit-detail.anim .ud-inner { animation: none; } }
.ud-grid { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: start; }
.ud-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ud-qr { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 8px; cursor: zoom-in; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.ud-qr img { width: 130px; height: 130px; display: block; }
.ud-qr span { font-size: 9px; color: #555; word-break: break-all; text-align: center; }
.ud-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.ud-cols .card { margin: 0; }
.cond-btn { border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 4px 6px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; }
@media (hover: hover) { .cond-btn:hover { border-color: var(--border); background: var(--surface); } }
.cond-caret { font-size: 10px; color: var(--text-muted); }
.cond-menu { position: fixed; z-index: 1000; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px; display: flex; flex-direction: column; min-width: 130px; }
.cond-menu button { border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 7px; cursor: pointer; font: inherit; }
.cond-menu button.active, .cond-menu button:hover, .cond-menu button:focus-visible { background: var(--surface2); outline: none; }
@media (max-width: 760px) { .ud-grid { grid-template-columns: minmax(0, 1fr) 110px; } .ud-qr img { width: 94px; height: 94px; } .ud-cols { grid-template-columns: 1fr; } }
.unit-row.sel { grid-template-columns: 22px 52px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.1fr) auto auto; }
.unit-row.picked { background: var(--accent-soft, var(--surface2)); }
.unit-check { width: 20px; height: 20px; min-height: 0; margin: 0; cursor: pointer; accent-color: var(--accent); }
.unit-act { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.unit-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.unit-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--radius-sm); background: var(--accent-soft, var(--surface2)); border: 1px solid var(--accent); position: sticky; top: 8px; z-index: 5; }
.unit-bar strong { margin-right: auto; font-size: 14px; }
.product-of { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; }
.product-of .po-main { flex: 1; min-width: 0; font-size: 14px; }
.product-of .po-main strong { font-size: 15px; }
@media (max-width: 760px) {
  .unit-row { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .unit-row.sel { grid-template-columns: 22px 52px minmax(0, 1fr) auto; }
  .unit-place, .unit-cond { display: none; }
  .unit-status { grid-column: 2; }
  .unit-row.sel .unit-status { grid-column: 3; }
  .unit-act { grid-column: 3; grid-row: 1 / span 2; flex-direction: column; align-items: stretch; }
  .unit-row.sel .unit-act { grid-column: 4; }
  .unit-row.sel .unit-check { grid-row: 1 / span 2; }
  .unit-row.sel .unit-qr { grid-row: 1 / span 2; }
}
.sibling-card { margin-bottom: 20px; padding: 14px 16px; }
.sibling-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 14px; margin-bottom: 10px; }
.sibling-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sibling-chips .chip { text-decoration: none; }
.sib-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.sib-dot.out { background: var(--orange); }
.sib-dot.fixed { background: var(--red-text); }
.chip.active .sib-dot { box-shadow: 0 0 0 2px #fff; }
.item-list .item-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 170px) 160px 120px; }
.item-row-cat { flex: none; }
.item-row-act { text-align: right; }
@media (max-width: 700px) { .item-list .item-row { grid-template-columns: 40px minmax(0, 1fr) auto; } .item-row-act { display: none; } }
@media (max-width: 700px) {
  .items-toolbar .filter-select { min-width: 0; flex: 1 1 0; }
  .items-search { flex-basis: 100%; }
  #status-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #status-chips::-webkit-scrollbar { display: none; }
}
@media (max-width: 700px) {
  .items-search { flex: 1 1 0; flex-basis: auto; order: 1; }
  .items-toolbar .view-switch { order: 2; }
  .items-toolbar .filter-select { order: 3; flex: 1 1 45%; }
  .view-switch .segmented-item { padding: 7px 8px; }
}
@media (max-width: 700px) {
  .product-head-img { width: 64px; height: 64px; }
  .product-page .detail-header { flex-wrap: wrap; }
  .product-page .detail-header > div:last-child { width: 100%; }
}

/* Referenz-Link für die Produktrecherche (3.9) */
.ref-box { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.ref-box > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ref-box[open] > summary { margin-bottom: 10px; }

/* Zubehör ohne QR-Code + Rückgabe-Prüfung (3.10) */
.parts-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.part-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface2); border-radius: var(--radius-sm); }
.part-row.is-missing { box-shadow: inset 3px 0 0 var(--warning, #ff9f0a); }
.part-name { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.part-thumb { flex: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.part-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.part-qty { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.parts-add { display: flex; gap: 8px; flex-wrap: wrap; }
.parts-add input[name=name] { flex: 1 1 160px; min-width: 0; }
.parts-add .parts-qty { width: 76px; flex: 0 0 76px; }
.rc-list { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; }
.rc-group { background: var(--surface2); border-radius: var(--radius-sm); padding: 4px 4px; }
.rc-title { font-size: 12px; color: var(--text-muted); padding: 6px 10px 2px; font-weight: 600; }
.rc-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; font-size: 14px; cursor: pointer; border-radius: 8px; }
.rc-row input { width: 18px; height: 18px; flex: 0 0 18px; }
.rc-nested { padding-left: 34px; }
.rc-row.rc-missing { color: var(--warning, #ff9f0a); text-decoration: line-through; text-decoration-thickness: 1px; }
.case-icon-wrap svg { width: 24px; height: 24px; }

/* Case-Foto statt Symbol (3.12) */
.case-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.case-icon-wrap, .detail-type-icon.case-has-img { overflow: hidden; }
.detail-type-icon.case-has-img { width: 72px; height: 72px; border: 1px solid var(--border); }
.detail-type-icon .case-img { object-fit: cover; }

/* ─── PROJEKTSEITE (seit 3.15) ───────────────────────────────────────────── */
.pj-hero { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 70%); border: 1px solid var(--border); border-radius: var(--radius-lg, 18px); padding: 22px; margin-bottom: 20px; }
.pj-hero-top { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.pj-hero-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.pj-hero-date { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; margin-top: 4px; }
.pj-hero-desc { margin-top: 10px; font-size: 14px; color: var(--text-dim); white-space: pre-line; max-width: 70ch; overflow-wrap: anywhere; }
.pj-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.pj-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 14px; min-width: 110px; }
.pj-stat-n { font-size: 24px; font-weight: 700; line-height: 1.1; }
.pj-stat-l { font-size: 12px; color: var(--text-muted); }
.pj-stat-s { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.pj-bar { height: 5px; border-radius: 3px; background: var(--fill); margin-top: 6px; overflow: hidden; }
.pj-bar span { display: block; height: 100%; background: var(--green, #30d158); border-radius: 3px; }
.pj-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pj-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pj-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pj-card-head .section-title { margin: 0; }
.pj-empty { color: var(--text-muted); font-size: 13.5px; padding: 6px 0; }
.pj-rows { display: flex; flex-direction: column; gap: 6px; }
.pj-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface2); border-radius: var(--radius-sm); }
.pj-row-icon { font-size: 20px; width: 26px; text-align: center; flex-shrink: 0; display: inline-flex; justify-content: center; }
.pj-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; overflow-wrap: anywhere; }
.pj-qty { min-width: 34px; text-align: center; font-weight: 700; color: var(--accent-text); background: var(--accent-soft); border-radius: 8px; padding: 3px 6px; font-size: 13px; }
.pj-ext { min-width: 38px; text-align: center; font-size: 10.5px; font-weight: 700; color: var(--text-muted); background: var(--fill); border-radius: 6px; padding: 5px 4px; }
.pj-day { margin-bottom: 14px; }
.pj-day.is-past { opacity: .6; }
.pj-day-head { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.pj-event { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--surface2); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); margin-bottom: 6px; cursor: pointer; transition: background var(--transition); }
@media (hover: hover) { .pj-event:hover { background: var(--surface3); } }
.pj-event-time { min-width: 46px; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
.pj-event-time span { color: var(--text-muted); font-weight: 400; font-size: 12px; }
.pj-event-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 5px; align-items: center; }
.pj-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.pj-thumb { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface2); }
.pj-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pj-thumb-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 16px; line-height: 1; opacity: 0; transition: opacity var(--transition); }
.pj-thumb:hover .pj-thumb-x, .pj-thumb-x:focus-visible { opacity: 1; }
@media (hover: none) { .pj-thumb-x { opacity: 1; } }
.pj-drop { margin-top: 12px; border: 1.5px dashed var(--border-strong, var(--border)); border-radius: var(--radius-md); padding: 14px; text-align: center; color: var(--text-muted); font-size: 13.5px; }
.pj-drop-big { padding: 34px 14px; margin-top: 0; }
.pj-drop-sub { font-size: 12px; margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; cursor: pointer; text-decoration: underline; }
.pj-dropveil { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center; background: color-mix(in srgb, var(--accent) 22%, transparent); backdrop-filter: blur(4px); font-size: 22px; font-weight: 700; color: var(--accent-text); pointer-events: none; }
.pj-dropveil.on { display: flex; }
.pj-tabs { margin-bottom: 14px; flex-wrap: wrap; }
.pj-pick { max-height: 340px; overflow-y: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.pj-pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface2); border-radius: var(--radius-sm); cursor: pointer; }
.pj-pick-row input { width: 18px; height: 18px; flex-shrink: 0; }
@media (max-width: 900px) { .pj-cols { grid-template-columns: minmax(0, 1fr); } .pj-hero { padding: 16px; } }

/* Projektliste */
.pjl-card { overflow: hidden; padding: 0; cursor: pointer; display: flex; flex-direction: column; }
.pjl-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pjl-chips { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.pjl-chips span { background: var(--surface2); border-radius: 999px; padding: 3px 9px; }

.timeline-sub { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
.timeline-subrow { display: flex; gap: 10px; align-items: baseline; font-size: 13px; padding: 5px 8px; border-radius: 6px; background: var(--surface); cursor: pointer; }
@media (hover: hover) { .timeline-subrow:hover { background: var(--surface3); } }
.timeline-subdate { min-width: 92px; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .pj-stats { display: grid; grid-template-columns: repeat(3, 1fr); } .pj-stat { min-width: 0; padding: 10px; } }

.case-ph svg { width: 52%; height: 52%; }
.item-big-img .case-ph { display: inline-flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.item-big-img .case-ph svg { width: 42%; height: 42%; }

/* Projektliste: großzügigere Karten */
.pj-grid { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.pj-grid .pjl-body { padding: 26px; gap: 14px; min-height: 190px; }
.pj-grid .pjl-body > div:nth-child(2) { font-size: 22px !important; line-height: 1.25; }
.pj-grid .pjl-chips { font-size: 13px; }
.pj-grid .pjl-chips span { padding: 4px 12px; }
.pj-grid .pj-bar { height: 7px; }
@media (max-width: 640px) { .pj-grid { grid-template-columns: minmax(0, 1fr); } }

/* Abrechnung auf der Projektseite */
.pj-docs { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-top: 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.pj-docs-main { min-width: 0; flex: 1 1 320px; }
.pj-docs-title { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.pj-docs-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-docs-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pj-doc-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--surface2); border-radius: 10px; text-decoration: none; color: inherit; font-size: 13px; }
.pj-doc-chip.is-off { opacity: .55; }
@media (hover: hover) { .pj-doc-chip:hover { background: var(--surface3); } }
.pj-doc-type { font-weight: 600; }
.pj-doc-sum { font-variant-numeric: tabular-nums; color: var(--text-muted); }

/* Seiten ohne Seitenleiste (Projektdetail): Inhalt zentriert, Zurück-Button statt Navigation */
body.no-sidebar .sidebar, body.no-sidebar .hamburger, body.no-sidebar .sidebar-overlay { display: none !important; }
body.no-sidebar .main-content { margin: 0 auto; max-width: 1360px; }

/* Übersicht: Tagesüberschriften in der Termin-Liste */
.agenda-day { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 14px 0 4px; }
.agenda-day:first-child { margin-top: 0; }
.list-row-main .stat-meter { max-width: 220px; }

/* Übersicht auf einen Blick: auf Desktop alles ohne Scrollen, Karten scrollen bei Bedarf intern */
.dash-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 14px 0 8px; }
.dash-users { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-user { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--border); font-size: 13px; color: var(--text); text-decoration: none; }
.dash-user b { font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 600; }
.dash-user.has b { color: var(--orange-text); }
@media (min-width: 1100px) and (min-height: 640px) {
  .main-content.dash-fit { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding-top: 24px; padding-bottom: 24px; max-width: none; }
  .dash-fit .topbar { margin-bottom: 16px; }
  .dash-fit .stats-grid { margin-bottom: 16px; }
  .dash-fit .stat-card { padding-top: 14px; padding-bottom: 14px; }
  .dash-fit .dash-grid { flex: 1; min-height: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .dash-fit .dash-grid > .card { display: flex; flex-direction: column; min-height: 0; padding: 18px 20px; }
  .dash-fit .dash-grid > .card > .card-header { flex: none; margin-bottom: 8px; }
  .dash-fit .dash-grid > .card > div:not(.card-header) { flex: 1; min-height: 0; overflow: hidden; }
  .dash-fit.dash-editing .dash-grid > .card > .dash-body { overflow: hidden; opacity: .55; }
  .dash-fit .list-row { padding-top: 6px; padding-bottom: 6px; }
  .dash-fit .empty-inline { padding: 6px 0; }
}
@media (min-width: 1100px) and (min-height: 640px) {
  .dash-fit .dash-grid { grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr); }
}
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 820px) {
  .dash-fit .topbar { margin-bottom: 10px; }
  .dash-fit .page-subtitle { margin-top: 0; }
  .dash-fit .stats-grid { margin-bottom: 12px; gap: 10px; }
  .dash-fit .stat-card { padding: 10px 14px; }
  .dash-fit .stat-top { display: none; }
  .dash-fit .dash-grid { gap: 12px; }
  .dash-fit .dash-grid > .card { padding: 14px 16px; }
  .dash-fit .date-chip { transform: scale(.85); transform-origin: left center; }
}
@media (min-width: 1100px) and (min-height: 640px) and (max-height: 820px) {
  .dash-fit .dash-sub { margin: 8px 0 6px; }
  .dash-fit .dash-users { gap: 6px; }
  .dash-fit .dash-user { font-size: 12px; padding: 2px 10px 2px 2px; gap: 6px; }
}

/* Kategorie-Symbole */
.cat-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.cat-icon-scroll { max-height: 280px; overflow-y: auto; padding-right: 4px; }
.cat-icon-group { font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 10px 0 6px; }
.cat-icon-group:first-child { margin-top: 0; }
.cat-icon-opt { height: 42px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface2); color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; }
.cat-icon-opt:hover { color: var(--text); }
.cat-icon-opt.active { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.chip-ic { display: inline-flex; font-size: 14px; }
.item-big-img > span:not(.case-ph):not(.count-badge):not(.status-dot), .thumb.placeholder { color: var(--text-muted); }

/* Nutzer: Initiale statt Emoji */
.avatar-emoji { font-weight: 700; }
.chip-ini { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px; font-weight: 700; flex-shrink: 0; line-height: 1; }

/* Kategorien mit Unterkategorien */
.cat-tree { grid-column: 1 / -1; }
.cat-subs { margin: 12px 0 0 56px; border-top: 1px solid var(--border); }
.cat-sub-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.cat-sub-row:last-child { border-bottom: 0; }
.cat-sub-ic { display: inline-flex; font-size: 18px; width: 24px; justify-content: center; }
.cat-sub-row .btn-icon { width: 30px; height: 30px; }
.chip-row-sub { margin-left: 14px; }
.chip-sub { font-size: 12.5px; padding-top: 4px; padding-bottom: 4px; }

/* Kategorie-Auswahl mit Hover-Untermenü */
.cat-picker { position: relative; }
.cat-picker-btn { width: 100%; text-align: left; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.cat-picker-btn .cp-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-picker-menu { position: fixed; z-index: 1100; width: max-content; max-width: calc(100vw - 16px); }
.cat-picker-menu[hidden] { display: none; }
.cp-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 4px; min-width: 220px; }
.cp-tops { max-height: 70vh; overflow-y: auto; max-width: 340px; }
.cp-top { position: relative; }
.cp-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; border-radius: 8px; cursor: pointer; }
.cp-item:hover, .cp-top:hover > .cp-item, .cp-top.open > .cp-item { background: var(--surface2); }
.cp-ic { display: inline-flex; width: 20px; height: 20px; flex: none; }
.cp-ic svg { width: 20px; height: 20px; }
.cp-txt { flex: 1; min-width: 0; }
.cp-arrow { color: var(--text-muted); }
.cp-sub { display: none; position: fixed; z-index: 1101; width: 240px; max-height: 70vh; overflow-y: auto; }
.cp-top:hover > .cp-sub, .cp-top.open > .cp-sub { display: block; }
@media (max-width: 640px) { .cp-sub { position: static !important; box-shadow: none; border: 0; margin-left: 14px; padding: 0; } }
abbr[title] { text-decoration: none; cursor: help; }

/* Produktseite: Feinschliff (3.48) */
.unit-chev { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; font-size: 22px; line-height: 1; color: var(--text-muted); transition: transform .32s cubic-bezier(.32,.72,0,1); }
.unit-row.open .unit-chev { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .unit-chev { transition: none; } }
.unit-head { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 640px) {
  .unit-act { flex-direction: row !important; align-items: center !important; }
  .ud-grid { grid-template-columns: 1fr !important; }
  .ud-qr { flex-direction: row; justify-self: start; gap: 10px; padding: 6px 10px 6px 6px; }
  .ud-qr img { width: 64px !important; height: 64px !important; }
  .ud-qr span { font-size: 10px; text-align: left; }
  .unit-row { grid-template-columns: 52px minmax(0, 1fr) auto !important; }
  .unit-row.sel { grid-template-columns: 22px 52px minmax(0, 1fr) auto !important; }
}

.unit-detail.closing { animation: udClose .3s cubic-bezier(.32,.72,0,1) forwards; }
.unit-detail.closing .ud-clip { overflow: hidden; }
.unit-detail.closing .ud-inner { animation: udFadeOut .3s cubic-bezier(.32,.72,0,1) forwards; }
@keyframes udClose { from { grid-template-rows: 1fr; opacity: 1; } to { grid-template-rows: 0fr; opacity: 0; } }
@keyframes udFadeOut { from { transform: none; } to { transform: translateY(-8px); } }
.unit-row.closing-row .unit-chev { transform: none; }
@media (prefers-reduced-motion: reduce) { .unit-detail.closing, .unit-detail.closing .ud-inner { animation: none; } }

.unit-norent { color: var(--orange-text); font-weight: 600; }
.rent-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: 14px; }
.rent-switch input { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--accent); cursor: pointer; }

.pj-bulk { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.pj-bulk-hint { font-size: 12px; color: var(--text-muted); margin-left: auto; }

.pj-close { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 20px; padding: 14px 16px; border: 1px dashed var(--border-hover); border-radius: var(--radius-md); }
@media (max-width: 640px) { .pj-close .btn { width: 100%; } }

.fb-meta { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.rm-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: start; }
.rm-col { background: var(--surface2); border-radius: var(--radius-md); padding: 10px; border-top: 3px solid var(--cc); }
.rm-col-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 2px 4px 10px; }
.rm-col-ic { display: inline-flex; color: var(--cc); }
.rm-col-n { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface); border-radius: 999px; padding: 1px 8px; }
.rm-col-body { display: flex; flex-direction: column; gap: 6px; max-height: 62vh; overflow-y: auto; padding: 2px; margin: -2px; }
.rm-col { transition: background var(--transition), box-shadow var(--transition); }
.rm-col.drop { background: var(--fill); box-shadow: inset 0 0 0 2px var(--cc); }
.rm-card.dragging { opacity: .4; }
.rm-card[draggable=true] { cursor: grab; }
.rm-empty { font-size: 12.5px; color: var(--text-muted); text-align: center; padding: 14px 0; }
.rm-card { display: flex; flex-direction: column; gap: 4px; text-align: left; width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--pc); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; box-shadow: var(--shadow-card); }
@media (hover: hover) { .rm-card:hover { border-color: var(--border-hover); border-left-color: var(--pc); } }
.rm-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rm-no { font-size: 12px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.rm-prio { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.rm-title { font-size: 13.5px; font-weight: 550; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rm-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-muted); }
.rm-foot .icon { width: 13px; height: 13px; vertical-align: -2px; }
.fbm-notes { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.fbm-note { background: var(--surface2); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px; font-size: 13.5px; overflow-wrap: anywhere; }

/* Liste: größere Produktbilder, Zeilenhöhe bleibt */
.items-list .case-icon-wrap { width: 72px; height: 72px; border-radius: 14px; }
.items-list .case-icon-wrap svg { width: 30px; height: 30px; }

/* Ticketboard 3.54: ruhiger, schmale Spalten, seitlich scrollbar */
.rm-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; grid-template-columns: none; }
.rm-col { flex: 1 1 0; min-width: 165px; background: transparent; border-top: 0; padding: 0; border-radius: 0; }
.rm-col-head { padding: 4px 4px 10px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.rm-col-ic { color: var(--cc); }
.rm-col-n { background: transparent; padding: 0; font-weight: 500; }
.rm-col-body { background: var(--surface2); border-radius: var(--radius-md); padding: 8px; margin: 0; min-height: 90px; max-height: 66vh; gap: 8px; }
.rm-col.drop .rm-col-body { background: var(--fill); box-shadow: inset 0 0 0 2px var(--cc); }
.rm-col.drop { background: transparent; box-shadow: none; }
.rm-card { border: 0; border-left: 0; box-shadow: 0 1px 2px rgba(0,0,0,.08); border-radius: 10px; padding: 10px 12px; gap: 8px; }
@media (hover: hover) { .rm-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.14); border: 0; } }
.rm-title { font-size: 13.5px; font-weight: 500; line-height: 1.35; }
.rm-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.rm-sp { flex: 1; }
.rm-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rm-n { display: inline-flex; align-items: center; gap: 3px; }
.rm-av { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.rm-empty { padding: 18px 0; }

.rm-col-body { background: var(--fill); }
.rm-col.drop .rm-col-body { background: var(--fill); }

.rm-av { background: none; color: inherit; width: auto; height: auto; display: inline-flex; }
.rm-av .avatar-emoji, .rm-av .avatar-img { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; object-fit: cover; }

/* ─── Dark-Mode-Feinschliff 3.56 ───────────────────────────────────────────
   Erhöhte Ebenen heller, keine grellen weißen Flächen ohne Foto,
   deaktivierte Buttons neutral statt matschig-blau. */
:root[data-theme="dark"] .item-big-img:not(:has(img)) { background: var(--surface2); border-color: var(--border); }
:root[data-theme="dark"] .item-big-img .count-badge { background: var(--surface2); color: var(--text-dim); box-shadow: 0 0 0 1px var(--border); }
:root[data-theme="dark"] .item-big-img .status-dot { box-shadow: 0 0 0 2px var(--surface2); }
:root[data-theme="dark"] .btn-primary:disabled { background: var(--fill-strong); color: var(--text-muted); box-shadow: none; opacity: 1; }
:root[data-theme="dark"] .btn:disabled:not(.btn-primary) { opacity: 0.45; }
:root[data-theme="dark"] .modal { border-color: var(--border-hover); box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
:root[data-theme="dark"] .cond-menu { background: var(--surface2); border-color: var(--border-hover); }
:root[data-theme="dark"] .rm-col-body { background: var(--surface); }
:root[data-theme="dark"] .rm-col.drop .rm-col-body { background: var(--surface); }
:root[data-theme="dark"] .rm-card { background: var(--surface2); box-shadow: none; }
@media (hover: hover) { :root[data-theme="dark"] .rm-card:hover { background: var(--surface3); box-shadow: none; } }

/* ─── Personalisierbare Übersicht (3.57) ─── */
.dash-slot { position: relative; display: flex; flex-direction: column; min-width: 0; }
.dash-slot > .stat-card { flex: 1; }
.dash-pick { display: block; margin: 6px 0 0; }
.dash-pick .form-select { min-height: 34px; padding-top: 4px; padding-bottom: 4px; font-size: 13px; font-weight: 600; }
.dash-card > .dash-pick { margin: 0 0 10px; flex: none; }
.dash-editing .stat-card, .dash-editing .dash-card { outline: 2px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.dash-editing .stat-card { pointer-events: none; }
.dash-editing .dash-body { pointer-events: none; }
.dash-edit-hint { font-size: 13px; color: var(--text-muted); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 10px 14px; margin: -6px 0 14px; }
.topbar-actions[hidden], .dash-edit-hint[hidden] { display: none !important; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dash-kpi { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface2); color: var(--text); text-decoration: none; min-width: 0; }
.dash-kpi span { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-kpi b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
@media (hover: hover) { .dash-kpi:hover, .dash-quick:hover { background: var(--surface3); } }
.dash-quicks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dash-quick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px 6px; border-radius: var(--radius-sm); background: var(--surface2); color: var(--text); text-decoration: none; font-size: 12.5px; font-weight: 600; text-align: center; }
.dash-quick .icon { width: 22px; height: 22px; color: var(--accent-text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dash-pick { position: relative; }
.dash-pick::after { content: ''; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.dash-pick .form-select { appearance: none; -webkit-appearance: none; background-image: none; padding-right: 32px; }

/* ─── Mobil & Tablet (3.58) ──────────────────────────────────────────────── */
/* Übersicht: Karten-Raster je nach Breite (vorher auf Handy/iPad zu schmalen Streifen gequetscht) */
#dash-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { #dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { #dash-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 600px) and (max-width: 900px) { .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* iOS zoomt bei Eingabefeldern unter 16 px hinein – auf Touch-Geräten (auch iPad quer) immer 16 px */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea { font-size: 16px !important; }
  /* kleine Text-Links bekommen eine größere Tippfläche, ohne das Layout zu verschieben */
  .card-action, .breadcrumb a, .breadcrumb-link { display: inline-block; padding: 10px 6px; margin: -10px -6px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
}
/* Bedienelemente, die nur bei Maus-Hover erscheinen, auf Touch immer zeigen */
@media (hover: none) { .pj-thumb-x { opacity: 1; } }
/* Lange Titel neben Aktions-Buttons: Buttons rutschen in eine eigene Zeile statt den Titel zu zerquetschen */
.detail-header > div:nth-child(2) { flex: 1 1 220px !important; min-width: 0; }
@media (max-width: 700px) {
  .pj-row { flex-wrap: wrap; row-gap: 8px; }
  .pj-row > div:nth-child(2) { flex: 1 1 calc(100% - 40px) !important; }
  .pj-row > div:nth-child(2) + .badge { margin-left: 36px; }
  .pj-row > .badge ~ .btn-icon, .pj-row > .badge ~ .btn:last-child { margin-left: auto; }
}
/* Steuerelemente: kein Text-Markieren beim langen Drücken */
.btn, .chip, .segmented-item, .nav-item, .mobile-nav-item, .rm-card { -webkit-user-select: none; user-select: none; }
a, button, [role=button], label, select { touch-action: manipulation; }

/* ─── Rundgang / Einführung (3.59) ───────────────────────────────────────── */
.tour-root { position: fixed; inset: 0; z-index: 10050; }
.tour-block { position: absolute; inset: 0; }
.tour-hole { position: fixed; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55), 0 0 0 2px var(--accent); transition: top 320ms var(--ease-out), left 320ms var(--ease-out), width 320ms var(--ease-out), height 320ms var(--ease-out), opacity 200ms; }
.tour-hole.none { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55); }
.tour-pop { position: fixed; z-index: 2; background: var(--surface); color: var(--text); border: 1px solid var(--border-hover); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 18px 18px 14px; width: min(360px, calc(100vw - 24px)); transition: top 320ms var(--ease-out), left 320ms var(--ease-out); animation: tour-in 260ms var(--ease-out); }
.tour-pop.centered { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px)) !important; padding: 26px 24px 18px; text-align: left; }
.tour-pop.nudge { animation: tour-nudge 300ms var(--ease-out); }
.tour-root.closing { opacity: 0; transition: opacity 200ms; }
.tour-root.no-motion .tour-hole, .tour-root.no-motion .tour-pop { transition: none; animation: none; }
@keyframes tour-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tour-nudge { 0%, 100% { translate: 0 0; } 30% { translate: -6px 0; } 60% { translate: 5px 0; } }
.tour-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.tour-icon .icon { width: 24px; height: 24px; }
.tour-step { font-size: 12px; font-weight: 600; color: var(--accent-text); margin-bottom: 4px; }
.tour-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; }
.tour-text { font-size: 14px; line-height: 1.5; color: var(--text-dim); margin: 0 0 12px; }
.tour-ack { font-size: 13.5px; margin: 4px 0 12px; align-items: flex-start; }
.tour-ack input { margin-top: 2px; }
.tour-dots { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--fill-strong); transition: width 200ms var(--ease-out), background 200ms; }
.tour-dots span.past { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.tour-dots span.on { width: 18px; background: var(--accent); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tour-nav { display: flex; gap: 8px; margin-left: auto; }
.tour-skip { color: var(--text-muted); padding-left: 0; }
.btn.disabled { opacity: 0.4; pointer-events: none; }
body.tour-open { overflow: hidden; }
.tour-offer { position: fixed; z-index: 9000; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: min(380px, calc(100vw - 32px)); display: flex; gap: 14px; background: var(--surface); border: 1px solid var(--border-hover); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; opacity: 0; transform: translateY(12px); transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out); }
.tour-offer.in { opacity: 1; transform: none; }
.tour-offer-icon { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent-text); display: inline-flex; align-items: center; justify-content: center; }
.tour-offer-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.tour-offer-text { font-size: 13.5px; color: var(--text-dim); line-height: 1.45; }
.tour-offer-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media (max-width: 900px) { .tour-offer { right: 16px; left: 16px; width: auto; bottom: calc(var(--nav-height, 64px) + 14px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .tour-offer { transition: none; } }

/* Hilfe-Seite */
.help-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.help-hero .tour-icon { margin: 0; width: 52px; height: 52px; }
.help-hero-text { flex: 1 1 260px; min-width: 0; }
.help-hero-text b { font-size: 16px; }
.help-hero-text p { margin: 2px 0 0; color: var(--text-muted); font-size: 14px; }
.help-toc { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.help-list { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.help-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.help-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 16px; font-weight: 600; font-size: 15px; -webkit-user-select: none; user-select: none; }
.help-item > summary::-webkit-details-marker { display: none; }
.help-item > summary .help-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-text); }
.help-item > summary .help-chev { margin-left: auto; color: var(--text-muted); transition: transform 200ms var(--ease-out); }
.help-item[open] > summary .help-chev { transform: rotate(90deg); }
.help-body { padding: 0 16px 16px 62px; font-size: 14.5px; line-height: 1.6; color: var(--text-dim); }
.help-body ol, .help-body ul { margin: 6px 0 10px; padding-left: 20px; }
.help-body li { margin: 3px 0; }
.help-body p { margin: 0 0 10px; }
.help-body .help-tip { background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13.5px; margin-top: 6px; }
.help-group { font-size: 13px; font-weight: 600; color: var(--text-muted); margin: 14px 0 2px; }
@media (max-width: 600px) { .help-body { padding-left: 16px; } }
body.tour-open .mobile-nav, body.tour-open .toast-container { z-index: 10040; }

/* ─── Ideenwand (3.60) ─── */
.idea-wall { columns: 240px; column-gap: 12px; margin-top: 12px; }
.idea-card { break-inside: avoid; display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; color: var(--text);
  background: hsl(var(--ih) 80% 92%); border: 1px solid hsl(var(--ih) 45% 80%); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.idea-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) { .idea-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.14); } }
:root[data-theme="dark"] .idea-card { background: hsl(var(--ih) 28% 17%); border-color: hsl(var(--ih) 25% 28%); box-shadow: none; }
.idea-title { font-size: 14.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.idea-details { font-size: 13px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.idea-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.idea-by { font-size: 12px; }
.idea-vote { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 3px 10px; border-radius: 999px; font: inherit; font-size: 12.5px; color: var(--text); background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.12); cursor: pointer; }
:root[data-theme="dark"] .idea-vote { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.idea-vote.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.idea-vote:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .idea-vote { min-height: 36px; padding: 5px 14px; } }
[hidden].form-grid, [hidden].form-group { display: none !important; }

/* ─── Nutzerkarten (3.60.1) ─── */
.uc { display: flex; flex-direction: column; gap: 10px; }
.uc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.uc-id { min-width: 0; }
.uc-name { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.uc-meta { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.uc-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; }
.uc-status.ok { color: var(--green-text); }
.uc-status.todo { color: var(--orange-text); }
.uc-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.uc-actions { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.uc-actions .btn { flex: 1 1 auto; justify-content: center; white-space: nowrap; }
.uc-actions .icon { width: 15px; height: 15px; }

/* ─── Dynamische Übersicht (3.61) ─── */
:root, :root[data-theme="dark"] { --chart-1: #0a84ff; --chart-2: #c87000; }
:root[data-theme="light"] { --chart-1: #007aff; --chart-2: #d47800; }
.dl-chart { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 210px; }
.dash-fit .dl-chart { min-height: 0; }
.dash-fit .dl-plot { min-height: 60px; }
.dl-x .today { color: var(--accent-text); }
.dl-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; flex: none; }
.dl-kpi { display: flex; flex-direction: column; }
.dl-kpi b { font-size: 22px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dl-kpi span { font-size: 12px; color: var(--text-muted); }
.dl-kpi em { font-style: normal; font-weight: 600; }
.dl-kpi em.up { color: var(--green-text); } .dl-kpi em.down { color: var(--red-text); }
.dl-legend { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); }
.dl-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--chart-1); flex: none; }
.dl-key.dl-s2 { background: var(--chart-2); }
.dl-key.line { height: 3px; border-radius: 2px; vertical-align: 3px; }
.dl-key.dot { width: 7px; height: 7px; border-radius: 50%; vertical-align: 0; }
.dl-plot { position: relative; flex: 1; min-height: 110px; margin: 8px 0 0 30px; touch-action: pan-y; }
.dl-ymax, .dl-ymid { position: absolute; right: calc(100% + 6px); font-size: 11px; color: var(--text-muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-ymax { top: 0; } .dl-ymid { top: 50%; }
.dl-plot:has(.dl-cols) .dl-ymid { display: none; }
.dl-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: dl-reveal 1.1s cubic-bezier(.3,.7,.2,1) both; }
.dl-grid, .dl-base { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dl-base { stroke: var(--border-hover); }
.dl-line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dl-line.dl-s1 { stroke: var(--chart-1); } .dl-line.dl-s2 { stroke: var(--chart-2); }
.dl-gl { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); }
.dl-cols { position: absolute; inset: 0; display: flex; align-items: stretch; gap: 3px; }
.dl-col { flex: 1; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 6px; min-width: 0; }
.dl-col.hl { background: color-mix(in srgb, var(--text) 6%, transparent); }
.dl-bar { width: 100%; max-width: 26px; border-radius: 4px 4px 1px 1px; background: var(--chart-1); opacity: .62; transform-origin: bottom; animation: dl-grow .7s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 35ms); }
.dl-col.today .dl-bar, .dl-col.hl .dl-bar { opacity: 1; }
.dl-dots { display: flex; gap: 2px; margin-bottom: 3px; }
.dl-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--chart-2); }
.dl-mark { position: absolute; left: 12%; right: 12%; height: 3px; border-radius: 2px; background: var(--chart-2); transform: translateY(50%); box-shadow: 0 0 0 1.5px var(--surface); }
.dl-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-left: 30px; flex: none; }
.dl-x.cols { gap: 3px; } .dl-x.cols span { flex: 1; text-align: center; line-height: 1.2; min-width: 0; }
.dl-x .today { color: var(--text); font-weight: 600; }
.dl-col.we { opacity: .85; }
.dl-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-muted); opacity: 0; pointer-events: none; }
.dl-plot.hovering .dl-guide { opacity: .45; }
.dl-plot:has(.dl-cols) .dl-guide { display: none; }
.dl-hdots { position: absolute; inset: 0; pointer-events: none; }
.dl-hdots i { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--surface); background: var(--chart-1); opacity: 0; }
.dl-hdots i.dl-s2 { background: var(--chart-2); }
.dl-plot.hovering .dl-hdots i { opacity: 1; }
.dl-tip { position: absolute; top: 2px; z-index: 3; pointer-events: none; opacity: 0; background: var(--surface); border: 1px solid var(--border-hover); box-shadow: var(--shadow-lg); border-radius: 10px; padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; white-space: nowrap; transition: opacity .12s; }
:root[data-theme="dark"] .dl-tip { background: var(--surface2); }
.dl-tip b { font-weight: 600; }
.dl-plot.hovering .dl-tip { opacity: 1; }
@keyframes dl-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes dl-grow { from { transform: scaleY(0); } }
@keyframes dl-growx { from { transform: scaleX(0); } }

/* Ring */
.dl-pulse { flex-direction: row; align-items: center; gap: 16px; justify-content: center; }
.dl-donut { position: relative; height: 100%; max-height: 150px; min-height: 110px; aspect-ratio: 1; flex: none; }
.dl-donut svg, .dl-ring svg { width: 100%; height: 100%; display: block; }
.dl-track { fill: none; stroke: var(--surface2); stroke-width: 5; }
.dl-seg { fill: none; stroke-width: 5; animation: dl-seg 1s cubic-bezier(.3,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 120ms); transition: stroke-width .15s, opacity .15s; cursor: pointer; }
@keyframes dl-seg { from { stroke-dasharray: 0 100; } }
.seg-hl .dl-seg:not(.on) { opacity: .3; }
.dl-seg.on { stroke-width: 6.4; }
.dl-c-avail { stroke: var(--green); } .dl-c-out { stroke: var(--orange); } .dl-c-def { stroke: var(--red); } .dl-c-fv { stroke: var(--indigo); }
.dl-key.dl-c-avail { background: var(--green); } .dl-key.dl-c-out { background: var(--orange); } .dl-key.dl-c-def { background: var(--red); } .dl-key.dl-c-fv { background: var(--indigo); }
.dl-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; padding: 18%; }
.dl-donut-c b { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.dl-donut-c span { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.2; }
.dl-pulse-legend { flex: 1; min-width: 180px; max-width: 240px; display: flex; flex-direction: column; gap: 9px; }
.dl-pl span { overflow: visible; white-space: nowrap; margin-right: 12px; }
.dl-pl b { justify-self: end; min-width: 2em; text-align: right; }
.dl-pl { display: grid; grid-template-columns: 12px auto auto 42px; align-items: center; gap: 6px; font-size: 13px; }
.dl-pl b { font-variant-numeric: tabular-nums; }
.dl-pl em { font-style: normal; color: var(--text-muted); text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

/* Countdown */
.dl-countdown { display: flex; flex-direction: column; gap: 10px; height: 100%; min-height: 0; }
.dl-cd-title { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-muted); text-decoration: none; min-width: 0; }
.dl-cd-title b { font-size: 17px; color: var(--text); font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { a.dl-cd-title:hover b { color: var(--accent-text); } }
.dl-cd { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 8px; }
.dl-cd-u { background: var(--surface2); border-radius: 12px; padding: 7px 4px 6px; text-align: center; overflow: hidden; }
.dl-cd-u b { display: block; font-size: clamp(20px, 2vw, 30px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.dl-cd-u span { font-size: 11px; color: var(--text-muted); }
.dl-cd-u b.flip { animation: dl-flip .35s cubic-bezier(.2,.8,.2,1); }
@keyframes dl-flip { from { transform: translateY(-35%); opacity: .15; } }
.dl-cd.done .dl-cd-u b { color: var(--green-text); }
.dl-cd-foot { display: flex; align-items: center; gap: 14px; }
.dl-ring { position: relative; width: 58px; height: 58px; flex: none; }
.dl-ring-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.dl-ring-c b { font-size: 13px; font-variant-numeric: tabular-nums; } .dl-ring-c span { font-size: 10px; color: var(--text-muted); }
.dl-cd-meta { font-size: 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-ev { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-muted); padding-top: 8px; border-top: 1px solid var(--border); margin-top: auto; line-height: 1.4; }
.dl-ev .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.dl-ev b { color: var(--text); font-weight: 600; }

/* Live-Feed */
.dl-live { display: flex; align-items: center; font-size: 12px; font-weight: 600; margin-bottom: 4px; flex: none !important; }
.dl-live .muted { font-weight: 400; margin-left: 4px; }
.dl-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block; margin-right: 7px; flex: none; animation: dl-ping 2s ease-out infinite; }
@keyframes dl-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.dl-feed-av { position: relative; flex: none; display: inline-flex; }
.dl-feed-av i { position: absolute; right: -4px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 0 0 2px var(--surface); }
.dl-feed-av i.out { background: var(--orange); } .dl-feed-av i.back { background: var(--green); }
.dl-feed-av i .icon { width: 10px; height: 10px; }
.dl-ago { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.dl-new { animation: dl-in .6s cubic-bezier(.2,.8,.2,1) both, dl-glow 2.6s ease-out; }
@keyframes dl-in { from { transform: translateY(-10px); opacity: 0; } }
@keyframes dl-glow { from { background: var(--accent-soft); } }

/* Meistgenutzt */
.dl-top { display: flex; flex-direction: column; gap: 10px; }
.dl-top-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; font-size: 13px; }
.dl-top-name { display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dl-top-name .icon { width: 15px; height: 15px; flex: none; color: var(--text-muted); }
.dl-top-row b { font-variant-numeric: tabular-nums; }
.dl-top-track { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.dl-top-fill { height: 100%; border-radius: 3px; background: var(--chart-1); transform-origin: left; animation: dl-growx .8s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* Mini-Kurve in Zahlen-Kacheln */
.dl-spark { position: absolute; right: 16px; top: 16px; width: 78px; height: 28px; overflow: visible; animation: dl-reveal 1s cubic-bezier(.3,.7,.2,1) both; }
.dl-spark polyline { fill: none; stroke: var(--tint, var(--accent)); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }

/* Anpassen-Modus */
.dash-slot, .dash-card { position: relative; }
.dash-edit-bar { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 45%, transparent); }
.dash-card > .dash-edit-bar { inset: 52px 0 0; border-radius: 0 0 var(--radius) var(--radius); }
.dash-drag { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border-hover); color: var(--text-muted); cursor: grab; box-shadow: var(--shadow-card); }
@media (pointer: coarse) { .dash-drag { display: none; } }
.dash-editing [draggable="true"] { cursor: grab; }
.dash-editing .dragging { opacity: .4; }
.dash-editing .drop-target > .stat-card, .dash-editing .dash-card.drop-target { outline: 2px solid var(--accent) !important; outline-offset: 2px; }
.dash-slot > .dash-pick { display: none; }

/* Widget-Galerie */
.wg-modal { width: min(920px, 100%); }
.wg-modal .modal-header { margin-bottom: 12px; }
.wg-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.wg-tools { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.wg-tools .chip-row { margin: 0; }
.wg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; max-height: min(62vh, 640px); overflow: auto; padding: 2px; margin: -2px; overscroll-behavior: contain; }
.wg-item { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s, border-color .16s; }
.wg-item[hidden] { display: none; }
@media (hover: hover) { .wg-item:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
.wg-item:active { transform: scale(.98); }
.wg-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wg-item.current { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wg-prev { height: 100px; background: var(--surface2); display: flex; align-items: center; justify-content: center; padding: 10px; overflow: hidden; }
:root[data-theme="dark"] .wg-prev { background: color-mix(in srgb, var(--surface2) 70%, var(--surface)); }
.wg-art svg { width: 116px; height: 72px; display: block; }
.wg-grid.small .wg-prev { height: auto; min-height: 118px; align-items: stretch; }
.wg-stat { width: 100%; pointer-events: none; }
.wg-stat .stat-card { box-shadow: none; padding: 12px 14px; }
.wg-stat .stat-top { display: flex; }
.wg-text { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.wg-title { font-size: 14px; font-weight: 600; }
.wg-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.wg-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 6px; }
.wg-tags:empty { display: none; }
.wg-tag { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--surface2); color: var(--text-muted); display: inline-flex; align-items: center; gap: 4px; }
.wg-tag.cur { background: var(--accent-soft); color: var(--accent-text); }
.wg-tag.live { background: var(--green-soft); color: var(--green-text); }
.wg-tag.live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
@media (max-width: 600px) { .wg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: none; } .wg-prev { height: 84px; } .wg-desc { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .dl-seg, .dl-bar, .dl-top-fill, .dl-plot svg, .dl-spark, .dl-new, .dl-cd-u b.flip, .dl-live-dot { animation: none !important; }
  .wg-item { transition: none; }
}
.dl-cd-state { display: inline-flex; align-items: center; }
@media (max-width: 420px) { .dl-pulse { flex-direction: column; } .dl-pulse-legend { max-width: none; width: 100%; } }
.dash-fit .dl-feed-row { padding-top: 4px; padding-bottom: 4px; }
.dl-feed-row .list-row-sub { font-size: 12px; }

/* ─── Etikettendrucker (3.62) ─── */
.lp-modal .modal-header { margin-bottom: 14px; }
.lp-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.lp-printer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: var(--surface2); margin-bottom: 14px; }
.lp-conn { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.lp-conn-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; }
.lp-conn-t span { font-size: 12.5px; color: var(--text-muted); }
.lp-conn-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.lp-dot.off { background: var(--text-muted); opacity: .5; } .lp-dot.on { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.lp-warn { color: var(--orange-text); }
.lp-hint { display: flex; gap: 10px; font-size: 13px; line-height: 1.45; }
.lp-hint .icon { width: 18px; height: 18px; flex: none; color: var(--accent-text); margin-top: 1px; }
.lp-preview { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: center; padding: 16px; border-radius: 12px; border: 1px dashed var(--border-hover); margin-bottom: 14px; }
.lp-label { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.lp-label canvas { image-rendering: pixelated; border-radius: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.12); background: #fff; max-width: 100%; height: auto !important; }
.lp-label figcaption { font-size: 11.5px; color: var(--text-muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-more { font-size: 12.5px; color: var(--text-muted); align-self: center; }
.lp-cap { flex-basis: 100%; text-align: center; font-size: 11.5px; color: var(--text-muted); }
.lp-opts { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.lp-opts .form-group { margin: 0; }
.lp-text { grid-column: 1 / -1; font-size: 13.5px; }
.lp-status { min-height: 20px; margin: 12px 0 0; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.lp-status:empty { display: none; }
.lp-status.err { color: var(--red-text); } .lp-status.ok { color: var(--green-text); font-weight: 600; }
.lp-status .icon { width: 16px; height: 16px; }
.lp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-hover); border-top-color: var(--accent); animation: lp-spin .8s linear infinite; flex: none; }
@keyframes lp-spin { to { transform: rotate(360deg); } }
.lp-foot { flex-wrap: wrap; }
@media (max-width: 560px) { .lp-text { grid-column: 1 / -1; padding-bottom: 0; } .lp-opts { grid-template-columns: 1fr 1fr; } .lp-opts .form-group:first-child { grid-column: 1 / -1; } }

/* ─── Lagerort-/Case-Auswahl (3.63) ─── */
select.pk-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; opacity: 0; pointer-events: none; overflow: hidden; }
.pk-trigger { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 42px; padding: 7px 12px; font: inherit; font-size: 15px; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.modal .pk-trigger, .card .pk-trigger { background: var(--surface2); border-color: transparent; }
.pk-trigger:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pk-trigger:disabled { opacity: .55; cursor: not-allowed; }
.pk-trigger > .icon:last-child { width: 15px; height: 15px; margin-left: auto; color: var(--text-muted); transform: rotate(90deg); flex: none; }
.pk-tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pk-meta { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 1; min-width: 0; }
.pk-meta::before { content: '· '; }
.pk-ph { color: var(--text-muted); }
.pk-ic { display: inline-flex; flex: none; } .pk-ic .icon { width: 17px; height: 17px; }
.pk-ic.muted { color: var(--text-muted); }
.pk-sq { width: 24px; height: 24px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.pk-sq .icon { width: 14px; height: 14px; }
.pk-back { position: fixed; inset: 0; z-index: 1200; }
.pk-back.sheet { background: rgba(0,0,0,.35); }
.pk-pop { position: fixed; z-index: 1201; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-hover); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pk-in .14s cubic-bezier(.2,.8,.2,1); }
:root[data-theme="dark"] .pk-pop { background: var(--surface2); }
.pk-pop.sheet { left: 0; right: 0; bottom: 0; max-height: 78vh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: pk-up .22s cubic-bezier(.2,.8,.2,1); }
@keyframes pk-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes pk-up { from { transform: translateY(100%); } }
.pk-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; font-size: 16px; }
.pk-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); flex: none; }
.pk-search .icon { width: 16px; height: 16px; color: var(--text-muted); flex: none; }
.pk-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--text); }
.pk-list { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.pk-group { display: flex; align-items: center; gap: 8px; padding: 10px 8px 5px; font-size: 12px; font-weight: 600; color: var(--text-muted); position: sticky; top: -6px; background: inherit; }
.pk-pop .pk-group { background: var(--surface); } :root[data-theme="dark"] .pk-pop .pk-group { background: var(--surface2); }
.pk-group .icon { width: 13px; height: 13px; }
.pk-group em { font-style: normal; font-weight: 500; margin-left: auto; font-variant-numeric: tabular-nums; }
.pk-av { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pk-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; min-height: 40px; }
@media (hover: hover) { .pk-row:hover { background: color-mix(in srgb, var(--text) 6%, transparent); } }
.pk-row.act { background: var(--accent-soft); }
.pk-row.on .pk-name { font-weight: 600; color: var(--accent-text); }
.pk-row.dis { opacity: .45; cursor: not-allowed; }
.pk-rt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pk-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-sub { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-check { color: var(--accent-text); display: inline-flex; } .pk-check .icon { width: 16px; height: 16px; }
.pk-empty { padding: 18px; text-align: center; color: var(--text-muted); font-size: 13px; }
@media (pointer: coarse) { .pk-row { min-height: 46px; } .pk-search input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .pk-pop, .pk-pop.sheet { animation: none; } }
.pk-trigger.pk-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px var(--red-soft); }

/* ── Als App auf dem Homescreen (iOS/Android „standalone“): fühlt sich wie eine native App an (seit 3.67) ── */
html { -webkit-text-size-adjust: 100%; }
html.standalone, html.standalone body { overscroll-behavior-y: none; }
html.standalone body { -webkit-touch-callout: none; background-color: var(--bg); }
html.standalone .sidebar, html.standalone .mobile-nav, html.standalone .nav-item, html.standalone .btn, html.standalone .topbar, html.standalone .badge, html.standalone .card-title { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.standalone a, html.standalone button { -webkit-touch-callout: none; }
html.standalone .main-content, html.standalone .modal, html.standalone .pk-list, html.standalone .cat-picker-menu { -webkit-overflow-scrolling: touch; }
@media (max-width: 900px) {
  /* Eingabefelder unter 16 px lassen iOS beim Antippen hineinzoomen */
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px; }
  html, body { min-height: -webkit-fill-available; }
}

/* Designfarbe wählen */
.ac-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ac-sw { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 2px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer; font-size: 12px; color: var(--text-muted); }
.ac-sw:hover { background: var(--surface2, var(--accent-soft)); }
.ac-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--c); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ac-dot .icon { width: 17px; height: 17px; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s cubic-bezier(.2,.8,.2,1); }
.ac-sw.on { color: var(--text); font-weight: 600; border-color: var(--border-hover, var(--border)); }
.ac-sw.on .ac-dot .icon { opacity: 1; transform: none; }
@media (max-width: 420px) { .ac-grid { grid-template-columns: repeat(4, 1fr); } }

/* Finanz-Widgets (seit 3.69) */
.dl-pair { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 100%; }
.dl-pair .dl-bar { flex: 1; width: auto; max-width: 11px; }
.dl-bar.dl-s2 { background: var(--chart-2); }
.dl-top-fill.dl-s2 { background: var(--chart-2); }
.dl-kpi b.neg, .dash-kpi b.neg { color: var(--red-text); }
.dash-note { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--orange-soft); color: var(--orange-text); font-size: 13px; font-weight: 600; text-decoration: none; }
.dash-note .icon { width: 16px; height: 16px; flex: none; }
a.dl-top-row { color: inherit; text-decoration: none; }

/* Kabel & Material */
.cb-modal .form-group { margin-bottom: 16px; }
.cb-modal .modal-header { margin-bottom: 18px; }
.cb-modal .modal-footer { margin-top: 22px; }
.cb-line { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.1fr) 76px 32px; gap: 8px; margin-bottom: 10px; align-items: center; }
@media (max-width: 600px) { .cb-line { grid-template-columns: 1fr 76px 32px; } .cb-line select:first-child { grid-column: 1 / -1; } }

html:has(#cb-body) { scrollbar-gutter: stable; }
#cb-body { min-height: 60vh; }
#cb-cls { min-height: 34px; margin-bottom: 10px; }
.cb-dim .search-input-wrapper { opacity: .55; }
.cb-tbl { table-layout: fixed; width: 100%; }
.cb-tbl td, .cb-tbl th { overflow-wrap: anywhere; }
.cb-where { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0; }
.cb-where-t { min-width: 0; }
/* Detailansicht: feste Spaltenbreiten, damit − und + in jeder Kabelart-Tabelle an derselben Stelle stehen */
.cb-dt { table-layout: fixed; width: 100%; }
.cb-dt th:nth-child(1) { width: 20%; } .cb-dt th:nth-child(2) { width: 10%; } .cb-dt th:nth-child(4) { width: 11%; } .cb-dt th:nth-child(5) { width: 130px; }
.cb-dt td { overflow-wrap: anywhere; }
.cb-step { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.cb-step strong { box-sizing: border-box; width: 36px; flex: 0 0 36px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }  /* feste Breite: − und + stehen in jeder Zeile an derselben Stelle, egal wie viele Stellen die Zahl hat */
.cb-sb { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.cb-sb:disabled { opacity: .35; cursor: default; }
@media (hover: hover) { .cb-sb:not(:disabled):hover { border-color: var(--border-hover); background: var(--surface-hover); } }
.cb-acts { display: flex; justify-content: flex-end; gap: 4px; align-items: center; white-space: nowrap; }
.cb-ic { padding: 6px 8px; }
.cb-ic .icon { width: 17px; height: 17px; }

.cb-list { display: flex; flex-direction: column; }
.cb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cb-row:last-child { border-bottom: 0; }
.cb-row-t { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.cb-zero .cb-row-t { color: var(--text-secondary); }
.cb-step-l { gap: 10px; }
.cb-step-l strong { width: 44px; flex-basis: 44px; font-size: 17px; }
@media (pointer: coarse) { .cb-sb { width: 40px; height: 40px; font-size: 20px; border-radius: 10px; } .cb-step { gap: 8px; } .cb-where { padding: 5px 0; } }
.cb-step-l .cb-sb { width: 38px; height: 38px; font-size: 19px; }
.cb-mut { color: var(--text-secondary); }
.cb-ico { --c: var(--accent); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 9px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); flex: 0 0 auto; }
.cb-ico .icon { width: 17px; height: 17px; }
.cb-ico.sm { width: 26px; height: 26px; border-radius: 8px; }
.cb-ico.sm .icon { width: 15px; height: 15px; }
.cb-gt { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; }
.location-group { margin-bottom: 22px; }
.cb-chip-ic { display: inline-flex; margin-right: 6px; }
.cb-chip-ic .icon { width: 15px; height: 15px; }
.cb-ib { padding: 6px 8px; }
.cb-ib .icon { width: 17px; height: 17px; }
.cb-row-t { display: flex; align-items: center; gap: 10px; }
.cb-bxf { flex-wrap: wrap; }
.cb-bxf .btn { flex: 1 1 auto; }
#cb-bar .pk-trigger { flex: 0 0 210px; width: 210px; min-width: 0; }
@media (max-width: 700px) { #cb-bar .pk-trigger { flex: 1 1 140px; width: auto; } }
@media (max-width: 600px) {
  .cb-box-modal .modal { max-width: none !important; width: 100%; max-height: 94vh; overflow-y: auto; }
  .cb-row { padding: 12px 0; }
  .cb-row-t { font-size: 17px; }
  .cb-step-l .cb-sb { width: 48px; height: 48px; font-size: 24px; }
  .cb-step-l strong { font-size: 20px; width: 56px; flex-basis: 56px; }
}


/* Kabel & Material – Artikel-Optik */
.cb-tile { color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface2)); }
.cb-tile .icon { width: 26px; height: 26px; }
.cb-badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.cb-badges .status-badge { flex: 0 0 auto; max-width: none; overflow: visible; }  /* Badge behält seine volle Breite samt Hintergrund; bei Platzmangel bricht die Reihe um */
.cb-wl { border-top: 1px solid var(--border); padding-top: 6px; display: flex; flex-direction: column; }
.cb-card { cursor: default; }
.cb-card .cb-acts { align-self: flex-start; margin: -4px -6px 0 0; }
.cb-orow .cb-acts { margin-left: auto; }
.cb-orow .item-row-cat { flex: 0 0 220px; }
@media (max-width: 700px) { .cb-orow { flex-wrap: wrap; } .cb-orow .item-row-cat { display: block; flex: 1 1 100%; order: 3; } .cb-orow .cb-acts { order: 2; } .item-grid:has(.cb-card) { grid-template-columns: 1fr; } }
.cb-wt { font-size: 13px; color: var(--text-muted); } .cb-wt .icon { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; } .cb-wt a { color: var(--text); font-weight: 500; text-decoration: none; }
.cb-lrow { align-items: flex-start; }
.cb-lmain { flex: 1; min-width: 0; }
.cb-lrow .item-row-name { white-space: normal; overflow-wrap: anywhere; }
.cb-lsub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.item-list .cb-lrow, .item-list .cb-orow { display: flex; }
.cb-ldone .item-row-name { color: var(--text-muted); }
.cb-orow .cb-acts { flex-wrap: wrap; }
@media (max-width: 700px) {
  .cb-lrow, .cb-orow { flex-wrap: wrap; }
  .cb-lrow .cb-acts, .cb-orow .cb-acts { width: 100%; justify-content: flex-start; margin-top: 8px; }
  .cb-lrow .cb-lmain { flex: 1 1 100%; }
}
.lp-logo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.lp-logo-prev { width: 44px; height: 44px; border-radius: 8px; border: 1px solid var(--border); background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; }
.lp-logo-prev img { max-width: 36px; max-height: 36px; object-fit: contain; transition: transform 150ms var(--ease-out); }
.lp-logo-row .btn { padding: 6px 10px; white-space: nowrap; }

/* Logo auf dem Kabel-Etikett: Größe und Lage */
.lp-logo-adj { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.lp-rng { display: grid; grid-template-columns: 112px 1fr 48px; align-items: center; gap: 8px; font-size: 13px; margin: 0; }
.lp-rng input[type=range] { width: 100%; min-width: 0; }
.lp-rng output { text-align: right; color: var(--text-muted); font-size: 12px; }

/* ─── GROSSE BILDSCHIRME (z. B. 4K) ─────────────────────────────────────────
   Seiteninhalt und Seitenleiste werden stufenweise mitskaliert, die Breitenbegrenzung entfällt.
   Pop-ups und Dialoge bleiben unverändert. */
:root { --uz: 1; }
@media (min-width: 2300px) { :root { --uz: 1.25; } }
@media (min-width: 2900px) { :root { --uz: 1.5; } }
@media (min-width: 3500px) { :root { --uz: 1.75; } }
@media (min-width: 4800px) { :root { --uz: 2.25; } }
@media (min-width: 2300px) {
  .main-content, .sidebar { zoom: var(--uz); }
  .main-content { max-width: none; }
  .main-content.dash-fit { height: calc(100dvh / var(--uz)); }
}

/* ─── HDR- UND WEITE-FARBRAUM-DISPLAYS ───────────────────────────────────────
   Auf Displays mit P3-/HDR-Farbraum (die meisten aktuellen 4K-/HDR-Monitore) werden Akzent- und
   Statusfarben etwas satter dargestellt. Die Helligkeit wird bewusst nicht angehoben: Oberflächen und
   Text bleiben im normalen Helligkeitsbereich, damit Lesbarkeit und Etiketten gleich bleiben. */
@media (color-gamut: p3) {
  :root, :root[data-theme="dark"] {
    --accent: color(display-p3 0.02 0.5 1);
    --accent-hover: color(display-p3 0.25 0.62 1);
    --green: color(display-p3 0.2 0.85 0.35);
    --orange: color(display-p3 1 0.6 0.05);
    --red: color(display-p3 1 0.27 0.23);
  }
  :root[data-theme="light"] {
    --accent: color(display-p3 0 0.47 1);
    --accent-hover: color(display-p3 0 0.4 0.85);
    --green: color(display-p3 0.2 0.78 0.35);
    --orange: color(display-p3 1 0.58 0);
    --red: color(display-p3 1 0.23 0.19);
  }
}

/* HDR-Displays: HDR-Fotos/-Videos würden neben der normalen Oberfläche blenden. Die UI und Artikelfotos
   bleiben im Standard-Helligkeitsbereich (dynamic-range-limit); Videos dürfen die volle HDR-Spitze nutzen. */
@media (dynamic-range: high) {
  html { dynamic-range-limit: standard; }
  video { dynamic-range-limit: no-limit; }
  img { dynamic-range-limit: constrained-high; }
}

/* ─── ADAPTER: Anschlüsse mit Stecker/Buchse-Markierung ─────────────── */
.cb-end { position: relative; display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.cb-end > svg { width: 100%; height: 100%; }
.cb-g { position: absolute; right: -3px; bottom: -3px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 2px var(--surface); }
.cb-g.f { background: var(--surface); border: 2px solid currentColor; box-sizing: border-box; }
.cb-n { position: absolute; left: -6px; top: -7px; font-size: 10px; font-weight: 700; line-height: 1; padding: 2px 3px; border-radius: 4px; background: var(--accent); color: #fff; }
.cb-adapt { display: inline-flex; align-items: center; gap: 4px; }
.cb-adapt .cb-end { width: 1.1em; height: 1.1em; }
.cb-arr { font-size: 12px; color: var(--text-muted); }
.ad-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-prev { margin-top: 12px; padding: 12px; border-radius: var(--radius-sm); background: var(--surface2); display: flex; flex-direction: column; gap: 8px; }
.ad-line { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.ad-line .cb-end { width: 1.6em; height: 1.6em; }
#ci-ad .chip { font-size: 12px; padding: 4px 9px; }

/* Einstellungen → Kabel-Anschlüsse */
.conn-group { margin-bottom: 14px; }
.conn-icons-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 8px; }
.conn-icon-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm, 10px); background: var(--surface); }
.conn-icon-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); color: var(--accent); cursor: pointer; }
.conn-icon-btn:hover { border-color: var(--accent); }
.conn-icon-btn .icon { width: 24px; height: 24px; }
.conn-icon-name { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 2px; }
.conn-tag { font-size: 11px; color: var(--text-muted); font-weight: 400; }
.conn-act { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.conn-act:hover { background: var(--surface2); color: var(--text); }
.conn-act.danger:hover { color: var(--danger, #d92d20); }
.conn-act .icon { width: 18px; height: 18px; }
/* Ausgeblendet: Geister-Optik, bleibt aber bedienbar */
.conn-icon-row.is-hidden { border-style: dashed; background: transparent; }
.conn-icon-row.is-hidden .conn-icon-btn, .conn-icon-row.is-hidden .conn-icon-name { opacity: .45; }
.conn-icon-row.is-hidden .conn-icon-btn { filter: grayscale(1); border-style: dashed; }

/* Adapter-Konfigurator (3.89) */
.ad-focus .ad-hide-on-pick { display: none !important; }
.ad-cable { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 0; row-gap: 8px; padding: 22px 14px 14px; background: var(--surface2); border-radius: var(--radius, 14px); }
.ad-plugbtn { background: none; border: 0; padding: 6px; border-radius: 14px; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 96px; min-height: 84px; }
.ad-plugbtn:not(:disabled):hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.ad-plugbtn:disabled { cursor: default; }
.ad-plugbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ad-empty { border: 2px dashed var(--border-strong, #b8c0cc); color: var(--text-muted); width: 84px; min-width: 84px; justify-self: center; }
.ad-plus .icon { width: 28px; height: 28px; }
.ad-plug { display: flex; align-items: center; }
.ad-plugbtn.side-b .ad-plug { flex-direction: row-reverse; }
.ad-body { width: 64px; height: 64px; border-radius: 14px; background: var(--surface); border: 2px solid currentColor; display: grid; place-items: center; }
.ad-body .icon { width: 34px; height: 34px; }
.ad-face { display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.g-m .ad-face i { width: 13px; height: 4px; background: currentColor; border-radius: 2px; }
.g-f .ad-face { width: 11px; height: 38px; align-items: center; gap: 5px; padding: 5px 0; background: currentColor; border-radius: 4px; }
.g-f .ad-face i { width: 4px; height: 4px; border-radius: 50%; background: var(--surface2); }
.g-x .ad-face { display: none; }
.ad-ys { display: flex; flex-direction: column; gap: 8px; position: relative; }
.ad-ys .ad-body { width: 46px; height: 46px; border-radius: 11px; }
.ad-ys .ad-body .icon { width: 26px; height: 26px; }
.ad-ys .g-m .ad-face i { width: 10px; height: 3px; }
.ad-ys .g-f .ad-face { height: 28px; width: 9px; gap: 3px; padding: 3px 0; }
.ad-ys::after { content: ''; position: absolute; top: 25%; bottom: 25%; width: 4px; background: var(--text-muted); opacity: .55; }
.side-a .ad-ys::after { right: -4px; }
.side-b .ad-ys::after { left: -4px; }
.ad-wire { height: 6px; border-radius: 3px; background: var(--text-muted); opacity: .55; margin: 0 -2px; min-width: 24px; }
.ad-cap { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; font-size: 14px; min-height: 36px; }
.ad-cap small { color: var(--text-muted); font-size: 12px; }
.ad-cap.mut { color: var(--text-muted); font-size: 13px; }
.ad-ctl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ad-ctl-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ad-ctl-col.off { opacity: .45; }
.ad-ctl-t { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.ad-name { margin: 14px 0 14px; text-align: center; font-size: 16px; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ad-name.mut { font-weight: 400; font-size: 13px; color: var(--text-muted); }
.ad-hint { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; }
.ad-pick-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ad-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ad-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; font-size: 12px; text-align: center; min-height: 82px; }
.ad-tile:hover { border-color: var(--accent); }
.ad-tile.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.ad-tile-ic { color: var(--accent); display: grid; place-items: center; }
.ad-tile-ic .icon { width: 30px; height: 30px; }
.ad-tile-t { overflow-wrap: anywhere; line-height: 1.2; }
#ad-q { margin-bottom: 12px; }
#ad-tiles { max-height: min(52vh, 420px); overflow-y: auto; padding-right: 2px; }
@media (max-width: 520px) {
  .ad-plugbtn { min-width: 80px; }
  .ad-ctl { grid-template-columns: 1fr; }
}

/* Unterwegs: Löschen */
.cb-del { color: var(--danger, #d92d20); }
.cb-del .icon { width: 15px; height: 15px; }
.cb-del span { margin-left: 4px; }

.ad-cable.cm { --c: var(--accent); }
.ad-cable.cm .ad-plugbtn { color: var(--c); cursor: default; }
.ad-plugbtn.static { pointer-events: none; }
.ad-cable.cm.one { grid-template-columns: 1fr; justify-items: center; }
.ad-wirebox { position: relative; display: flex; align-items: center; }
.ad-wirebox .ad-wire { flex: 1; }
.cm-len { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ad-cable.cm .ad-cap { grid-column: 2; }
.ad-cable.cm.one .ad-cap { grid-column: 1; }
/* Neu anlegen (3.335): zwei Spalten, links wählen, rechts Vorschau und Angaben; am Handy untereinander */
.cb-modal.ci { height: min(780px, calc(100dvh - 32px)); max-height: none; display: flex; flex-direction: column; overflow: hidden; }
.cb-modal.ci > .modal-header, .cb-modal.ci > #ci-cls, .cb-modal.ci > .modal-footer { flex: none; }
.cb-modal.ci > .modal-footer { margin-top: 14px; }
.cb-modal.ci > #ci-cls { align-self: flex-start; margin-bottom: 14px; }
.ci-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; overflow: hidden; }
.ci-panel, .ci-details { min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 4px 8px 2px; }
.ci-panel > div { display: block; }
.ci-selhead { margin: 2px 0 10px; font-size: 13px; font-weight: 650; color: var(--text); }
.ci-q { margin-bottom: 10px; }
.ci-grp { grid-column: 1 / -1; margin: 10px 0 2px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.ci-grp:first-child { margin-top: 0; }
.ci-tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ci-tiles .ad-tile { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 9px 10px; min-height: 0; text-align: left; }
.ci-tiles .ad-tile-ic svg { width: 20px; height: 20px; }
#ad-tiles { max-height: none; overflow: visible; }
.ci-stage { background: var(--surface2, var(--fill)); border: 1px solid var(--border); border-radius: 16px; padding: 18px 14px 14px; margin-bottom: 16px; min-height: 120px; display: flex; align-items: center; justify-content: center; }
.ci-stage .ad-cable { width: 100%; }
.ci-details .form-group { margin-bottom: 14px; }
.ci-more { margin-top: 2px; }
.ci-more > summary { cursor: pointer; padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--text-muted); list-style: none; }
.ci-more > summary::-webkit-details-marker { display: none; }
.ci-more > summary::before { content: '+ '; }
.ci-more[open] > summary::before { content: '– '; }
.ci-adapter .ci-more > summary { display: none; }
.ci-adapter .ci-main { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
.ci-adapter .ci-panel, .ci-adapter .ci-details { overflow: visible; }
@media (max-width: 820px) {
  .ci-main { display: block; overflow-y: auto; }
  .ci-panel { max-height: 38vh; overflow-y: auto; padding: 0 2px; }
  .ci-adapter .ci-panel { max-height: none; }
  .ci-details { overflow: visible; padding: 0; }
  .ci-details { padding-top: 16px; }
}

/* Spaß-Widgets (3.95) */
.df-mood { text-align: center; padding: 4px 0 2px; container-type: inline-size; min-width: 0; }
.df-emoji { font-size: clamp(32px, 12vw, 56px); line-height: 1; animation: df-bob 3.2s ease-in-out infinite; }
.df-mood-t { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 14px; }
.df-mood-t b { font-size: 18px; letter-spacing: -.01em; }
.df-mood-t span, .df-sub, .df-clock-l { font-size: 12.5px; color: var(--text-muted); }
.df-gauge { position: relative; height: 8px; margin: 0 9px; border-radius: 99px; background: linear-gradient(90deg, var(--green), #e8c547 55%, var(--red)); }
.df-gauge i { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); transform: translate(-50%, -50%); transition: left .8s cubic-bezier(.2,.8,.2,1); }
.df-gauge-l { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin: 6px 9px 0; }
@keyframes df-bob { 50% { transform: translateY(-5px) rotate(-4deg); } }
.df-big { display: flex; flex-direction: column; margin-bottom: 12px; }
.df-big b { font-size: 34px; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.df-big span { font-size: 12.5px; color: var(--text-muted); }
.df-ref { display: grid; grid-template-columns: 118px 1fr 48px; align-items: center; gap: 8px; font-size: 12.5px; margin: 7px 0; }
.df-ref b { text-align: right; font-variant-numeric: tabular-nums; }
.df-bar { height: 7px; border-radius: 99px; background: var(--surface3); overflow: hidden; }
.df-bar i { display: block; height: 100%; border-radius: 99px; background: var(--chart-1); animation: df-grow .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
@keyframes df-grow { from { transform: scaleX(0); } }
.df-clock-n { font-size: 13px; color: var(--text-muted); }
.df-clock-n b { color: var(--text); }
.df-digits { display: flex; gap: 8px; margin: 10px 0 12px; }
.df-digits span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 12px; background: var(--surface3); font-size: 11px; color: var(--text-muted); }
.df-digits b { font-size: 26px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.df-podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; min-height: 150px; padding-top: 6px; }
.df-pod { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; max-width: 96px; text-align: center; font-size: 12.5px; }
.df-pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.df-pod-m { font-size: 22px; }
.df-pod-a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; }
.df-pod-b { width: 100%; border-radius: 10px 10px 0 0; background: var(--accent-soft); display: grid; place-items: center; animation: df-rise .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.df-pod.p1 .df-pod-b { background: var(--accent); color: #fff; }
.df-pod-b i { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
@keyframes df-rise { from { transform: scaleY(0); } }
.df-sub { margin-top: 10px; text-align: center; }
.df-cols { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.df-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; font-size: 11px; color: var(--text-muted); }
.df-col i { display: block; width: 100%; border-radius: 6px; background: var(--surface3); animation: df-rise .8s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.df-col.top i { background: var(--orange); }
.df-col.top span { color: var(--text); font-weight: 700; }
.df-dice { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.df-die { font-size: 44px; line-height: 1; border: 0; background: var(--surface3); border-radius: 18px; width: 78px; height: 78px; cursor: pointer; flex: none; }
.df-die:hover { background: var(--accent-soft); }
.df-die.roll { animation: df-roll .5s ease; }
@keyframes df-roll { 40% { transform: rotate(200deg) scale(1.15); } 100% { transform: rotate(360deg); } }
.df-dice-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.df-dice-t b { font-size: 16px; overflow-wrap: anywhere; }
.df-dice-t span { font-size: 12.5px; color: var(--text-muted); }
@media (prefers-reduced-motion: reduce) { .df-emoji, .df-bar i, .df-pod-b, .df-col i, .df-die.roll { animation: none; } }

/* Kein Mitscrollen des Hintergrunds hinter Fenstern und Auswahlblättern (3.96) */
body.scroll-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
.modal-overlay, .pk-back, .pk-pop { overscroll-behavior: contain; }
.pk-back.sheet { touch-action: none; }

.cb-outbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cb-outbar label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.cb-outbar .form-select { width: auto; min-width: 120px; }

/* Packlisten (3.98) */
.cb-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cb-pack { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.cb-pack-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.cb-pack-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cb-pack-l li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cb-pack-l li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cb-pack-l li b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cb-pack-l li.cb-short b { color: var(--orange-text, var(--orange)); }
.cb-pk-row { display: grid; grid-template-columns: 1fr 76px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.cb-pack-l .cb-ico { flex: none; }

/* Merkliste (3.99) */
.ds-add { display: flex; gap: 8px; margin-bottom: 10px; }
.ds-add .form-input { flex: 1; min-width: 0; }
.ds-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ds-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.ds-row:last-child { border-bottom: 0; }
.ds-chk { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong, var(--text-muted)); background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.ds-chk svg { width: 14px; height: 14px; }
.ds-row.done .ds-chk { background: var(--green); border-color: var(--green); }
.ds-row.done .ds-name { text-decoration: line-through; color: var(--text-muted); }
.ds-t { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.ds-name { overflow-wrap: anywhere; font-size: 14px; }
.ds-sub { font-size: 12px; color: var(--text-muted); }
.ds-prio { border: 0; border-radius: 99px; padding: 1px 9px; font-size: 11.5px; font-weight: 600; cursor: pointer; }
.ds-prio.need { background: var(--orange-soft, #fdecd2); color: var(--orange-text, #a05a00); }
.ds-prio.nice { background: var(--surface3); color: var(--text-muted); }
.ds-link { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent-text, var(--accent)); text-decoration: none; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); max-width: 120px; }
.ds-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-link svg { width: 13px; height: 13px; flex: none; }
.ds-del { flex: none; border: 0; background: transparent; color: var(--text-muted); font-size: 18px; cursor: pointer; width: 26px; height: 26px; border-radius: 8px; }
.ds-del:hover { background: var(--surface3); color: var(--red); }
.ds-done { margin-top: 10px; }
.ds-done summary { cursor: pointer; font-size: 13px; color: var(--text-muted); padding: 4px 0; }
.ds-more { margin-top: 6px; }
.cb-shop { color: var(--text-muted); }
.ds-add { position: sticky; top: 0; z-index: 2; background: var(--surface); padding-bottom: 8px; }

/* Dateien (3.100) */
.fl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.fl-crumbs { margin: 4px 0 14px; font-size: 14px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fl-crumbs a { color: var(--accent-text, var(--accent)); text-decoration: none; font-weight: 600; }
.fl-crumb-cur { color: var(--text); font-weight: 600; }
.fl-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fl-folder { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; }
.fl-folder:hover, .fl-folder:focus-visible { border-color: var(--accent); outline: none; }
.fl-folder-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text, var(--accent)); }
.fl-folder-ic svg { width: 20px; height: 20px; }
.fl-folder-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fl-folder-t strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-folder-t small, .fl-file-t small { color: var(--text-muted); font-size: 12.5px; }
.fl-files { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.fl-file { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--border); }
.fl-file:last-child { border-bottom: 0; }
.fl-file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.fl-file-main:hover { background: var(--surface2, var(--surface3)); }
.fl-ext { flex: none; min-width: 42px; height: 34px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.fl-file-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fl-file-t strong { overflow-wrap: anywhere; font-size: 14.5px; }
.fl-note { font-style: italic; }
.fl-file-a { display: flex; flex: none; padding-right: 8px; }
.fl-drop { position: fixed; inset: 0; z-index: 1400; background: color-mix(in srgb, var(--accent) 16%, rgba(0,0,0,.35)); display: grid; place-items: center; pointer-events: none; }
.fl-drop > div { padding: 22px 34px; border-radius: 20px; background: var(--surface); border: 2px dashed var(--accent); font-size: 18px; font-weight: 700; }
.fl-drop[hidden] { display: none; }
.fl-prog { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1500; width: min(420px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 30px rgba(0,0,0,.25); border: 1px solid var(--border); }
.fl-prog-t { font-size: 13px; margin-bottom: 8px; overflow-wrap: anywhere; }
.fl-prog-b { height: 6px; border-radius: 99px; background: var(--surface3); overflow: hidden; }
.fl-prog-b i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.fl-prev { min-height: 120px; max-height: 70vh; overflow: auto; display: grid; place-items: center; }
.fl-prev img, .fl-prev video { max-width: 100%; max-height: 66vh; border-radius: 10px; }
.fl-prev iframe { width: 100%; height: 66vh; border: 0; border-radius: 10px; background: #fff; }
.fl-pre { width: 100%; margin: 0; padding: 12px; border-radius: 10px; background: var(--surface3); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; align-self: start; }
@media (max-width:520px){.fl-folders{grid-template-columns:1fr 1fr}.fl-folder{padding:10px}.fl-folder-ic{display:none}}

/* Kabel-Etikett-Fenster (3.101) */
.lp-cbx { display: flex; flex-direction: column; gap: 12px; }
.lp-cbx-hint { font-size: 12.5px; color: var(--text-muted); text-align: center; margin-top: -4px; }
.lp-cbx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-cbx-row .form-group { margin: 0; }
.lp-tools { display: flex; flex-direction: column; gap: 8px; }
.lp-tool { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lp-tool-n { width: 40px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.lp-seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.lp-seg .btn { padding: 6px 10px; white-space: nowrap; }
.lp-seg .btn .icon { width: 14px; height: 14px; }
.lp-more-d > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); padding: 4px 0 10px; }
.lp-preview.lp-dragging, .lp-preview.lp-dragging canvas { cursor: grabbing; }
.lp-preview.lp-cable canvas { cursor: grab; }
@media (max-width: 560px) { .lp-cbx-row { grid-template-columns: 1fr; } }

.ci-grp { grid-column: 1 / -1; font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin: 8px 0 -2px; }
.ci-q { margin-bottom: 8px; }

/* Dateien: Ansichten, Fortschritt, Vorschau (3.102) */
.fl-actions .btn { min-height: 40px; min-width: 128px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; font-size: 14px; box-sizing: border-box; }
.fl-actions .btn .icon { width: 17px; height: 17px; }
.fl-grid { display: grid; gap: 12px; margin-bottom: 18px; }
.fl-grid.big { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.fl-grid.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fl-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.fl-card.fl-folder { cursor: pointer; }
.fl-card.fl-folder:hover, .fl-card.fl-folder:focus-visible, .fl-dropt { border-color: var(--accent); outline: none; box-shadow: 0 0 0 2px var(--accent-soft); }
.fl-card-thb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.fl-card-th { display: grid; place-items: center; width: 100%; background: var(--surface3, var(--surface2)) center / cover no-repeat; position: relative; }
.fl-grid.big .fl-card-th { height: 230px; } .fl-grid.big .fl-folder .fl-card-th { height: 130px; } .fl-grid.big .fl-folder .fl-card-th svg { width: 52px; height: 52px; } .fl-grid.big .fl-card-b strong { font-size: 15.5px; } .fl-grid.grid .fl-card-th { height: 104px; }
.fl-card-th.has .fl-ext { display: none; }
.fl-card-th .fl-ext { min-width: 52px; height: 40px; font-size: 13px; }
.fl-folder-th { background: var(--accent-soft); color: var(--accent-text, var(--accent)); }
.fl-folder-th svg { width: 38px; height: 38px; }
.fl-card-b { display: flex; flex-direction: column; gap: 1px; padding: 9px 12px 10px; min-width: 0; }
.fl-card-b strong { font-size: 14px; overflow-wrap: anywhere; line-height: 1.3; }
.fl-card-b small { color: var(--text-muted); font-size: 12px; }
.fl-card-a { position: absolute; top: 6px; right: 6px; display: flex; gap: 2px; padding: 2px; border-radius: 10px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); }
.fl-th-s { flex: none; width: 44px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: center / cover no-repeat; overflow: hidden; }
.fl-th-s.has .fl-ext { display: none; }
.fl-th-s .fl-ext { min-width: 0; width: 100%; height: 100%; border-radius: 0; font-size: 10.5px; }
.fl-row { border-radius: 12px; }
.fl-folder-ic.sm { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.fl-folder-ic.sm svg { width: 16px; height: 16px; }
.fl-tablewrap { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow-x: auto; }
.fl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fl-table th { text-align: left; font-size: 12.5px; color: var(--text-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.fl-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.fl-table tr:last-child td { border-bottom: 0; }
.fl-table tr.fl-folder { cursor: pointer; } .fl-table tbody tr:hover { background: var(--surface2, var(--surface3)); }
.fl-tn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; white-space: normal; }
.fl-tn span:last-child { display: flex; flex-direction: column; }
.fl-tn small { color: var(--text-muted); font-size: 12px; }
.fl-ta { text-align: right; width: 1%; }
.fl-dragging { opacity: .45; }
tr.fl-dropt, .fl-folder.fl-dropt, .fl-crumbs a.fl-dropt { background: var(--accent-soft); outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.fl-tr { position: fixed; right: 16px; bottom: 16px; z-index: 1500; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.fl-tr .fl-prog { pointer-events: auto; }
.fl-prog { position: static; transform: none; width: auto; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: 0 8px 30px rgba(0,0,0,.25); border: 1px solid var(--border); }
.fl-prog-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 8px; }
.fl-prog-t { font-size: 13.5px; overflow-wrap: anywhere; }
.fl-prog-m { font-size: 12.5px; margin-top: 7px; } .fl-prog-m2 { font-size: 12px; color: var(--text-muted); min-height: 16px; }
.fl-pages { display: flex; flex-direction: column; gap: 10px; align-items: center; width: 100%; }
.fl-pages canvas { max-width: 100%; border-radius: 4px; box-shadow: 0 1px 6px rgba(0,0,0,.2); background: #fff; }
.fl-prev { align-items: start; }
.fl-prev img { cursor: zoom-in; } .fl-prev.zoomed { display: block; } .fl-prev.zoomed img { max-width: none; max-height: none; cursor: zoom-out; }
.fl-pv-foot { align-items: center; gap: 8px; }
.fl-pv-n { font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 520px) { .fl-grid.big { grid-template-columns: 1fr 1fr; } .fl-actions .btn { min-width: 0; flex: 1; } .fl-tr { right: 16px; left: 16px; width: auto; } }

.fl-grid.fl-gf { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.fl-card-b { text-align: left; align-items: flex-start; }
.fl-gf .fl-card.fl-folder { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; }
.fl-gf .fl-card.fl-folder .fl-card-th { width: 42px; height: 42px !important; border-radius: 10px; flex: none; }
.fl-gf .fl-card.fl-folder .fl-card-th svg { width: 20px; height: 20px; }
.fl-gf .fl-card.fl-folder .fl-card-b { padding: 0; flex: 1; min-width: 0; }
.fl-gf .fl-card.fl-folder .fl-card-a { position: static; background: none; backdrop-filter: none; padding: 0; }

.fl-th.txt { background: #fff; align-items: start; justify-items: start; color: #333; }
.fl-th.txt pre { margin: 0; padding: 8px 10px; font: 10px/1.35 ui-monospace, Menlo, Consolas, monospace; white-space: pre-wrap; overflow: hidden; overflow-wrap: anywhere; width: 100%; height: 100%; text-align: left; box-sizing: border-box; }

/* 3.105 Dateien: Zurück, Sortierung, Listen, Teilen */
.fl-back { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px 4px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); margin-right: 6px; }
.fl-back svg { width: 16px; height: 16px; }
.fl-sortc { display: inline-flex; gap: 6px; align-items: center; } .fl-sortc .form-select { width: auto; min-width: 120px; padding-top: 7px; padding-bottom: 7px; }
.fl-frow { cursor: pointer; } .fl-frow:hover, .fl-frow:focus-visible { background: var(--surface2, var(--surface3)); outline: none; } .fl-frow .fl-file-main { cursor: pointer; pointer-events: none; }
.fl-frow.fl-dropt { border-radius: 0; }
.fl-table tr.fl-trf { cursor: pointer; }
.fl-sh { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; font-weight: 600; } .fl-sh.on { color: var(--text); } .fl-sh span { font-size: 9px; }
.fl-shared { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--accent-text, var(--accent)); } .fl-shared svg { width: 13px; height: 13px; }
.fl-card, .fl-card-b, .fl-card-b strong, .fl-card-b small { text-align: left; } .fl-card-b { align-items: flex-start; }
.fl-grid.big .fl-card.fl-folder { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
.fl-grid.big .fl-card.fl-folder .fl-card-b { padding: 9px 12px 10px; }
.fl-share-b { display: flex; flex-direction: column; gap: 6px; } .fl-share-r, .fl-share-n { display: flex; gap: 6px; align-items: center; } .fl-share-r .form-input { flex: 1; min-width: 0; font-size: 12.5px; } .fl-share-n .form-select { flex: 1; }
.fl-share-i { color: var(--text-muted); font-size: 12px; }
tr.fl-trf.fl-dropt { background: var(--accent-soft); }

.fl-spacebar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; } .fl-spacebar small { color: var(--text-muted); font-size: 13px; } .fl-spacebar .segmented-item { display: inline-flex; align-items: center; gap: 6px; } .fl-spacebar svg { width: 15px; height: 15px; }

/* 3.106 Auswahl */
.fl-selbar { position: sticky; top: 8px; z-index: 20; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 10px; border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); box-shadow: 0 6px 20px rgba(0,0,0,.12); } .fl-selbar[hidden] { display: none; } .fl-selbar strong { margin-right: auto; font-size: 14px; }
.fl-sel { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: none; cursor: pointer; } .fl-sel input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; margin: 0; }
.fl-card { position: relative; } .fl-card > .fl-sel { position: absolute; top: 8px; left: 8px; z-index: 3; background: var(--surface); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.fl-file > .fl-sel { margin-left: 8px; } .fl-tc { width: 1%; padding-right: 0 !important; }
.fl-picked { background: var(--accent-soft) !important; } .fl-card.fl-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.fl-gf .fl-card.fl-folder > .fl-sel { position: static; box-shadow: none; background: none; }
.fl-printfr { position: fixed; right: 0; bottom: 0; width: 1px; height: 1px; border: 0; opacity: 0; pointer-events: none; }
.fl-pv-foot [hidden] { display: none !important; }

/* 3.106 Kacheln: nichts mehr abschneiden; Liste: große Vorschaubilder */
.fl-grid.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.fl-grid.grid .fl-card-a, .fl-grid.fl-gf .fl-card-a { position: static; background: none; backdrop-filter: none; padding: 0 8px 8px; justify-content: flex-start; flex-wrap: wrap; }
.fl-grid.fl-gf { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.fl-gf .fl-card.fl-folder { flex-wrap: wrap; row-gap: 2px; }
.fl-gf .fl-card.fl-folder .fl-card-a { flex-basis: 100%; padding: 0 0 0 0; margin-top: 2px; }
.fl-card-b strong { white-space: normal; overflow-wrap: anywhere; } .fl-card-b small { overflow-wrap: anywhere; }
.fl-th-l { width: 132px; height: 96px; border-radius: 10px; }
.fl-th-l .fl-ext { font-size: 14px; }
.fl-files .fl-file-main { padding: 10px 14px; gap: 16px; } .fl-files .fl-frow .fl-folder-ic { width: 54px; height: 54px; border-radius: 12px; } .fl-files .fl-frow .fl-folder-ic svg { width: 26px; height: 26px; }
.fl-on { color: var(--accent-text, var(--accent)) !important; }
.fl-table .fl-th-s { width: 32px; height: 26px; border-radius: 6px; } .fl-table td { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 520px) { .fl-th-l { width: 96px; height: 72px; } }

.fl-quota { display: inline-flex; align-items: center; gap: 8px; } .fl-quota-bar { width: 90px; height: 6px; border-radius: 99px; background: var(--surface3, var(--border)); overflow: hidden; display: inline-block; } .fl-quota-bar span { display: block; height: 100%; background: var(--accent); } .fl-quota.warn { color: var(--danger, #d93025); } .fl-quota.warn .fl-quota-bar span { background: var(--danger, #d93025); }
.fl-qrow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; } .fl-qrow:last-child { border-bottom: 0; } .fl-qrow .q-n { flex: 1; min-width: 120px; font-weight: 600; } .fl-qrow .q-u { color: var(--text-muted); font-size: 13px; min-width: 120px; } .fl-qrow input { width: 90px; }
.fl-pdfph { display: block; width: 100%; max-width: 100%; background: #fff; opacity: .85; filter: blur(.4px); }

/* Belegungsplan */
.occ-head { display:flex; flex-wrap:nowrap; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.occ-status { font-size:13px; color:var(--text-muted); margin-top:3px; }
.occ-warn { color:var(--red-text); font-weight:600; }
.occ-chips { display:flex; gap:4px; background:var(--fill); padding:3px; border-radius:9px; }
.occ-chip { white-space:nowrap; border:0; background:transparent; color:var(--text-muted); font:inherit; font-size:12px; padding:4px 10px; border-radius:7px; cursor:pointer; }
.occ-chip.on { background:var(--surface); color:var(--text); box-shadow:0 1px 2px rgba(0,0,0,.15); }
.occ-plot { position:relative; }
.occ-lanes { position:relative; background:repeating-linear-gradient(90deg, transparent 0, transparent calc(100%/6 - 1px), rgba(128,128,128,.12) calc(100%/6 - 1px), rgba(128,128,128,.12) calc(100%/6)); border-radius:8px; }
.occ-bar { position:absolute; height:22px; border-radius:6px; padding:0 8px; display:flex; align-items:center; font-size:12px; font-weight:500; overflow:hidden; white-space:nowrap; text-decoration:none; box-sizing:border-box; min-width:6px; }
.occ-bar { overflow:visible; }
.occ-bar span { overflow:hidden; text-overflow:ellipsis; }
.occ-short { padding:0; }
.occ-bar em { position:absolute; left:calc(100% + 5px); font-style:normal; color:var(--text-dim); font-size:12px; font-weight:500; pointer-events:none; max-width:150px; overflow:hidden; text-overflow:ellipsis; }
.occ-project { background:var(--accent-soft); color:var(--accent-text); box-shadow:inset 3px 0 0 var(--accent); }
.occ-reservation { background:var(--orange-soft); color:var(--orange-text); box-shadow:inset 3px 0 0 var(--orange); }
.occ-out { background:var(--green-soft); color:var(--green-text); box-shadow:inset 3px 0 0 var(--green); }
.occ-conflict { outline:2px solid var(--red); outline-offset:-2px; }
a.occ-bar:hover { filter:brightness(1.12); }
.occ-today { position:absolute; top:-4px; bottom:-4px; width:2px; background:var(--red); border-radius:1px; pointer-events:none; }
.occ-none { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:12px; color:var(--text-muted); }
.occ-axis { position:relative; height:18px; margin-top:4px; }
.occ-tick { position:absolute; font-size:11px; color:var(--text-muted); transform:translateX(-50%); white-space:nowrap; }
.occ-empty { font-size:12px; color:var(--text-muted); margin:-8px 2px 20px; }
@media (max-width:600px) { .occ-chip { padding:4px 8px; } }

/* Pläne (Beta) in der Projektseite */
.pj-beta { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 2px 7px; border-radius: 99px; background: var(--orange-soft); color: var(--orange-text); vertical-align: middle; margin-left: 6px; }
.pj-plan { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding: 4px 0; }
.pj-plan:first-child { border-top: 0; }
.pj-plan-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 4px; color: inherit; text-decoration: none; flex-wrap: wrap; }
.pj-plan-main:hover .pj-plan-name { color: var(--accent-text); }
.pj-plan-kind { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--fill); }
.pj-plan-name { font-weight: 600; }

.pj-row-icon.has-img { width: 44px; height: 44px; border-radius: 8px; background: #fff; border: 1px solid var(--border); overflow: hidden; }
.pj-row-icon.has-img img { width: 100%; height: 100%; object-fit: contain; }

.tl-grid { display:flex; flex-direction:column; gap:6px; overflow-x:auto; }
.tl-row { display:flex; gap:10px; align-items:flex-start; }
.tl-name { flex:0 0 140px; font-size:13px; font-weight:600; line-height:1.25; padding-top:4px; overflow:hidden; text-overflow:ellipsis; }
.tl-name small { display:block; font-weight:400; color:var(--text-muted); font-size:11px; }
.tl-plot { position:relative; flex:1; min-width:260px; background:var(--fill); border-radius:8px; }
@media (max-width:600px) { .tl-name { flex-basis:96px; font-size:12px; } }

/* Projektseite: Reiter (3.119) */
.pj-tabbar { display:flex; gap:4px; background:var(--fill); padding:3px; border-radius:11px; margin-bottom:16px; overflow-x:auto; position:sticky; top:0; z-index:5; }
.pj-tab { border:0; background:transparent; color:var(--text-muted); font:inherit; font-size:14px; padding:8px 14px; border-radius:9px; cursor:pointer; white-space:nowrap; }
.pj-tab.on { background:var(--surface); color:var(--text); box-shadow:0 1px 2px rgba(0,0,0,.15); font-weight:600; }
.pj-tab-n { font-size:11.5px; color:var(--text-muted); background:var(--fill); border-radius:99px; padding:0 6px; margin-left:2px; }
.pj-panel { display:flex; flex-direction:column; gap:16px; }
.pj-panel[hidden] { display:none; }
.pj-next { border-color:var(--accent); background:linear-gradient(135deg, var(--accent-soft), var(--surface) 80%); }
.pj-next-t { font-size:18px; font-weight:700; }
.pj-ov-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(300px, 1fr)); gap:16px; }
.pj-ph-row { display:flex; gap:12px; padding:6px 0; font-size:14px; border-bottom:1px solid var(--border); }
.pj-ph-row:last-child { border-bottom:0; }
.pj-ph-l { flex:0 0 110px; color:var(--text-muted); }
.pj-ph-sep { font-size:12px; color:var(--text-muted); margin:12px 0 2px; }
.pj-phase { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:6px 0; }
.pj-phase-l { flex:0 0 70px; font-weight:600; }
.pj-phase .form-input { width:auto; }
.pj-phase-bis { color:var(--text-muted); font-size:13px; }
.pj-chips { display:flex; gap:6px; flex-wrap:wrap; align-items:center; margin-bottom:10px; }
.pj-row.pj-sel { background:var(--accent-soft); border-radius:10px; }
.pj-row > input[type=checkbox] { flex:none; width:18px; height:18px; }
.pj-selbar { position:sticky; bottom:12px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:12px; padding:10px 14px; background:var(--surface); border:1px solid var(--border-hover); border-radius:12px; box-shadow:0 6px 24px rgba(0,0,0,.18); }
.pj-selbar strong { margin-right:auto; }

/* Projektseite als Dashboard (3.123) */
.pj-next { display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; padding:14px 18px; margin-bottom:16px; }
.pj-next-t { font-size:16px; }
.pj-dash { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr); gap:16px; align-items:start; }
.pj-col { display:flex; flex-direction:column; gap:16px; min-width:0; }
.pj-col .pj-card { margin-bottom:0; }
.pj-count { font-size:12px; font-weight:600; color:var(--text-muted); background:var(--fill); border-radius:99px; padding:1px 8px; margin-left:4px; vertical-align:middle; }
.pj-sub { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:18px 0 6px; font-size:13px; font-weight:600; color:var(--text-muted); }
.pj-card.is-empty { padding-top:12px; padding-bottom:12px; }
.pj-card.is-empty .pj-card-head { margin-bottom:0; }
.pj-card.is-empty .pj-drop { display:none; }
.pj-dash .pj-phase-l { flex:0 0 100%; font-size:12.5px; color:var(--text-muted); margin-bottom:-2px; }
.pj-dash .pj-phase { padding:4px 0 8px; }
.pj-dash .pj-phase .form-input { padding-left:8px; padding-right:8px; min-width:0; }
@media (max-width:1000px) { .pj-dash { grid-template-columns:minmax(0,1fr); } }

.pj-dash .pj-phase { display:block; padding:2px 0 8px; }
.pj-dash .pj-phase-l { display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:600; color:var(--text-muted); margin:0; }
.pj-dash .pj-phase-l .btn { font-weight:400; }
.pj-phase-in { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr); gap:6px; }
.pj-phase-in .form-input { width:100%; padding:7px 8px; font-size:13.5px; }

/* Zeitplan über die volle Breite (3.124) */
.pj-timeline { margin-bottom:16px; }
.pj-days { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:12px; align-items:start; }
.pj-timeline .pj-day { margin:0; }
.pj-timeline .pj-day.is-today .pj-day-head { color:var(--accent-text); }
.pj-event.pj-k-setup { border-left-color:var(--orange-text, #d97706); }
.pj-event.pj-k-teardown { border-left-color:var(--text-muted); }

/* Dubletten-Hinweis beim Anlegen (3.125) */
.dup-box { margin-top:8px; padding:10px 12px; border:1px solid var(--orange-text, #d97706); background:var(--surface2); border-radius:var(--radius-sm); display:flex; flex-direction:column; gap:6px; }
.dup-box[hidden] { display:none; }
.dup-join { flex-direction:row; align-items:center; justify-content:space-between; gap:10px; border-color:var(--accent); background:var(--accent-soft); }
.dup-t { font-size:13px; font-weight:600; }
.dup-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* Projekt-Module (3.126) */
.pj-mod-foot { display:flex; justify-content:flex-end; margin-top:10px; }
.pj-mod-foot .btn { color:var(--text-muted); font-weight:400; font-size:12.5px; }
.pj-mod-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:10px; }
.pj-mod-tile { display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; border:1px dashed var(--border-hover, var(--border)); border-radius:var(--radius-sm); background:var(--surface2); color:inherit; cursor:pointer; font:inherit; transition:background var(--transition), border-color var(--transition); }
@media (hover:hover) { .pj-mod-tile:hover { background:var(--accent-soft); border-color:var(--accent); } }
.pj-mod-ic { flex:none; width:34px; height:34px; border-radius:9px; background:var(--fill); display:grid; place-items:center; }
.pj-mod-tx { display:flex; flex-direction:column; gap:2px; min-width:0; flex:1; }
.pj-mod-tx span:not(.pj-beta) { font-size:12.5px; color:var(--text-muted); }
.pj-mod-plus { flex:none; font-size:20px; color:var(--accent-text); }
#pj-addmods.flash { outline:2px solid var(--accent); }
#pj-addmods { margin-top:16px; }

.pj-dash.no-eq { grid-template-columns:minmax(0,1fr); }
.pj-dash.no-eq .pj-col:not(:last-child) { display:none; }
.pj-dash.no-eq .pj-col { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); align-items:start; }
.pj-modrow { display:flex; align-items:center; gap:12px; padding:8px 4px; cursor:pointer; border-bottom:1px solid var(--border); }
.pj-modrow:last-child { border-bottom:0; }
.pj-modrow input { flex:none; width:18px; height:18px; }
.pj-modrow.is-lock { opacity:.55; cursor:default; }

/* Modul-Galerie (3.128) */
.mk-modal { max-width:940px !important; width:calc(100vw - 24px); }
.mk-bar { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.mk-bar .form-input { max-width:260px; }
.mk-cats { display:flex; gap:6px; flex-wrap:wrap; }
.mk-cat { border:0; background:var(--fill); color:var(--text-muted); font:inherit; font-size:13.5px; padding:6px 13px; border-radius:99px; cursor:pointer; }
.mk-cat.on { background:var(--accent); color:var(--on-accent, #fff); font-weight:600; }
.mk-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:14px; }
.mk-card { display:flex; flex-direction:column; gap:12px; padding:16px; border:1px solid var(--border); border-radius:16px; background:var(--surface); transition:border-color var(--transition), box-shadow var(--transition); }
@media (hover:hover) { .mk-card:hover { border-color:var(--border-hover, var(--border)); box-shadow:0 6px 20px rgba(0,0,0,.08); } }
.mk-card.is-on { background:var(--surface2); }
.mk-head { display:flex; gap:12px; align-items:flex-start; }
.mk-ic { flex:none; width:46px; height:46px; border-radius:14px; display:grid; place-items:center; color:#fff; background:linear-gradient(145deg, var(--c), color-mix(in srgb, var(--c) 68%, #000)); box-shadow:0 3px 10px color-mix(in srgb, var(--c) 35%, transparent); }
.mk-ic svg { width:24px; height:24px; }
.mk-ic.sm { width:38px; height:38px; border-radius:11px; }
.mk-ic.sm svg { width:20px; height:20px; }
.mk-name { font-weight:700; font-size:15px; }
.mk-sub { font-size:13px; color:var(--text-muted); margin-top:2px; line-height:1.35; }
.mk-feat { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:4px; font-size:13px; flex:1; }
.mk-feat li { padding-left:18px; position:relative; }
.mk-feat li::before { content:'✓'; position:absolute; left:0; color:var(--accent-text); font-weight:700; }
.mk-foot { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.mk-state { font-size:13px; font-weight:600; color:var(--success-text, #1a8f3c); margin-right:auto; }
.mk-req { font-size:12px; color:var(--text-muted); }
.mk-bundle { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; padding:18px 20px; margin-bottom:14px; border-radius:16px; color:#fff; background:linear-gradient(135deg, #ff375f, #bf5af2); }
.mk-bundle .btn { background:#fff; color:#1d1d1f; border-color:transparent; }
.mk-bname { font-size:17px; font-weight:700; }
.mk-bsub { font-size:13.5px; opacity:.92; max-width:520px; margin-top:2px; }
.pj-mini { display:flex; align-items:center; gap:12px; text-align:left; padding:12px 14px; border:1px solid var(--border); border-radius:14px; background:var(--surface2); color:inherit; cursor:pointer; font:inherit; }
@media (hover:hover) { .pj-mini:hover { border-color:var(--accent); background:var(--accent-soft); } }
.pj-mini .mk-sub { font-size:12.5px; }

.mk-card[data-det] { cursor:pointer; }
.mk-card:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.mk-more { font-size:12.5px; color:var(--accent-text); margin-right:auto; }
.mk-card.is-on .mk-more { display:none; }
.mk-ic.lg { width:64px; height:64px; border-radius:19px; }
.mk-ic.lg svg { width:32px; height:32px; }
.mk-dhead { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.mk-dname { font-size:22px; font-weight:700; }
.mk-dcat { font-size:12.5px; color:var(--text-muted); margin-top:4px; }
.mk-dact { display:flex; align-items:center; }
.mk-about { font-size:15px; line-height:1.55; margin:0 0 18px; max-width:68ch; }
.mk-cols { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:20px; }
.mk-h { font-size:13px; font-weight:700; color:var(--text-muted); margin-bottom:8px; }
.mk-tips li::before { content:'i'; font-style:italic; font-family:serif; }
.mk-bar[hidden] { display:none; }

.pj-addmods { margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.pj-addmods[hidden] { display: none; }

.detail-type-icon img { cursor: zoom-in; }
.img-zoom { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.img-zoom img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; background: #fff; }
.img-zoom-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }

/* Zeiterfassung */
.tt-timer, .tt-start { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); margin-bottom: 12px; }
.tt-start .form-select { flex: 1; max-width: 220px; }
.tt-big { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.tt-sum { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; font-size: 14px; }
.tt-chip { background: var(--surface2); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.tt-row { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: 'time dur act' 'sub sub sub'; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.tt-time { grid-area: time; } .tt-main { grid-area: sub; } .tt-dur { grid-area: dur; } .tt-act { grid-area: act; }
.tt-time { flex-direction: row !important; gap: 10px; align-items: baseline; }
.tt-start .form-select, .tt-timer .form-select { background-color: var(--surface); }
.tt-row:first-child { border-top: 0; }
.tt-time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.tt-time span { font-size: 12px; color: var(--text-muted); }
.tt-sub { color: var(--text-muted); font-size: 13px; overflow-wrap: anywhere; }
.tt-dur { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-live { color: var(--accent, #0a84ff); }
.tt-act { display: flex; gap: 2px; justify-content: flex-end; min-width: 8px; }
.tt-day { display: flex; justify-content: space-between; font-weight: 600; margin: 14px 0 2px; font-size: 14px; }
.tt-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tt-tbl th, .tt-tbl td { padding: 8px 6px; border-top: 1px solid var(--border); text-align: left; }
.tt-tbl th { font-weight: 600; font-size: 12px; color: var(--text-muted); border-top: 0; }
.tt-tbl td.n, .tt-tbl th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-time b, .tt-time span { white-space: nowrap; }

.pj-doc-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.pj-doc-row:first-child { border-top: 0; }
.pj-doc-row:hover b { color: var(--accent-text); }
.pj-step { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.pj-step b { min-width: 22px; text-align: center; }
.pj-pick-row:has(.pj-step) { cursor: default; }

/* ── Projekt-Dashboard ── */
.pj-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: -6px 0 16px; }
.pj-kpi:empty { display: none; }
.pj-kpi-c { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.pj-kpi-t { font-size: 12px; color: var(--text-dim); }
.pj-kpi-v { font-size: 22px; font-weight: 700; line-height: 1.2; margin-top: 2px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-kpi-s { font-size: 12px; color: var(--text-dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-dash { grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); }
.pj-dash.no-eq { grid-template-columns: minmax(0, 1fr); }
.pj-dash > .pj-col:last-child { display: block; columns: 2 320px; column-gap: 16px; }
.pj-dash > .pj-col:last-child > .pj-card { break-inside: avoid; margin: 0 0 16px; display: block; }
.pj-dash > .pj-col:last-child > .pj-card[hidden] { display: none; }
.pj-hide { display: none !important; }
.pj-more { margin-top: 6px; }
.pj-mod-foot { opacity: 0; transition: opacity .15s; }
.pj-card:hover .pj-mod-foot, .pj-card:focus-within .pj-mod-foot { opacity: 1; }
@media (max-width: 900px) { .pj-dash { grid-template-columns: minmax(0, 1fr); } .pj-mod-foot { opacity: 1; } }

/* ── Projektseite als Dashboard: Farben und Karten wie im übrigen Programm, Kacheln lückenlos in Spalten ── */
.pj-hero .pj-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0 0; }
.pj-hero .pj-kpi-c { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; }
.pj-hero .pj-kpi-v { font-size: 24px; font-weight: 700; }
.pj-dash, .pj-dash.no-eq { display: flex; gap: 16px; align-items: flex-start; }
.pj-dash > .pj-col, .pj-dash > .pj-col:last-child { display: contents; columns: auto; }
.pj-mcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.pj-dash .pj-card, .pj-dash > .pj-col:last-child > .pj-card { margin: 0; min-width: 0; break-inside: auto; }
.pj-dash .pj-card[hidden] { display: none !important; }
.pj-today { background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius-lg, 18px); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.pj-today-h { font-size: 13px; color: var(--text-dim); }
.pj-today-m { font-size: 21px; line-height: 1.25; font-weight: 700; color: var(--text); }
.pj-today-s { font-size: 13px; color: var(--text-dim); }
.pj-dash .pj-card .pj-card-head { flex-wrap: wrap; gap: 8px; }
.pj-dash #card-plan .pj-days { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 720px) {
  .pj-hero-top { flex-direction: column; align-items: stretch; }
  .pj-hero-top > div:first-child { flex: none !important; }
  .pj-hero-actions { justify-content: flex-start; }
  .pj-hero .pj-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-hero .pj-kpi-v { font-size: 20px; }
}
@media (max-width: 720px) { .pj-hero .pj-kpi-v, .pj-hero .pj-kpi-s { white-space: normal; overflow: visible; } }

/* ── Projektseite: festes Raster, jede Zeile füllt die Breite und ist gleich hoch (3.186) ── */
.pj-dash, .pj-dash.no-eq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pj-dash > .pj-col, .pj-dash.no-eq > .pj-col, .pj-dash.no-eq > .pj-col:not(:last-child) { display: contents !important; }
.pj-dash .pj-card, .pj-dash > .pj-col > .pj-card, .pj-dash > .pj-col:last-child > .pj-card { grid-column: span var(--sp, 4); margin: 0; min-width: 0; display: flex; flex-direction: column; break-inside: auto; overflow-wrap: anywhere; }
.pj-dash .pj-card[hidden], .pj-dash > .pj-col > .pj-card[hidden] { display: none !important; }
.pj-dash .pj-card .pj-mod-foot { margin-top: auto; padding-top: 12px; }
.pj-dash #card-today, .pj-dash > .pj-today { grid-column: 1 / -1; order: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; padding: 14px 20px; }
.pj-today-m { font-size: 19px; }
.pj-today-s { margin-left: auto; }
.pj-hero-meta { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 6px; }
.pj-hero-meta .pj-hero-date { margin: 0; }
.pj-hero .pj-kpi-v { white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.pj-hero .pj-kpi-s { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.pj-dash #card-plan .pj-days { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); align-items: start; }
.pj-dash .pj-event { flex-wrap: wrap; gap: 4px 12px; }
.pj-dash .pj-event > div:last-child { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.pj-dash .pj-event-time { flex: 0 0 auto; min-width: 56px; }
.pj-dash .pj-card-head { align-items: flex-start; }
.pj-dash .pj-card-head > div { max-width: 100%; }
@media (max-width: 640px) { .pj-today-s { margin-left: 0; } }

/* Navigation in Planer, Beschallung, Einmessen (3.187) */
.wn { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; }
.wn-b { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; min-width: 0; }
.wn-b:hover, .wn-b.on { background: var(--fill); }
.wn-b svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wn-home { padding: 0 7px; color: var(--text-muted); }
.wn-proj { color: var(--accent-text, var(--accent)); }
.wn-proj span { overflow: hidden; text-overflow: ellipsis; max-width: 18ch; }
.wn-go { font-weight: 600; background: var(--fill); }
.wn-go svg { width: 14px; height: 14px; opacity: .7; }
.wn-menu { position: fixed; z-index: 200; min-width: 260px; max-width: min(340px, 94vw); max-height: 80vh; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.wn-h { font-size: 11.5px; font-weight: 600; color: var(--text-muted); padding: 8px 10px 3px; }
.wn-i { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.wn-i small { font-size: 11.5px; color: var(--text-muted); }
.wn-i:hover { background: var(--fill); }
.wn-i.cur { background: var(--accent-soft); color: var(--accent-text, var(--accent)); cursor: default; }
@media (max-width: 720px) { .wn-proj span { max-width: 9ch; } }

/* Projekt-Dashboard auf dem Handy */
.pj-jump { display: none; }
@media (max-width: 640px) {
  .pj-jump { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 2px 16px 6px; scrollbar-width: none; position: sticky; top: 0; z-index: 20; background: var(--bg); -webkit-overflow-scrolling: touch; }
  .pj-jump::-webkit-scrollbar { display: none; }
  .pj-jump a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-hover); color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; white-space: nowrap; }
  .pj-card { scroll-margin-top: 56px; }
  .pj-row { flex-wrap: wrap; row-gap: 4px; padding: 10px; }
  .pj-row > .badge { margin-left: 62px; }
  .pj-row input[type=checkbox] { width: 20px; height: 20px; }
  .pj-card .btn-sm, .pj-card .occ-chip { min-height: 38px; }
  .pj-plan { flex-wrap: wrap; row-gap: 4px; }
  .pj-plan .btn, .pj-plan button { min-height: 38px; min-width: 44px; }
  .pj-mod-foot .btn { min-height: 40px; }
  .pj-selbar { position: sticky; bottom: 76px; z-index: 15; }
  .pj-stat .big, .pj-stat strong { overflow-wrap: anywhere; }
  .pj-hero-top .btn { flex: 1 1 auto; }
  #pj-dash { padding-bottom: 90px; }
}

/* Projektseite nutzt die ganze Breite (3.215) */
#pj-main.main-content { max-width: none; }

/* Einzelne Projekt-Karten auf der Übersicht */
.dash-proj { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.dash-proj-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-proj-when { font-size: 13px; color: var(--text-muted); }
.dash-proj-desc { font-size: 13px; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-proj-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dash-proj-nums > div { background: var(--fill); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; }
.dash-proj-nums b { font-size: 22px; line-height: 1.1; }
.dash-proj-nums span { font-size: 12px; color: var(--text-muted); }
.dash-proj-links { display: flex; gap: 8px; margin-top: auto; }
.dash-unpin { font-size: 20px; line-height: 1; }
.main-content.dash-fit.dash-more { height: auto; min-height: 100vh; min-height: 100dvh; }
.dash-fit.dash-more .dash-grid { grid-template-rows: none; grid-auto-rows: minmax(250px, auto); flex: none; }
.dash-fit.dash-more .dash-grid > .card > div:not(.card-header) { overflow: visible; }

/* Projekt-Kacheln: Listen scrollen intern statt endlos zu wachsen */
#project-items-list, #project-material, #project-cables, #project-notes, #project-files, #project-maps,
#project-studio, #project-handover, #project-catering, #project-advancing, #project-controlling, #project-time, #project-docs, #project-plans,
#project-light, #project-tuning, #project-acoustics, #project-events {
  max-height: min(55vh, 460px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}
#project-items-list, #project-notes { max-height: min(60vh, 520px); }
.pj-note-ta { flex:1; min-width:0; width:100%; border:1px solid transparent; background:transparent; color:inherit; font:inherit; font-size:14px; line-height:1.45; resize:none; overflow:hidden; padding:6px 8px; border-radius:8px; }
.pj-note-ta:hover { background:var(--fill); }
.pj-note-ta:focus { outline:none; background:var(--surface,#fff); border-color:var(--accent,#0a84ff); }

/* ─── Lader: die zwei Lichtkegel der Marke wechseln sich ruhig ab ─── */
.loading-spinner { position: relative; display: inline-block; width: 26px; height: 24px; border: 0; border-radius: 0; animation: none; flex: none; }
.loading-spinner::before, .loading-spinner::after { content: ""; position: absolute; inset: 0; background: no-repeat center / contain; animation: twbeam 1.3s ease-in-out infinite; opacity: .25; }
.loading-spinner::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 60 54'%3E%3Cpolygon points='22,52 6,8 38,8' fill='%23F59E0B'/%3E%3Ccircle cx='22' cy='52' r='3.4' fill='%230E1726'/%3E%3C/svg%3E"); }
.loading-spinner::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 60 54'%3E%3Cpolygon points='42,52 26,8 58,8' fill='%230EA5E9'/%3E%3Ccircle cx='42' cy='52' r='3.4' fill='%230E1726'/%3E%3C/svg%3E"); animation-delay: .65s; }
@keyframes twbeam { 0%, 100% { opacity: .22; } 45% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .loading-spinner::before, .loading-spinner::after { animation: none; opacity: .8; } }

/* ─── Leere Seiten: ruhige Kachel, ohne Symbol die Marke einfarbig grau ─── */
.empty-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--fill); align-items: center; justify-content: center; opacity: 1; }
.empty-icon .icon { width: 28px; height: 28px; }
.empty-state:not(:has(.empty-icon))::before { content: ""; width: 56px; height: 50px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 4 60 54'%3E%3Cpolygon points='22,52 6,8 38,8' fill='%238e8e93' fill-opacity='.45'/%3E%3Cpolygon points='42,52 26,8 58,8' fill='%238e8e93' fill-opacity='.7'/%3E%3Ccircle cx='22' cy='52' r='3.4' fill='%238e8e93'/%3E%3Ccircle cx='42' cy='52' r='3.4' fill='%238e8e93'/%3E%3C/svg%3E") no-repeat center / contain; opacity: .8; }
.empty-state .empty-title { letter-spacing: -.01em; }

/* ─── Platzhalter ohne Bild: Initialen statt Würfel ─── */
.placeholder .ini { font-size: 15px; font-weight: 600; letter-spacing: .02em; color: var(--text-muted); font-style: normal; }
.item-big-img .ini { font-size: 40px; }

/* ─── Startbild der installierten App ─── */
#tw-splash { position: fixed; inset: 0; z-index: 100000; background: #0E1726; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; color: #fff; transition: opacity .35s ease; }
#tw-splash.off { opacity: 0; pointer-events: none; }
#tw-splash img { width: 88px; height: 88px; border-radius: 22px; }
#tw-splash .wordmark { font-size: 34px; line-height: 1; }
#tw-splash .loading-spinner { margin-top: 10px; }

/* ─── Verbindungshinweis ─── */
.tw-offline { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-height, 64px) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 9998; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--material-strong); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border: 1px solid var(--border-hover); border-radius: 999px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; }
.tw-offline[hidden] { display: none; }

/* ─── Rundgang: Willkommen mit Marke ─── */
.tour-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.tour-brand img { width: 34px; height: 34px; border-radius: 9px; }
.tour-brand .wordmark { font-size: 22px; line-height: 1; }

/* Animiertes Logo: Lampen, Kegel (amber, dann cyan), Wortmarke; danach ruhiges Atmen */
.tw-anim { display: block; overflow: visible; }
.tw-anim .tw-c1, .tw-anim .tw-c2 { transform-box: fill-box; transform-origin: 50% 100%; animation: twgrow .7s cubic-bezier(.2,.7,.2,1) both, twbreath 4.5s ease-in-out 1.6s infinite; }
.tw-anim .tw-c2 { animation-delay: .3s, 2.2s; }
.tw-anim .tw-d { transform-box: fill-box; transform-origin: 50% 50%; animation: twpop .35s cubic-bezier(.3,1.6,.5,1) both; }
.tw-anim .tw-w { animation: twfade .6s ease-out .8s both; }
@keyframes twgrow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); } }
@keyframes twpop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes twfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes twbreath { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .tw-anim * { animation: none !important; } }
#tw-splash .tw-anim { margin-bottom: 4px; }
.login-logo { margin: 0; font: inherit; display: flex; flex-direction: column; align-items: center; }
.login-logo .tw-anim { margin: 4px auto 0; color: var(--text, #1d1d1f); }
.login-brand .login-logo { display: block; width: 100%; } .login-brand .login-logo .tw-anim { margin: 6px auto 4px; }

/* Monatsblatt im Kalender */
.mo-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.mo-head > div { text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); padding: 4px 0 8px; }
.mo-week { position: relative; border-top: 1px solid var(--border, rgba(128,128,128,.25)); }
.mo-cells { position: absolute; inset: 0; }
.mo-cell { border-left: 1px solid var(--border, rgba(128,128,128,.25)); padding: 4px 6px; cursor: pointer; }
.mo-cell:last-child { border-right: 1px solid var(--border, rgba(128,128,128,.25)); }
.mo-cell:hover { background: var(--fill, rgba(128,128,128,.08)); }
.mo-cell.mo-busy { background: color-mix(in srgb, var(--accent, #0EA5E9) 7%, transparent); }
.mo-cell.mo-out { opacity: .45; }
.mo-cell.mo-sel { outline: 2px solid var(--accent, #0EA5E9); outline-offset: -2px; }
.mo-num { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.mo-today .mo-num { background: var(--accent, #0EA5E9); color: #fff; border-radius: 10px; padding: 1px 7px; }
.mo-bar { position: absolute; height: 19px; border-radius: 5px; padding: 0 7px; display: flex; align-items: center; font-size: 12px; font-weight: 500; text-decoration: none; overflow: hidden; white-space: nowrap; box-sizing: border-box; z-index: 1; }
.mo-bar span { overflow: hidden; text-overflow: ellipsis; }
.mo-project { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 3px 0 0 var(--accent); }
.mo-reservation { background: var(--orange-soft); color: var(--orange-text); box-shadow: inset 3px 0 0 var(--orange); }
.mo-event { background: var(--fill-strong, rgba(128,128,128,.2)); color: var(--text); box-shadow: inset 3px 0 0 var(--text-muted); }
.mo-more { position: absolute; font-size: 11px; color: var(--text-muted); z-index: 1; pointer-events: none; }
.mo-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-top: 10px; border-top: 1px solid var(--border, rgba(128,128,128,.25)); padding-top: 10px; }
.mo-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mo-k { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.mo-k.mo-free { background: color-mix(in srgb, var(--accent, #0EA5E9) 12%, transparent); }
.mo-daybox { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--fill, rgba(128,128,128,.08)); }
.mo-dayrow { display: flex; align-items: center; gap: 8px; padding: 6px 0; flex-wrap: wrap; }
.mo-dayrow small { color: var(--text-muted); }
@media (max-width: 640px) { .mo-bar { font-size: 10.5px; padding: 0 4px; } .mo-cell { padding: 3px 3px; } }

/* Ladescreen: Logo darf auf schmalen Handys nicht breiter als der Bildschirm werden */
#tw-splash { padding: 0 24px; box-sizing: border-box; text-align: center; }
#tw-splash .tw-anim { max-width: min(78vw, 340px); height: auto; }
#tw-splash img { max-width: 40vw; height: auto; }

/* Kabel-Dialog: Anschlussauswahl nimmt die ganze Fläche (3.337) */
.ci-adapter .ci-main { display: block; overflow-y: auto; }
.ci-picking .ci-details { display: none; }
.ad-plug.idle { opacity: .45; }
/* Drucken-Menü */
.cb-pm { position: relative; }
.cb-pm-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 270px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 6px; }
.cb-pm-list[hidden] { display: none; }
.cb-pm-list button { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 12px; cursor: pointer; color: inherit; font: inherit; }
.cb-pm-list button:hover, .cb-pm-list button:focus-visible { background: var(--fill, rgba(127,127,127,.12)); outline: none; }
.cb-pm-list b { display: block; font-weight: 600; font-size: 14px; }
.cb-pm-list small { display: block; color: var(--text-secondary, #777); font-size: 12px; margin-top: 2px; }

/* Ordnerfarben (frei wählbar, unabhängig von der Systemfarbe) */
.fl-colored .fl-folder-th, .fl-folder-ic.fl-colored { background: color-mix(in srgb, var(--fc) 18%, transparent); color: var(--fc); }
.fl-card.fl-colored:hover, .fl-card.fl-colored:focus-visible { border-color: var(--fc); }
.fl-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fl-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.fl-sw.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.fl-sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fl-sw-none { background: repeating-linear-gradient(45deg, var(--surface2), var(--surface2) 4px, var(--border) 4px, var(--border) 5px); }
.fl-sw-own { overflow: hidden; background: conic-gradient(#e5484d, #f5b800, #30a46c, #0090ff, #d6409f, #e5484d); }
.fl-sw-own input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

/* Kabel & Material: „Neu anlegen“ / „Ändern“ (3.343), schmal und einspaltig */
.nm-cls { margin: 0 0 14px; align-self: flex-start; }
.nm-body { max-height: min(76vh, 820px); overflow-y: auto; padding: 2px 2px 4px; }
.nm-sec { margin-bottom: 16px; } .nm-sec[hidden] { display: none; }
.nm-lab { font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.nm-q { margin-bottom: 8px; }
.nm-list { max-height: 232px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 4px; }
.nm-g { font-size: 11.5px; font-weight: 600; color: var(--text-muted); padding: 8px 10px 3px; }
.nm-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.nm-row:hover, .nm-row:focus-visible { background: var(--accent-soft); outline: none; }
.nm-ic { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; color: var(--accent); }
.nm-ic svg { width: 20px; height: 20px; }
.nm-none { padding: 14px 10px; color: var(--text-muted); font-size: 13px; }
.nm-chosen { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.nm-chosen b { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.nm-end { margin-bottom: 14px; }
.nm-end-t { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.nm-end-c { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.nm-more { margin: 4px 0 0; } .nm-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary); padding: 6px 0 10px; }
.nm-sum { min-height: 0; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface2, var(--fill)); font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.nm .modal-footer { margin-top: 14px; }
.nm-art { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 14px; padding: 16px 12px; border-radius: 14px; background: var(--surface2, var(--fill)); border: 1px solid var(--border); }
.nm-ec { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; text-align: center; }
.nm-ec-i { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 14px; background: var(--surface, #fff); border: 1px solid var(--border); color: var(--accent, #0a84ff); }
.nm-ec-i svg { width: 30px; height: 30px; }
.nm-ec b { font-size: 13px; }
.nm-ec small { font-size: 12px; color: var(--text-muted); }
.nm-ec-0 { color: var(--text-muted); }
.nm-ec-l { font-size: 20px; color: var(--text-muted); }
.nm-art[hidden] { display: none; }

.cb-foreign { background: var(--surface2, var(--fill)); color: var(--text-muted); border: 1px solid var(--border); }
