/* Redesign staging — calm Linear/Monday · rd1 */
:root, [data-theme="light"] {
  --bg: #f7f8fa; --bg-elev: #ffffff; --surface: #ffffff; --surface-2: #f1f3f7; --hover: #eef1f6;
  --border: #e8eaef; --border-strong: #d5d9e2;
  --text: #111827; --text-2: #374151; --muted: #6b7280;
  --accent: #2563eb; --accent-strong: #1d4ed8; --accent-ink: #fff; --accent-soft: #eff6ff;
  --accent2: #7c3aed; --accent2-soft: rgba(124,58,237,.1);
  --ok: #059669; --warn: #d97706; --bad: #dc2626;
  --shadow: 0 1px 2px rgba(16,24,40,.04); --shadow-lg: 0 8px 24px rgba(16,24,40,.08);
  --scrim: rgba(17,24,39,.4);
}
[data-theme="dark"] {
  --bg: #0b0f17; --bg-elev: #111827; --surface: #151c2c; --surface-2: #1a2336; --hover: #1f2a40;
  --border: #243044; --border-strong: #334155;
  --text: #e5e7eb; --text-2: #cbd5e1; --muted: #94a3b8;
  --accent: #60a5fa; --accent-strong: #3b82f6; --accent-ink: #0b0f17; --accent-soft: rgba(96,165,250,.14);
  --accent2: #a78bfa; --accent2-soft: rgba(167,139,250,.14);
  --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --shadow: none; --shadow-lg: 0 12px 32px rgba(0,0,0,.35);
  --scrim: rgba(0,0,0,.55);
}
:root {
  --r: 12px; --r-sm: 8px; --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --topbar-h: 56px;
}
body { font: 14px/1.45 var(--font); letter-spacing: -.01em; }

/* ── Single header ── */
.topbar {
  height: var(--topbar-h); gap: 12px; padding: 0 16px 0 14px;
  background: var(--bg-elev); border-bottom: 1px solid var(--border); box-shadow: none;
}
.brand { gap: 10px; min-width: 0; }
.brand-logos { height: 28px; padding: 3px 8px; border-radius: 8px; background: var(--surface-2); border: 0; }
.brand-logos img { height: 18px; }
.brand-title { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: none; }
.topbar .nav {
  display: flex; align-items: center; gap: 2px; flex: 1; min-width: 0;
  overflow-x: auto; scrollbar-width: none; height: 100%;
}
.topbar .nav::-webkit-scrollbar { display: none; }
.nav-sep { display: none; }
.nav-btn {
  height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 550;
  color: var(--muted); gap: 6px;
}
.nav-btn svg { width: 15px; height: 15px; }
.nav-btn:hover { background: var(--hover); color: var(--text); }
.nav-btn.active { color: var(--text); background: var(--surface-2); }
.nav-btn.active::after { display: none; }
.nav-badge { min-width: 16px; height: 16px; font-size: 10px; }
.topbar-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.topbar .search-wrap { flex: none; width: 200px; max-width: 28vw; margin: 0; }
.topbar .search-wrap input[type=search] {
  height: 32px; border-radius: 8px; background: var(--surface-2); border-color: transparent;
}
.topbar .search-wrap input[type=search]:focus { background: var(--surface); border-color: var(--accent); }
.em-btn {
  height: 32px; padding: 0 10px; border-radius: 8px; border: 0;
  background: var(--bad); color: #fff; font-weight: 650; font-size: 12px; gap: 5px;
  display: inline-flex; align-items: center; cursor: pointer;
}
.em-btn:hover { filter: brightness(1.05); }
.em-btn svg { width: 14px; height: 14px; }
.em-lab { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; }
.user-btn { height: 32px; padding: 0 8px 0 3px; border-radius: 999px; border: 0; background: var(--surface-2); gap: 6px; }
.user-btn .ub-name { font-size: 12px; font-weight: 600; }
.user-menu { width: 260px; padding: 6px; border-radius: 12px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.um-nav { padding: 4px 0; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.um-nav .menu-item { color: var(--muted); }
.um-trail { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 700; }
.menu-item { height: 34px; border-radius: 8px; font-size: 13px; }
.tabbar { display: none !important; }
.sync-pill {
  position: fixed; left: 12px; bottom: 12px; z-index: 15;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: var(--bg-elev);
  border: 1px solid var(--border); font-size: 11px; color: var(--muted);
  opacity: .85; pointer-events: none;
}

/* ── Page ── */
.page { padding: 20px 24px 88px; }
.page-head { margin-bottom: 14px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { font-size: 13px; }
.page-head.no-title h1, .page-head.no-title .page-sub { display: none; }
.toolbar { gap: 8px; margin-bottom: 12px; }
.filter-panel {
  border-radius: 12px; border: 1px solid var(--border); box-shadow: none;
  background: var(--surface); padding: 12px; margin: 0 0 14px;
}
.btn { height: 32px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 13px; box-shadow: none; }
.btn.sm, .btn.xs { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.primary { box-shadow: none; }

/* ── Dashboard ── */
.bnotes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.bnote { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: none; }
.bnote h3 { font-size: 13px; font-weight: 650; margin: 0; }
.bn-head { margin-bottom: 6px; }
.bn-text { font-size: 13px; color: var(--text-2); }
.dash-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.dash-filters.collapsed { display: none; }
.dash-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: end;
  width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
.dash-filters label { font-size: 11px; gap: 3px; }
.dash-tabs { gap: 4px; }
.dtab {
  height: 30px; padding: 0 10px; border-radius: 8px; border: 0; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.dtab.on { background: var(--surface-2); color: var(--text); }
.dtab i { display: none; }
.kpis { gap: 8px; margin-bottom: 16px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: none; min-height: 0;
}
.kpi .label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; }
.kpi .value { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.modgrid { gap: 14px; }
.modsec { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; box-shadow: none; }
.modsec h2 { font-size: 14px; font-weight: 650; }

/* ── Board cards ── */
.board { gap: 10px; }
.col { background: var(--surface-2); border: 0; border-radius: 12px; }
.col-head { padding: 10px 12px; font-size: 13px; font-weight: 650; color: var(--text); background: transparent; border: 0; border-top: 3px solid var(--sc); border-radius: 10px 10px 0 0; }
.col-head > span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); margin-right: 7px; vertical-align: 1px; }
.col-head .col-count { background: color-mix(in srgb, var(--sc) 18%, transparent); color: var(--text); }
.col-body { padding: 6px; gap: 6px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 0; box-shadow: none; overflow: hidden;
}
.card::before { height: 2px; }
.card:hover { box-shadow: var(--shadow); transform: none; border-color: var(--border-strong); }
.card .c-thumb { display: none; }
.card .c-body { padding: 10px 10px 8px; gap: 6px; }
.card h4 { font-size: 13px; font-weight: 600; line-height: 1.3; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.card .oil-id { font-size: 11px; font-weight: 700; color: var(--muted); }
.card .c-meta { font-size: 11px; }
.card .c-tags { display: none; }
.card .c-row { margin-top: 2px; }
.card .prio-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--pc, var(--muted)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 25%, transparent);
}
.card .cell-chip {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px;
  border-radius: 6px; background: var(--surface-2); color: var(--muted);
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
}
.card .prog { height: 3px; border-radius: 2px; }

/* ── Table ── */
.grp { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: none; margin-bottom: 10px; }
.grp-head { background: var(--surface); padding: 8px 10px; }
.mtable th { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ── Task popup ── */
.tp { border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.tp-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.tp-body { gap: 0; }
.tp-sec {
  background: transparent; border: 0; border-bottom: 1px solid var(--border);
  border-radius: 0; padding: 14px 16px; margin: 0; box-shadow: none;
}
.tp-sec:last-child { border-bottom: 0; }
.tp-sec h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.tp-side { border-left: 1px solid var(--border); }
.tp-foot { padding: 12px 16px; border-top: 1px solid var(--border); }

/* ── Motivation (gross wie vor dem Redesign: Kopf 128px, Balken darunter) ── */
.mot {
  width: 232px; padding: 12px 12px 12px; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.18)); opacity: 1; bottom: 16px; right: 16px;
}
.mot .mot-img { width: 176px; height: 176px; margin: 4px auto 2px; }
.mot .mot-pct b { font-size: 30px; }
.mot .mot-bar { height: 10px; margin: 5px 6px 7px; }
.mot.closed { width: auto; padding: 5px 12px 5px 5px; opacity: 1; border-radius: 999px; }
.mot.closed .mot-toggle { gap: 8px; }
.mot.closed .mot-toggle img { width: 56px; height: 56px; }
.mot.closed .mot-toggle b { font-size: 20px; }
@media (max-width: 760px) {
  .mot { width: 168px; padding: 10px; }
  .mot .mot-img { width: 120px; height: 120px; }
  .mot .mot-pct b { font-size: 24px; }
  .mot .mot-bar { height: 9px; }
  .mot.closed { padding: 4px 10px 4px 4px; }
  .mot.closed .mot-toggle img { width: 48px; height: 48px; }
  .mot.closed .mot-toggle b { font-size: 18px; }
}

/* ── VNC redesign ── */
.vnc-head {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.vnc-search { max-width: none; flex: 1 1 auto; grid-column: 1 / -1; }
.vnc-search input {
  height: 44px; border-radius: 12px; font-size: 15px; padding-left: 40px;
  background: var(--surface); border: 1px solid var(--border);
}
.vnc-search .search-ico { left: 14px; }
.vnc-search .search-ico svg { width: 18px; height: 18px; }
.vnc-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.vnc-rail { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.vnc-favs {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px;
  scrollbar-width: thin;
}
.vnc-favs:empty { display: none; }
.vf-chip {
  flex: none; display: inline-flex; flex-direction: column; gap: 2px;
  min-width: 92px; padding: 8px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); cursor: pointer; text-align: left;
}
.vf-chip:hover { border-color: var(--accent); }
.vf-chip b { font-size: 13px; }
.vf-chip span { font-size: 10px; color: var(--muted); }
.vnc-setup {
  grid-template-columns: 1fr; gap: 12px; border: 1px solid var(--border); border-left: 0;
  border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: none;
}
.vnc-setup.first { border: 1px solid var(--accent); box-shadow: none; }
.vnc-mod { margin-bottom: 28px; }
.vnc-mh { border: 0; padding: 0; margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.vnc-zelle { margin: 0 0 18px; }
.vnc-zelle h3 {
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.vnc-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.vnc-card {
  min-height: 112px; padding: 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; gap: 6px; box-shadow: none;
  transition: border-color .12s, background .12s;
}
.vnc-card::before { display: none; }
.vnc-card:hover { transform: none; box-shadow: none; border-color: var(--accent); background: var(--accent-soft); }
.vnc-card.off { opacity: .45; cursor: default; }
.vnc-card.off:hover { border-color: var(--border); background: var(--surface); }
.vc-op { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.vc-name { font-size: 12px; color: var(--text-2); line-height: 1.3; }
.vc-iprow { display: flex; align-items: center; gap: 6px; margin-top: auto; }
.vc-ip {
  background: transparent; padding: 0; font-weight: 500; font-size: 12px; color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.vc-ip:hover { background: transparent; }
.vc-copybtn {
  all: unset; cursor: pointer; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; color: var(--muted);
}
.vc-copybtn:hover { background: var(--hover); color: var(--text); }
.vc-copybtn svg { width: 14px; height: 14px; }
.vc-act { display: none; }
.vc-hl { background: #fde68a; color: inherit; border-radius: 2px; padding: 0 1px; }
[data-theme="dark"] .vc-hl { background: #854d0e; color: #fef3c7; }
.vnc-count { display: none; }

@media (max-width: 760px) {
  .topbar { padding: 0 8px; gap: 6px; }
  .brand-text { display: none; }
  .topbar .search-wrap { width: 36px; }
  .topbar .search-wrap input { padding-left: 30px; }
  .em-lab { display: none; }
  .user-btn .ub-name { display: none; }
  .nav-btn span:not(.nav-badge) { display: none; }
  .nav-btn { padding: 0 8px; }
  .page { padding: 12px 12px 80px; }
  .bnotes { grid-template-columns: 1fr; }
  .vnc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vnc-card { min-height: 96px; padding: 10px; }
  .vc-op { font-size: 18px; }
  .sync-pill { bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
  /* restore bottom nav feel using top nav scroll */
  .mot { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); right: 8px; }
}

/* Live ping */
.pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; position: relative; top: -2px; }
.pdot.online { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.pdot.offline { background: #9ca3af; }
.vc-seen { font-size: 10px; color: var(--muted); margin-left: auto; white-space: nowrap; }
.vc-iprow .vc-copybtn { margin-left: 2px; }

/* dash top row: mod tabs + filter inline */
.dash-top { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.dash-top > * { margin: 0 !important; }
.dash-top #dash-filter-btn { display: inline-flex; align-items: center; gap: 6px; }
.dash-top #dash-filter-btn svg { width: 14px; height: 14px; }
.dash-top .chips { display: flex; gap: 6px; flex-wrap: wrap; }
#dash-filter-wrap { margin: 0 0 14px; }

.vnc-search input#vnc-q { padding-left: 42px !important; }
.vnc-favs { align-items: center; }
.vnc-favs .vf-lab { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 4px; white-space: nowrap; }
.vnc-favs .vf-lab svg { width: 13px; height: 13px; }

/* mobile polish */
@media (max-width: 760px) {
  .topbar .em-btn .em-lab { display: none !important; }
  .topbar .em-btn { padding: 0 10px !important; min-width: 0 !important; }
  .vnc-head { grid-template-columns: 1fr !important; }
  .vnc-head > * { min-width: 0; }
  .vnc-rail { flex-wrap: nowrap !important; overflow-x: auto; width: 100%; height: auto !important; flex-direction: row !important; }
  .vnc-rail .dtab { flex: 0 0 auto; }
  .vnc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .vnc-card { min-width: 0; overflow: hidden; }
  .vnc-card .vc-top, .vnc-card .vc-iprow { min-width: 0; }
  .vnc-card .vc-op { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .vnc-card .vc-iprow { flex-wrap: wrap; row-gap: 2px; }
  .vnc-card .vc-ip { font-size: 11px; }
  .vnc-card .vc-seen { margin-left: 0; order: 3; flex-basis: 100%; }
  .dash-top .dash-tabs { max-width: 100%; }
}
@media (max-width: 760px) {
  #nav.nav, #nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; margin: 0;
    height: calc(58px + env(safe-area-inset-bottom, 0px)); padding: 4px 4px env(safe-area-inset-bottom, 0px);
    display: flex; justify-content: space-around; align-items: stretch; gap: 0; overflow: visible;
    background: var(--surface); border-top: 1px solid var(--border); max-width: none; width: auto;
  }
  #nav .nav-btn { flex: 1 1 0; flex-direction: column; justify-content: center; height: auto; padding: 4px 0; border-radius: 10px; gap: 2px; }
  #nav .nav-btn span:not(.nav-badge) { display: block !important; font-size: 10px; line-height: 1; }
  #nav .nav-btn svg { width: 20px; height: 20px; }
  .topbar-right { margin-left: auto; }
}
@media (max-width: 760px) {
  .topbar .search-wrap { overflow: hidden; flex: 0 0 36px; }
  .topbar .search-wrap input { width: 100% !important; min-width: 0 !important; }
  .topbar .search-wrap:focus-within { position: absolute; left: 8px; right: 8px; top: 8px; width: auto; flex: none; z-index: 70; overflow: visible; }
  #nav { height: calc(64px + env(safe-area-inset-bottom, 0px)); }
  #nav .nav-btn svg { width: 19px; height: 19px; }
}
@media (max-width: 760px) { .vnc-tools { justify-content: flex-start !important; } }

/* ── Live-Chat ── */
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.chat-hbtn { display: none; position: relative; }
.chat-w { position: fixed; left: 16px; bottom: 16px; z-index: 65; }
.chat-w.hidden { display: none; }
.sync-pill { left: 132px !important; bottom: 26px !important; }
.chat-fab {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px;
  border-radius: 999px; border: 0; cursor: pointer; font: inherit; font-weight: 650; font-size: 13.5px;
  background: var(--accent, #2563eb); color: #fff; box-shadow: 0 6px 20px rgba(15,23,42,.18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.chat-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(15,23,42,.24); }
.chat-fab svg { width: 18px; height: 18px; }
.chat-w.open .chat-fab { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.chat-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #ef4444; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.chat-badge.hidden { display: none; }
.chat-panel {
  position: absolute; left: 0; bottom: 56px; width: 368px; height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(15,23,42,.22); overflow: hidden;
  animation: chatIn .16s ease-out;
}
.chat-panel.hidden { display: none; }
@keyframes chatIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 8px 14px; }
.chat-ht { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.chat-live { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.chat-chans { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); }
.chat-chans::-webkit-scrollbar { display: none; }
.ch-chan { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 6px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.ch-chan.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.ch-chan.ch-new { padding: 0 8px; color: var(--muted); }
.ch-chan svg { width: 14px; height: 14px; }
.ch-hash { width: 18px; text-align: center; opacity: .6; }
.ch-u { font-style: normal; background: #ef4444; color: #fff; border-radius: 999px; font-size: 10px; padding: 0 5px; line-height: 16px; }
.chat-list { flex: 1 1 auto; overflow-y: auto; padding: 10px 6px 10px 10px; overscroll-behavior: contain; }
.ch-msg { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 4px 26px 4px 4px; border-radius: 10px; }
.ch-msg:not(.ch-grp) { margin-top: 8px; }
.ch-msg:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.ch-msg.men { background: color-mix(in srgb, #f59e0b 12%, transparent); }
.ch-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; }
.ch-meta time { font-size: 11px; color: var(--muted); }
.ch-txt { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ch-msg.del .ch-txt { color: var(--muted); font-size: 12px; }
.ch-men { color: var(--accent, #2563eb); font-weight: 650; background: color-mix(in srgb, var(--accent, #2563eb) 10%, transparent); border-radius: 4px; padding: 0 2px; }
.ch-del { position: absolute; right: 2px; top: 4px; width: 22px; height: 22px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; cursor: pointer; opacity: 0; display: grid; place-items: center; }
.ch-del svg { width: 13px; height: 13px; }
.ch-msg:hover .ch-del, .ch-del:focus { opacity: 1; }
@media (hover: none) { .ch-del { opacity: .6; } }
.ch-more { display: block; margin: 0 auto 6px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.ch-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
.ch-empty svg { width: 28px; height: 28px; opacity: .5; }
.ch-pick-h { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 6px 8px; }
.ch-person { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; border-radius: 10px; cursor: pointer; }
.ch-person:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.ch-person span { display: flex; flex-direction: column; }
.ch-person small { color: var(--muted); font-size: 11px; }
.chat-form { position: relative; display: grid; grid-template-columns: 1fr 38px; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--border); }
.chat-form.hidden { display: none; }
.chat-form textarea { resize: none; min-height: 38px; max-height: 120px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg, transparent); color: var(--text); font: inherit; font-size: 13.5px; line-height: 1.35; }
.chat-form textarea:focus { outline: 2px solid var(--accent, #2563eb); border-color: transparent; }
.chat-send { height: 38px; width: 38px; border-radius: 12px; border: 0; background: var(--accent, #2563eb); color: #fff; display: grid; place-items: center; cursor: pointer; align-self: end; }
.chat-send svg { width: 17px; height: 17px; }
.chat-hint { grid-column: 1 / -1; font-size: 10.5px; color: var(--muted); }
.chat-mention { position: absolute; left: 12px; right: 12px; bottom: calc(100% - 4px); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(15,23,42,.18); padding: 4px; z-index: 2; }
.chat-mention.hidden { display: none; }
.ch-mi { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; border-radius: 8px; cursor: pointer; text-align: left; }
.ch-mi small { margin-left: auto; color: var(--muted); }
.ch-mi.on, .ch-mi:hover { background: color-mix(in srgb, var(--accent, #2563eb) 12%, transparent); }
body:has(.tp-backdrop:not(.hidden)) .chat-w:not(.open), body:has(.modal-backdrop:not(.hidden)) .chat-w:not(.open) { opacity: 0; pointer-events: none; }

@media (max-width: 760px) {
  .chat-hbtn { display: grid; }
  .chat-hbtn .chat-badge { top: 0; right: 0; }
  .chat-fab { display: none; }
  .chat-w { left: 0; bottom: 0; }
  .sync-pill { left: 8px !important; }
  body.chat-sheet .chat-panel {
    position: fixed; inset: 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 90;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); animation: chatUp .18s ease-out;
  }
  body.chat-sheet { overflow: hidden; }
  body.chat-sheet .mot, body.chat-sheet .sync-pill { display: none !important; }
  .chat-head { padding: 12px 10px 10px 16px; }
  .chat-form textarea { font-size: 16px; }  /* kein iOS-Zoom */
  .ch-del { opacity: .6; }
}
@keyframes chatUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Private Medien: sicheres Löschen ── */
.pm-thumb .pm-del, .pm-thumb .pm-more { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: #fff; padding: 0; }
.pm-thumb .pm-del svg, .pm-thumb .pm-more svg { width: 15px; height: 15px; }
.pm-thumb .pm-del { top: 6px; left: 6px; background: rgba(226,68,92,.92); opacity: 0; pointer-events: none; transition: opacity .15s; }
.pm-thumb .pm-more { bottom: 6px; right: 6px; background: rgba(0,0,0,.62); display: none; }
.pm-thumb .thumb-dl { top: 6px; right: 6px; width: 28px; height: 28px; pointer-events: none; }
@media (hover: hover) {
  .pm-thumb:hover .pm-del, .pm-thumb:focus-within .pm-del { opacity: 1; pointer-events: auto; }
  .pm-thumb:hover .thumb-dl, .pm-thumb:focus-within .thumb-dl { opacity: .95; pointer-events: auto; }
  .pm-thumb .pm-del:hover { background: #c81e3a; }
}
@media (hover: none) {
  .pm-thumb .pm-del, .pm-thumb .thumb-dl { display: none; }
  .pm-thumb .pm-more { display: grid; width: 36px; height: 36px; }
  .pm-thumb .thumb-open { -webkit-touch-callout: none; user-select: none; }
}
.pm-sheet { text-align: center; }
.pm-sheet img { max-width: 100%; max-height: 46vh; border-radius: 10px; display: block; margin: 0 auto 8px; object-fit: contain; }

/* ── Header: Meine Aufgaben ── */
#nav .nav-btn span.nl-short { display: none; }
.nav-btn { position: relative; white-space: nowrap; }
#nav .nav-btn .nav-badge { margin-left: 2px; }
@media (max-width: 1180px) and (min-width: 761px) { #nav .nav-btn span.nl-long { display: none !important; } #nav .nav-btn span.nl-short { display: inline !important; } }
@media (max-width: 760px) {
  #nav .nav-btn span.nl-long { display: none !important; }
  #nav .nav-btn span.nl-short { display: block !important; }
  #nav .nav-btn .nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 10px; }
}

/* ── Header-Uhr Berlin (nur Desktop) ── */
.hdr-clock { display: inline-flex; align-items: baseline; gap: 5px; padding: 0 10px; height: 32px; align-self: center; line-height: 32px; border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; flex: 0 0 auto; color: var(--text); font-variant-numeric: tabular-nums; }
.hdr-clock .hc-lab { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.hdr-clock b { font-size: 14px; font-weight: 700; }
@media (max-width: 1024px), (hover: none) and (pointer: coarse) { .hdr-clock { display: none !important; } }

/* ── VNC bearbeiten: Zelle-Dropdown ── */
.vc-z-in { height: 30px; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; font-size: 12px; background: var(--surface-2); color: var(--text); min-width: 0; }
.vnc-add select { height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: var(--surface); color: var(--text); }

/* ── rd6: Titel entfernt (mehr Platz), Sync im Profil-Menü, VNC global/umbenennen ── */
.brand { flex-shrink: 0; }
.sync-pill { display: none !important; }
.um-sync { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 6px 10px 8px; margin: 0 0 4px; border-bottom: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.um-sync .sync-dot { flex: 0 0 auto; }
.um-sync-off:empty { display: none; }
.um-sync-off { flex-basis: 100%; color: var(--bad, #e2445c); font-weight: 600; }
.sync-dot.bad { background: var(--bad, #e2445c) !important; box-shadow: 0 0 0 3px rgba(226,68,92,.2) !important; }
.user-wrap.sync-bad::after { content: ""; position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad, #e2445c); border: 2px solid var(--bg-elev); pointer-events: none; }
.vnc-global { margin: 0 0 14px; padding: 10px 12px 12px; border: 1px solid var(--accent); border-radius: 14px; background: var(--accent-soft); }
.vnc-global .vg-lab { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.vnc-global .vnc-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 320px)); }
.vnc-card.global { background: var(--surface); }
.vnc-card.edit { grid-template-columns: 1fr auto; }
.vnc-card.edit .vc-op-in, .vnc-card.edit .vc-name-in { grid-column: 1 / -1; height: 30px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--surface-2); color: var(--text); min-width: 0; }
.vnc-card.edit .vc-op-in { font-size: 15px; font-weight: 800; }
.vnc-card.edit .vc-name-in { font-size: 12px; }
.vc-op-in.saved, .vc-name-in.saved { border-color: #00c875 !important; } .vc-op-in.invalid, .vc-name-in.invalid { border-color: var(--bad) !important; }
.vnc-card.edit .vc-z-in, .vnc-card.edit .vc-pw-in, .vnc-card.edit > .muted { grid-column: 1 / -1; }
/* Header kompakter, damit voller Titel + alle Tabs (inkl. Offen) in eine Zeile passen */
@media (max-width: 1500px) and (min-width: 761px) {
  #nav .nav-btn svg { display: none; }
  #nav .nav-btn { padding: 0 9px; }
  #nav .nav-btn span.nl-long { display: none !important; } #nav .nav-btn span.nl-short { display: inline !important; }
  .topbar .search-wrap { width: 150px; }
}
@media (max-width: 1200px) and (min-width: 761px) {
  .topbar { position: relative; }
  .hdr-clock .hc-lab { display: none; }
  .topbar .em-btn .em-lab, .user-btn .ub-name { display: none; }
  .topbar .search-wrap { width: 36px; flex: 0 0 36px; }
  .topbar .search-wrap input[type=search] { padding-right: 0; }
  .topbar .search-wrap:focus-within { position: absolute; right: 150px; top: 50%; transform: translateY(-50%); width: 280px; z-index: 70; }
  .topbar .search-wrap:focus-within input[type=search] { padding-right: 12px; }
}
@media (max-width: 1180px) and (min-width: 761px) { #nav .nav-btn { padding: 0 7px; font-size: 12.5px; } }

/* rd6: Titel-Text im Header entfernt (Browser-Tab-Titel bleibt) */
.topbar .brand-text { display: none !important; }
/* rd6: offizielles GROB-Logo (von Dennis, PNG transparent, 2x) – blau im hellen, weiß im dunklen Theme */
.brand-logos { background: transparent !important; border: 0 !important; }
.brand-logos img.logo-grob { height: 20px; width: auto; }
.brand-logos.lg img.logo-grob { height: 44px; }
.brand-logos .logo-grob-d { display: none; }
[data-theme="dark"] .brand-logos .logo-grob-l { display: none; }
[data-theme="dark"] .brand-logos .logo-grob-d { display: block; }
/* rd6: Alarme – Antwortlisten, Abbrechen, Übersicht im Profil-Menü */
.alarm-resp { display: grid; gap: 6px; margin: 10px 0 4px; text-align: left; }
.ar-grp b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.ar-come b { color: #00a862; } .ar-dec b { color: var(--bad, #e2445c); } .ar-open b { color: var(--muted); }
.ar-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ar-chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }
.ar-come .ar-chip { border-color: rgba(0,200,117,.5); } .ar-dec .ar-chip { border-color: rgba(226,68,92,.45); }
.ar-chip i { color: var(--muted); font-style: normal; }
.alarm-box .alarm-resp { max-height: 34vh; overflow: auto; }
.alarm-box .alarm-cancel { margin-top: 10px; }
.btn.alarm-cancel { border: 1px solid var(--bad, #e2445c); color: var(--bad, #e2445c); background: transparent; }
.as-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.um-alarms .um-alarms-n { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--bad, #e2445c); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; }
.um-alarms .um-alarms-n.hidden { display: none; }
.user-wrap.alarm-on::after { content: ""; position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--bad, #e2445c); border: 2px solid var(--bg-elev); pointer-events: none; animation: alPulse 1.2s infinite; }
@keyframes alPulse { 50% { transform: scale(1.35); } }
.al-ov { display: grid; gap: 10px; }
.al-item { border: 1px solid var(--bad, #e2445c); border-radius: 12px; padding: 10px 12px; }
.al-top { font-size: 13px; } .al-msg { font-size: 13px; margin-top: 4px; }
.al-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.al-h { margin: 8px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.al-hist { font-size: 12px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.al-st { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); }
.al-st-cancelled { color: var(--bad, #e2445c); } .al-st-expired { color: var(--muted); }
.vnc-pinghint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid #f5a623; background: rgba(245,166,35,.1); font-size: 12.5px; }

/* logo-gm-new: offizielles GM-Logo (quadratisch) */
.brand-logos img.logo-gm { height: 24px; width: auto; }
.brand-logos.lg img.logo-gm { height: 48px; }

/* ═════ Features feat1: Ursache/Lösung, Historie, Wissen, Bericht, GM-Links ═════ */
.modal-backdrop.over-tp { z-index: 92; }
.cs-ov { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cs-box { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 20px 22px; display: grid; gap: 12px; }
.cs-box h3 { margin: 0; font-size: 17px; }
.cs-why { margin: 0; color: var(--text-2); font-size: 13px; }
.cs-box .field > span { font-size: 12px; font-weight: 600; color: var(--text-2); display: block; margin-bottom: 4px; }
.cs-box .rt-ed { min-height: 72px; }
.cs-err { color: var(--bad); font-size: 13px; font-weight: 600; }
.cs-btns { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cs-hint { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 16%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); font-size: 13px; }
.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.btn.link.xs.mh-link { padding: 0 2px; height: auto; font-size: 12px; font-weight: 600; color: var(--accent); }
.mh { display: grid; gap: 14px; }
.mh-sum { display: flex; gap: 8px; flex-wrap: wrap; }
.mh-sum .chip { padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 600; }
.mh-sum .chip.ok { color: var(--ok); }
.mh-issue { border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.mh-issue.done { border-left-color: var(--ok); }
.mh-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mh-head .btn.link { padding: 0; height: auto; text-align: left; white-space: normal; }
.mh-cs { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; display: grid; gap: 4px; }
.mh-cs .rt p { margin: 0; display: inline; }
.mh-cs.miss { color: var(--warn); font-weight: 600; }
.mh-tl { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 6px; }
.mh-ev { display: grid; grid-template-columns: 22px 118px 1fr; gap: 6px; font-size: 12.5px; align-items: baseline; position: relative; }
.mh-ev::before { content: ""; position: absolute; left: -20px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.mh-ev.mh-status::before { background: var(--accent); }
.mh-ev.mh-solution::before, .mh-ev.mh-cause::before { background: var(--ok); }
.mh-at { color: var(--muted); font-variant-numeric: tabular-nums; }
.mh-tx { word-break: break-word; }
@media (max-width: 640px) { .mh-ev { grid-template-columns: 20px 1fr; } .mh-at { grid-column: 2; } .mh-tx { grid-column: 2; } }
.rp-quick { display: flex; gap: 8px; margin-top: 10px; }
.vc-hist { align-self: flex-start; margin-top: 4px; border: 0; background: none; padding: 0; font-size: 11px; font-weight: 600; color: var(--accent); cursor: pointer; }
.vc-hist:hover { text-decoration: underline; }
.kb { display: grid; gap: 14px; }
.kb-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kb-head .kb-search { flex: 1 1 320px; min-width: 0; }
.kb-head select, .kb-head > input { height: 38px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); padding: 0 10px; font: inherit; }
.kb-head > input { width: 150px; }
.kb-list { display: grid; gap: 10px; }
.kb-item { border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); padding: 12px 14px; display: grid; gap: 8px; box-shadow: var(--shadow); }
.kb-item.pinned { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--warn) 35%, transparent), var(--shadow); }
.kb-item header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.kb-item header .kb-open { padding: 0; height: auto; text-align: left; white-space: normal; font-size: 14.5px; color: var(--text); }
.kb-item header .btn.xs:first-of-type { margin-left: auto; }
.kb-pin-b { font-size: 11.5px; font-weight: 700; color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); padding: 2px 8px; border-radius: 999px; }
.kb-row { display: grid; grid-template-columns: 90px 1fr; gap: 10px; font-size: 13.5px; }
.kb-row > b { color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.kb-row .rt p { margin: 0 0 4px; }
.kb-sol { background: color-mix(in srgb, var(--ok) 8%, transparent); border-radius: 8px; padding: 6px 8px; }
.kb-count { margin-bottom: -4px; }
mark { background: color-mix(in srgb, var(--warn) 35%, transparent); color: inherit; border-radius: 3px; }
@media (max-width: 640px) { .kb-row { grid-template-columns: 1fr; gap: 2px; } .kb-head > input, .kb-head select { flex: 1 1 45%; } .kb-item header .btn.xs:first-of-type { margin-left: 0; } }
.gm-tbl { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.gm-tbl th, .gm-tbl td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.gm-tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.gm-url { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent-soft); display: grid; gap: 8px; }
.gm-url-row { display: flex; gap: 8px; flex-wrap: wrap; }
.gm-url-row input { flex: 1 1 320px; min-width: 0; height: 34px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 12.5px ui-monospace, monospace; }
@media (max-width: 640px) { .gm-tbl thead { display: none; } .gm-tbl tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--border); padding: 6px 0; } .gm-tbl td { border: 0; padding: 3px 4px; } #page-action .pa-lbl { display: none; } }
.kb-head .kb-search input { padding-left: 42px !important; height: 40px; }
.kb-row { grid-template-columns: 150px 1fr; }
.kb-row > b { font-size: 11px; line-height: 1.3; }
.mh-head .pill, .kb-item .pill { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.mh-head .pill[data-st="Erledigt"], .mh-head .pill[data-st="N/A"] { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.mh-head .pill[data-st="Offen"] { color: var(--accent); }
@media (max-width: 640px) { .kb-row { grid-template-columns: 1fr; } }
.kb-item header .kb-open b, .mh-head .btn.link b { white-space: nowrap; }
.kb-head .kb-search .search-ico { left: 14px; }
.push-banner { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 70; width: min(720px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 2px solid #e2445c; box-shadow: var(--shadow-lg); }
.push-banner .pb-ico { font-size: 22px; }
.push-banner .pb-tx { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: 13px; }
.push-banner .pb-tx span { color: var(--text-2); font-size: 12px; }
@media (max-width: 640px) { .push-banner { bottom: 76px; flex-wrap: wrap; } .push-banner .pb-tx { flex-basis: calc(100% - 40px); } }
.typ-b { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 7px; border-radius: 999px; line-height: 16px; white-space: nowrap; vertical-align: middle; }
.typ-b.Fehler { color: #b3203a; background: color-mix(in srgb, #e2445c 13%, transparent); }
.typ-b.Aufgabe { color: var(--accent); background: var(--accent-soft); }
.split-new { display: inline-flex; gap: 6px; }
.typ-seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.typ-seg button { border: 0; background: var(--surface); color: var(--text-2); padding: 0 14px; height: 36px; font: inherit; font-weight: 600; cursor: pointer; }
.typ-seg button.on { background: var(--accent); color: #fff; }
.typ-seg button.on[data-typ="Fehler"] { background: #e2445c; }

.admin-only-hint { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 999px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.typ-seg button:disabled { opacity: .55; cursor: not-allowed; }
label.field select:disabled, label.field input:disabled { opacity: .75; cursor: not-allowed; background: var(--surface-2); }

/* Notizen in Aufgaben löschen: Hover-Button (Desktop) / ⋯ (Touch) */
.comment .c-del, .comment .c-more { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; padding: 0; background: transparent; color: var(--muted); }
.comment .c-del svg, .comment .c-more svg { width: 15px; height: 15px; }
.comment .c-more { display: none; }
.comment .c-del { opacity: 0; pointer-events: none; transition: opacity .15s; }
@media (hover: hover) {
  .comment:hover .c-del, .comment:focus-within .c-del { opacity: 1; pointer-events: auto; }
  .comment .c-del:hover { background: rgba(226,68,92,.12); color: #c81e3a; }
}
@media (hover: none) {
  .comment .c-del { display: none; }
  .comment .c-more { display: grid; width: 34px; height: 34px; }
}
.cmt-sheet blockquote { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid var(--border); background: var(--surface-2); border-radius: 6px; white-space: pre-wrap; word-break: break-word; }

/* ── Anwesenheit (unten links) ── */
.pres { position: fixed; left: 16px; bottom: 16px; z-index: 58; max-width: calc(100vw - 290px); }
.pres-bar { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.14)); cursor: pointer; color: var(--text); font: inherit; }
.pres-bar:hover { border-color: var(--border-strong, #cbd5e1); }
.pres-bar:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 2px; }
.pres-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); flex: none; }
.pres-dot.off { background: #9ca3af; box-shadow: 0 0 0 3px rgba(156,163,175,.18); }
.pres-lab { font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.pres-avs { display: inline-flex; align-items: center; }
.pres-avs .pres-av + .pres-av { margin-left: -6px; }
.pres-av { position: relative; display: inline-grid; border-radius: 50%; }
.pres-av .avatar.sm { width: 28px; height: 28px; font-size: 11px; box-shadow: 0 0 0 2px var(--surface); }
.pres-av::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 2px var(--surface); }
.pres-av.away .avatar { filter: grayscale(1); opacity: .55; }
.pres-av.away::after { background: #9ca3af; }
.pres-more { margin-left: 4px; font-size: 11px; font-weight: 700; color: var(--muted); }
.pres-pop { position: absolute; left: 0; bottom: 48px; width: 300px; max-height: min(420px, 60vh); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.18)); padding: 10px; }
.pres-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.pres-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pres-row { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; }
.pres-row.focus { background: var(--surface-2); }
.pres-row .avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.pres-who { display: grid; min-width: 0; flex: 1; }
.pres-who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-row .btn.em-ghost { color: #c81e3a; border: 1px solid rgba(226,68,92,.35); background: transparent; gap: 4px; display: inline-flex; align-items: center; }
.pres-row .btn.em-ghost:hover { background: rgba(226,68,92,.08); }
.pres-row .btn.em-ghost svg { width: 13px; height: 13px; }
.pres-empty { padding: 8px 4px; }
.pres-foot { padding: 8px 4px 2px; border-top: 1px solid var(--border); margin-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 760px) {
  .pres { left: 8px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 180px); }
  .pres-bar { height: 36px; padding: 0 8px; gap: 6px; }
  .pres-av .avatar.sm { width: 24px; height: 24px; font-size: 10px; }
  .pres-lab { display: none; }
  .pres-pop { width: min(300px, calc(100vw - 20px)); bottom: 44px; }
  .pres-row .btn.em-ghost { min-height: 36px; }
}
@media print { .pres { display: none; } }

/* ── Emergency: Spiel/Ist da (Absender), Bin da (Helfer) ── */
.as-game { margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; background: linear-gradient(135deg, rgba(34,231,255,.10), rgba(177,77,255,.10)); border: 1px solid rgba(34,231,255,.35); font-size: 12.5px; }
.as-game b { color: #16a34a; }
.as-game-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.as-play { background: linear-gradient(135deg, #22e7ff, #b14dff) !important; color: #05101f !important; font-weight: 800 !important; border: 0 !important; }
.as-arrive { background: #16a34a !important; color: #fff !important; font-weight: 800 !important; border: 0 !important; }
.as-help { border-left: 3px solid #16a34a; padding-left: 8px; }
/* ── Anwesenheit: letzte VNC-Verbindung ── */
.pres-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 2px; margin-left: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.pres-avs .pres-chip + .pres-av, .pres-avs .pres-av + .pres-chip, .pres-avs .pres-chip + .pres-chip { margin-left: 4px; }
.pres-loc { font-size: 10.5px; font-weight: 700; color: var(--text); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pres-av.has-loc::before { content: "📍"; position: absolute; left: -3px; top: -7px; font-size: 10px; line-height: 1; }
.pres-where { display: block; color: var(--accent-strong, #2563eb); font-weight: 600; margin-top: 1px; }
/* Aktive Alarme: Spielen / Ist da / Bin da / Pop-up wieder anzeigen */
.al-btns.al-help{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:6px;padding:6px 8px;border-radius:8px;background:rgba(56,189,248,.08);border:1px solid rgba(56,189,248,.25)}
.al-btns.al-help .tiny{flex:1 1 100%}
/* Toolbar oben rechts: Bericht erstellen / + Neuer Fehler / + Neue Aufgabe – identische Maße, nur Neuer Fehler farbig */
#page-action { display: flex; align-items: center; gap: 8px; }
#page-action .split-new { display: inline-flex; align-items: center; gap: 8px; }
#page-action .btn, #page-action .btn.primary {
  box-sizing: border-box; height: 36px; min-height: 36px; padding: 0 14px; gap: 6px; border-radius: 8px; border-width: 1px;
  font-size: 13px; font-weight: 600; line-height: 1; box-shadow: none; vertical-align: middle; margin: 0; white-space: nowrap;
}
#page-action .btn.primary { border-color: transparent; }
#page-action .btn svg { width: 16px; height: 16px; flex: none; }
@media (max-width: 640px) {
  #page-action .btn, #page-action .btn.primary { height: 44px; min-height: 44px; padding: 0 14px; }
  #page-action #pa-report { width: 44px; padding: 0; }
}
/* Dashboard: Unterzeile im KPI "Offen (nicht zugewiesen)" */
.kpi .kpi-sub { margin-top: 2px; font-size: 11.5px; color: var(--muted); font-weight: 500; }
/* ── "Festplatte bei mir" (Header neben Mindelheim-Uhr) ── */
.drive-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; align-self: center; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600; white-space: nowrap; cursor: pointer; line-height: 1; }
.drive-btn:hover { background: var(--hover, rgba(127,127,127,.08)); }
.drive-btn .dv-ico { font-size: 14px; }
.drive-btn .dv-since { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.drive-btn.free .dv-since, .drive-btn.free .dv-ico { display: none; }
.drive-btn.mine { background: #16a34a; border-color: #16a34a; color: #fff; }
.drive-btn.mine .dv-since { color: rgba(255,255,255,.85); }
.drive-btn.other { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.45); color: var(--text); cursor: default; }
body.is-admin .drive-btn.other { cursor: pointer; }
.drive-btn[disabled] { opacity: .6; }
@media (max-width: 1280px) { .drive-btn .dv-since { display: none; } }
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .drive-btn { width: 36px; height: 36px; padding: 0; justify-content: center; position: relative; }
  .drive-btn .dv-lab, .drive-btn .dv-since { display: none !important; }
  .drive-btn.free .dv-ico { display: inline; opacity: .55; filter: grayscale(1); }
  .drive-btn.mine, .drive-btn.other { background: var(--surface); color: var(--text); }
  .drive-btn.mine::after, .drive-btn.other::after { content: ""; position: absolute; right: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--surface); }
  .drive-btn.mine::after { background: #16a34a; } .drive-btn.other::after { background: #f59e0b; }
}
.drive-pop { position: fixed; z-index: 400; width: 290px; max-width: calc(100vw - 16px); padding: 12px; border-radius: 12px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0,0,0,.18); display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.drive-pop .btn { align-self: flex-start; }
.drive-pop .btn.danger { color: #dc2626; border-color: rgba(220,38,38,.4); }
.drive-pop .dp-h { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-top: 2px; }
.drive-pop .dp-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 12px; max-height: 220px; overflow: auto; }
.menu-item.um-drive.mine { color: #16a34a; font-weight: 700; } .menu-item.um-drive.other { color: #b45309; }
@media (min-width: 1025px) and (hover: hover) { .menu-item.um-drive { display: none !important; } }
/* ── Bilder in Notizen ── */
.rt img.rt-img { display: block; max-width: min(100%, 420px); max-height: 260px; height: auto; margin: 6px 0; border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in; object-fit: contain; background: var(--bg, #f5f6f8); }
.rt-ed img.rt-img { cursor: default; }
.rt-ed img.rt-up { opacity: .45; filter: grayscale(.4); }
.rt-ed.rt-drop { outline: 2px dashed var(--accent, #3b82f6); outline-offset: 2px; }
.rt-prog { margin-top: 4px; font-size: 12px; color: var(--muted); }

/* ── g10: kompakteres Suchfeld, Emergency = rote Glocke im Kreis, Festplatte kompakt ── */
.topbar .search-wrap { transition: width .18s ease; }
@media (min-width: 1501px) { .topbar .search-wrap { width: 132px; } .topbar .search-wrap:focus-within { width: 240px; } }
@media (max-width: 1500px) and (min-width: 1201px) { .topbar .search-wrap { width: 112px; } .topbar .search-wrap:focus-within { width: 220px; } }
.topbar .em-btn.em-round, .em-btn.em-round {
  width: 34px; height: 34px; min-width: 34px; padding: 0 !important; border-radius: 50%; justify-content: center; gap: 0;
  background: rgba(220,38,38,.08); color: #dc2626; border: 2px solid #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12), 0 0 10px rgba(220,38,38,.28); flex: none;
}
.em-btn.em-round svg { width: 17px; height: 17px; stroke: currentColor; }
.em-btn.em-round:hover { background: #dc2626; color: #fff; filter: none; box-shadow: 0 0 0 4px rgba(220,38,38,.2), 0 0 14px rgba(220,38,38,.45); }
.em-btn.em-round:focus-visible { outline: 2px solid #dc2626; outline-offset: 2px; }
.em-btn.em-round .em-lab { display: none !important; }
[data-theme="dark"] .em-btn.em-round { color: #f87171; border-color: #f87171; background: rgba(248,113,113,.12); box-shadow: 0 0 0 3px rgba(248,113,113,.14), 0 0 12px rgba(248,113,113,.35); }
[data-theme="dark"] .em-btn.em-round:hover { background: #ef4444; border-color: #ef4444; color: #fff; }
@media (max-width: 760px) {
  .topbar .em-btn.em-round { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .em-btn.em-round svg { width: 19px; height: 19px; }
}
/* Festplatte: frei = nur 💾, belegt = 💾 + Name */
.drive-btn .dv-since { display: none !important; }
.drive-btn.free { width: 32px; padding: 0; justify-content: center; }
.drive-btn.free .dv-ico { display: inline !important; opacity: 1; filter: none; font-size: 15px; }
.drive-btn.free .dv-lab { display: none !important; }
.drive-btn .dv-lab { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.drive-btn.mine, .drive-btn.other { padding: 0 10px 0 8px; gap: 5px; }
@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .drive-btn.mine, .drive-btn.other { width: auto; padding: 0 8px; gap: 4px; }
  .drive-btn.mine .dv-lab, .drive-btn.other .dv-lab { display: inline-block !important; max-width: 64px; font-size: 12px; }
  .drive-btn.mine { background: #16a34a; border-color: #16a34a; color: #fff; }
  .drive-btn.other { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.5); color: var(--text); }
  .drive-btn.mine::after, .drive-btn.other::after { display: none; }
  .drive-btn.free { width: 36px; }
}
.pres-where.last { color: var(--muted); font-weight: 500; }

/* g12 Desktop-App */
.dt-dlg .dt-intro { margin: 0 0 12px; line-height: 1.5; }
.dt-dlg .dt-steps { margin: 0 0 12px 18px; padding: 0; display: grid; gap: 6px; line-height: 1.45; }
.dt-dlg .note { margin-top: 8px; }
#dt-dl span[data-ico], #dt-rmdl span[data-ico] { display: inline-flex; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }
@media (max-width: 760px) { .user-menu .um-desktop { display: none; } }

/* ═══ g13 · Klickziele nur Text/Buttons · Zurück · Übersicht aufgeräumt ═══ */
/* 1) Flächen sind nicht mehr klickbar: kein Zeiger, kein Hover */
.mtable tbody tr, table.tasks tbody tr, .card, .pool-card, .mini-task, .kpi, .team-row, .drow, .zrow, .mk { cursor: default !important; }
.mtable tbody tr:hover td, table.tasks tbody tr:hover, .mini-task:hover { background: transparent !important; }
.mtable tbody tr:hover td.c-status, .mtable tbody tr:hover td.c-prio { background: transparent !important; }
.card:hover, .pool-card:hover, .kpi:hover { box-shadow: none !important; transform: none !important; border-color: var(--border) !important; }
.mk:hover, .drow:hover, .zrow:hover { filter: none !important; background: transparent; }
/* Klickbare Texte: klarer Rahmen beim Drüberfahren */
.tlink, .dlink { cursor: pointer; border-radius: 6px; padding: 1px 5px; margin: 0 -5px; transition: box-shadow .12s, background-color .12s, color .12s; box-shadow: inset 0 0 0 1px transparent; }
button.dlink { appearance: none; -webkit-appearance: none; border: 0; background: none; font: inherit; color: inherit; text-align: left; line-height: inherit; }
.tlink:hover, .dlink:hover { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); color: var(--text); }
.tlink:focus-visible, .dlink:focus-visible, .back-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ttl.tlink { display: inline-block; max-width: 100%; vertical-align: middle; }
.mt-title .tlink { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.pool-card h4 .tlink { display: inline; }
.card[draggable=true] .c-body { cursor: grab; }
.card[draggable=true] .c-body:active { cursor: grabbing; }
.card .tlink { cursor: pointer; }

/* 2) Zurück */
.ph-l { min-width: 0; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; margin: 0 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.back-btn span[aria-hidden] { font-size: 15px; line-height: 1; }
.back-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.back-btn.hidden { display: none; }
.tp-back { margin: 0; height: 28px; }

/* 3) Übersicht: ruhiger, klare Abschnitte */
.page { padding: 22px 28px 96px; }
.bn-fold { margin: 0 0 14px; }
.bn-fold > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; cursor: default; }
.bn-fold > summary::-webkit-details-marker { display: none; }
.bn-fold > summary::before { content: "▸"; font-size: 11px; transition: transform .15s; }
.bn-fold[open] > summary::before { transform: rotate(90deg); }
.bn-fold .bnotes { margin-bottom: 4px; }
.bn-fold .bnote { border-left-width: 1px; padding: 10px 14px; }
.dash-top { margin-bottom: 14px !important; }
.kpis.six { gap: 10px; margin-bottom: 22px; }
.kpi { padding: 12px 14px 12px 16px !important; box-shadow: none !important; border-radius: 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi::before { width: 3px !important; background: var(--border-strong) !important; }
.kpi.warn::before, .kpi.bad::before { background: var(--bad) !important; }
.kpi.ok::before { background: var(--ok) !important; }
.kpi .label.dlink { font-size: 12px; font-weight: 600; color: var(--muted); align-self: flex-start; }
.kpi .label.dlink:hover { color: var(--text); }
.kpi .value { font-size: 26px !important; line-height: 1.15; margin: 0; }
.kpi.bad .value, .kpi.warn .value { color: var(--bad) !important; }
.kpi.ok .value { color: var(--ok) !important; }
.sec-title { margin: 26px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.opsec { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px 6px; }
.sec-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sec-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.sec-head .muted { font-size: 12.5px; }
.sec-head .dlink { font-size: 13px; font-weight: 600; color: var(--accent); }
.ms-empty { padding: 10px 0 14px; }
/* Aufgabentabelle (Übersicht + Tabelle): Spalten klar, wenig Linien, wenig Farbe */
table.mtable { min-width: 960px; }
.mtable th { text-align: left !important; background: var(--surface-2) !important; border-right: 0 !important; font-size: 11px !important; text-transform: uppercase; letter-spacing: .05em; padding: 7px 10px !important; }
.mtable td { text-align: left !important; border-right: 0 !important; }
.mtable td.c-status, .mtable td.c-prio { padding: 4px 8px !important; }
.mtable .c-typ { width: 96px; } .mtable .c-prio { width: 120px; } .mtable .c-place { width: 190px; } .mtable .c-person { width: 190px; } .mtable .c-due { width: 108px; } .mtable .c-status { width: 150px; }
.otable th.c-title, .otable td.c-title { border-left: 0 !important; padding-left: 4px !important; }
.otable th:first-child { border-top-left-radius: 8px; } .otable th:last-child { border-top-right-radius: 8px; }
.otable tbody tr:last-child td { border-bottom: 0; }
.ppill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.ppill i { width: 9px; height: 9px; border-radius: 50%; background: var(--lc); flex: none; }
.ri.sub-n { font-size: 11.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.mtable tfoot td.c-prio { border-left: 0 !important; border-right: 0 !important; }
/* Module */
.modsec { padding: 14px 16px !important; }
.ms-attn { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.ms-attn .mk { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 4px; padding: 2px 4px 2px 9px !important; border-radius: 999px !important; border: 0 !important; background: var(--surface-2) !important; font-size: 12px !important; }
.ms-attn .mk b { font-size: 13px !important; color: var(--text) !important; }
.ms-attn .mk.bad b, .ms-attn .mk.warn b { color: var(--bad) !important; } .ms-attn .mk.violet b { color: #a25ddc !important; }
.ms-attn .mk .dlink { margin: 0; color: var(--text-2); }
.ms-ok { font-size: 12.5px; font-weight: 600; color: var(--ok); }
.drow { padding: 3px 2px !important; }
.drow .dl.dlink { flex: 1; margin: 0; }
.drow b { font-variant-numeric: tabular-nums; }
.zrow { padding: 4px 2px !important; }
.zrow .zl.dlink { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modsec h4 { margin: 12px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 760px) {
  .page { padding: 14px 12px 96px; }
  .kpi .value { font-size: 22px !important; }
  .opsec { padding: 12px 10px 4px; }
  table.mtable { min-width: 0; }
  .otable tbody tr { border-left: 1px solid var(--border) !important; }
  .mtable td.c-typ { order: 0; }
  .back-btn { margin-bottom: 6px; }
}
@media (max-width: 760px) { .mtable .ttl.tlink { white-space: normal; } }

/* g13 · Aufgabe/Fehler-Formular: nummerierte Abschnitte, klare Felder, Typ-Kopf */
.tp.typ-Fehler { border-top: 4px solid #e2445c; }
.tp.typ-Aufgabe { border-top: 4px solid var(--accent); }
.tp.typ-Fehler #tp-title::before, .tp.typ-Aufgabe #tp-title::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; background: #e2445c; }
.tp.typ-Aufgabe #tp-title::before { background: var(--accent); }
.g13form .tp-sec { padding: 16px 0 18px; margin: 0; border-bottom: 1px solid var(--border); }
.g13form .tp-sec:last-child { border-bottom: 0; }
.g13form .tp-num > h3, .g13form .tp-more > summary > h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 14px; font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); }
.g13form .sec-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; flex: none; }
.tp.typ-Fehler .g13form .sec-n { background: color-mix(in srgb, #e2445c 12%, transparent); color: #c62f48; }
.g13form .tp-grid { gap: 14px 16px; }
.g13form .field { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.g13form .field > input:not([type=hidden]), .g13form .field > select { height: 38px; font-size: 14px; font-weight: 400; }
.g13form .lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g13form .typ-seg button { min-height: 36px; }
.g13form .tp-more > summary { list-style: none; cursor: pointer; }
.g13form .tp-more > summary::-webkit-details-marker { display: none; }
.g13form .tp-more > summary > h3 { margin: 0; }
.g13form .tp-more > summary > h3::after { content: "▸"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.g13form .tp-more[open] > summary > h3 { margin-bottom: 14px; }
.g13form .tp-more[open] > summary > h3::after { transform: rotate(90deg); }
.g13form .tp-more > summary:hover h3 { color: var(--accent); }
.g13form .tp-more-hint { font-size: 12px; font-weight: 500; }
.g13form .tp-sub { margin-top: 16px; }
.g13form .tp-sub > h4 { margin: 0 0 8px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.tp-foot { position: sticky; bottom: 0; z-index: 2; }
@media (max-width: 760px) {
  .g13form .tp-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .g13form .tp-more-hint { display: none; }
}

/* g13: Editor-Toolbar einzeilig (Größen-Auswahl nicht volle Breite) */
.tp-form .rt-bar .rt-size, .rt-bar select.rt-size { width: auto; flex: none; min-width: 0; }

/* g13 Batch C: Archiv-Ansicht + Bericht-Filter */
.arch-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.arch-bar .kb-search { flex: 1 1 260px; max-width: 420px; }
.qchips { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qchip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 550; cursor: pointer; }
.qchip:hover { border-color: var(--accent); }
.qchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.arch .otable .c-status { text-align: right; white-space: nowrap; }
.rp-kind { display: inline-flex; margin-top: 6px; }
.arch-bar .kb-search input[type=search] { padding-left: 38px !important; }
