/* ==========================================================================
 *  Service-Dispo (Webversion) — Samsung-HME-Design, moderne Ausbaustufe
 *  Hell, monochrom, Poppins — dunkle Sidebar als Kontrast, weiche Tiefe.
 * ========================================================================== */

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../vendor/fonts/poppins-500.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../vendor/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../vendor/fonts/poppins-700.woff2") format("woff2");
}

:root {
  --brand: #000000;
  --brand-dark: #2a2a2a;
  --brand-light: #ededed;
  --ok: #111111;
  --ok-light: #e7e7e7;
  --danger: #c0392b;
  --bg: #f5f5f6;
  --card: #ffffff;
  --text: #101013;
  --muted: #71717a;
  --faint: #a6a6ae;
  --border: #ebebee;
  --radius: 20px;
  --radius-s: 12px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(16, 16, 19, 0.04), 0 8px 24px rgba(16, 16, 19, 0.05);
  --shadow-lift: 0 2px 6px rgba(16, 16, 19, 0.06), 0 16px 36px rgba(16, 16, 19, 0.10);
  --sidebar-w: 244px;
  --topbar-h: 66px;
  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Ampel */
  --amp-rot: #e5493a;
  --amp-gelb: #f0a53b;
  --amp-gruen: #34a45c;
  /* Status-Töne (Donut / Kachel-Akzente) */
  --st-neu: #111111;
  --st-ersatzteil: #e5493a;
  --st-zugeordnet: #0e9f9f;   /* Akzent: Warten auf Freigabe / Zugewiesen */
  --st-geplant: #a3a3ab;
  --st-erledigt: #dcdce0;
  /* Aliase (von neueren Komponenten genutzt) + Theme-Basis */
  --line: var(--border);
  --ink: var(--text);
  --side-bg: #0d0d10;
  --nav-on-bg: #ffffff;
  --nav-on-fg: #0d0d10;
  --akzent: #0d0d10;
  --ghost-bg: #ececef;
  --topbar-bg: rgba(245, 245, 246, 0.72);
  --bg-glow: rgba(255, 255, 255, 0.9);
}

/* ===== Farbschemata (kontogebunden, 3 Schemen × Hell/Dunkel) ===== */
html[data-schema="blue"] {
  --brand: #2f66f4; --brand-dark: #2451c4; --akzent: #2f66f4;
  --side-bg: #0c1830; --nav-on-bg: #2f66f4; --nav-on-fg: #ffffff;
  --bg: #f3f5fa; --border: #e3e8f2; --st-neu: #2f66f4;
}
html[data-schema="green"] {
  --brand: #123024; --brand-dark: #0c211a; --akzent: #1a915a;
  --side-bg: #0c1f18; --nav-on-bg: #1fa863; --nav-on-fg: #ffffff;
  --bg: #f3f7f4; --border: #e2ece5; --st-neu: #1a915a;
}
html[data-modus="dunkel"] {
  --bg: #121215; --card: #1c1c22; --text: #f1f1f4;
  --muted: #a2a2ac; --faint: #70707a; --border: #2c2c34;
  --ghost-bg: #29292f; --side-bg: #0a0a0e;
  --topbar-bg: rgba(18, 18, 21, 0.72);
  --bg-glow: rgba(255, 255, 255, 0.04);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.4), 0 16px 36px rgba(0, 0, 0, 0.5);
  --st-erledigt: #3a3a42; --brand-light: #2a2a31;
}
html[data-modus="dunkel"][data-schema="blue"] { --side-bg: #0a1226; --bg: #11141c; --card: #1a1e28; --border: #293040; }
html[data-modus="dunkel"][data-schema="green"] { --side-bg: #081510; --bg: #101513; --card: #1a201d; --border: #29332e; }
html[data-modus="dunkel"] .badge.neu { background: #f1f1f4; color: #101013; }
html[data-modus="dunkel"] .beta-pill { color: #ff9d8f; background: rgba(255, 138, 122, 0.12); }
html[data-modus="dunkel"] .bell svg, html[data-modus="dunkel"] .burger svg { color: var(--text); stroke: var(--text); }
html[data-modus="dunkel"] .badge.ersatzteil { background: rgba(229, 73, 58, 0.2); color: #ff9d8f; }
html[data-modus="dunkel"] .badge.zugeordnet { background: rgba(14, 159, 159, 0.22); color: #5fd6d6; }
html[data-modus="dunkel"] .badge.inarbeit { background: rgba(240, 165, 59, 0.2); color: #ffc46e; }
html[data-modus="dunkel"] .badge.geplant, html[data-modus="dunkel"] .badge.erledigt { background: #2c2c34; color: #b9b9c2; }
html[data-modus="dunkel"] .badge.kva { background: rgba(138, 108, 255, 0.22); color: #b5a0ff; }
html[data-modus="dunkel"] .komp-chip.wart-aktiv { background: rgba(52, 164, 92, 0.18); border-color: rgba(52, 164, 92, 0.4); color: #7fe3a4; }
html[data-modus="dunkel"] .komp-chip.wart-abgelaufen { background: rgba(229, 73, 58, 0.16); border-color: rgba(229, 73, 58, 0.4); color: #ff9d8f; }
html[data-modus="dunkel"] .kva-hinweis.aktiv { background: rgba(240, 165, 59, 0.12); border-color: rgba(240, 165, 59, 0.35); }
html[data-modus="dunkel"] .kva-hinweis.abgelaufen { background: rgba(229, 73, 58, 0.12); border-color: rgba(229, 73, 58, 0.35); }
html[data-modus="dunkel"] .todo-auto-zeile { background: rgba(240, 165, 59, 0.12); border-color: rgba(240, 165, 59, 0.32); }
html[data-modus="dunkel"] .folge-info, html[data-modus="dunkel"] .pick-info { background: var(--card); }
html[data-modus="dunkel"] .fbtn { background: var(--card); color: var(--muted); border-color: var(--border); }
html[data-modus="dunkel"] .fbtn.on { background: var(--text); color: var(--bg); }
html[data-modus="dunkel"] .rep-balken, html[data-modus="dunkel"] .rep-split, html[data-modus="dunkel"] .balken { background: #2c2c34; }
html[data-modus="dunkel"] .qr-img { background: #fff; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(900px 420px at 85% -8%, var(--bg-glow), transparent 65%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
a { color: inherit; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d6d6db; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* Einblend-Animation der Inhalte (Tabelle ausgenommen: bleibt beim Tippen ruhig) */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.content > * { animation: fadeUp 0.32s ease both; }
.content > *:nth-child(2) { animation-delay: 0.04s; }
.content > *:nth-child(3) { animation-delay: 0.08s; }
.content > *:nth-child(4) { animation-delay: 0.12s; }
.content > .table-card, .content > .toolbar { animation: none; }

/* ==========================================================================
 *  App-Shell: dunkle Sidebar + helle Hauptspalte
 * ========================================================================== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
/* Anmeldeansicht: Sidebar/Topbar sind ausgeblendet — volle Breite fürs Login */
.app.anmeldung { grid-template-columns: 1fr; }
.app.anmeldung .content { max-width: none; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--side-bg);
  display: flex;
  flex-direction: column;
  padding: 16px 13px 12px;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 6px 14px; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: #fff;
  color: #0d0d10;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.brand-txt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: #fff;
  min-width: 0;
}
.brand-txt span { display: block; font-size: 0.68rem; font-weight: 500; color: #83838d; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; overflow-y: auto; padding: 4px 0; scrollbar-width: thin; scrollbar-color: #2c2c33 transparent; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { border: none; border-radius: 99px; background: #2c2c33; }
.nav-sec {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: #55555f;
  margin: 13px 12px 5px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #9d9da7;
  text-decoration: none;
  margin-bottom: 3px;
  transition: background 0.14s ease, color 0.14s ease, transform 0.14s ease;
}
.nav a svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: 0.85; }
.nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.nav a.on { background: var(--nav-on-bg); color: var(--nav-on-fg); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.nav a.on svg { opacity: 1; }
.nav a[data-soon] { opacity: 0.45; }
.nav-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: var(--pill);
  padding: 1px 9px;
  font-variant-numeric: tabular-nums;
}
.nav a.on .nav-count { background: var(--nav-on-fg); color: var(--nav-on-bg); }

.side-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 14px 10px 2px;
  font-size: 0.74rem;
  color: #83838d;
  font-weight: 600;
  line-height: 1.5;
}
.foot-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amp-gruen); box-shadow: 0 0 0 3px rgba(52, 164, 92, 0.25); margin-right: 5px; }
.foot-sub { font-weight: 400; color: #55555f; }

/* ---------- Topbar ---------- */
.maincol { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom: 1px solid rgba(16, 16, 19, 0.05);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
}
.burger {
  display: none;
  background: var(--card);
  border: none;
  width: 40px; height: 40px;
  border-radius: var(--pill);
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow);
}
.burger svg { width: 20px; height: 20px; }
.tb-search {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--pill);
  padding: 10px 18px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease;
}
.tb-search:focus-within { box-shadow: var(--shadow-lift), 0 0 0 1.5px #111; }
.tb-search svg { width: 16px; height: 16px; color: var(--faint); flex: 0 0 auto; }
.tb-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  outline: none;
}
.tb-search input::placeholder { color: var(--faint); }
.beta-pill {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--danger);
  background: rgba(192, 57, 43, 0.09);
  border-radius: var(--pill);
  padding: 5px 12px;
}
.bell {
  position: relative;
  background: var(--card);
  border: none;
  width: 42px; height: 42px;
  border-radius: var(--pill);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.bell:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.bell svg { width: 19px; height: 19px; }
.bell-dot {
  position: absolute;
  top: 5px; right: 5px;
  min-width: 17px; height: 17px;
  border-radius: var(--pill);
  background: var(--amp-rot);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid #fff;
}
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--akzent), var(--side-bg));
  background-size: cover;
  background-position: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
}

/* ---------- Content ---------- */
.content {
  flex: 1;
  padding: 26px 34px 70px;
  width: 100%;
  /* volle Fensterbreite — Raster und Karten skalieren mit */
}
@media (min-width: 1800px) {
  .content { padding-left: 48px; padding-right: 48px; }
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head .ph-txt { flex: 1; min-width: 220px; }
.crumb {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--faint);
  margin-bottom: 4px;
}
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--text); }
.page-head h2 {
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}
.page-head .sub { color: var(--muted); font-size: 0.88rem; margin-top: 3px; }
.ph-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--pill);
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  font-family: var(--font-display);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.btn-primary:hover { transform: translateY(-1.5px); box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24); }
.btn-primary:active { background: var(--brand-dark); transform: none; }
.btn-ghost { background: var(--ghost-bg); color: var(--text); }
.btn-ghost:hover { background: #e2e2e6; }
.btn-outline { background: var(--card); color: var(--text); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--bg); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 9px 16px; font-size: 0.84rem; }
.btn-row { display: flex; gap: 10px; }

/* ==========================================================================
 *  Karten & KPI-Kacheln
 * ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  min-width: 0;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 .h3-sub { font-family: var(--font-body); font-weight: 400; font-size: 0.76rem; color: var(--faint); margin-left: auto; }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.tech-av.partner-av { background: #3d6de0; font-size: 0.85rem; }
.tile {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.tile.on { border-color: #111; box-shadow: 0 0 0 1.5px #111 inset, var(--shadow); }
.tile-top { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.tile-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--tc, var(--brand)); flex: 0 0 auto; }
.tile-lbl {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.25;
}
.tile-num {
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.tile-sub { font-size: 0.74rem; color: var(--faint); margin-top: 3px; min-height: 1.15em; }
.tile-sub b { color: var(--amp-rot); font-weight: 700; }
.tile-bar {
  margin-top: 10px;
  height: 4px;
  border-radius: var(--pill);
  background: #f0f0f3;
  overflow: hidden;
}
.tile-bar i {
  display: block;
  height: 100%;
  border-radius: var(--pill);
  background: var(--tc, var(--brand));
  transition: width 0.5s ease;
}

/* ---------- Dashboard-Raster ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.5fr;
  gap: 14px;
  margin-bottom: 14px;
}
.dash-grid2 {
  display: grid;
  grid-template-columns: 1.5fr 1.05fr;
  gap: 14px;
}

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut { flex: 0 0 auto; }
.donut svg { display: block; }
.donut .dn-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
  fill: var(--text);
}
.donut .dn-lbl { font-size: 0.6rem; font-weight: 700; fill: var(--faint); text-transform: uppercase; letter-spacing: 0.09em; }
.donut circle { cursor: pointer; transition: opacity 0.14s ease, stroke-width 0.14s ease; }
.donut circle:hover { opacity: 0.82; stroke-width: 19; }
.legend { flex: 1; min-width: 150px; }
.leg-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 11px;
  cursor: pointer;
  font-size: 0.86rem;
  transition: background 0.12s ease;
}
.leg-row:hover { background: #f5f5f6; }
.leg-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.leg-lbl { flex: 1; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-num { font-weight: 700; font-variant-numeric: tabular-nums; font-family: var(--font-display); }

/* Balken */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 150px;
  padding-top: 8px;
}
.bar-g { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-pair { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.bar-pair i {
  display: block;
  width: 14px;
  border-radius: 6px;
  min-height: 3px;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.bar-pair i:hover { opacity: 0.75; transform: scaleY(1.02); transform-origin: bottom; }
.bar-pair .b-neu { background: linear-gradient(180deg, #2a2a2e, #0d0d10); }
.bar-pair .b-erl { background: #d9d9de; }
.bar-lbl { font-size: 0.7rem; color: var(--faint); font-weight: 700; }
.bars-leg { display: flex; gap: 18px; margin-top: 12px; font-size: 0.76rem; color: var(--muted); }
.bars-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* Terminliste / Feed */
.mini-list { display: flex; flex-direction: column; gap: 4px; }
.mini-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 11px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.mini-row:hover { background: #f5f5f6; transform: translateX(2px); }
.mini-date {
  flex: 0 0 auto;
  width: 48px;
  text-align: center;
  background: #0d0d10;
  color: #fff;
  border-radius: 13px;
  padding: 6px 0 7px;
  font-family: var(--font-display);
  line-height: 1.1;
}
.mini-date b { display: block; font-size: 1.08rem; font-weight: 700; }
.mini-date span { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #9d9da7; }
.mini-main { flex: 1; min-width: 0; }
.mini-t { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); }
.mini-s { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding: 8px 4px; font-size: 0.84rem; align-items: flex-start; }
.feed li + li { border-top: 1px solid #f2f2f4; }
.feed .f-dot { width: 7px; height: 7px; border-radius: 50%; background: #0d0d10; margin-top: 7px; flex: 0 0 auto; }
.feed .f-txt { flex: 1; min-width: 0; }
.feed .f-id { font-weight: 700; font-size: 0.76rem; color: var(--muted); cursor: pointer; font-variant-numeric: tabular-nums; }
.feed .f-id:hover { color: var(--text); text-decoration: underline; }
.feed .f-ts { flex: 0 0 auto; font-size: 0.72rem; color: var(--faint); font-variant-numeric: tabular-nums; padding-top: 2px; }

/* ==========================================================================
 *  Auftragsliste (Tabelle)
 * ========================================================================== */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.seg {
  display: inline-flex;
  background: var(--card);
  border-radius: var(--pill);
  padding: 4px;
  box-shadow: var(--shadow);
}
.seg button {
  border: none;
  background: none;
  border-radius: var(--pill);
  padding: 9px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.12s ease;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--ink); color: var(--card); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }

.fchips { display: flex; gap: 7px; flex-wrap: wrap; }
.fbtn {
  border: none;
  background: #fff;
  color: var(--muted);
  border-radius: var(--pill);
  padding: 8px 15px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: all 0.12s ease;
}
.fbtn:hover { color: var(--text); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.fbtn.on { background: var(--ok); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }
.fbtn .fb-n { opacity: 0.65; font-variant-numeric: tabular-nums; margin-left: 2px; }

.table-card { padding: 6px 6px 0; overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.orders {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}
.orders thead th {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
  text-align: left;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  user-select: none;
}
.orders thead th.sortable { cursor: pointer; transition: color 0.12s ease; }
.orders thead th.sortable:hover { color: var(--text); }
.orders thead th .arr { font-size: 0.7rem; margin-left: 3px; }
.orders tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid #f3f3f5;
  vertical-align: middle;
  font-size: 0.88rem;
}
.orders tbody tr { cursor: pointer; transition: background 0.1s ease; }
.orders tbody tr:hover { background: #f7f7f9; }
.orders tbody tr:last-child td { border-bottom: none; }

.td-id { font-weight: 700; font-size: 0.78rem; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-main b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em; }
.td-main span { font-size: 0.75rem; color: var(--faint); }
.td-prob { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.td-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-date .dl { display: block; font-size: 0.64rem; color: var(--faint); text-transform: uppercase; font-weight: 700; letter-spacing: 0.07em; }
.td-date.over { color: var(--amp-rot); font-weight: 700; }

.typ-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text);
  background: #f0f0f3;
  padding: 4px 11px 4px 8px;
  border-radius: var(--pill);
  white-space: nowrap;
}
.typ-tag svg { width: 14px; height: 14px; flex: 0 0 auto; }

.tech-cell { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.tech-av {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(140deg, #2a2a2e, #0d0d10);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.tech-cell.leer { color: var(--faint); font-style: italic; }

/* Status-Badges — weiche Tönungen */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--pill);
  white-space: nowrap;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.neu { background: #111; color: #fff; }
.badge.ersatzteil { background: rgba(229, 73, 58, 0.1); color: #c53a2c; }
.badge.zugeordnet { background: rgba(14, 159, 159, 0.12); color: #0b7f7f; }
.badge.geplant { background: #fff; color: var(--text); box-shadow: inset 0 0 0 1.5px #111; }
.badge.inarbeit { background: rgba(240, 165, 59, 0.14); color: #a86a12; }
.badge.erledigt { background: rgba(52, 164, 92, 0.1); color: #2a7c48; }

/* Ampel */
.ampel {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.ampel.rot { background: var(--amp-rot); box-shadow: 0 0 0 4px rgba(229, 73, 58, 0.16); }
.ampel.gelb { background: var(--amp-gelb); box-shadow: 0 0 0 4px rgba(240, 165, 59, 0.16); }
.ampel.gruen { background: var(--amp-gruen); box-shadow: 0 0 0 4px rgba(52, 164, 92, 0.14); }
.ampel.grau { background: #cfcfd4; box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04); }

/* Pagination */
.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.pager .pg-info { margin-right: auto; }
.pager button {
  min-width: 32px; height: 32px;
  border: none;
  background: #f0f0f3;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s ease;
}
.pager button:hover { background: #e4e4e8; }
.pager button.on { background: var(--brand); color: #fff; }
.pager button:disabled { opacity: 0.35; cursor: default; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 58px 20px;
}
.empty svg { width: 44px; height: 44px; color: #d3d3d8; margin-bottom: 10px; }
.empty b { display: block; font-family: var(--font-display); margin-bottom: 3px; color: var(--text); }

/* ==========================================================================
 *  Detailansicht
 * ========================================================================== */
.detail-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 14px;
  align-items: start;
}
.detail-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f3f3f5;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: var(--muted); flex: 0 0 auto; }
.kv-row .v { font-weight: 600; text-align: right; word-break: break-word; }
.kv-row .v a { text-decoration: none; border-bottom: 1px solid #d6d6db; transition: border-color 0.12s ease; }
.kv-row .v a:hover { border-color: #111; }
.kv-row .v.leer { color: var(--faint); font-weight: 400; font-style: italic; }

.problem-text { margin: 0; white-space: pre-wrap; font-size: 0.92rem; }

/* Status-Pills */
.status-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-tog {
  border: none;
  background: #f0f0f3;
  color: var(--muted);
  border-radius: var(--pill);
  padding: 9px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s ease;
}
.st-tog:hover { color: var(--text); transform: translateY(-1px); }
.st-tog.on { background: var(--ok); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22); }

.field-lbl { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 0.85rem; }
.sel, .inp {
  width: 100%;
  font-size: 15px;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.sel:focus, .inp:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06); }
textarea.inp { resize: vertical; min-height: 74px; }
select.sel {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%23a6a6ae' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 36px;
}

/* Ausfallstufen */
.flag-tag {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--pill);
  padding: 2px 9px;
  margin-right: 7px;
  vertical-align: 1px;
  white-space: nowrap;
}
.flag-tag.total { background: var(--amp-rot); color: #fff; box-shadow: 0 2px 8px rgba(229, 73, 58, 0.35); }
.flag-tag.krit { color: var(--amp-rot); box-shadow: inset 0 0 0 1.5px var(--amp-rot); background: rgba(229, 73, 58, 0.06); }

.ck-wrap { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ckline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-s);
  padding: 10px 13px;
  transition: all 0.12s ease;
}
.ckline input { width: 17px; height: 17px; accent-color: var(--amp-rot); flex: 0 0 auto; cursor: pointer; }
.ckline:hover { border-color: #c9c9ce; }
.ckline.krit:has(input:checked) { border-color: var(--amp-rot); background: rgba(229, 73, 58, 0.05); color: #c53a2c; }
.ckline.total:has(input:checked) { border-color: var(--amp-rot); background: var(--amp-rot); color: #fff; }
.ckline.total:has(input:checked) input { accent-color: #fff; }

/* Kundensuche (Combobox im Auftrags-Modal) */
.combo { position: relative; }
.sug {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 5px);
  z-index: 20;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border);
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
}
.sug-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f3f3f5;
}
.sug-row:last-child { border-bottom: none; }
.sug-row:hover { background: #f5f5f6; }
.sug-row b { display: block; font-size: 0.88rem; font-family: var(--font-display); font-weight: 600; }
.sug-row span { font-size: 0.76rem; color: var(--muted); }
.sug-row.sug-neu b { color: var(--text); }
.sug-row.sug-neu { background: #fafafb; }

.pick-info {
  position: relative;
  background: #f5f5f6;
  border-radius: var(--radius-s);
  padding: 12px 40px 12px 15px;
  font-size: 0.88rem;
  line-height: 1.5;
}
.pick-info span { color: var(--muted); font-size: 0.8rem; }
.pick-x {
  position: absolute;
  top: 10px; right: 10px;
  background: #fff;
  border: none;
  width: 26px; height: 26px;
  border-radius: var(--pill);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  box-shadow: var(--shadow);
}

/* Kundenstamm */
.such-inp {
  max-width: 440px;
  border-radius: var(--pill);
  padding: 11px 18px;
  border: none;
  box-shadow: var(--shadow);
}
.such-inp:focus { box-shadow: var(--shadow-lift), 0 0 0 1.5px #111; }
.hlink { font-size: 0.78rem; font-weight: 600; color: var(--muted); cursor: pointer; text-decoration: none; }
.hlink:hover { color: var(--text); }
.order-go { color: #c9c9ce; font-size: 1.5rem; line-height: 1; }

.geraet-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid #f3f3f5;
}
.geraet-ic {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: #0d0d10;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.geraet-ic svg { width: 20px; height: 20px; }
.geraet-main { flex: 1; min-width: 0; }
.geraet-t { font-weight: 600; font-size: 0.9rem; font-family: var(--font-display); }
.geraet-s { font-size: 0.76rem; color: var(--muted); }
.geraet-inst { flex: 0 0 auto; text-align: right; }
.geraet-inst .dl { display: block; font-size: 0.62rem; color: var(--faint); text-transform: uppercase; font-weight: 700; letter-spacing: 0.06em; margin-bottom: 3px; }
.inst-inp { width: 150px; padding: 7px 9px; font-size: 0.84rem; }
.add-geraet { margin-top: 14px; padding-top: 4px; }
.section-mini {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
  margin: 6px 0 2px;
}

/* Revisions- / Folge-Kennzeichnung */
.rev-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f0f0f3;
  border-radius: var(--pill);
  padding: 2px 8px;
  vertical-align: 1px;
}

/* Historie / Revisionen (Detailansicht) */
.hist-list { display: flex; flex-direction: column; gap: 4px; }
.hist-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
}
.hist-row:hover { background: #f5f5f6; transform: translateX(2px); }
.hist-row.cur { background: #f5f5f6; box-shadow: inset 0 0 0 1.5px #111; cursor: default; }
.hist-row.cur:hover { transform: none; }
.hist-id {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #0d0d10;
  color: #fff;
  border-radius: 9px;
  padding: 4px 9px;
  white-space: nowrap;
}
.hist-main { flex: 1; min-width: 0; }
.hist-t { font-weight: 600; font-size: 0.84rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-s { font-size: 0.74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .badge { flex: 0 0 auto; }
.hist-leer { color: var(--faint); font-size: 0.86rem; font-style: italic; padding: 4px 2px; }

/* Ersatzteile am Auftrag */
.teil-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 2px;
  border-bottom: 1px solid #f3f3f5;
  flex-wrap: wrap;
}
.teil-row:last-of-type { border-bottom: none; }
.teil-main { flex: 1; min-width: 140px; }
.teil-t { font-weight: 600; font-size: 0.86rem; font-family: var(--font-display); }
.teil-s { font-size: 0.74rem; color: var(--muted); }
.teil-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: #f0f0f3;
  border-radius: var(--pill);
  padding: 3px 9px;
  white-space: nowrap;
}
.teil-tag.ok { background: rgba(52, 164, 92, 0.12); color: #2a7c48; }
.teil-x {
  border: none;
  background: #f0f0f3;
  color: var(--muted);
  width: 24px; height: 24px;
  border-radius: var(--pill);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.teil-x:hover { background: #e4e4e8; color: var(--danger); }
.teil-form {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.6fr;
  gap: 8px;
  margin-top: 10px;
}
.teil-form .btn { grid-column: 1 / -1; }

/* Servicebericht (aus der Techniker-App) */
.bericht-karte { border-color: rgba(52, 164, 92, 0.4); }
.bericht-text {
  font-size: 0.88rem;
  white-space: pre-wrap;
  background: #fafafb;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0;
}
.bericht-text b {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  margin-bottom: 3px;
}
.bericht-text.intern { background: #fdf6ec; }
.sig-bild {
  max-width: 220px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-top: 8px;
  background: #fff;
}

/* Folgeauftrag-Hinweis im Modal */
.folge-info {
  background: #f5f5f6;
  border-radius: var(--radius-s);
  padding: 13px 15px;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 4px;
}
.folge-info span { color: var(--muted); font-size: 0.82rem; }

/* Leere Dashboard-Zeilen (alle Karten abgewählt) einklappen */
.dash-grid:not(:has(.card)), .dash-grid2:not(:has(.card)) { display: none; }

/* Personalisierung */
.einst-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}
.einst-zeile:hover { background: #f5f5f6; }
.einst-zeile input { width: 17px; height: 17px; accent-color: #111; }

/* Inline-Icons (Emoji-Ersatz) */
.ic-s {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}

/* Kontextfelder im Status-Popup */
.st-ctx {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 12px 14px;
  background: #fafafa;
}
.section-mini {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

/* Verlaufseintrag löschen */
.tl-x {
  flex: 0 0 auto;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--faint);
  font-size: 1.05rem;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}
.tl li:hover .tl-x { opacity: 1; }
.tl-x:hover { color: var(--danger); background: #f5f5f6; }

/* Status-Verlauf: Kopfzeile + Statusarten-Popup */
.sv-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sv-kopf h3 { margin: 0 !important; }
.tl-code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}
.st-liste {
  margin-top: 8px;
  max-height: 190px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  padding: 4px;
}
.st-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}
.st-row:hover { background: #f5f5f6; }
.st-row.on { background: #111; color: #fff; }
.st-row.on .st-code { color: rgba(255, 255, 255, 0.65); }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.st-name { flex: 1; min-width: 0; }
.st-code { margin-left: auto; color: var(--faint); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }

/* Status-Zeile + Timeline-Badges */
.status-akt {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f3f5;
  margin-bottom: 2px;
}
.zu-zeile .field-lbl { margin: 12px 0 6px; }

/* Partner-Dropdown in der Dashboard-Kachel */
.tile-sel {
  width: 100%;
  margin-top: 3px;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
.tl-badge { font-size: 0.62rem; padding: 2px 8px; margin-right: 7px; vertical-align: 1px; }

/* Nummerierte Timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; display: flex; gap: 14px; padding-bottom: 17px; }
.tl li::before {
  content: "";
  position: absolute;
  left: 13px; top: 30px; bottom: 3px;
  width: 2px;
  border-radius: 2px;
  background: #ececef;
}
.tl li:last-child { padding-bottom: 2px; }
.tl li:last-child::before { display: none; }
.tl-num {
  flex: 0 0 auto;
  width: 27px; height: 27px;
  border-radius: 50%;
  background: #f0f0f3;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}
.tl li.cur .tl-num { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-ts { font-size: 0.72rem; color: var(--faint); font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-tx { font-size: 0.88rem; }

/* ==========================================================================
 *  Modal / Overlay / Toast
 * ========================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(13, 13, 16, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px 16px;
  overflow-y: auto;
  animation: fadeIn 0.16s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 620px;
  animation: popIn 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 24px 0;
}
.modal-head h3 { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.modal-x {
  background: #f0f0f3;
  border: none;
  width: 36px; height: 36px;
  border-radius: var(--pill);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.12s ease;
}
.modal-x:hover { background: #e4e4e8; }
.modal-body { padding: 8px 24px 4px; }
.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 24px 22px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 120;
  background: #16161a;
  color: #fff;
  padding: 13px 20px;
  border-radius: 14px;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: 88%;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } }
.toast.err { background: var(--danger); }
.toast.ok { background: #16161a; }

/* ==========================================================================
 *  Field Service Support (Video + Markieren)
 * ========================================================================== */
.sup-liste {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.sup-karte-kopf { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); }
.sup-karte-sub { font-size: 0.84rem; color: var(--muted); margin-top: 4px; }
.sup-wrap { display: flex; flex-direction: column; gap: 12px; max-width: 1100px; }
.sup-buehne {
  position: relative;
  background: #0d0d10;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.sup-buehne video {
  display: block;
  width: 100%;
  max-height: 68vh;
  min-height: 380px;
  object-fit: contain;
  background: #0d0d10;
}
.sup-buehne canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}
.sup-status {
  position: absolute;
  left: 14px; right: 14px; top: 14px;
  background: rgba(13, 13, 16, 0.72);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 14px;
  border-radius: 12px;
  text-align: center;
  pointer-events: none;
}
.sup-frost {
  position: absolute;
  right: 14px; bottom: 14px;
  background: rgba(61, 109, 224, 0.9);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--pill);
  pointer-events: none;
}
.sup-tools { display: flex; gap: 10px; }
.sup-tools .btn { flex: 1; }

/* ==========================================================================
 *  Anmeldung
 * ========================================================================== */
.login-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lift);
  padding: 30px 28px 24px;
  text-align: center;
}
.login-logo {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: #0d0d10;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.8rem;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}
.login-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}
.login-sub { color: var(--muted); font-size: 0.86rem; margin-bottom: 18px; }
.login-card .field-lbl { text-align: left; }
.login-hinweis {
  background: #f5f5f6;
  border-radius: var(--radius-s);
  padding: 9px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.login-rollen { font-size: 0.74rem; color: var(--faint); margin-top: 14px; }

/* ==========================================================================
 *  Responsive
 * ========================================================================== */
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .dash-grid, .dash-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 940px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: min(280px, 84vw);
    height: 100vh;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.45);
  }
  .sidebar.open { transform: none; }
  .burger { display: flex; }
  .side-veil {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(13, 13, 16, 0.4);
    backdrop-filter: blur(3px);
  }
  .detail-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 56px; }
  .beta-pill { display: none; }
}
@media (max-width: 560px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tb-search input { font-size: 16px; }
}

/* ================= Praxedo 2.0: Mitarbeitende, Organigramm, WaWi, Anfragen ================= */
.komp-chips { display: flex; flex-wrap: wrap; gap: 5px; max-width: 340px; }
.komp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 600; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.komp-chip i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.komp-chip.mehr { color: var(--faint); }
.komp-zeile { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.komp-zeile:last-child { border-bottom: none; }
.komp-neu { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.komp-x { flex: 0 0 auto; }

/* Organigramm: zentrierter Baum mit Verbindungslinien */
.org-baum, .org-baum ul {
  display: flex; justify-content: center;
  list-style: none; margin: 0; padding: 26px 0 0;
  position: relative;
}
.org-baum { padding-top: 6px; min-width: max-content; margin: 0 auto; }
.org-baum li { position: relative; padding: 26px 10px 0; display: flex; flex-direction: column; align-items: center; }
.org-baum > li { padding-top: 0; }
/* senkrechte Linie über jeder Karte */
.org-baum li::before {
  content: ""; position: absolute; top: 0; left: 50%;
  width: 2px; height: 26px; background: var(--line);
}
.org-baum > li::before { display: none; }
/* waagerechte Verbindungslinie zwischen Geschwistern */
.org-baum li::after {
  content: ""; position: absolute; top: 0; height: 2px; background: var(--line);
  left: 0; right: 0;
}
.org-baum li:first-child::after { left: 50%; }
.org-baum li:last-child::after { right: 50%; }
.org-baum li:only-child::after { display: none; }
.org-baum > li::after { display: none; }
/* senkrechte Linie unter Karten mit Kindern */
.org-karte { position: relative; z-index: 1; }
.org-baum li > ul::before {
  content: ""; position: absolute; top: -26px; left: 50%;
  width: 2px; height: 26px; background: var(--line);
}
.org-baum li > ul { padding-top: 0; margin-top: 26px; }
.org-karte {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 14px; min-width: 190px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 16, 19, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.org-karte:hover { border-color: var(--ink); transform: translateY(-1px); }
.org-info { display: flex; flex-direction: column; line-height: 1.3; }
.org-info b { font-size: 0.88rem; }
.org-info span { font-size: 0.74rem; color: var(--muted); }
.org-info .org-ort { color: var(--faint); }

/* Kundenportal-QR */
.qr-box { display: flex; gap: 16px; align-items: flex-start; }
.qr-img {
  width: 132px; height: 132px; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 6px;
}
.qr-txt p { margin: 0 0 8px; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }

.fehler-liste { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 560px) {
  .qr-box { flex-direction: column; }
  .komp-chips { max-width: none; }
}
.section-title { font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin: 4px 0 10px; }

/* Datei-Upload als Dropzone */
.upload-zone {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 1.5px dashed var(--line); border-radius: 14px;
  padding: 26px 16px; text-align: center; cursor: pointer;
  color: var(--muted); background: var(--bg);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.upload-zone:hover, .upload-zone.zieht { border-color: var(--ink); background: var(--card); }
.upload-zone.zieht { border-style: solid; }
.upload-zone svg { width: 26px; height: 26px; margin-bottom: 4px; color: var(--faint); }
.upload-zone:hover svg, .upload-zone.zieht svg { color: var(--ink); }
.upload-zone b { font-size: 0.9rem; color: var(--ink); }
.upload-zone > span { font-size: 0.78rem; color: var(--faint); }
.upload-zone .upload-datei {
  margin-top: 8px; font-size: 0.8rem; font-weight: 600; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
}
.upload-zone.hat-datei { border-color: var(--ink); border-style: solid; }
.upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Servicepartner: Ansprechpartner-Liste */
.kontakt-zeile { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.kontakt-zeile:last-of-type { border-bottom: none; }
.kontakt-main { display: flex; flex-direction: column; flex: 1; line-height: 1.35; min-width: 0; }
.kontakt-main b { font-size: 0.86rem; }
.kontakt-main span { font-size: 0.76rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.kontakt-zeile .komp-chip { flex: 0 0 auto; }
.komp-chip.kat-buchhaltung { background: #fdf3e4; border-color: #f0d9b0; }
.komp-chip.kat-disposition { background: #e9effc; border-color: #c4d3f5; }
.komp-chip.kat-technik { background: #e7f5ec; border-color: #bfe3cc; }
.komp-chip.kat-techniker { background: #f3e9fc; border-color: #ddc4f5; }
.kontakt-x { flex: 0 0 auto; }

/* Ampel-Legende unter der Auftragstabelle */
.ampel-legende {
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  margin-top: 10px; padding: 0 6px;
  font-size: 0.76rem; color: var(--faint);
}
.ampel-legende span { display: inline-flex; align-items: center; gap: 7px; }
.leg-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }

/* Geräte-Register im Kunden-Detail */
.g-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.g-tab {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; font-weight: 600;
  font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.g-tab.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.tab-dot.ok { background: var(--amp-gruen); }
.tab-dot.warn { background: var(--amp-rot); }
.g-tab.on .tab-dot.ok { background: #7fe3a4; }
.g-tab.on .tab-dot.warn { background: #ff9d92; }

/* Wartungsvertrag-Chips */
.komp-chip.wart-aktiv { background: #e7f5ec; border-color: #bfe3cc; color: #1d7a42; }
.komp-chip.wart-abgelaufen { background: #fdecea; border-color: #f2c4be; color: #b03a2e; }

/* Geräte-Blöcke im Kunden-Anlegen */
.geraet-block { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-top: 10px; }
.geraet-block-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* Dokument-Zeilen */
.dok-zeile { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.dok-zeile:last-child { border-bottom: none; }
.dok-datei { font-size: 0.84rem; font-weight: 600; flex: 0 0 auto; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dok-name { flex: 1; padding: 7px 10px; font-size: 0.85rem; }

/* KVA-Wartungshinweis */
.kva-hinweis { border-radius: 12px; padding: 12px 14px; font-size: 0.9rem; line-height: 1.55; }
.kva-hinweis.aktiv { background: #fdf3e4; border: 1px solid #f0d9b0; }
.kva-hinweis.abgelaufen { background: #fdecea; border: 1px solid #f2c4be; }

/* Chips mit Entfernen-Knopf */
.chip-x { border: none; background: none; cursor: pointer; font-size: 0.85rem; color: var(--faint); padding: 0 0 0 2px; }
.chip-x:hover { color: var(--amp-rot); }

/* Reporting-Balken */
.rep-zeile { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.rep-lbl { flex: 0 0 110px; font-size: 0.8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-balken { flex: 1; height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; }
.rep-balken i { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.rep-wert { flex: 0 0 34px; text-align: right; font-size: 0.82rem; font-weight: 700; }

/* Faktura: Positionseditor — passt sich der Kartenbreite an, kein Quer-Scroll */
table.beleg-pos { min-width: 0; table-layout: fixed; }
.beleg-pos th, .beleg-pos td { padding: 5px 4px; }
.beleg-pos th:nth-child(1) { width: auto; }
.beleg-pos th:nth-child(2) { width: 11%; }
.beleg-pos th:nth-child(3) { width: 14%; }
.beleg-pos th:nth-child(4) { width: 11%; }
.beleg-pos th:nth-child(5) { width: 15%; }
.beleg-pos th:nth-child(6) { width: 30px; }
.beleg-pos .inp { width: 100%; padding: 7px 8px; font-size: 0.85rem; }
.beleg-pos .pos-klein { text-align: right; }
.beleg-pos .pos-netto { white-space: nowrap; font-size: 0.85rem; }
/* Zahlen-Spinner rauben Platz — Werte werden getippt */
.beleg-pos input[type="number"]::-webkit-inner-spin-button,
.beleg-pos input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.beleg-pos input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
@media (max-width: 640px) {
  .beleg-pos th:nth-child(3) { width: 17%; }
  .beleg-pos .inp { padding: 7px 5px; font-size: 0.8rem; }
}
.beleg-aktionen { display: flex; flex-direction: column; gap: 8px; }
.beleg-aktionen .btn { width: 100%; }

/* Status Kostenvoranschlag + Zielstatus-Hinweis im Status-Popup */
.badge.kva { background: rgba(138, 108, 255, 0.12); color: #6a48e0; }
.st-ziel { margin-left: auto; font-size: 0.68rem; font-weight: 600; color: var(--faint); white-space: nowrap; padding-left: 10px; }

/* Freigabe-Kachel: mit Akzentfarbe hinterlegt, sticht aus den weissen Kacheln heraus */
.tile[data-status="zugeordnet"] {
  background: linear-gradient(135deg, rgba(14, 159, 159, 0.10), rgba(14, 159, 159, 0.04));
  border-color: rgba(14, 159, 159, 0.35);
}
.tile[data-status="zugeordnet"] .tile-num { color: #0b7f7f; }

/* Aktivitäts-Feed: ausführender Nutzer unter dem Datum */
.f-ts { text-align: right; line-height: 1.35; }
.f-nutzer { display: block; font-style: normal; font-size: 0.7rem; color: var(--faint); white-space: nowrap; }

/* Todos + Tages-Briefing (Demo) */
.todo-auto { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.todo-auto-zeile {
  display: block; font-size: 0.84rem; font-weight: 600; color: var(--ink);
  background: rgba(240, 165, 59, 0.1); border: 1px solid rgba(240, 165, 59, 0.3);
  border-radius: 10px; padding: 7px 11px; text-decoration: none;
}
.todo-auto-zeile:hover { border-color: #f0a53b; }
.todo-zeile { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.todo-zeile:last-child { border-bottom: none; }
.todo-ck { width: 17px; height: 17px; accent-color: var(--ink); flex: 0 0 auto; cursor: pointer; }
.todo-main { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.todo-titel { font-size: 0.9rem; font-weight: 600; }
.todo-sub { font-size: 0.74rem; color: var(--faint); }
.todo-zeile.fertig .todo-titel { text-decoration: line-through; color: var(--faint); font-weight: 500; }
.brief-kopf { display: flex; align-items: center; gap: 14px; }
.brief-sonne {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
  background: linear-gradient(135deg, #ffe8bd, #ffd58a); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
}
.brief-liste { margin: 4px 0 0; padding-left: 20px; font-size: 0.92rem; line-height: 1.75; }
.brief-liste b.rot, .brief-modal .rot { color: var(--amp-rot); }
.brief-phrase { margin-top: 16px; font-size: 0.92rem; font-style: italic; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }

/* ================= Reportings v2 + Hover-Feinschliff ================= */
.rp-chart { width: 100%; height: auto; display: block; }
.rp-linie { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: rpZeichnen 1.1s ease forwards; }
@keyframes rpZeichnen { to { stroke-dashoffset: 0; } }
.rp-punkt .rp-tip { opacity: 0; pointer-events: none; transition: opacity 0.12s ease; }
.rp-punkt:hover .rp-tip { opacity: 1; }
.rp-punkt:hover .rp-dot { r: 5; }
.rp-punkt { cursor: pointer; }

.rep-zeile .rep-balken i { transform-origin: left; animation: repWachsen 0.7s ease; }
@keyframes repWachsen { from { transform: scaleX(0); } }
.rep-extra { flex: 0 0 78px; text-align: right; font-size: 0.72rem; color: var(--faint); }
.rep-klick { cursor: pointer; border-radius: 8px; transition: background 0.14s ease, transform 0.14s ease; }
.rep-klick:hover { background: var(--bg); transform: translateX(3px); }
.rep-mod { display: flex; gap: 20px; margin-bottom: 8px; }
.rep-mod-num { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; display: block; line-height: 1.1; }
.rep-mod-lbl { font-size: 0.76rem; color: var(--muted); }
.rep-split { height: 10px; border-radius: 99px; background: #d9d9de; overflow: hidden; }
.rep-split i { display: block; height: 100%; background: #0d0d10; border-radius: 99px 0 0 99px; transition: width 0.7s ease; }
.rep-umsatz-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.rep-umsatz-summe { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.rep-export-zahl { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.rep-export-zahl.warn { color: #b07514; }
.rep-export-zahl.warn span { display: block; font-size: 0.8rem; }
.seg#repZeit button { min-width: 84px; }

/* Dezente Hover-Mikroanimationen app-weit */
.hist-row, .mini-row { transition: background 0.14s ease, transform 0.14s ease; border-radius: 10px; }
.hist-row:hover, .mini-row:hover { background: var(--bg); transform: translateX(3px); }
.orders tbody tr { transition: background 0.13s ease; }
.orders tbody tr:hover td { background: rgba(13, 13, 16, 0.025); }
.komp-chip { transition: transform 0.13s ease, box-shadow 0.13s ease; }
.komp-chip:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(16, 16, 19, 0.08); }
.btn { transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease; }
.btn-primary:hover { transform: translateY(-1.5px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22); }
.btn-ghost:hover, .btn-outline:hover { transform: translateY(-1px); }
.g-tab { transition: transform 0.13s ease, border-color 0.13s ease, background 0.13s ease, color 0.13s ease; }
.g-tab:hover:not(.on) { border-color: var(--ink); transform: translateY(-1px); }
.nav a svg { transition: transform 0.15s ease; }
.nav a:hover svg { transform: scale(1.12); }
.todo-zeile, .kontakt-zeile, .dok-zeile { transition: background 0.13s ease; }
.todo-zeile:hover, .kontakt-zeile:hover, .dok-zeile:hover { background: var(--bg); }

/* ================= Benutzermenü + Avatar-Editor + Farbschema ================= */
.user-menu {
  position: fixed; top: calc(var(--topbar-h) + 6px); right: 18px; z-index: 120;
  width: 260px; background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lift); padding: 8px;
  animation: popIn 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
.um-kopf { display: flex; align-items: center; gap: 11px; padding: 10px 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.um-kopf .avatar { width: 40px; height: 40px; font-size: 0.85rem; cursor: default; }
.um-name { font-weight: 700; font-size: 0.92rem; line-height: 1.2; }
.um-rolle { font-size: 0.74rem; color: var(--muted); }
.um-punkt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: none; border-radius: 10px;
  font-family: inherit; font-size: 0.88rem; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.13s ease;
}
.um-punkt:hover { background: var(--bg); }
.um-punkt svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--muted); }
.um-punkt.rot { color: var(--amp-rot); }
.um-punkt.rot svg { color: var(--amp-rot); }
.um-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* Farbschema-Auswahl */
.schema-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.schema-karte {
  border: 2px solid var(--border); border-radius: 14px; padding: 8px; cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease; text-align: center;
}
.schema-karte:hover { transform: translateY(-2px); }
.schema-karte.on { border-color: var(--akzent); }
.schema-prev { display: flex; height: 44px; border-radius: 9px; overflow: hidden; margin-bottom: 6px; }
.schema-prev i { flex: 1; }
.schema-karte span { font-size: 0.76rem; font-weight: 600; }
.modus-seg { display: flex; gap: 8px; margin-top: 14px; }
.modus-seg button {
  flex: 1; padding: 10px; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--muted); font-family: inherit; font-weight: 700;
  font-size: 0.86rem; cursor: pointer;
}
.modus-seg button.on { background: var(--ink); border-color: var(--ink); color: var(--card); }

/* Avatar-Editor (DiceBear) */
.av-kopf { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.av-current { width: 96px; height: 96px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); flex: 0 0 auto; }
.av-lbl { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 12px 0 6px; }
.av-opts { display: flex; flex-wrap: wrap; gap: 6px; }
.av-opt-t {
  width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--border);
  overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: var(--bg); transition: border-color 0.12s ease;
}
.av-opt-t img { width: 100%; height: 100%; }
.av-opt-t.sel { border-color: var(--akzent); }
.av-none { font-size: 0.6rem; color: var(--faint); font-weight: 600; }
.av-sw { display: flex; flex-wrap: wrap; gap: 6px; }
.av-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--border); transition: transform 0.12s ease, border-color 0.12s ease;
}
.av-swatch:hover { transform: scale(1.12); }
.av-swatch.sel { border-color: var(--ink); }

/* Ruhiges Neuzeichnen: Einblenden nur beim echten Seitenwechsel */
.content.kein-anim > * { animation: none !important; }
.content.kein-anim .rp-linie, .content.kein-anim .rep-zeile .rep-balken i,
.content.kein-anim .rep-split i { animation: none !important; transition: none !important; }
html { scrollbar-gutter: stable; }

/* Gerätemodelle + Installations-Karte */
.modell-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px dashed var(--line); }
.modell-zeile:last-child { border-bottom: none; }
.modell-zeile b { font-size: 0.92rem; min-width: 140px; }
#osmKarte { z-index: 1; }
.leaflet-popup-content a { color: var(--akzent); font-weight: 600; text-decoration: none; }
