/* ============================================================================
   PCs für alle – Design-System 2026
   Wird NACH app.css geladen und überschreibt die alten Komponenten.
   Ziel: ruhige Enterprise-Optik (Slate-Palette), App-Shell mit Sidebar,
   einheitliche Karten/Tabellen/Formulare/Badges.
   ========================================================================== */

:root {
  --bg: #f8fafc;            /* slate-50 */
  --card: #ffffff;
  --line: #e2e8f0;          /* slate-200 */
  --line-soft: #eef2f7;
  --text: #0f172a;          /* slate-900 */
  --muted: #64748b;         /* slate-500 */
  --brand: #2563eb;         /* blue-600 */
  --brand-dark: #1d4ed8;
  --brand-soft: #eff4ff;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --violet: #7c3aed;
  --indigo: #4f46e5;
  --rose: #e11d48;
  --r: 12px;
  --sh: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --sh-hover: 0 4px 14px rgba(15, 23, 42, .08);
  --sidebar: 260px;
}

body {
  background: var(--bg);
  font-size: 15px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- App-Shell */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }

/* Sidebar */
.side {
  position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
  background: #fff; border-right: 1px solid var(--line); padding: 18px 14px 24px;
  display: flex; flex-direction: column; gap: 4px; z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 16px; text-decoration: none; color: var(--text); }
.side-brand img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; }
.side-brand b { font-size: 15px; letter-spacing: -.01em; }
.alpha {
  font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(245, 158, 11, .15); color: #b45309; border: 1px solid rgba(245, 158, 11, .35);
}
.sgroup { margin: 14px 6px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em;
          text-transform: uppercase; color: #94a3b8; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: #334155; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.2;
  border: 1px solid transparent;
}
.snav a svg { width: 18px; height: 18px; flex: 0 0 18px; stroke-width: 1.8; color: #64748b; }
.snav a:hover { background: #f1f5f9; color: var(--text); }
.snav a.on { background: var(--brand-soft); border-color: #dbe7ff; color: var(--brand-dark); }
.snav a.on svg { color: var(--brand); }
.snav a .cnt {
  margin-left: auto; min-width: 20px; text-align: center; font-size: 11px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px; background: #fef3c7; color: #b45309;
}
.snav a .cnt.blue { background: #dbeafe; color: #1d4ed8; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); font-size: 11.5px; color: #94a3b8; }

/* Topbar */
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 14px;
  padding: 0 22px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.tb-title { font-size: 14px; font-weight: 700; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title .sep { color: #cbd5e1; margin: 0 6px; }
.tb-title .muted { color: var(--muted); font-weight: 500; }
.tb-mid { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 9px; color: var(--muted);
  font-size: 13px; min-width: 190px;
}
.tb-search input { border: 0; background: transparent; height: 34px; padding: 0; margin: 0; font-size: 13px; }
.tb-search input:focus { outline: none; }
.langpick { height: 36px; margin: 0; padding: 0 8px; font-size: 13px; width: auto; border-radius: 9px; }
.userpill {
  display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--text);
}
.userpill:hover { background: #f8fafc; }
.userpill .meta { display: flex; flex-direction: column; line-height: 1.15; }
.userpill .meta b { font-size: 12.5px; font-weight: 700; }
.userpill .meta span { font-size: 11px; color: var(--muted); }
.btn-ghost-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  border-radius: 9px; border: 1px solid var(--line); background: #fff; color: #475569; cursor: pointer;
  text-decoration: none;
}
.btn-ghost-icon:hover { background: #f1f5f9; }
.burger { display: none; }

.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 26px 26px 40px; }

/* ------------------------------------------------------------ Typografie */
h1 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; font-weight: 800; }
h1 .small, h1 .sub { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
h2 { font-size: 15px; font-weight: 800; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.small { font-size: 12.5px; color: var(--muted); }
.mono, code, .code-badge, .badge-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------------------------------------------------------------- Karten */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; margin: 0 0 16px; box-shadow: var(--sh);
}
.card > h2:first-child { margin-top: 0; }
.card.flat { box-shadow: none; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.wide { grid-column: 1 / -1; }

/* --------------------------------------------------------------- Formulare */
label { display: block; margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: #475569; }
input, select, textarea {
  width: 100%; height: 40px; padding: 0 12px; font-size: 14px; color: var(--text);
  border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; margin-top: 5px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}
input[type="checkbox"], input[type="radio"] { width: auto; height: auto; margin: 0; }
label.inline { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid #cbd5e1;
  background: #fff; color: #1e293b; text-decoration: none; font-size: 14px; font-weight: 600;
  cursor: pointer; margin: 0; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: #f8fafc; box-shadow: var(--sh); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.dark { background: #0f172a; border-color: #0f172a; color: #fff; }
.btn.danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.btn.danger:hover { background: #fef2f2; }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.big { height: 46px; font-size: 15px; }
/* Auf dem Desktop keine seitenbreiten Balken mehr */
@media (min-width: 901px) { .btn.big { width: auto; min-width: 200px; } }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------------------------------------------------------------- Badges */
.badge, .pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; border: 1px solid transparent; white-space: nowrap;
}
.badge-code {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 7px;
  background: #f1f5f9; border: 1px solid var(--line); color: #0f172a; font-size: 12px; font-weight: 700;
}
.badge.s-new { background: #dbeafe; color: #1d4ed8; }
.badge.s-check { background: #fef3c7; color: #b45309; }
.badge.s-ready { background: #d1fae5; color: #047857; }
.badge.s-issued { background: #e0e7ff; color: #4338ca; }
.badge.s-defekt { background: #fee2e2; color: #b91c1c; }
.gchip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 6px; font-size: 11.5px; font-weight: 800; }
.gA { background: #d1fae5; color: #047857; }
.gB { background: #fef3c7; color: #b45309; }
.gC { background: #fee2e2; color: #b91c1c; }
.hchip.hgruen { background: #d1fae5; color: #047857; }
.hchip.hgelb { background: #fef3c7; color: #b45309; }
.hchip.hrot { background: #fee2e2; color: #b91c1c; }
.role-owner { background: #f3e8ff; color: #6d28d9; border-color: #e9d5ff; }
.role-admin { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }
.role-tech { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.role-intake { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }

/* ---------------------------------------------------------------- Tabellen */
.tablewrap { overflow-x: auto; border-radius: var(--r); }
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: #64748b; font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line);
  background: #f8fafc; white-space: nowrap;
}
.rtable td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.rtable tbody tr:hover td { background: #f8fafc; }
.rtable tbody tr:last-child td { border-bottom: 0; }
.rtable tbody tr:nth-child(even) td { background: rgba(248, 250, 252, .5); }
.rtable a { color: var(--brand-dark); text-decoration: none; font-weight: 600; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.kv th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 12px 8px 0; width: 150px; vertical-align: top; }
.kv td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.kv tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- Avatare */
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 999px; object-fit: cover; font-size: 12.5px; font-weight: 800; color: #fff;
  background: #475569; letter-spacing: .02em; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar.a1 { background: #2563eb; } .avatar.a2 { background: #7c3aed; } .avatar.a3 { background: #059669; }
.avatar.a4 { background: #d97706; } .avatar.a5 { background: #e11d48; } .avatar.a6 { background: #0891b2; }
.avatar.a7 { background: #4f46e5; } .avatar.a8 { background: #be123c; }

/* -------------------------------------------------------------- Meldungen */
.flash { padding: 11px 14px; border-radius: 10px; margin: 0 0 14px; font-size: 13.5px; border: 1px solid; }
.flash.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.flash.err { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ------------------------------------------------------------ Segmented Control */
.segbtns, .segmented { display: inline-flex; gap: 4px; padding: 3px; background: #f1f5f9;
  border: 1px solid var(--line); border-radius: 10px; }
.segbtns .seg, .segmented > * {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 13px;
  border-radius: 8px; font-size: 13px; font-weight: 700; color: #475569; text-decoration: none;
  border: 1px solid transparent; background: transparent; cursor: pointer;
}
.segbtns .seg.on, .segmented > .on { background: #fff; color: var(--text); border-color: var(--line); box-shadow: var(--sh); }

/* ------------------------------------------------------------- Dashboard-Bento */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--sh); }
.stat .n { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .t { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat.b-new { border-top: 3px solid var(--brand); }
.stat.b-check { border-top: 3px solid var(--warn); }
.stat.b-defekt { border-top: 3px solid var(--bad); }
.stat.b-ready { border-top: 3px solid var(--ok); }
.stat.b-issued { border-top: 3px solid var(--indigo); }

/* --------------------------------------------------------------- Geräteliste */
.glist { border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.grow { display: grid; grid-template-columns: 96px minmax(160px, 1.4fr) minmax(180px, 2fr) auto auto; gap: 12px;
  align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  text-decoration: none; color: inherit; }
.grow:last-child { border-bottom: 0; }
.grow:hover { background: #f8fafc; }
.grow .gcode { font-family: ui-monospace, monospace; font-weight: 800; font-size: 13px; color: var(--brand-dark); }
.grow .gname { font-weight: 700; font-size: 13.5px; }
.grow .gspecs { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.grow .gspecs span { background: #f1f5f9; border-radius: 6px; padding: 1px 6px; }
.grow .gright { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.mhead { display: flex; align-items: center; justify-content: space-between; margin: 18px 2px 8px; }
.mhead span:first-child { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #64748b; }

/* ------------------------------------------------------------------ Filter */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar input, .toolbar select { margin: 0; height: 38px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; color: #334155; text-decoration: none; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .n { font-size: 11px; opacity: .8; }

/* ------------------------------------------------------------- Bestehendes aufräumen */
.top, .wrap.toprow { background: transparent; color: inherit; }
.foot { max-width: 1440px; margin: 0 auto; padding: 10px 26px 30px; color: #94a3b8; font-size: 11.5px; }
.foot .alphafoot { display: none; }
.burger, .navclose { display: none; }

/* ---------------------------------------------------------------- Mobil */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed; inset: 0 auto 0 0; width: 84%; max-width: 320px; height: 100dvh;
    transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--sh-hover);
  }
  body.sideopen .side { transform: translateX(0); }
  body.sideopen::after { content: ""; position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 35; }
  .burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; }
  .topbar { padding: 0 14px; gap: 10px; height: 58px; }
  .tb-search, .userpill .meta { display: none; }
  .content { padding: 16px 14px 32px; }
  h1 { font-size: 20px; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .grow { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .grow .gspecs { grid-column: 1 / -1; }
  .grow .gright { grid-column: 2; grid-row: 1; }
  .rtable thead { display: none; }
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; background: #fff; }
  .rtable td { border: 0; padding: 6px 0; display: flex; gap: 10px; }
  .rtable td::before { content: attr(data-label); font-size: 11px; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .05em; min-width: 92px; }
  .rtable tbody tr:nth-child(even) td { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ------------------------------------------------- Kategorie-Tabs / Jahres-Chips */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600; color: #334155; text-decoration: none; white-space: nowrap;
}
.tab:hover { background: #f8fafc; }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab .cnt { font-size: 11px; opacity: .75; }
.tab .dot { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; }
.chipwrap { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.yearchips { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.yearchips .chip { height: 30px; font-size: 12.5px; }
.yearchips .chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chipfilter { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #94a3b8; }

/* ------------------------------------------------ Scan-/Terminal-Layout */
.scanlayout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.inputgroup { display: flex; gap: 8px; align-items: stretch; }
.inputgroup input { flex: 1; height: 44px; font-size: 16px; }
.inputgroup .btn { height: 44px; }
.scanview { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px);
  border: 1px dashed #cbd5e1; border-radius: 12px; min-height: 150px; display: flex;
  align-items: center; justify-content: center; overflow: hidden; }
.scanframe { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #94a3b8;
  font-size: 12.5px; text-align: center; padding: 20px; }
.scanview video, .scanview canvas { max-width: 100%; border-radius: 10px; }
.stepper { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.stepper li { position: relative; padding: 0 0 14px 34px; font-size: 13px; color: #334155; counter-increment: st; }
.stepper li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 22px; height: 22px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 11.5px;
  font-weight: 800; display: flex; align-items: center; justify-content: center; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px;
  width: 1.5px; background: #e2e8f0; }
@media (max-width: 900px) { .scanlayout { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------- Ausgabe-Station */
.auslayout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .auslayout { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------- API-Key / Rollen */
.keycard { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #0f172a; border-radius: 10px; padding: 12px 14px; }
.keycard code { color: #e2e8f0; font-size: 13px; letter-spacing: .02em; word-break: break-all; flex: 1; min-width: 200px; }
.keybtns { display: flex; gap: 6px; }
.keybtns .btn { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.keybtns .btn:hover { background: #334155; }
.inlcode { background: #f1f5f9; color: #0f172a; padding: 2px 6px; border-radius: 5px;
  font-family: ui-monospace, monospace; font-size: 12px; border: 1px solid var(--line); }
.fileinput { padding: 6px; height: auto; background: #f8fafc; border-style: dashed; }
.ulist { border-top: 1px solid var(--line); }
.urow { border-bottom: 1px solid var(--line-soft); }
.urow > summary { display: flex; align-items: center; gap: 12px; padding: 11px 18px; cursor: pointer; list-style: none; }
.urow > summary::-webkit-details-marker { display: none; }
.urow > summary:hover { background: #f8fafc; }
.urow[open] > summary { background: #f8fafc; }
.urow > form { padding: 0 18px 6px; }
.uinfo { display: flex; flex-direction: column; min-width: 180px; flex: 1; line-height: 1.25; }
.uinfo b { font-size: 13.5px; }
.uedit { margin-left: auto; color: #94a3b8; }
.role-owner { background:#f3e8ff; color:#6d28d9; border-color:#e9d5ff; }
.role-admin { background:#ffedd5; color:#c2410c; border-color:#fed7aa; }
.role-tech  { background:#dcfce7; color:#15803d; border-color:#bbf7d0; }
.role-intake{ background:#dbeafe; color:#1d4ed8; border-color:#bfdbfe; }
@media (max-width: 900px) {
  .urow > summary { flex-wrap: wrap; gap: 8px; padding: 11px 14px; }
  .uinfo { min-width: 0; }
  .uedit { display: none; }
  .urow > form { padding: 0 14px 6px; }
}

/* --------------------------------------------------------- Wissens-Karten */
.wgrid2026 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.wcard2026 { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px; text-decoration: none; color: inherit; box-shadow: var(--sh);
  transition: box-shadow .16s, transform .16s, border-color .16s; }
.wcard2026:hover { box-shadow: var(--sh-hover); border-color: #cbd5e1; transform: translateY(-1px); }
.wcard2026 h3 { margin: 0; font-size: 14.5px; line-height: 1.3; }
.wcard2026 p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.wico { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.wfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px;
  border-top: 1px solid var(--line-soft); }
.warrow { font-size: 12px; font-weight: 700; color: var(--brand); opacity: 0; transform: translateX(-4px);
  transition: opacity .16s, transform .16s; }
.wcard2026:hover .warrow { opacity: 1; transform: translateX(0); }
@media (max-width: 900px) { .warrow { opacity: 1; transform: none; } }

/* ------------------------------------------------------ Rollen & Rechte */
.rolegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.rolecard { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: #fff;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh); }
.rolecard b { font-size: 13.5px; }
.rolecard span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.rc-owner { border-top: 3px solid #7c3aed; } .rc-owner svg { color: #7c3aed; }
.rc-admin { border-top: 3px solid #d97706; } .rc-admin svg { color: #d97706; }
.rc-tech  { border-top: 3px solid #059669; } .rc-tech svg  { color: #059669; }
.rc-intake{ border-top: 3px solid #2563eb; } .rc-intake svg{ color: #2563eb; }
.cbyes { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 999px; background: #d1fae5; color: #047857; }
.cbno { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px;
  border-radius: 999px; color: #cbd5e1; }
.rrecht { font-weight: 600; font-size: 13.5px; color: #1e293b; }
select.rsel { height: 30px; padding: 0 26px 0 9px; font-size: 12px; font-weight: 700; border-radius: 999px; margin: 0; }
select.rsel.s4 { background: #f3e8ff; border-color: #e9d5ff; color: #6d28d9; }
select.rsel.s3 { background: #ffedd5; border-color: #fed7aa; color: #c2410c; }
select.rsel.s2 { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
select.rsel.s1 { background: #dbeafe; border-color: #bfdbfe; color: #1d4ed8; }
@media (max-width: 900px) { .rolegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ------------------------------------------------------------- Zertifikate */
.zhero { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: linear-gradient(100deg, #1e3a8a 0%, #1e40af 45%, #3730a3 100%);
  color: #fff; border-radius: 14px; padding: 22px 24px; box-shadow: 0 6px 22px rgba(30,58,138,.22); }
.zhero-klein { font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #c7d2fe; }
.zhero-zahl { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.zhero-stand { font-size: 12.5px; color: #c7d2fe; }
.zkgrid2026 { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; }
.zkfeld { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px; background: #f8fafc; font-size: 12px; font-weight: 600; color: #475569; margin: 0; }
.zkfeld span { min-height: 28px; line-height: 1.2; }
.zkfeld input { margin: 0; height: 36px; background: #fff; font-weight: 700; text-align: center; }
.zksumme { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px;
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; font-weight: 600; }
.zksumme b { font-weight: 800; }
@media (max-width: 900px) { .zhero { padding: 18px; } .zhero-zahl { font-size: 27px; } .zhero-ico { display: none; } }
/* Gast-Ansicht (Login): keine Sidebar */
body.guest .side { display: none; }
body.guest .app { grid-template-columns: minmax(0, 1fr); }
body.guest .topbar .tb-search, body.guest .topbar .tb-mid, body.guest .topbar .langpick { display: none; }

/* ------------------------------------------------ Gerätetabelle kompakt */
.gtable td { padding: 9px 12px; font-size: 13.5px; }
.gtable .gname { display: block; font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.gtable .gsub { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.gtable .cd { width: 7px; height: 7px; border-radius: 999px; flex: 0 0 7px; }
.gtable .gspec { font-size: 12.5px; color: #475569; }
.gtable tr.msep td { background: #f1f5f9 !important; padding: 6px 12px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; color: #64748b; }
.gtable tr.klink { cursor: pointer; }
.gtable tr.klink:hover td { background: #f8fafc; }
.hdot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-left: 6px; vertical-align: 1px; }
.hdot.hgruen { background: #10b981; } .hdot.hgelb { background: #f59e0b; } .hdot.hrot { background: #ef4444; }

/* ----------------------------------------------------- Gerätedetail-Layout */
.devlayout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .devlayout { grid-template-columns: minmax(0, 1fr); } }
.devqr svg, .devqr img { width: 128px; height: 128px; display: block; }

/* ------------------------------------------------------------- Aufgabenliste */
.tdlist2026 { list-style: none; margin: 0; padding: 0; }
.tdrow2026 { display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft); transition: background .12s; }
.tdrow2026:last-child { border-bottom: 0; }
.tdrow2026:hover { background: #f8fafc; }
.tdrow2026.done { opacity: .58; }
.tdrow2026.done .tdbody b { text-decoration: line-through; }
.prio { width: 3px; align-self: stretch; border-radius: 3px; flex: 0 0 3px; background: #cbd5e1; }
.prio.p1 { background: #dc2626; } .prio.p2 { background: #f59e0b; } .prio.p3 { background: #94a3b8; }
.tdck { width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800;
  color: #94a3b8; cursor: pointer; flex: 0 0 28px; }
.tdck.frei { color: #2563eb; border-color: #bfdbfe; background: #eff4ff; }
.tdck.done { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.tdbody { flex: 1; min-width: 0; }
.tdbody b { font-size: 13.5px; display: block; line-height: 1.3; }
.tddesc { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tdmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 5px; font-size: 12px; color: var(--muted); }
.tdactions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------------------- Fortschritt */
.pbar { height: 8px; background: #eef2f7; border-radius: 999px; overflow: hidden; margin-top: 6px; }
.pbar-in { height: 8px; background: #10b981; border-radius: 999px; transition: width .3s; }

/* -------------------------------------------------------- Etikettenliste */
.eliste2026 { display: flex; flex-direction: column; }
.elrow { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-top: 1px solid var(--line-soft); }
.elrow:hover { background: #f8fafc; }
.elrow .cd { width: 8px; height: 8px; border-radius: 999px; flex: 0 0 8px; }
.elname { flex: 1; min-width: 0; font-size: 13.5px; color: #334155;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- Ereignisse */
.eventline2026 { display: flex; flex-direction: column; gap: 0; }
.evrow { display: grid; grid-template-columns: 14px 128px 130px minmax(0, 1fr); gap: 10px;
  align-items: baseline; padding: 8px 0; border-bottom: 1px dashed var(--line-soft); font-size: 12.5px; }
.evrow:last-child { border-bottom: 0; }
.evdot { width: 7px; height: 7px; border-radius: 999px; background: #bfdbfe; border: 1.5px solid #2563eb; margin-top: 4px; }
.evts { color: #94a3b8; font-family: ui-monospace, monospace; font-size: 11.5px; }
.evwho { font-weight: 700; color: #334155; }
.evwhat { color: #475569; }
@media (max-width: 900px) {
  .evrow { grid-template-columns: 12px minmax(0, 1fr); }
  .evts, .evwho { grid-column: 2; }
  .evwhat { grid-column: 2; }
  .tdrow2026 { flex-wrap: wrap; padding: 12px 14px; }
  .tdactions { width: 100%; justify-content: flex-start; padding-left: 40px; }
  .prio { display: none; }
}

/* ----------------------------------------- Modus-Schalter (Scan/Ausgabe) */
.segbtns .seg { position: relative; cursor: pointer; user-select: none; color: #475569; }
.segbtns .seg input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}
.segbtns .seg:hover { background: #eef2f7; }
.segbtns .seg.on,
.segbtns .seg:has(input:checked) {
  background: #fff; color: var(--text); border-color: var(--line); box-shadow: var(--sh);
}
.segbtns .seg.on svg,
.segbtns .seg:has(input:checked) svg { color: var(--brand); }
.segbtns .seg:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Kamera aktiv: Platzhalter ausblenden, Video sauber zeigen */
#reader:has(video) .scanframe,
#reader:has(canvas) .scanframe { display: none; }
#reader:has(video) { background: #0f172a; border-style: solid; border-color: #334155; padding: 6px; }
#reader video { border-radius: 8px; width: 100%; height: auto; }

/* ------------------------------------------------------------ CO₂-Bilanz */
.mbars { display: flex; align-items: flex-end; gap: 8px; height: 160px; overflow-x: auto; padding: 8px 0 0; }
.mcol { flex: 0 0 auto; width: 48px; text-align: center; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mbar { background: linear-gradient(180deg, #34d399, #059669); border-radius: 5px 5px 0 0; min-height: 3px; }
.mlabel { font-size: 10.5px; margin-top: 5px; color: #64748b; font-weight: 600; }
.esbars { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }

/* ---------------------------------------------- Kamera-Bereich (Scan/Import) */
#btnImportScan, #btnCam { min-width: 0; }
#importScanReader:has(video) .scanframe,
#importScanReader:has(canvas) .scanframe { display: none; }
#importScanReader:has(video) { background: #0f172a; border-style: solid; border-color: #334155; padding: 6px; }
.dotline { display: inline-block; width: 7px; height: 7px; border-radius: 999px; margin-right: 4px; vertical-align: 0; }
summary::-webkit-details-marker { display: none; }

/* ================================================= CO₂-Bilanz (ESG-Dashboard) */
.pagehead { margin-bottom: 18px; }
.pagehead h1 { margin-bottom: 2px; }
.pagehead .sub { margin: 0; font-size: 13px; color: var(--muted); }

.kpi-grid { display: grid; grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
  gap: 12px; margin-bottom: 16px; }
.kpi-hero {
  background: linear-gradient(135deg, #065f46 0%, #047857 45%, #134e4a 100%);
  color: #fff; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column;
  justify-content: space-between; min-height: 148px;
  box-shadow: 0 6px 20px rgba(6, 95, 70, .22);
}
.kpi-hero-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.kpi-hero-num { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 38px;
  font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: 10px 0 4px; }
.kpi-hero-foot { font-size: 12px; color: rgba(255,255,255,.82); }

.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh); min-height: 148px; }
.kpi-ico { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center;
  justify-content: center; }
.kpi-n { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 25px; font-weight: 800;
  letter-spacing: -.02em; line-height: 1.1; margin-top: auto; }
.kpi-t { font-size: 11.5px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .05em; line-height: 1.25; }
.kpi-sub { font-size: 11.5px; color: var(--muted); }

/* Tabelle */
.cardhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line-soft); }
.cardhead h2 { margin: 0; }
.ctable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ctable thead th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: #64748b; font-weight: 800; padding: 9px 14px; background: #f8fafc;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.ctable th.num, .ctable td.num { text-align: right; font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ctable td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.ctable tbody tr:hover td { background: rgba(248, 250, 252, .8); }
.ctable .cdot { display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 8px; }
.ctable .num-strong { font-weight: 800; }
.ctable .num-muted { color: #64748b; }
.ctable tfoot td { background: rgba(248, 250, 252, .9); font-weight: 700; border-bottom: 0;
  border-top: 1px solid var(--line); }
.info-dot { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px;
  border-radius: 999px; background: #e2e8f0; color: #64748b; font-size: 9px; font-weight: 800;
  font-family: system-ui, sans-serif; margin-left: 5px; cursor: help; }

/* Elektroschrott */
.eslist { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 4px; }
.esrow2 { display: grid; grid-template-columns: 150px minmax(0, 1fr) 84px; gap: 12px; align-items: center; }
.esname { font-size: 13px; color: #334155; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estrack2 { height: 12px; background: #f1f5f9; border-radius: 999px; padding: 2px; overflow: hidden; }
.estrack2 i { display: block; height: 8px; border-radius: 999px; min-width: 6px;
  background: linear-gradient(90deg, #34d399, #0d9488); }
.esbadge { text-align: right; font-family: ui-monospace, monospace; font-size: 12.5px; font-weight: 700;
  color: #0f172a; }
.essumme2 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--line-soft); font-size: 13px; color: #475569; }
.essumme2 b { font-family: ui-monospace, monospace; font-size: 16px; color: #065f46; }

/* Jahres-Diagramm */
.yrchart { display: flex; align-items: flex-end; gap: 22px; height: 210px; padding: 16px 4px 0;
  border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.yrcol { display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  width: 84px; height: 100%; }
.yrval { font-family: ui-monospace, monospace; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 5px; }
.yrbar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
.yrbar { width: 100%; background: #10b981; border-radius: 8px 8px 0 0; min-height: 4px;
  transition: background .15s; }
.yrcol:hover .yrbar { background: #059669; }
.yrlabel { font-size: 12px; font-weight: 800; color: #334155; margin-top: 8px; }
.yrsub { font-size: 10.5px; color: #94a3b8; margin-bottom: 6px; }

/* Nachweis + Export */
.infobox { display: flex; gap: 10px; background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a;
  border-radius: 12px; padding: 14px 16px; font-size: 12.5px; line-height: 1.65; margin: 4px 0 16px; }
.exportrow { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-export { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px;
  border-radius: 11px; border: 1px solid #cbd5e1; background: #fff; color: #334155;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, box-shadow .15s; }
.btn-export:hover { background: #f8fafc; box-shadow: var(--sh); }
.btn-export.primary { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.btn-export.primary:hover { background: #1e40af; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-hero { grid-column: 1 / -1; min-height: 132px; }
}
@media (max-width: 900px) {
  .kpi-grid { gap: 10px; }
  .kpi, .kpi-hero { min-height: 0; }
  .kpi-n { font-size: 21px; }
  .kpi-hero-num { font-size: 30px; }
  .esrow2 { grid-template-columns: minmax(0, 1fr) 76px; row-gap: 4px; }
  .esname { grid-column: 1 / -1; }
  .ctable thead { display: none; }
  .ctable, .ctable tbody, .ctable tr, .ctable td, .ctable tfoot { display: block; width: 100%; }
  .ctable tr { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; }
  .ctable td { border: 0; padding: 5px 0; }
  .ctable td.num { text-align: left; }
  .ctable td::before { content: attr(data-label); font-size: 10.5px; font-weight: 800; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .05em; display: block; }
  .yrchart { gap: 12px; }
  .yrcol { width: 64px; }
}
/* ============================================================================
   Print-Studio 2026 – Etiketten-Warteschlange (/etiketten)
   Zwei Spalten: Warteschlange links, A4-Bogen-Vorschau rechts.
   ========================================================================== */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.studio-card { margin: 0 0 16px; }
.studio-titel { margin: 0; font-size: 15px; }
.studio-titel .small { font-weight: 500; color: #94a3b8; }

.studio-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.studio-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.studio-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* ------------------------------------------------------ Warteschlange */
.elq { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.elq-kopf, .elq-zeile {
  display: grid; grid-template-columns: 34px 118px minmax(0, 1fr) 150px 96px;
  gap: 10px; align-items: center; padding: 8px 12px;
}
.elq-kopf { background: #f8fafc; border-bottom: 1px solid var(--line);
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #94a3b8; }
.elq-zeile { border-bottom: 1px solid #f1f5f9; font-size: 13px; cursor: pointer; }
.elq-zeile:last-child { border-bottom: 0; }
.elq-zeile:hover { background: #f8fafc; }

.elq-nr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; font-weight: 800;
  color: #64748b; background: #f1f5f9; border-radius: 6px; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center; }
.elq-geraet { display: flex; align-items: center; gap: 6px; min-width: 0; }
.elq-geraet .gt-code { padding: 1px 6px; }
.elq-modell { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0f172a; }
.elq-marke { display: inline-block; font-size: 10px; font-weight: 800; color: #64748b; background: #f1f5f9;
  border-radius: 4px; padding: 1px 5px; margin-right: 6px; text-transform: uppercase; letter-spacing: .03em; }
.elq-meta { font-size: 11.5px; color: #94a3b8; white-space: nowrap; }
.elq-zeile .btn.small { justify-self: end; white-space: nowrap; }
.elq-leer { padding: 18px; font-size: 13px; color: #64748b; }

/* ---------------------------------------------------------- A4-Vorschau */
.a4-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 2px 0 6px; }
.a4-zaehler { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 800; color: #047857; }
.a4-bar { height: 8px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.a4-bar span { display: block; height: 8px; background: #10b981; border-radius: 999px; transition: width .2s; }

.a4-blatt { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(8, 1fr);
  gap: 6px; padding: 10px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px;
  aspect-ratio: 1 / 1.414; max-width: 240px; margin: 14px auto; box-shadow: inset 0 1px 3px rgba(15,23,42,.05); }
.a4-feld { border-radius: 5px; border: 1px dashed #d7dee8; background: #fff; }
.a4-feld.belegt { border: 1px solid #bfdbfe; background: #eff6ff; display: flex; align-items: center;
  justify-content: center; }
.a4-feld.belegt span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 7.2px;
  font-weight: 800; color: #1d4ed8; letter-spacing: .02em; }

.studio-info { display: flex; gap: 8px; background: #f8fafc; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font-size: 12px; color: #475569; line-height: 1.5; }
.studio-info svg { color: #64748b; }

@media (max-width: 1100px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .a4-blatt { max-width: 210px; }
}
@media (max-width: 720px) {
  .elq-kopf { display: none; }
  .elq-zeile { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas:
      "nr geraet action" "nr modell action" "nr meta meta"; row-gap: 3px; }
  .elq-nr { grid-area: nr; align-self: start; }
  .elq-geraet { grid-area: geraet; }
  .elq-modell { grid-area: modell; white-space: normal; }
  .elq-meta { grid-area: meta; }
  .elq-zeile .btn.small { grid-area: action; align-self: start; }
}


/* ===================== Geräte-Tabelle (Partial _gtabelle.html) ============ */
.topbar .tb-search { display: none; }
  .gt { table-layout: auto; }
  .gt th { padding: 10px 12px; }
  .gt td { padding: 9px 12px; font-size: 13.5px; white-space: nowrap; }
  .gt td[data-label="Modell"] { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
  .gt td[data-label="Speicher"] { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }

  /* ---- Geräte-Kennung als Asset-Tag -------------------------------------- */
  .gt .gt-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px;
                background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 7px; }
  .gt .gt-tag .gt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
  .gt .gt-tag a { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
                  font-weight: 700; color: #0f172a; text-decoration: none; letter-spacing: .01em; }
  .gt .gt-tag:hover { border-color: #cbd5e1; background: #eef2f7; }

  /* ---- Marke ------------------------------------------------------------- */
  .gt .gt-brand { font-size: 11.5px; font-weight: 600; color: #334155; background: #f8fafc;
                  border: 1px solid #e8edf3; border-radius: 6px; padding: 2px 7px; white-space: nowrap; }

  /* ---- Zustand / RAM / Speicher ----------------------------------------- */
  .gt .gt-grade { display: inline-flex; align-items: center; justify-content: center; min-width: 22px;
                  padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 800; }
  .gt .gt-grade.g0 { background: #f1f5f9; color: #64748b; font-weight: 600; }
  .gt .gt-grade.gA { background: #d1fae5; color: #047857; }
  .gt .gt-grade.gB { background: #dbeafe; color: #1d4ed8; }
  .gt .gt-grade.gC { background: #fef3c7; color: #b45309; }
  .gt .gt-tech { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px;
                 color: #334155; background: #f1f5f9; border-radius: 6px; padding: 2px 7px; }
  .gt .gt-nossd { font-size: 11.5px; font-weight: 600; color: #b45309; background: #fffbeb;
                  border: 1px solid #fde68a; border-radius: 6px; padding: 2px 7px; }

  /* ---- Seriennummer mit Kopieren --------------------------------------- */
  .gt .gt-serial { display: inline-flex; align-items: center; gap: 5px; }
  .gt .gt-serial .gt-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: #475569; }
  .gt .gt-copy { opacity: 0; border: 0; background: transparent; padding: 2px; cursor: pointer; color: #94a3b8;
                 line-height: 0; transition: opacity .12s, color .12s; }
  .gt tr:hover .gt-copy { opacity: 1; }
  .gt .gt-copy:hover { color: #2563eb; }
  .gt .gt-copy.ok { color: #059669; opacity: 1; }

  /* ---- Akku-Kennzahlen -------------------------------------------------- */
  .gt .gt-ak { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 700;
               border-radius: 6px; padding: 2px 7px; border: 1px solid transparent; }
  .gt .gt-ak.gut { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
  .gt .gt-ak.mittel { background: #f0fdfa; color: #0f766e; border-color: #99f6e4; }
  .gt .gt-ak.schwach { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
  .gt .gt-ak.keine { background: #fff1f2; color: #be123c; border-color: #fecdd3; opacity: .8; }

  /* ---- Erfasst-Avatar --------------------------------------------------- */
  .gt .gt-av { display: inline-flex; align-items: center; justify-content: center;
               min-width: 28px; height: 26px; padding: 0 7px; border-radius: 999px;
               font-size: 10.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; }

  .gt tbody tr.gt-row { cursor: pointer; }
  .gt tbody tr.gt-row:hover td { background: #f8fafc; }
  .gt .gt-soft { color: #94a3b8; font-size: 12px; }
  .gt .gt-flow { white-space: nowrap; }
  .gt .gt-flow .badge { margin-right: 6px; }

  /* ---- Gruppen-Balken --------------------------------------------------- */
  .gt tr.gt-group td { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0;
                       padding: 7px 12px; }
  .gt .gt-group-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .gt .gt-group-l { font-size: 11.5px; font-weight: 700; color: #334155; }
  .gt .gt-group-n { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px; color: #64748b;
                    background: #fff; border: 1px solid #e2e8f0; border-radius: 999px; padding: 1px 9px; }

  .gt-empty { padding: 24px 14px !important; font-size: 13px; color: var(--muted); }
  .gt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
             padding: 11px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc; font-size: 11.5px; color: #64748b; }

  @media (max-width: 1400px) {
    .gt th:nth-child(8), .gt td:nth-child(8) { display: none; }   /* Serien-Nr. */
  }
  @media (max-width: 1400px) {
    .gt th:nth-child(5), .gt td:nth-child(5) { display: none; }   /* Zustand */
  }
  @media (max-width: 1100px) {
    .tablewrap { overflow: visible; }
    .gt, .gt tbody, .gt tr, .gt td { display: block; width: 100%; }
    .gt colgroup, .gt thead { display: none; }
    .gt tr.gt-row { position: relative; background: #fff; border: 1px solid var(--line);
      border-radius: var(--r); padding: 10px 12px; margin: 8px 10px; width: auto; box-sizing: border-box; }
    .gt tr.gt-row td { border: 0; padding: 2px 0; display: flex; align-items: center; gap: 8px;
      white-space: normal; overflow: visible; text-overflow: clip; max-width: none; }
    .gt tr.gt-row td::before { content: attr(data-label); flex: 0 0 78px; font-size: 10px; font-weight: 800;
      letter-spacing: .05em; text-transform: uppercase; color: #94a3b8; }
    .gt tr.gt-row td[data-label="Gerät"] { font-size: 14px; margin-bottom: 2px; }
    .gt tr.gt-row td[data-label="Gerät"]::before { content: none; }
    .gt tr.gt-row td[data-label="Status"]::before { content: none; }
    .gt tr.gt-row td[data-label="Status"] { margin-top: 4px; flex-wrap: wrap; }
    .gt tr.gt-group td { border-radius: 8px; margin: 6px 8px; border: 0; }
    .gt .gt-copy { opacity: 1; }
    .gt-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
  }

/* ============================================================================
   Geräteliste 2026 – Kategorie-Kacheln, Segmented-Control, Toolbar-Feinschliff
   ========================================================================== */
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cat-tile {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px;
  border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #1e293b;
  font-size: 12px; font-weight: 500; text-decoration: none; line-height: 1.2;
  transition: background .12s, border-color .12s, box-shadow .12s, opacity .12s;
}
.cat-tile:hover { border-color: #cbd5e1; background: #f8fafc; }
.cat-ico { width: 15px; height: 15px; flex: 0 0 15px; color: #64748b; }
.cat-name { white-space: nowrap; }
.cat-n {
  font-size: 10.5px; font-weight: 700; color: #64748b; background: #f1f5f9;
  border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.cat-tile.on { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; font-weight: 600;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .08); }
.cat-tile.on .cat-ico { color: #2563eb; }
.cat-tile.on .cat-n { background: #2563eb; color: #fff; }
.cat-tile.leer { opacity: .55; background: #fafbfc; border-color: #e8edf3; }
.cat-tile.leer:hover { opacity: 1; }

/* Segmented-Control in Vereinsblau */
.segmented { display: inline-flex; align-items: center; gap: 2px; background: #f1f5f9;
  border-radius: 9px; padding: 3px; }
.segmented a { padding: 5px 11px; border-radius: 6px; font-size: 12px; font-weight: 500;
  color: #475569; text-decoration: none; line-height: 1.3; transition: background .12s, color .12s; }
.segmented a:hover { color: #0f172a; background: #e8eef6; }
.segmented a.on { background: #2563eb; color: #fff; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .14); }
.segmented a.on:hover { background: #1d4ed8; }
.seg-lab { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: #94a3b8; padding: 0 6px; }
.seg-n { font-size: 10px; opacity: .7; margin-left: 4px; }

/* Kopfzeile über der Kategorie-Leiste */
.gt-years { display: flex; justify-content: flex-end; margin: -4px 0 12px; }

/* Filter-Toolbar */
.gt-bar { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; background: #f8fafc; gap: 8px; }
.gt-bar input, .gt-bar select, .gt-bar .btn { height: 40px; border-radius: 8px; }
.gt-search { position: relative; flex: 1 1 240px; min-width: 200px; display: flex; align-items: center; }
.gt-search svg { position: absolute; left: 11px; pointer-events: none; }
.gt-search input { width: 100%; padding-left: 34px; margin: 0; }
.gt-sel { width: auto; min-width: 140px; }
.gt-bar .btn.primary { padding: 0 18px; font-weight: 600; }

/* Gruppierung */
.gt-gbar { display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px solid #eef2f7; flex-wrap: wrap; }

/* Volle Arbeitsbreite */
.tablewrap { width: 100%; }
.card > .tablewrap { border-radius: 0; }

@media (max-width: 720px) {
  .cat-tile { padding: 6px 9px; font-size: 11.5px; }
  .cat-ico { width: 14px; height: 14px; flex: 0 0 14px; }
  .gt-search { flex: 1 1 100%; }
  .gt-sel { flex: 1 1 46%; min-width: 0; }
  .gt-bar .btn { flex: 1 1 auto; }
}

/* letzte Feinheiten: Archiv-Kachel rechts, Tabelle darf scrollen statt abzuschneiden */
.cat-tile.archiv { margin-left: auto; }
.tablewrap { overflow-x: auto; }
.gt th { padding: 9px 10px; }
.gt td { padding: 8px 10px; }
.gt th:last-child, .gt td:last-child { padding-right: 16px; }
@media (max-width: 1100px) { .cat-tile.archiv { margin-left: 0; } }

/* Breiten-Feinschliff: Tabelle passt ohne Scrollen in die Karte */
.gt td[data-label="Modell"] { max-width: 205px; }
.gt td[data-label="CPU"] { max-width: 148px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1440px) {
  .cat-tile { padding: 6px 9px; font-size: 11.5px; gap: 6px; }
  .cat-n { font-size: 10px; padding: 1px 6px; }
}

/* Zellen etwas enger, damit elf Spalten ohne Scrollen passen */
.gt th, .gt td { padding-left: 7px; padding-right: 7px; }
.gt .gt-tag { padding: 2px 7px; }
.gt .gt-tech, .gt .gt-ak, .gt .gt-nossd { padding: 2px 6px; }
.gt .gt-flow .badge { padding: 2px 7px; font-size: 10.5px; }
.gt .gt-av { width: auto; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
               font-size: 10.5px; white-space: nowrap; }

/* Endschliff Breite: Kachelzeile und Spaltenbreiten */
@media (max-width: 1500px) {
  .cats { gap: 5px 5px; }
  .cat-tile { padding: 6px 8px; font-size: 11.5px; }
  .cat-ico { width: 14px; height: 14px; flex: 0 0 14px; }
}
.gt th, .gt td { padding-left: 7px; padding-right: 7px; }

/* ---------------- Hover-Aktionen: Öffnen-Pfeil und Kopier-Knopf ---------- */
.gt td.gt-flow { position: relative; }
.gt .gt-open { position: absolute; right: 4px; top: 50%; display: inline-flex; align-items: center; gap: 2px;
  font-size: 11.5px; font-weight: 700; color: #2563eb; text-decoration: none; white-space: nowrap;
  padding: 7px 6px 7px 26px; border-radius: 0 6px 6px 0;
  background: linear-gradient(90deg, rgba(248, 250, 252, 0), #f8fafc 45%);
  opacity: 0; transform: translateY(-50%) translateX(4px); pointer-events: none;
  transition: opacity .13s ease, transform .13s ease; }
.gt .gt-open:hover { color: #1d4ed8; }
.gt tr.gt-row:hover .gt-open, .gt tr.gt-row:focus-within .gt-open {
  opacity: 1; transform: translateY(-50%) translateX(0); pointer-events: auto; }
.gt .gt-tag .gt-copy-tag { margin-left: -2px; }
.gt .gt-tag .gt-copy { opacity: 0; }
.gt tr:hover .gt-tag .gt-copy { opacity: 1; }

@media (max-width: 1100px) {
  .gt .gt-open { position: static; transform: none; opacity: 1; pointer-events: auto;
    background: transparent; padding: 0; margin-left: 6px; }
  .gt .gt-tag .gt-copy { opacity: 1; }
}

.gt-ziele { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.gt-filtern { display: none; }
/* ============================================================================
   Mobile Geräte-Karten (< 768 px): Tabelle raus, Hardware-Karten rein.
   ========================================================================== */
.mcards { display: none; }

@media (max-width: 767px) {

  .gtdesk { display: none; }
  .mcards { display: block; }

  .mcard {
    display: block; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 12px 13px; margin: 0 0 9px; text-decoration: none; color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: background .12s;
  }
  .mcard:active { background: #f8fafc; }

  .mcard .mc-kopf { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .mcard .mc-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
    font-weight: 700; color: #0f172a; letter-spacing: .01em; }
  .mcard .mc-ende { margin-left: auto; display: inline-flex; gap: 5px; align-items: center; }
  .mcard .mc-ende .badge { font-size: 10px; padding: 2px 7px; }

  .mcard .mc-modell { font-size: 14.5px; font-weight: 600; color: #0f172a; margin: 7px 0 8px;
    line-height: 1.3; }

  .mcard .mc-pills { display: flex; flex-wrap: wrap; gap: 5px; }
  .mcard .mc-pills .gt-tech, .mcard .mc-pills .gt-ak, .mcard .mc-pills .gt-nossd,
  .mcard .mc-pills .gt-grade { font-size: 11px; padding: 3px 7px; }

  .mc-gruppe { display: flex; align-items: center; justify-content: space-between;
    font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .05em;
    margin: 14px 2px 8px; }
  .mc-gruppe .mc-gn { background: #f1f5f9; border-radius: 999px; padding: 1px 8px; font-size: 10.5px;
    color: #64748b; letter-spacing: 0; text-transform: none; }
  .mc-leer { padding: 18px 4px; color: #64748b; font-size: 13px; }

  /* Kategorie-Leiste: waagerecht wischbar */
  .cats { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    margin: 0 -14px 12px; padding: 2px 14px 6px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat-tile { flex: 0 0 auto; min-height: 42px; }
  .cat-tile.archiv { margin-left: 0; }

  /* Filter: Suche voll, Filter-Knopf daneben, Dropdowns einklappbar */
  .gt-bar { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .gt-search { flex: 1 1 calc(100% - 120px); min-width: 0; }
  .gt-bar .gt-sel { display: none; flex: 1 1 46%; }
  .gt-bar .gt-ziele { display: none; flex: 1 1 100%; }
  .gt-bar.offen .gt-sel, .gt-bar.offen .gt-ziele { display: block; }
  .gt-bar .jsfilter { display: inline-flex; }
  .gt-filtern { min-height: 42px; flex: 0 0 auto; }
  .gt-gbar { padding: 10px 12px; }
  .gt-gbar .segmented { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .gt-gbar .segmented::-webkit-scrollbar { display: none; }
  .gt-gbar .segmented a { flex: 0 0 auto; }

  /* Fußzeile der Liste */
  .gt-foot { padding: 10px 12px; }
}

/* App-Shell nur unter 768 px sichtbar */
.mhead, .mtab, .msheet { display: none; }

/* ============================================================================
   Mobile 2026 – App-Shell für Smartphones (< 768 px).
   Desktop bleibt unberührt: alles hier greift nur unter 768 px.
   ========================================================================== */
@media (max-width: 767px) {

  html, body { overflow-x: hidden; }
  body { padding-bottom: 0; }

  /* ---------------------------------------------------------- Mobile-Header */
  .mhead {
    display: flex; align-items: center; gap: 10px;
    height: 56px; padding: 0 14px; position: sticky; top: 0; z-index: 40;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid #e2e8f0;
  }
  .mhead img { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
  .mhead .mh-titel { font-size: 15px; font-weight: 700; color: #0f172a; letter-spacing: -.01em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mhead .mh-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
  .mhead .mh-aktionen { margin-left: auto; display: flex; align-items: center; gap: 4px; }
  .mhead .mh-ico { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; color: #475569; text-decoration: none; }
  .mhead .mh-ico:active { background: #f1f5f9; }
  .mhead .mh-av { width: 34px; height: 34px; border-radius: 999px; overflow: hidden; display: inline-flex;
    align-items: center; justify-content: center; background: #e8eef8; color: #25539b;
    font-size: 12px; font-weight: 700; text-decoration: none; }
  .mhead .mh-av img { width: 34px; height: 34px; border-radius: 999px; }

  /* Alte Topbar auf dem Handy ausblenden – der Mobile-Header übernimmt */
  .topbar { display: none; }

  /* ------------------------------------------------------ Bottom-Tab-Bar */
  .mtab {
    display: flex; align-items: center; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; height: 64px; z-index: 50;
    background: #fff; border-top: 1px solid #e2e8f0;
    padding: 0 6px calc(0px + env(safe-area-inset-bottom));
  }
  .mtab .mi {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 48px; text-decoration: none; color: #94a3b8;
    font-size: 10.5px; font-weight: 600; background: none; border: 0; font-family: inherit;
    position: relative;
  }
  .mtab .mi svg { width: 22px; height: 22px; stroke-width: 1.9; }
  .mtab .mi.on { color: #2563eb; }
  .mtab .mi .dot { position: absolute; top: 6px; right: calc(50% - 16px); min-width: 15px; height: 15px;
    border-radius: 999px; background: #f59e0b; color: #fff; font-size: 9px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; }
  .mtab .mscan {
    flex: 0 0 auto; width: 58px; height: 58px; margin-top: -22px; border-radius: 18px;
    background: #2563eb; color: #fff; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 1px; text-decoration: none; box-shadow: 0 6px 16px rgba(37, 99, 235, .35);
    border: 3px solid #fff;
  }
  .mtab .mscan svg { width: 24px; height: 24px; stroke-width: 2; }
  .mtab .mscan span { font-size: 8.5px; font-weight: 800; letter-spacing: .04em; }
  .mtab .mscan:active { transform: scale(.96); }

  /* Platz, damit die Tab-Bar nichts verdeckt */
  .content { padding: 12px 14px calc(84px + env(safe-area-inset-bottom)); }
  .foot { padding-bottom: 84px; }
  h1 { font-size: 19px; line-height: 1.25; margin: 2px 0 10px; }
  .foot { display: none; }

  /* ------------------------------------------------------ Bottom-Sheet */
  .msheet { position: fixed; inset: 0; z-index: 60; display: none; }
  .msheet.open { display: block; }
  .msheet .ms-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .38); }
  .msheet .ms-panel {
    position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
    border-radius: 18px 18px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
    max-height: 82vh; overflow: auto; box-shadow: 0 -8px 30px rgba(15, 23, 42, .18);
    animation: ms-up .18s ease-out;
  }
  @keyframes ms-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
  .msheet .ms-griff { width: 42px; height: 4px; border-radius: 999px; background: #cbd5e1; margin: 6px auto 10px; }
  .msheet .ms-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .msheet .ms-kopf b { font-size: 15px; }
  .msheet .ms-x { width: 36px; height: 36px; border: 0; background: #f1f5f9; border-radius: 10px;
    font-size: 16px; color: #475569; }
  .msheet .ms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .msheet .ms-grid a {
    display: flex; align-items: center; gap: 9px; min-height: 46px; padding: 10px 12px;
    border: 1px solid #e6ebf2; border-radius: 12px; text-decoration: none;
    color: #1e293b; font-size: 13px; font-weight: 500; background: #fff;
  }
  .msheet .ms-grid a:active { background: #f8fafc; }
  .msheet .ms-grid a svg { width: 18px; height: 18px; color: #64748b; flex: 0 0 18px; }
  .msheet .ms-gruppe { grid-column: 1 / -1; font-size: 10px; font-weight: 800; letter-spacing: .06em;
    text-transform: uppercase; color: #94a3b8; margin: 8px 0 -2px; }

  /* --------------------------------------------- Einheitliche Touch-Größen */
  .btn, .btn.small { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
  .segmented a, .segbtns .seg { min-height: 42px; display: inline-flex; align-items: center; }
  input, select, textarea { font-size: 16px !important; min-height: 44px; }
  .btn.small { font-size: 13px; }

  /* Tabellen ohne Umbau: horizontal wischen statt Layout sprengen */
  .tablewrap, .admin-table, .overflow-x { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============================================================================
   Mobile 2026 – Scan, Geräteakte und Schnelltest (< 768 px)
   ========================================================================== */
@media (max-width: 767px) {

  /* ------------------------------------------------------ /scan Cockpit */
  .scanlayout { grid-template-columns: 1fr; gap: 12px; }
  .scanlayout > div:first-child .card { display: flex; flex-direction: column; }
  .scanlayout #modePick { order: 1; margin-bottom: 10px !important; }
  .scanlayout .segbtns .seg { min-height: 44px; font-size: 12.5px; padding: 0 6px; gap: 5px; }
  .scanlayout .segbtns .seg svg { display: none; }

  .scanlayout .modinfo { order: 5; margin-top: 4px; }
  .scanlayout #reader { order: 2; }
  .scanlayout .actions { order: 3; }
  .scanlayout #scanForm { order: 4; }
  .scanlayout #camMsg { order: 2; }

  .scanlayout .scanview { min-height: 190px; }
  .scanlayout .scanview.cam-on { min-height: 260px; }
  .scanlayout .scanframe { min-height: 180px; justify-content: center; font-size: 12.5px; text-align: center;
    padding: 0 10px; }

  .scanlayout #btnCam { flex: 1 1 100%; min-height: 54px; font-size: 15px; font-weight: 600;
    justify-content: center; }
  .scanlayout .actions { gap: 8px; }

  .scanlayout .inputgroup { flex-wrap: nowrap; gap: 8px; }
  .scanlayout .inputgroup input { flex: 1 1 auto; min-width: 0; font-size: 16px !important;
    letter-spacing: .04em; }
  .scanlayout .inputgroup .btn { flex: 0 0 auto; min-height: 48px; padding: 0 16px; }

  /* Sitzungsliste: große Touch-Buttons */
  #scanLog .scanitem, #scanLog .logitem, #scanLog li { padding: 10px 0; }
  #scanLog a.btn, #scanLog button.btn { min-height: 40px; font-size: 12.5px; }

  /* Kurzanleitung einklappen */
  .scan-hilfe { display: block; }
  .scan-hilfe > summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px;
    padding: 0 12px; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc;
    font-size: 12.5px; font-weight: 600; color: #475569; }
  .scan-hilfe > summary::-webkit-details-marker { display: none; }
  .scan-hilfe[open] > summary { border-radius: 10px 10px 0 0; }

  /* --------------------------------------------------- /device Akte */
  .devlayout { grid-template-columns: 1fr !important; gap: 12px; }

  /* Reihenfolge: Übersicht → Technik → Status → Rest */
  .devlayout > div:first-child { display: flex; flex-direction: column; }
  .devlayout > div:first-child > .card:nth-child(1) { order: 1; }
  .devlayout > div:first-child > .card:nth-child(2) { order: 2; }
  .devlayout > div:first-child > .card:nth-child(3) { order: 3; }
  .devlayout > div:first-child > .card:nth-child(4) { order: 4; }
  .devlayout > div:first-child > .card:nth-child(5) { order: 90; }  /* Löschen ganz nach unten */
  .devlayout > div:first-child > .card:nth-child(6) { order: 12; }  /* Status */
  .devlayout > div:first-child > .card:nth-child(7) { order: 13; }
  .devlayout > div:first-child > .card:nth-child(8) { order: 14; }
  .devlayout > div:first-child > .card:nth-child(9) { order: 15; }
  .devlayout > div:first-child > .card:nth-child(10) { order: 16; }
  .devlayout > div:first-child > .card:nth-child(11) { order: 17; }

  /* Tech-Daten: erst drei Zeilen, Rest auf Wunsch */
  .devkv-btn { display: inline-flex; width: 100%; justify-content: center; margin-top: 8px; min-height: 42px; }
  .devkv-wrap:not(.open) table.kv tr:nth-child(n+4) { display: none; }
  .devkv-wrap.open .devkv-btn::after { content: ''; }
  .devkv-wrap:not(.open) .devkv-btn::after { content: ''; }

  /* --------------------------------------------------- /check Schnelltest */
  .segbtns { width: 100%; }
  .segbtns .seg { flex: 1 1 0; min-height: 46px; justify-content: center; text-align: center;
    font-size: 13px; }
  .segbtns .seg span { padding: 0 4px; }

  .grades { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .grades .gopt .gbox { min-height: 56px; padding: 10px; display: flex; flex-direction: column;
    justify-content: center; }

  .stickybar { position: sticky; bottom: 76px; z-index: 5; padding: 8px 0 4px;
    background: linear-gradient(180deg, rgba(255,255,255,0), #fff 40%); }
  .stickybar .btn.big { width: 100%; min-height: 52px; font-size: 15px; }

  textarea { min-height: 96px; }
}

@media (max-width: 767px) {
  .scanlayout #modePick { display: flex; width: 100%; gap: 4px; }
  .scanlayout #modePick .seg { flex: 1 1 0; min-width: 0; justify-content: center; }
  .scanlayout #modePick .seg span { display: none; }
  .scanlayout #modePick .seg { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* Geräteakte: QR über der Tabelle statt daneben */
  .devlayout > div:first-child > .card:nth-child(1) > div:first-of-type { flex-direction: column; gap: 12px !important; }
  .devlayout .devqr { padding: 8px !important; }
  .devlayout .devqr svg, .devlayout .devqr img { width: 96px !important; height: 96px !important; }
  .devlayout > div:first-child > .card:nth-child(1) table.kv { width: 100%; }

  /* Reihenfolge: Übersicht → Status → Technik → Erfassungen → Verlauf … */
  .devlayout > div:first-child > .card:nth-child(1) { order: 1; }
  .devlayout > div:first-child > .card:nth-child(6) { order: 2; }
  .devlayout > div:first-child > .card:nth-child(4) { order: 3; }
  .devlayout > div:first-child > .card:nth-child(2) { order: 4; }
  .devlayout > div:first-child > .card:nth-child(3) { order: 5; }
  .devlayout > div:first-child > .card:nth-child(7) { order: 6; }
  .devlayout > div:first-child > .card:nth-child(8) { order: 7; }
  .devlayout > div:first-child > .card:nth-child(9) { order: 8; }
  .devlayout > div:first-child > .card:nth-child(10) { order: 9; }
  .devlayout > div:first-child > .card:nth-child(11) { order: 10; }
  .devlayout > div:first-child > .card:nth-child(5) { order: 99; }

  /* Aktionsknöpfe der Akte: mindestens 44 px */
  .devlayout .btn { min-height: 44px; }

  /* Karte andeuten, dass sie klickbar ist */
  .mcard .mc-kopf .mc-code::after { content: ''; }
  .mcard::after {
    content: '›'; float: right; margin-top: -46px; margin-right: -2px;
    color: #cbd5e1; font-size: 22px; line-height: 1; font-weight: 400;
  }
}

@media (max-width: 767px) {
  /* Beide Akten-Spalten in eine Reihenfolge bringen */
  .devlayout { display: flex; flex-direction: column; gap: 12px; }
  .devlayout > div:first-child, .devlayout > div:nth-child(2) { display: contents; }
  .devlayout > div:first-child > .card:nth-child(1) { order: 1; }   /* Übersicht */
  .devlayout > div:nth-child(2) > .card:nth-child(1) { order: 2; }  /* Status ändern */
  .devlayout > div:first-child > .card:nth-child(4) { order: 3; }   /* Technik-Formular */
  .devlayout > div:first-child > .card:nth-child(2) { order: 4; }   /* Erfassungen */
  .devlayout > div:first-child > .card:nth-child(3) { order: 5; }   /* Verlauf */
  .devlayout > div:nth-child(2) > .card:nth-child(n+2) { order: 6; }
  .devlayout > div:first-child > .card:nth-child(5) { order: 99; }  /* Löschen */
  .devlayout > .card { margin-bottom: 0; }
}

@media (max-width: 767px) {
  #scanLog .btn, #scanLog a.btn { min-height: 44px; font-size: 13px; padding: 0 14px; }
  #scanLog > p.small { font-size: 12.5px; }
}

/* ------------------------------------------------- Standort-Umschalter ---- */
.ortswitch { display: inline-flex; align-items: center; gap: 2px; background: #f1f5f9;
  border-radius: 9px; padding: 3px; }
.ortswitch .ort { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border-radius: 6px; font-size: 12px; font-weight: 500; color: #475569; text-decoration: none;
  white-space: nowrap; transition: background .12s, color .12s; }
.ortswitch .ort:hover { background: #e8eef6; color: #0f172a; }
.ortswitch .ort.on { background: #2563eb; color: #fff; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .14); }
.ortbadge { display: inline-flex; align-items: center; margin-left: 6px; font-size: 11px;
  font-weight: 600; padding: 2px 8px; border-radius: 999px; color: var(--oc, #2563eb);
  background: color-mix(in srgb, var(--oc, #2563eb) 12%, #fff);
  border: 1px solid color-mix(in srgb, var(--oc, #2563eb) 26%, #fff); }
.ortbadge.alle { --oc: #64748b; }

/* Aufteilung nach Standort (Dashboard, "Alle") */
.ortsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px;
  margin: 0 0 18px; }
.ortsplit a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid #e2e8f0; background: #fff; text-decoration: none; color: inherit; }
.ortsplit a:hover { border-color: #cbd5e1; }
.ortsplit .punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--oc, #94a3b8); }
.ortsplit .name { font-size: 12.5px; font-weight: 600; color: #334155; }
.ortsplit .zahl { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; font-weight: 700; color: #0f172a; }
.ortsplit .co2 { font-size: 11px; color: #64748b; }

/* Standort-Kürzel in der Geräteliste (nur wenn "Alle") */
.gt .gt-ort { display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; font-size: 9.5px;
  font-weight: 800; letter-spacing: .03em; color: var(--oc, #475569);
  background: color-mix(in srgb, var(--oc, #475569) 12%, #fff); }
.mcard .mc-ort { display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 5px; font-size: 10px;
  font-weight: 800; color: var(--oc, #475569);
  background: color-mix(in srgb, var(--oc, #475569) 12%, #fff); }

@media (max-width: 1100px) { .ortswitch .ort { padding: 5px 8px; font-size: 11.5px; } }
@media (max-width: 767px) {
  .ortswitch { display: none; }
  .ms-ort { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
  .ms-ort .ort { flex: 1 1 auto; justify-content: center; min-height: 42px; padding: 8px 10px;
    border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #334155;
    font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex;
    align-items: center; }
  .ms-ort .ort.on { background: #2563eb; border-color: #2563eb; color: #fff; }
}
.ortsplit .zahl .einh { display: block; font-size: 9.5px; font-weight: 600; color: #94a3b8;
  text-align: right; letter-spacing: .02em; }

/* ============================ Sidebar einklappen (Icon-Modus) ============== */
@media (min-width: 1101px) { .side { position: sticky; transition: width .16s ease; } }
.side-pill {
  position: absolute; left: 6px; right: 6px; top: 0; height: 34px; border-radius: 8px;
  background: color-mix(in srgb, #2563eb 10%, #fff); border: 1px solid color-mix(in srgb, #2563eb 16%, #fff);
  opacity: 0; z-index: 0; pointer-events: none;
  transition: transform .22s cubic-bezier(.22, .61, .36, 1), height .16s ease, opacity .16s ease;
}
.side .snav { position: relative; z-index: 1; }
.side .snav a { position: relative; }
.side .snav a.on { background: transparent !important; border-color: transparent; box-shadow: none; }

.side-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 10px;
  padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff;
  color: #64748b; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.side-toggle:hover { background: #f8fafc; color: #334155; }
.side-toggle svg { width: 15px; height: 15px; flex: 0 0 15px; transition: transform .18s; }

@media (min-width: 1101px) {
  body.side-mini { --sidebar: 68px; }
  body.side-mini .side { padding: 14px 8px 18px; align-items: stretch; }
  body.side-mini .side-brand { padding: 2px 0 12px; justify-content: center; }
  body.side-mini .side-brand img { width: 32px; height: 32px; }
  body.side-mini .side-brand b,
  body.side-mini .alpha,
  body.side-mini .side-fuss { display: none; }
  body.side-mini .snav a {
    font-size: 0; justify-content: center; padding: 10px 0; gap: 0;
  }
  body.side-mini .snav a svg { width: 19px; height: 19px; flex: 0 0 19px; }
  body.side-mini .snav a .cnt {
    position: absolute; top: 4px; right: 6px; font-size: 9px; padding: 0 4px; line-height: 14px;
    min-width: 14px; height: 14px;
  }
  body.side-mini .sgroup {
    font-size: 0; height: 1px; background: #eef2f7; margin: 8px 8px; padding: 0; overflow: hidden;
  }
  body.side-mini .side-foot { padding-top: 8px; }
  body.side-mini .side-toggle { justify-content: center; padding: 8px 0; }
  body.side-mini .side-toggle span { display: none; }
  body.side-mini .side-toggle svg { transform: rotate(180deg); }
  body.side-mini .side-pill { left: 4px; right: 4px; }
}

/* Umschalter immer sichtbar am unteren Rand der Sidebar (auch bei langer Navigation) */
@media (min-width: 1101px) {
  .side-toggle {
    position: fixed; left: 12px; bottom: 14px; z-index: 45;
    width: calc(var(--sidebar) - 26px); background: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .08);
  }
  body.side-mini .side-toggle { left: 9px; width: calc(var(--sidebar) - 20px); }
  .side { padding-bottom: 74px; }
}
@media (min-width: 1101px) {
  body.side-mini .side .sgroup {
    display: block; height: 1px; min-height: 1px; max-height: 1px; flex: 0 0 1px;
    padding: 0; margin: 12px 8px; background: #d5deea; overflow: hidden;
  }
  body.side-mini .side-toggle { min-height: 34px; }
}

/* QR in der Geräteakte: feste Größe, kein Überlaufen über den Text */
/* QR in der Akte: Kasten groß genug, damit nichts abgeschnitten wird */
.devqr { overflow: visible !important; padding: 10px !important; box-sizing: content-box; }
.devqr svg, .devqr img { display: block; width: 116px; height: 116px; max-width: none; }
@media (max-width: 767px) {
  .devqr svg, .devqr img { width: 100px; height: 100px; }
}

@media (max-width: 1150px) {
  .gt .gt-mode { display: none; }                                    /* Workflow-Badge weicht */
  .gt th:nth-child(7), .gt td:nth-child(7) { display: none; }        /* Speicher – steht in der Akte */
}

/* ===================== Schmale Desktops: Spalten & Akte ===================== */
/* Geräteakte: Kennwert-Tabelle darf nie über den Rand laufen */
.devlayout .kv { table-layout: fixed; width: 100%; }
.devlayout .kv th, .devlayout .kv td { overflow-wrap: anywhere; word-break: break-word; }
.devlayout .kv td { min-width: 0; white-space: normal; }
.devlayout .kv td .mono, .devlayout .kv td code { white-space: normal; overflow-wrap: anywhere; }
.devlayout .kv .btn { max-width: 100%; }
.devlayout > div { min-width: 0; }

@media (max-width: 1300px) {
  .gt th:nth-child(2), .gt td:nth-child(2) { display: none; }   /* Marke – steckt meist im Modellnamen */
}
@media (max-width: 1250px) {
  .gt th, .gt td { padding-left: 6px; padding-right: 6px; font-size: 12.5px; }
  .gt .gt-tag { padding: 2px 6px; }
  .gt .gt-tag a { font-size: 11px; }
  .gt .gt-av { font-size: 9.5px; padding: 0 5px; }
  .gt .gt-flow .badge { font-size: 10px; padding: 2px 5px; }
  .gt td[data-label="Modell"] { max-width: 130px; }
  .gt td[data-label="CPU"] { max-width: 110px; }
}
@media (max-width: 1150px) {
  .gt .gt-mode { display: none; }   /* Workflow-Badge weicht, Status bleibt */
}
@media (max-width: 1100px) { html, body { overflow-x: hidden; } }


/* Aufgaben + Reparaturen nebeneinander (Dashboard) */
.rep-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1000px) {
  .rep-split { grid-template-columns: 1fr; }
}
/* ============================================================================
   UI 3.0 – ruhige, symmetrische Oberfläche für das gesamte Portal
   Wird nach allen anderen Styles geladen: hier stehen nur Tokens und
   Komponenten, keine Seiten-Sonderfälle. Alles andere erbt davon.
   ========================================================================== */

:root {
  /* Vereinsfarbe bleibt Blau – aber abgedunkelt statt grell */
  --brand: #1e4e8c;
  --brand-dark: #173f72;
  --brand-soft: #eef3fa;
  --brand-tint: #f5f8fc;

  /* Primäraktion: Anthrazit/Slate – nur einmal pro Ansicht */
  --primary: #0f172a;
  --primary-hover: #1e293b;

  /* Abstände & Radien (ein Raster für alles) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --gap: 16px;

  --r-card: 12px;
  --r-btn: 8px;
  --r-badge: 999px;

  --h-sm: 32px;
  --h-md: 36px;

  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --sh: 0 1px 2px rgba(15, 23, 42, .04), 0 1px 3px rgba(15, 23, 42, .04);
}

/* --------------------------------------------------------------- Buttons ---
   Eine Hierarchie für das ganze Portal:
   .btn            → Sekundär (weiß, feiner Rahmen)     = Standard
   .btn.primary    → Primär (Anthrazit)                 = max. 1 pro Ansicht
   .btn.link/ghost → nur Text, wird beim Hover hinterlegt
   .btn.danger     → Löschen (weiß, roter Rahmen)
   ------------------------------------------------------------------------- */
.btn,
.btn-export,
button.btn,
a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--h-md);
  padding: 0 14px;
  border-radius: var(--r-btn);
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.btn:hover,
.btn-export:hover { background: #f8fafc; border-color: #cfd8e3; box-shadow: none; }
.btn:focus-visible { outline: 2px solid #94a3b8; outline-offset: 2px; }

.btn.small,
.btn-export.small { height: var(--h-sm); padding: 0 11px; font-size: 12.5px; border-radius: var(--r-btn); }
.btn.big { height: 42px; font-size: 14.5px; }

/* Primär – dunkel, sparsam */
.btn.primary,
.btn-export.primary,
button.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn.primary:hover,
.btn-export.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

/* Ghost / Link – nimmt Schwere aus dem Layout */
.btn.link,
.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--brand);
  padding: 0 8px;
}
.btn.link:hover,
.btn.ghost:hover { background: var(--brand-tint); border-color: transparent; color: var(--brand-dark); }

/* Gefahr */
.btn.danger { background: #fff; border-color: #f3d4d4; color: #b42318; }
.btn.danger:hover { background: #fef4f4; border-color: #eebcbc; }

/* Ikonenknöpfe in Zeilen: gleiche Höhe, kein Springen */
.btn.icon { width: var(--h-md); padding: 0; }
.btn.small.icon { width: var(--h-sm); }

/* ---------------------------------------------------------------- Karten ---
   Ein Rahmen, ein Radius, ein Innenabstand – überall.
   ------------------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-5);
  box-shadow: var(--sh);
}
.card.flat { box-shadow: none; }
.card > h2:first-child { margin-top: 0; }

/* Card-Kopf: Titel links, genau EIN Ghost-Link rechts */
.cardhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0 0 var(--sp-3);
  margin: 0 0 var(--sp-2);
  border-bottom: 1px solid var(--line-soft);
}
.cardhead h2 { margin: 0; font-size: 15.5px; letter-spacing: -.01em; }
.cardhead .small { color: var(--muted); font-weight: 500; }

/* ---------------------------------------------------------------- Badges ---
   Weiche Pastelltöne, dunkle Schrift – nie grell.
   ------------------------------------------------------------------------- */
.badge, .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-badge);
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  background: #f1f5f9;
  color: #334155;
  white-space: nowrap;
}
.badge.s-new    { background: #eef2f9; color: #1e4e8c; border-color: #dde6f4; }
.badge.s-check  { background: #fdf4e7; color: #92560e; border-color: #f6e3c8; }
.badge.s-ready  { background: #ecf7f0; color: #14724b; border-color: #d6ecdf; }
.badge.s-issued { background: #eef0fb; color: #3b3f8f; border-color: #dfe2f6; }
.badge.s-defekt { background: #fdf0ef; color: #a3342b; border-color: #f5d8d5; }

/* --------------------------------------------------- KPI-Kacheln (Bestand) --
   5 gleiche Kacheln, Status als feiner Balken oben statt dicker Rahmen.
   ------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}
.bento .stat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 96px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: #fff;
  box-shadow: var(--sh);
  overflow: hidden;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.bento .stat:hover {
  border-color: #cfd8e3;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .07);
  transform: translateY(-1px);
}
/* schmaler Status-Indikator oben – dezent, nicht als Rahmen */
.bento .stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: #cbd5e1;
}
.bento .stat.b-new::before    { background: #93a9c9; }
.bento .stat.b-check::before  { background: #e2b96a; }
.bento .stat.b-defekt::before { background: #d99a92; }
.bento .stat.b-ready::before  { background: #7bbf9c; }
.bento .stat.b-issued::before { background: #9aa2d8; }

.bento .stat .t { font-size: 12.5px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.bento .stat .n { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }

/* ------------------------------------------- Aufgaben & Reparaturen (50/50) --
   Immer gleich hoch, eine Aktion pro Zeile, ruhiger Leerzustand.
   ------------------------------------------------------------------------- */
.rep-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}
.rep-split > .card {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 260px;
}
.rep-split > .card > .cardhead { margin: 0; padding: 16px 18px 12px; }
.rep-split > .card > ul { flex: 1; }
/* eine Zeile = 3 Zonen: Icon | Text | eine Aktion */
.rep-split .tdrow {
  display: flex !important;
  align-items: center;
  gap: var(--sp-3);
  padding: 12px 18px !important;
  border-bottom: 1px solid var(--line-soft);
}
.rep-split .tdrow:last-child { border-bottom: 0; }
.rep-split .tdrow > div:nth-child(2) { flex: 1; min-width: 0; }
.rep-split .tdrow b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-split .tdrow .small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rep-split .tdrow form { margin: 0; flex: 0 0 auto; }

/* Leerzustand: mittig, ruhig, füllt die Karte */
.leer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
}
.leer .leer-icon { font-size: 22px; opacity: .55; }
.leer .leer-text { font-size: 13px; }

/* --------------------------------------------------------- Weitere Karten --
   Kalender-Woche: 7 gleich breite Spalten, heute blau getönt.
   ------------------------------------------------------------------------- */
.woche {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-2);
}
.woche .tag {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: #fff;
  min-height: 84px;
}
.woche .tag.we  { background: #f8fafc; color: var(--muted); }
.woche .tag.heute { background: var(--brand-tint); border-color: #c8d8ee; }

/* CO₂-Kasten beruhigen */
.co2-beruhigt {
  background: #f3f8f5;
  border: 1px solid #dfeee5;
  border-radius: var(--r-card);
}
.co2-beruhigt .n { color: #14724b; }

/* -------------------------------------------------------------- Tabellen ---
   Klebriger Kopf, dezenter Hover, keine harten Linien.
   ------------------------------------------------------------------------- */
.tbl thead th,
table.grid thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
table.grid tbody tr:hover { background: rgba(248, 250, 252, .8); }

/* Filter-Chips: gleiche Höhe, ruhige Aktivmarkierung */
.chips { display: flex; gap: 6px; flex-wrap: wrap; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  height: var(--h-sm);
  padding: 0 12px;
  border-radius: var(--r-badge);
  border: 1px solid var(--line);
  background: #fff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.chip:hover { background: #f8fafc; border-color: #cfd8e3; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.leer { opacity: .5; }

/* ---------------------------------------------------------------- Mobil ----
   Touch-freundlich: 40px Höhe, KPI 2 Spalten, Karten untereinander.
   ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .rep-split { grid-template-columns: 1fr; }
  .woche { grid-template-columns: repeat(7, minmax(96px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
@media (max-width: 640px) {
  :root { --gap: 12px; }
  .card { padding: 16px; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento .stat { min-height: 84px; }
  .btn, .btn-export { height: 40px; }
  .btn.small, .btn-export.small { height: 36px; }
  .rep-split > .card { min-height: 0; }
}

/* ---- Nachtrag: Standortkarten gleich breit, KPI-Innenleben bündig ------- */
.ortsplit { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.ortsplit > a { display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-card); background: #fff;
  box-shadow: var(--sh); text-decoration: none; color: inherit; min-width: 0; }
.ortsplit > a:hover { border-color: #cfd8e3; }
.ortsplit .zahl { margin-left: auto; text-align: right; font-size: 20px; font-weight: 700; }
.ortsplit .einh { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

/* KPI: Beschriftung immer zweizeilig reserviert -> Zahlen auf einer Linie */
.bento .stat .t { min-height: 32px; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; }

/* Zeilen in Aufgaben/Reparaturen: gleiche Meta-Höhe, Badge ruhiger */
.rep-split .tdmeta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rep-split .badge { height: 20px; font-size: 11px; }
@media (max-width: 640px) { .ortsplit { grid-template-columns: 1fr; } }
/* ============================================================================
   UI 3.1 – Compact / High-Density
   Verdichtet Abstände und Zeilen, macht die Kategorie-Kacheln zu schlanken
   Pills. Nur Komponenten, gilt damit auf allen Seiten.
   ========================================================================== */

:root {
  --gap: 12px;
  --pad-card: 16px;
  --row-py: 6px;
}

/* --- Karten enger ---------------------------------------------------------- */
.card { padding: var(--pad-card); }
.cardhead { padding: 10px 14px 8px; margin: 0; }

/* --- KPI-Kacheln flacher --------------------------------------------------- */
.bento { margin-bottom: 12px !important; }
.bento .stat { min-height: 76px; padding: 10px 12px 9px; }
.bento .stat .t { min-height: 26px; font-size: 12px; }
.bento .stat .n { font-size: 23px; }

/* --- Aufgaben / Reparaturen: kompakte Liste -------------------------------- */
.rep-split { gap: 12px; }
.rep-split > .card { min-height: 0; }
.rep-split .tdrow {
  padding: var(--row-py) 14px !important;
  gap: 10px;
  min-height: 0;
}
.rep-split .tdrow b { font-size: 13px; line-height: 1.25; }
.rep-split .tdrow .small { font-size: 11.5px; line-height: 1.3; }
.rep-split .tdrow .tdmeta { margin-top: 1px !important; gap: 6px; }
.rep-split .tdrow .avatar { width: 22px; height: 22px; font-size: 10px; }
.rep-split .badge { height: 18px; padding: 0 7px; font-size: 10.5px; }
.rep-split .btn.small {
  height: 26px;
  padding: 0 9px;
  font-size: 11.5px;
  border-radius: 6px;
}

/* Leerzustand: flache Zeile statt hoher Kasten */
.rep-split .leer {
  flex: 0 0 auto;
  padding: 14px 12px;
  gap: 3px;
  min-height: 0;
}
.rep-split .leer .leer-icon { font-size: 15px; opacity: .5; }
.rep-split .leer .leer-text { font-size: 12px; }
.rep-split .leer .btn { height: 24px; font-size: 11.5px; padding: 0 6px; }

/* --- Kategorie-Filter: schlanke, strikt einzeilige Pills ------------------- */
.cats {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cats::-webkit-scrollbar { display: none; }

.cat-tile {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  flex: 0 0 auto;
  box-shadow: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.cat-tile:hover { background: #f8fafc; border-color: #cfd8e3; }
.cat-tile .cat-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  opacity: .7;
  display: block;
}
.cat-tile .cat-name { display: inline; white-space: nowrap; }
.cat-tile .cat-n {
  background: #f1f5f9;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  line-height: 1.5;
  flex: 0 0 auto;
}
.cat-tile.on {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.cat-tile.on .cat-n { background: rgba(255, 255, 255, .2); color: #fff; }
.cat-tile.on .cat-ico { opacity: .9; }
.cat-tile.leer { opacity: .55; }

/* --- Sektionen enger aneinander ------------------------------------------- */
.rep-split { margin-top: 12px !important; }
.card + .card { margin-top: 12px; }

/* --- Mobil: Pills bleiben einzeilig, Buttons bleiben touchbar -------------- */
@media (max-width: 640px) {
  .cat-tile { height: 34px; font-size: 12px; }
  .rep-split .btn.small { height: 28px; }
}

/* ============================================================================
   UI 3.2 – Reparaturliste, Drawer, Toasts
   ========================================================================== */
.kpi4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  text-decoration: none; color: inherit; transition: border-color .14s ease, background .14s ease;
}
.kpi:hover { border-color: #cfd8e3; background: #f8fafc; }
.kpi.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #f8fafc; }
.kpi-t { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi-n { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

.zlist { display: flex; flex-direction: column; }
.zrow {
  position: relative; display: grid;
  grid-template-columns: 148px minmax(0, 1fr) 165px 155px auto;
  gap: 12px; align-items: center; padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.zrow:last-child { border-bottom: 0; }
.zrow:hover { background: #f8fafc; }
.zlink { position: absolute; inset: 0; z-index: 0; }
.z-cell { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.z-titel { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-muted { color: #94a3b8; }
.z-status { flex-direction: row; align-items: center; gap: 8px; }
.z-aktion { flex-direction: row; gap: 6px; justify-content: flex-end; }

@media (max-width: 900px) {
  .zrow { grid-template-columns: 1fr; gap: 3px; padding: 10px 12px; }
  .z-status, .z-aktion { flex-direction: row; justify-content: flex-start; }
  .z-aktion { margin-top: 4px; }
}

.drawer { display: none; position: fixed; inset: 0; z-index: 90; }
.drawer:target { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(520px, 100%);
  background: #fff; box-shadow: -8px 0 30px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column; animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(22px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.drawer-fuss { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line-soft); }

.toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 95; margin: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  animation: toast-in .2s ease-out, toast-out .5s ease-in 5s forwards;
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

.box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 10px 0 0; }
.checks { display: flex; gap: 12px; flex-wrap: wrap; }
.chk { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0 !important; }
.steuerung { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .kpi4 { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================================
   UI 3.2 – Reparaturliste, Drawer, Toasts
   ========================================================================== */
.kpi4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.kpi {
  display: flex; flex-direction: column; gap: 1px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  text-decoration: none; color: inherit; transition: border-color .14s ease, background .14s ease;
}
.kpi:hover { border-color: #cfd8e3; background: #f8fafc; }
.kpi.on { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #f8fafc; }
.kpi-t { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kpi-n { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }

.zlist { display: flex; flex-direction: column; }
.zrow {
  position: relative; display: grid;
  grid-template-columns: 148px minmax(0, 1fr) 165px 155px auto;
  gap: 12px; align-items: center; padding: 8px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.zrow:last-child { border-bottom: 0; }
.zrow:hover { background: #f8fafc; }
.zlink { position: absolute; inset: 0; z-index: 0; }
.z-cell { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.z-titel { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.z-muted { color: #94a3b8; }
.z-status { flex-direction: row; align-items: center; gap: 8px; }
.z-aktion { flex-direction: row; gap: 6px; justify-content: flex-end; }

@media (max-width: 900px) {
  .zrow { grid-template-columns: 1fr; gap: 3px; padding: 10px 12px; }
  .z-status, .z-aktion { flex-direction: row; justify-content: flex-start; }
  .z-aktion { margin-top: 4px; }
}

.drawer { display: none; position: fixed; inset: 0; z-index: 90; }
.drawer:target { display: block; }
.drawer-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.drawer-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(520px, 100%);
  background: #fff; box-shadow: -8px 0 30px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column; animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(22px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { padding: 14px 16px; overflow-y: auto; flex: 1; }
.drawer-fuss { display: flex; justify-content: flex-end; gap: 8px; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--line-soft); }

.toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 95; margin: 0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  animation: toast-in .2s ease-out, toast-out .5s ease-in 5s forwards;
}
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { opacity: 0; visibility: hidden; } }

.box { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin: 10px 0 0; }
.checks { display: flex; gap: 12px; flex-wrap: wrap; }
.chk { display: flex; gap: 6px; align-items: center; font-weight: 400; margin: 0 !important; }
.steuerung { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } .kpi4 { grid-template-columns: repeat(2, 1fr); } }

/* KPI-Kacheln: kompakt, klar klickbar */
.kpi {
  flex-direction: row; align-items: center; justify-content: space-between;
  padding: 10px 12px; min-height: 46px; cursor: pointer;
}
.kpi-t { font-size: 12px; }
.kpi-n { font-size: 18px; }
.kpi:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(15, 23, 42, .07); }
.kpi.on { background: #f1f5f9; }
.kpi::after { content: "›"; color: #cbd5e1; font-size: 15px; line-height: 1; margin-left: 4px; }
.kpi.on::after { color: var(--primary); }

/* ============================================================================
   UI 3.3 – Korrekturen für den 2-Spalten-Bereich (Aufgaben / Reparaturen)
   ========================================================================== */

/* 1) Gleiche Oberkante, gleiche Höhe – kein Sonderabstand an der zweiten Card */
.rep-split { align-items: stretch; }
.rep-split > .card { display: flex; flex-direction: column; }
.rep-split > .card + .card { margin-top: 0 !important; }

/* 2) Zeilen liegen oben an und wachsen nicht in die Höhe */
.rep-split > .card > ul { flex: 0 0 auto !important; }
.rep-split .tdrow {
  flex: 0 0 auto !important;
  align-items: center;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 !important;
}
.rep-split .tdrow > div { min-width: 0; }
.rep-split .tdrow > div:nth-child(2) { flex: 1 1 auto; min-width: 0; }
.rep-split .tdrow b,
.rep-split .tdrow .small { max-width: 100%; }

/* 3) Rechter Aktionsbereich bleibt immer sichtbar */
.rep-split .tdrow > form,
.rep-split .tdrow > a.btn { flex: 0 0 auto; margin-left: 10px; }
.rep-split .tdrow .tdactions { flex: 0 0 auto; margin-left: 10px; }

/* 4) Kontrast: dunkle Knöpfe immer mit weißer Schrift */
.btn.primary,
a.btn.primary,
button.btn.primary,
.btn-export.primary { color: #fff !important; }
.btn.primary:hover,
a.btn.primary:hover,
button.btn.primary:hover { color: #fff !important; }
.btn.primary svg { stroke: #fff !important; }
.btn.primary::after { color: #fff !important; }

/* 5) Feine Trennlinien statt Kisten */
.rep-split .tdrow + .tdrow { border-top: 1px solid var(--line-soft); }
.rep-split .tdrow:last-child { border-bottom: 0; }

/* UI 3.4 – letzter Schliff: horizontales Padding in den Zeilen, kein Überlauf */
.rep-split .tdrow {
  padding-left: 14px !important;
  padding-right: 14px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  overflow: hidden;
}
.rep-split .tdrow > div { min-width: 0 !important; overflow: hidden; }
.rep-split .tdrow > form,
.rep-split .tdrow > a.btn,
.rep-split .tdrow > span { flex: 0 0 auto !important; }
.rep-split .tdrow form button { white-space: nowrap; }

/* UI 3.5 – Zeilenknöpfe in den Dashboard-Karten kompakt und weiß beschriftet */
.rep-split .btn,
.rep-split button.btn {
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--line);
}
.rep-split .btn.primary,
.rep-split button.btn.primary {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}
.rep-split .btn.link { background: transparent !important; border-color: transparent !important; color: var(--brand) !important; height: 22px !important; }

/* Sekundärknöpfe in Zeilen: dunkle Schrift statt Slate-500 */
.rep-split .btn:not(.primary):not(.link) { color: #0f172a !important; border-color: #d7dee8 !important; }

/* ============================================================================
   UI 4.0 – Buttons portalweit: weiß, blaue Linie, schwarze Schrift, Hover
   ========================================================================== */
.btn, a.btn, button.btn, .btn-export, .btn-export.primary {
  background: #fff !important;
  border: 1px solid #b8cbe4 !important;      /* dezente blaue Linie */
  color: #0f172a !important;
  box-shadow: none !important;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.btn:hover, a.btn:hover, button.btn:hover, .btn-export:hover {
  background: #eef3fa !important;             /* helles Vereinsblau */
  border-color: #1e4e8c !important;
  color: #0f172a !important;
  transform: translateY(-1px);
}
.btn:active, button.btn:active { transform: translateY(0); }

/* Primäraktion: gleiche Optik, nur kräftigere Linie und fette Schrift */
.btn.primary, a.btn.primary, button.btn.primary, .btn-export.primary {
  background: #fff !important;
  border: 2px solid #1e4e8c !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}
.btn.primary:hover, a.btn.primary:hover, button.btn.primary:hover {
  background: #1e4e8c !important;
  border-color: #1e4e8c !important;
  color: #fff !important;
}
.btn.primary:hover * { color: #fff !important; }

/* Ghost bleibt ohne Rahmen */
.btn.link, .btn.ghost, a.btn.link {
  border-color: transparent !important;
  background: transparent !important;
  color: var(--brand) !important;
}
.btn.link:hover, .btn.ghost:hover {
  background: #eef3fa !important;
  border-color: transparent !important;
  transform: none;
}

/* Löschen: rötliche Linie */
.btn.danger { border-color: #e7b9b9 !important; color: #a3342b !important; background: #fff !important; }
.btn.danger:hover { background: #fdf1f0 !important; border-color: #cf8f8f !important; color: #8f2b22 !important; }

/* --------------------------------------------------- Zeilen klickbar machen */
.rep-split .tdrow { position: relative; cursor: pointer; transition: background .12s ease; }
.rep-split .tdrow:hover { background: #f7f9fc; }
.rep-split .tdrow > * { position: relative; z-index: 1; }
.rep-split .tdrow > .rowlink {
  position: absolute; inset: 0; z-index: 0;
  border-radius: 6px; text-decoration: none;
}

/* UI 4.1 – Primärknopf auch in Listen: weiß, blaue Linie, schwarze Schrift */
.rep-split .btn.primary,
.rep-split button.btn.primary,
.tdrow2026 .btn.primary,
.card .btn.primary {
  background: #fff !important;
  border: 2px solid #1e4e8c !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}
.rep-split .btn.primary:hover,
.rep-split button.btn.primary:hover,
.tdrow2026 .btn.primary:hover,
.card .btn.primary:hover {
  background: #1e4e8c !important;
  border-color: #1e4e8c !important;
  color: #fff !important;
}
/* Linie etwas kräftiger, damit sie als Blau erkennbar ist */
.btn:not(.primary):not(.link),
a.btn:not(.primary):not(.link),
button.btn:not(.primary):not(.link) {
  border-color: #9db4d4 !important;
}

/* ============================================================================
   UI 4.2 – Klickflächen über den Zeilen wirklich nach oben legen
   Vorher lag der Link UNTER dem Text: Klicks trafen den Text, nicht den Link.
   ========================================================================== */

/* Dashboard: Aufgaben / Reparaturen */
.rep-split .tdrow { position: relative; }
.rep-split .tdrow > .rowlink {
  position: absolute;
  inset: 0;
  z-index: 2;                 /* über dem Text */
  border-radius: 6px;
}
.rep-split .tdrow > * { position: relative; z-index: 1; }
.rep-split .tdrow > form,
.rep-split .tdrow > a.btn,
.rep-split .tdrow > .tdactions {
  z-index: 3;                 /* Knöpfe bleiben klickbar */
}

/* Reparaturliste (/reparaturen) – gleiche Logik */
.zrow { position: relative; }
.zrow .zlink { z-index: 2; }
.zrow .z-cell { z-index: 1; }
.zrow .z-aktion { z-index: 3; }

/* Zeiger + dezenter Hover, damit man sieht, dass die Zeile klickbar ist */
.rep-split .tdrow, .zrow { cursor: pointer; }
.rep-split .tdrow:hover, .zrow:hover { background: #f7f9fc; }
