:root {
  --red: #d9282f;
  --red-dark: #b81f26;
  --dark: #2b2e33;
  --bg: #f4f4f5;
  --card: #ffffff;
  --text: #1c1d20;
  --muted: #62666d;
  --line: #d4d6da;
  --grey: #bcbfc4;
  --row: #ececee;
  --warn: #f6b73c;
  --warn-bg: #fff3d6;
  --radius: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
[hidden] { display: none !important; }
button, input, select { font: inherit; color: inherit; }

/* ---------- Kopf */
.top { background: var(--dark); color: #fff; position: relative; }
.top-inner {
  max-width: 1200px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 14px;
  display: flex; align-items: center; gap: 12px; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.slash { width: 6px; height: 40px; background: var(--red); transform: skewX(-14deg); border-radius: 2px; flex: none; }
.brand-sub { font-size: 12px; opacity: .8; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
h1 { margin: 0; font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: .01em; text-transform: uppercase; }
.crest { height: 64px; width: auto; flex: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.ribbon { height: 5px; background: var(--red); }
.top-actions { position: relative; display: flex; align-items: center; gap: 8px; }
.role { font-size: 12px; background: rgba(255,255,255,.14); padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.icon-btn {
  border: 0; background: transparent; color: inherit; width: 40px; height: 40px;
  border-radius: 10px; font-size: 20px; cursor: pointer; flex: none;
}
.top .icon-btn:hover { background: rgba(255,255,255,.12); }
.menu {
  position: absolute; right: 0; top: 44px; z-index: 20; background: #fff; color: var(--text);
  border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); padding: 6px; min-width: 170px;
}
.menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; background: none; border-radius: 8px; cursor: pointer; }
.menu button:hover { background: var(--row); }

/* ---------- Anmeldung */
.login { padding: 32px 16px; display: flex; justify-content: center; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; width: 100%; max-width: 380px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card h2 { margin: 0 0 6px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=date], select {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px;
}
input:focus, select:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
#pin { font-size: 22px; letter-spacing: .3em; text-align: center; }
.err { color: var(--red-dark); font-size: 14px; min-height: 1.2em; margin: 10px 0 0 !important; }

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; color: var(--text); font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #9a9ea5; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn.danger { color: var(--red-dark); border-color: #efb2b5; }
.card .btn { width: 100%; margin-top: 16px; }

/* ---------- Werkzeugleiste */
main { max-width: 1200px; margin: 0 auto; padding: 16px 16px calc(32px + env(safe-area-inset-bottom)); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; }
.plan-pick { flex: 1 1 220px; max-width: 340px; }
.plan-pick label { margin-top: 0; }
.tb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.status { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { font-size: 13px; padding: 5px 10px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.chip.ok { border-color: #9fd3ae; background: #eaf7ee; }
.chip.warn { border-color: var(--warn); background: var(--warn-bg); }
.empty { background: #fff; border-radius: var(--radius); padding: 28px; text-align: center; }
.hint { color: var(--muted); font-size: 13px; }

/* ---------- Funktions-Symbole */
.fn-ico { width: 30px; height: 30px; border-radius: 7px; background: var(--red); display: grid; place-items: center; flex: none; }
.fn-ico svg { width: 22px; height: 22px; }

/* ---------- Karten (Handy) */
.cards { display: grid; gap: 14px; }
.veh { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.veh-head { background: var(--red); color: #fff; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.veh-head b { font-size: 18px; letter-spacing: .01em; }
.veh-head span { font-size: 13px; opacity: .9; }
.slot { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--row); min-height: 56px; }
.slot:first-of-type { border-top: 0; }
.slot .fn { width: 118px; flex: none; font-size: 14px; font-weight: 600; }
.cell-btn {
  flex: 1; min-width: 0; min-height: 42px; text-align: left; padding: 8px 12px;
  border: 1.5px dashed var(--line); border-radius: 9px; background: #fafafa; font-size: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cell-btn.filled { border-style: solid; border-color: transparent; background: var(--row); font-weight: 600; }
.cell-btn.empty-cell { color: var(--muted); }
.cell-btn.dup { background: var(--warn-bg); border-color: var(--warn); border-style: solid; }
.cell-btn.editable { cursor: pointer; }
.cell-btn.editable:hover { border-color: var(--red); }
.cell-btn:disabled { cursor: default; color: inherit; opacity: 1; }
.tag-atv { display: inline-block; background: var(--red); color: #fff; font-weight: 700; padding: 8px 12px; border-radius: 9px; }

/* ---------- Tabelle (PC) */
.table-wrap { display: none; }
.grid { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.grid th, .grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; }
.grid thead th { background: #fff; padding: 10px 6px; }
.grid thead th .vh { background: var(--red); color: #fff; border-radius: 8px; padding: 9px 4px; font-size: 15px; text-align: center; }
.grid thead th:first-child { width: 190px; }
.grid tbody th { background: var(--row); text-align: left; font-size: 14px; }
.grid tbody th .fnrow { display: flex; align-items: center; gap: 9px; }
.grid td { height: 58px; }
.grid td.blocked { background: var(--grey); }
.grid td .cell-btn { width: 100%; text-align: center; padding: 6px 4px; font-size: 15px; }
.grid td .tag-atv { display: block; text-align: center; }
.grid tr:last-child > * { border-bottom: 0; }
.grid tr > *:last-child { border-right: 0; }

@media (min-width: 900px) {
  .cards { display: none; }
  .table-wrap { display: block; }
  h1 { font-size: 26px; }
  .crest { height: 78px; }
}

/* ---------- Dialoge */
dialog.sheet {
  border: 0; padding: 18px; width: min(520px, 100vw); max-height: 88vh; border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.3); color: var(--text);
}
dialog::backdrop { background: rgba(20,20,24,.45); }
@media (max-width: 600px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.sheet-head h3 { margin: 0; font-size: 20px; }
.sheet-veh { display: inline-block; background: var(--red); color: #fff; font-weight: 700; font-size: 13px; border-radius: 6px; padding: 2px 8px; margin-bottom: 4px; }
.names { list-style: none; margin: 10px 0; padding: 0; max-height: 40vh; overflow: auto; border: 1px solid var(--row); border-radius: 10px; }
.names li button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 11px 12px; border: 0; border-bottom: 1px solid var(--row); background: #fff; cursor: pointer; }
.names li:last-child button { border-bottom: 0; }
.names li button:hover, .names li button:focus-visible { background: var(--row); outline: none; }
.names li button small { color: var(--muted); font-size: 12px; text-align: right; }
.names li button small.busy { color: #9a5b00; }
.names .none { padding: 12px; color: var(--muted); font-size: 14px; }
.chk { display: flex; gap: 8px; align-items: center; font-weight: 500; color: var(--text); font-size: 14px; }
.sheet-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.sheet-btns .btn { flex: 1; }
h4 { margin: 18px 0 8px; font-size: 15px; }
.row { display: flex; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row input { flex: 1; }
.admin-names { list-style: none; padding: 0; margin: 10px 0; max-height: 34vh; overflow: auto; }
.admin-names li { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 6px 10px; border-bottom: 1px solid var(--row); }
.admin-names li button { border: 0; background: none; color: var(--red-dark); cursor: pointer; padding: 8px; border-radius: 8px; }
.admin-names li button:hover { background: #fdecec; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(120px);
  background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  transition: transform .25s; z-index: 50; max-width: calc(100vw - 32px);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Nur-Ansicht: leere Felder ruhiger, lange Namen in der Tabelle umbrechen */
.cell-btn:disabled.empty-cell { border-color: transparent; background: transparent; }
.grid td .cell-btn { white-space: normal; line-height: 1.15; font-size: 14px; overflow-wrap: anywhere; }
.cell-btn { white-space: normal; line-height: 1.2; overflow-wrap: anywhere; }
.brand > div { min-width: 0; }
h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) {
  .role { display: none; }
  h1 { font-size: 19px; }
  .crest { height: 54px; }
}

/* ---------- Reiter */
.tabs { display: flex; gap: 4px; background: #e4e5e8; padding: 4px; border-radius: 12px; margin-bottom: 16px; overflow-x: auto; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 10px 12px; border-radius: 9px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.sec-title { margin: 0; font-size: 22px; }
.sec-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.back { border: 0; background: none; color: var(--red-dark); font-weight: 600; padding: 6px 0; margin-bottom: 8px; cursor: pointer; font-size: 15px; }
textarea { width: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 16px; resize: vertical; }
textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: transparent; }
.grow { flex: 1; min-width: 0; }
.dlg-text { color: var(--muted); font-size: 14px; margin: 0 0 6px; }

/* ---------- Dokumente */
.doc-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.doc-list button { width: 100%; text-align: left; background: #fff; border: 0; border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; align-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.doc-list button:hover { box-shadow: 0 0 0 2px var(--red); }
.doc-list .d-main { flex: 1; min-width: 0; }
.doc-list .d-title { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list .d-meta { color: var(--muted); font-size: 13px; }
.doc-list .d-count { font-size: 13px; font-weight: 700; background: var(--row); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.doc-list .empty-li { background: #fff; border-radius: var(--radius); padding: 24px; text-align: center; color: var(--muted); }
.pill { display: inline-block; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 8px; margin-right: 6px; }
.doc-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; }
.doc-meta { color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.doc-text { background: #fff; border-radius: var(--radius); padding: 14px 16px; margin: 14px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.doc-text:empty { display: none; }
.doc-cols { display: grid; gap: 16px; }
@media (min-width: 900px) { .doc-cols { grid-template-columns: 2fr 1fr; } }
.sig-list, .miss-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: var(--radius); overflow: hidden; }
.sig-list li { display: grid; grid-template-columns: 1fr 140px 36px; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--row); }
.sig-list li:last-child, .miss-list li:last-child { border-bottom: 0; }
.sig-list .s-name { font-weight: 700; }
.sig-list .s-meta { color: var(--muted); font-size: 12px; }
.sig-list svg { width: 140px; height: 44px; }
.sig-list .s-del { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; border-radius: 8px; height: 36px; }
.sig-list .s-del:hover { background: #fdecec; color: var(--red-dark); }
.miss-list li { padding: 10px 12px; border-bottom: 1px solid var(--row); font-size: 15px; }
.sig-list .none, .miss-list .none { color: var(--muted); font-size: 14px; display: block; padding: 12px; }
.danger-zone { margin-top: 24px; }

/* ---------- Statistik */
.stat-filter select { width: auto; min-height: 44px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.stat-card b { display: block; font-size: 26px; line-height: 1.1; }
.stat-card span { color: var(--muted); font-size: 13px; }
.table-scroll { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0,0,0,.07); }
.stat-table { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; }
.stat-table th, .stat-table td { padding: 10px 12px; border-bottom: 1px solid var(--row); text-align: right; white-space: nowrap; }
.stat-table th:first-child, .stat-table td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }
.stat-table thead th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-table .arch { color: var(--muted); font-size: 12px; font-weight: 400; }
.bar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar i { display: block; width: 80px; height: 8px; border-radius: 4px; background: var(--row); overflow: hidden; }
.bar i b { display: block; height: 100%; background: var(--red); border-radius: 4px; }

/* ---------- Sammelmodus */
.kiosk { position: fixed; inset: 0; z-index: 100; background: var(--bg); overflow-y: auto; -webkit-user-select: none; user-select: none; }
.kiosk-top { position: sticky; top: 0; z-index: 2; background: var(--dark); color: #fff; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; border-bottom: 5px solid var(--red); }
.kiosk-doc { font-weight: 800; font-size: 18px; }
.kiosk-sub { font-size: 13px; opacity: .8; }
.kiosk-top .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.kiosk-body { max-width: 720px; margin: 0 auto; padding: 18px 16px calc(28px + env(safe-area-inset-bottom)); }
.kiosk-body h2 { margin: 0 0 12px; font-size: 22px; }
.k-names { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.k-names button { width: 100%; min-height: 58px; text-align: left; font-size: 19px; font-weight: 600; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 16px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.k-names button:hover { border-color: var(--red); }
.k-names button:disabled { background: #eaf7ee; border-color: #9fd3ae; color: #2c6b3f; cursor: default; }
.k-names .none { color: var(--muted); padding: 8px 4px; }
.k-text { max-height: 34vh; overflow: auto; -webkit-user-select: text; user-select: text; }
.chk.big { font-size: 16px; align-items: flex-start; margin: 14px 0; }
.chk.big input { width: 24px; height: 24px; flex: none; margin: 0; }
.pad-wrap { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 12px; }
#pad { display: block; width: 100%; height: 210px; touch-action: none; cursor: crosshair; }
.pad-line { position: absolute; left: 18px; right: 18px; bottom: 34px; border-top: 1.5px dashed #b9bcc2; font-size: 12px; color: var(--muted); padding-top: 4px; pointer-events: none; }
.kiosk-done { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(244,244,245,.97); z-index: 3; }
.kiosk-done .tick { width: 96px; height: 96px; border-radius: 50%; background: #2e9b55; color: #fff; font-size: 56px; display: grid; place-items: center; margin: 0 auto 14px; }
.kiosk-done p { font-size: 22px; font-weight: 700; margin: 0; }

/* ---------- Einsatzberichte */
.r-box { border: 0; background: #fff; border-radius: var(--radius); padding: 14px 16px 16px; margin: 14px 0; box-shadow: 0 1px 3px rgba(0,0,0,.07); min-width: 0; }
.r-box legend { font-weight: 800; font-size: 16px; padding: 0; float: left; width: 100%; margin-bottom: 6px; }
.r-box legend + * { clear: both; }
.r-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 12px; }
.r-grid .wide { grid-column: 1 / -1; }
@media (min-width: 900px) { .r-grid .wide { grid-column: span 2; } }
.r-grid label, .r-box > label { display: block; }
.r-grid input, .r-box > label input, .r-box textarea { margin-top: 4px; }
.chk.inline { display: flex; align-self: end; min-height: 44px; font-size: 15px; }
.chk.inline input { width: 22px; height: 22px; }
.unsaved { color: #9a5b00; font-weight: 600; font-size: 14px; margin: 6px 0 0; }
.r-strength { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.r-strength div { background: var(--row); border-radius: 10px; padding: 8px 10px; }
.r-strength div.on { background: #fdecec; box-shadow: inset 0 0 0 1.5px var(--red); }
.r-strength b { display: block; font-size: 13px; }
.r-strength span { font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.r-search { margin: 4px 0 10px; }
.crew-group h4 { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.crew-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(150px, 1fr) auto; gap: 6px 10px; align-items: center; padding: 7px 8px; border-radius: 10px; }
.crew-row:nth-child(even) { background: #f7f7f8; }
.crew-row.on { background: #fdecec; }
.crew-row .cn { font-weight: 600; overflow-wrap: anywhere; }
.crew-row .cn small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.crew-row select { width: 100%; min-height: 40px; padding: 6px 8px; font-size: 15px; }
.flags { display: flex; gap: 4px; flex-wrap: wrap; }
.flag { min-height: 36px; min-width: 44px; padding: 0 8px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--muted); }
.flag[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 640px) {
  .crew-row { grid-template-columns: 1fr 1fr; }
  .crew-row .flags { grid-column: 1 / -1; }
}
details.crew-group summary { cursor: pointer; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin: 14px 0 6px; }
.pad-wrap.small #rPad { height: 150px; }
#rPad { display: block; width: 100%; height: 150px; touch-action: none; cursor: crosshair; }
.r-box .row { margin-top: 8px; }
.admin-names li { gap: 8px; }
.admin-names .an-name { flex: 1; min-width: 0; }
.admin-names .an-fn { width: auto; min-height: 36px; padding: 4px 6px; font-size: 14px; }
.ablage code { font-size: 12px; background: var(--row); padding: 1px 4px; border-radius: 4px; }
.ablage .row input { min-width: 0; }
#ablageInfo { margin: 6px 0 0; }

/* Kopf: mehr Luft unter der Statusleiste, Wappen nie angeschnitten */
.top-inner { padding-top: calc(16px + env(safe-area-inset-top)); padding-bottom: 16px; }
.crest { align-self: center; }
/* Reiter auf dem Handy: 2 × 2 statt seitlich abgeschnitten */
@media (max-width: 640px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; }
  .tabs button { padding: 10px 6px; font-size: 15px; }
}

/* ---------- Benutzerkonten */
.seg { display: flex; background: var(--row); border-radius: 10px; padding: 3px; margin: 10px 0 14px; }
.seg button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.linkbtn { border: 0; background: none; color: var(--red-dark); font: inherit; font-size: 14px; padding: 10px 0 0; cursor: pointer; }
.menu-who { padding: 8px 12px 6px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--row); margin-bottom: 4px; }
.menu-who:empty { display: none; }
.menu-who b { display: block; color: var(--text); font-size: 14px; }
.role { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; }
.user-list { list-style: none; padding: 0; margin: 10px 0; max-height: 40vh; overflow: auto; }
.user-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px 8px 10px; border-bottom: 1px solid var(--row); }
.user-list .u-main { flex: 1; min-width: 0; }
.user-list .u-name { font-weight: 600; }
.user-list .u-name .off { color: var(--muted); font-weight: 500; font-size: 13px; }
.user-list .u-meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.user-list .u-meta .r { background: var(--row); border-radius: 99px; padding: 1px 7px; color: var(--text); }
.user-list .u-meta .w { background: var(--warn-bg); color: #7a4a00; border-radius: 99px; padding: 1px 7px; }
.user-list li.inactive .u-name { color: var(--muted); text-decoration: line-through; }
.user-list .empty-li { color: var(--muted); font-size: 14px; }
fieldset.rights { border: 1px solid var(--row); border-radius: 10px; padding: 6px 12px 10px; margin: 12px 0; }
fieldset.rights legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 4px; }
fieldset.rights .chk { padding: 7px 0; }
fieldset.rights .chk input, #ueActiveRow input { width: 20px; height: 20px; flex: none; margin: 0; }
fieldset.rights .chk small { color: var(--muted); font-weight: 400; display: block; font-size: 12px; }
#ueActiveRow { margin: 6px 0 4px; align-items: flex-start; }
.sheet-btns { flex-wrap: wrap; }
dialog.sheet.wide { width: min(720px, 100vw); }
.log-list { list-style: none; padding: 0; margin: 10px 0 0; max-height: 60vh; overflow: auto; font-size: 14px; }
.log-list li { padding: 7px 4px; border-bottom: 1px solid var(--row); }
.log-list .l-meta { font-size: 12px; color: var(--muted); }
.log-list .l-meta b { color: var(--text); }
.chip.who { background: var(--row); color: var(--muted); }
.ablage-st { font-size: 13px; color: var(--muted); margin: 4px 0 10px; word-break: break-word; }
.ablage-st.bad { color: #9a5b00; }
.ablage-st .linkbtn { padding: 0; font-size: 13px; }
.linkbtn.small { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
