:root {
  --rot: #b71c1c; --rot-d: #8e1414; --rot-l: #fbeaea;
  --ink: #1d232a; --ink-2: #4a5561; --ink-3: #7b8692;
  --line: #e2e6ea; --bg: #f5f6f8; --card: #fff;
  --ok: #1e7a46; --ok-l: #e7f5ed; --warn: #b26a00;
  --r: 10px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  font-size: 14.5px; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--rot); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 1.1rem 0 .5rem; }
code { background: #eef0f3; padding: 1px 5px; border-radius: 4px; font-size: .85em; word-break: break-all; }
.dim { color: var(--ink-3); font-weight: 400; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.2rem;
  background: var(--ink); color: #fff; padding: .55rem 1.2rem; flex-wrap: wrap; }
.brand { display: flex; gap: .6rem; align-items: center; }
.brand .mark { height: 40px; width: auto; display: block; }
.brand strong { display: block; font-size: .98rem; }
.brand small { display: block; color: #aeb8c2; font-size: .75rem; }
nav { display: flex; gap: .2rem; flex-wrap: wrap; }
nav a { color: #d5dbe1; padding: .45rem .75rem; border-radius: 7px; font-weight: 500; }
nav a:hover { background: #2c343d; text-decoration: none; color: #fff; }
nav a.on { background: #fff; color: var(--ink); }
.tools { margin-left: auto; display: flex; gap: .7rem; align-items: center; }
.jahr label { color: #aeb8c2; font-size: .8rem; display: flex; gap: .4rem; align-items: center; }
.jahr select { background: #2c343d; color: #fff; border: 1px solid #3b4550; border-radius: 7px; padding: .35rem .5rem; font: inherit; }

main { max-width: 1250px; margin: 0 auto; padding: 1.3rem 1.2rem 5rem; }
footer { text-align: center; color: var(--ink-3); font-size: .75rem; padding: 1rem; }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .35rem; padding: .5rem .95rem; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #c6ccd2; text-decoration: none; background: #fafbfc; }
.btn.primary { background: var(--rot); border-color: var(--rot); color: #fff; }
.btn.primary:hover { background: var(--rot-d); }
.btn.danger { color: var(--rot); border-color: #efc4c4; }
.btn.danger:hover { background: var(--rot-l); }
.btn.small { padding: .32rem .65rem; font-size: .82rem; font-weight: 500; }

/* Karten */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0 1rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: .9rem 1.1rem; border-top: 3px solid var(--rot); }
.tile span { display: block; color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.tile b { display: block; font-size: 1.9rem; font-variant-numeric: tabular-nums; margin: .15rem 0; }
.tile small { color: var(--ink-3); font-size: .78rem; }
.tile.small b { font-size: 1.35rem; }

/* Tabellen */
.tablewrap { overflow-x: auto; }
.tablewrap.short { max-height: 420px; overflow-y: auto; }
table.grid { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.grid.narrow { width: auto; min-width: 320px; }
.grid th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3);
  font-weight: 600; padding: .5rem .6rem; border-bottom: 2px solid var(--line); background: #fff; position: sticky; top: 0; }
.grid td { padding: .42rem .6rem; border-bottom: 1px solid #eef0f2; }
.grid tbody tr:hover { background: #fafbfc; }
.grid tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.grid .num { text-align: right; }
.grid .nr { width: 3rem; color: var(--ink-3); }
.grid .strong { font-weight: 700; }
.grid .zero { color: #c3c9cf; }
.grid tr.muted td { color: var(--ink-3); }
.grid tr.click { cursor: pointer; }
.nowrap { white-space: nowrap; }
.empty { color: var(--ink-3); text-align: center; padding: 1.5rem; }

.tag { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .4rem; border-radius: 4px; background: #eef0f3; color: var(--ink-2); vertical-align: 1px; }
.tag.night { background: #e6e9f5; color: #34407a; }
.tag.nacht { background: #000; color: #fff; }
.tag.tagzeit { background: #a9d8f5; color: #000; }
.tag.nacht, .tag.tagzeit { min-width: 2.6rem; text-align: center; }
/* Einsatztypen */
.tag.typ { min-width: 2.6rem; text-align: center; color: #fff; }
.tag.typ-B   { background: #c62828; }
.tag.typ-TH  { background: #1565c0; }
.tag.typ-THV { background: #ef6c00; }
.tag.typ-THT { background: #2e7d32; }
.tag.typ-BMA { background: #6a1b9a; }
.tag.typ-SO  { background: #616161; }
.warn { color: var(--warn); font-weight: 600; }
.kat { font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: #eef0f3; white-space: nowrap; }
.k-einsatz { background: var(--rot-l); color: var(--rot); }
.k-jf_ausbildung, .k-jf_veranstaltung { background: #e7f0fb; color: #1f4e8c; }
.count { display: inline-block; min-width: 1.6rem; text-align: center; font-size: .78rem; background: var(--ink); color: #fff; border-radius: 99px; padding: .05rem .45rem; margin-left: .3rem; vertical-align: 2px; }

/* Balken */
.bars { display: grid; gap: .35rem; }
.bar { display: grid; grid-template-columns: 170px 1fr 90px 90px; align-items: center; gap: .8rem; color: var(--ink); padding: .2rem .3rem; border-radius: 6px; }
.bar:hover { background: #f7f8fa; text-decoration: none; }
.bar .track { height: 12px; background: #f0f2f4; border-radius: 99px; overflow: hidden; }
.bar .fill { display: block; height: 100%; background: var(--rot); border-radius: 99px; }
.bar .val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar .sub { color: var(--ink-3); font-size: .8rem; }

/* Chips */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { padding: .35rem .75rem; border-radius: 99px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 500; font-size: .86rem; }
.chip em { font-style: normal; color: var(--ink-3); margin-left: .2rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on em { color: #aeb8c2; }
.chip:hover { text-decoration: none; border-color: #c6ccd2; }

/* Formulare */
.form label, .fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.fields { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: flex-end; margin-bottom: .8rem; }
.fields .wide { flex: 1 1 280px; }
.fieldbtn { display: flex; align-items: flex-end; }
input, select { font: inherit; font-weight: 400; color: var(--ink); padding: .48rem .6rem; border: 1px solid #cfd5db; border-radius: 7px; background: #fff; }
input:focus, select:focus { outline: 2px solid #f1b5b5; border-color: var(--rot); }
label.check { flex-direction: row; align-items: center; gap: .5rem; margin: .7rem 0; }
.hint { color: var(--ink-3); font-size: .82rem; margin: .5rem 0 0; }
.links { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .5rem; }

/* Anwesenheit */
.att-head { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.att-head h2 { margin: 0; }
.att-tools { display: flex; gap: .5rem; flex-wrap: wrap; }
.att-tools input[type=search] { min-width: 200px; }
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: .4rem; }
.pitem { display: flex !important; flex-direction: row !important; align-items: center; gap: .55rem !important;
  border: 1px solid var(--line); border-radius: 8px; padding: .35rem .45rem .35rem .6rem; cursor: pointer;
  font-size: .9rem !important; font-weight: 500 !important; color: var(--ink) !important; background: #fff; user-select: none; }
.pitem:hover { border-color: #c6ccd2; }
.pitem.on { border-color: var(--ok); background: var(--ok-l); }
.pitem input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; }
.pitem .pname { flex: 1; }
.pitem .hrs { width: 62px; padding: .25rem .4rem; text-align: right; }
.pitem:not(.on) .hrs { visibility: hidden; }
.pitem.hidden { display: none !important; }
details summary { cursor: pointer; font-weight: 600; margin: 1rem 0 .5rem; color: var(--ink-2); }
.actions { display: flex; gap: .6rem; align-items: center; }
.actions .grow { flex: 1; }
.actions.sticky { position: sticky; bottom: 0; background: rgba(245,246,248,.94); backdrop-filter: blur(4px); padding: .8rem 0; border-top: 1px solid var(--line); }
.only-einsatz, .only-lehrgang { display: none !important; }
form[data-kat=einsatz] .only-einsatz { display: flex !important; }
form[data-kat=lehrgang] .only-lehrgang { display: flex !important; }

/* Meldungen */
.flashes { display: grid; gap: .4rem; margin-bottom: 1rem; }
.flash { padding: .6rem .9rem; border-radius: 8px; background: var(--ok-l); color: #14532d; border: 1px solid #bfe3cd; }
.flash.fehler { background: var(--rot-l); color: var(--rot-d); border-color: #f0c2c2; }

@media (max-width: 760px) {
  .bar { grid-template-columns: 110px 1fr 70px; }
  .bar .sub { display: none; }
  .tools { margin-left: 0; }
}
.tile small b { display: inline; font-size: inherit; margin: 0; color: var(--ink); }
.empty-start { border-left: 4px solid var(--rot); }
.empty-start p { margin: .4rem 0 .8rem; }
.wappen-row { display: flex; gap: 1rem; align-items: center; }
.wappen-vorschau { height: 90px; width: auto; }
.cols.tight { gap: 0 1.5rem; }
.steps { margin: .3rem 0 .6rem; padding-left: 1.3rem; line-height: 1.7; }
.actions form { display: inline; }

/* =====================================================================
   Bildschirm-Layout ab 1200 px Breite (FullHD): volle Breite, keine
   Seiten-Scrollbalken – lange Listen scrollen innerhalb ihrer Karte.
   ===================================================================== */
.layout { display: grid; gap: 14px; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.col > .card, .layout > .card { margin-bottom: 0; }
.card.grow { display: flex; flex-direction: column; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.tiles.zwei { grid-template-columns: 1fr 1fr; }

@media (min-width: 1200px) {
  :root { font-size: 14px; }
  html, body { height: 100%; }
  body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
  .top { flex: none; padding: .4rem 1.2rem; }
  main { flex: 1; min-height: 0; overflow: auto; max-width: none; width: 100%;
         padding: 12px 20px 14px; display: flex; flex-direction: column; }
  .pagehead { flex: none; margin-bottom: 10px; }
  h1 { font-size: 1.35rem; }
  .flashes { flex: none; }
  .card { padding: .85rem 1rem; }
  .tiles { margin-bottom: 0; gap: 12px; }
  .tile { padding: .6rem .9rem; }
  .tile b { font-size: 1.6rem; margin: .05rem 0; }
  .grid td { padding: .22rem .55rem; }
  .grid th { padding: .38rem .55rem; }
  .bars { gap: .15rem; }
  .bar { padding: .1rem .3rem; grid-template-columns: 150px 1fr 80px 80px; }

  /* Seiten mit festem Raster füllen die Fensterhöhe */
  main.voll .layout { flex: 1; min-height: 0; }
  main.voll .col { min-height: 0; }
  main.voll .card.grow { flex: 1; min-height: 0; }
  main.voll .scrollbox { flex: 1; min-height: 0; overflow: auto; }
  .scrollbox .grid thead th { position: sticky; top: 0; z-index: 1; }
  .scrollbox .grid tfoot td { position: sticky; bottom: 0; background: #fff; z-index: 1; }

  .layout.uebersicht { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
  .layout.einsaetze { grid-template-columns: 300px minmax(0, 1.7fr) minmax(0, 1fr); }
  .layout.mitglieder { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .layout.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .layout.konfig { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
  .konfig-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .konfig-form .card { margin: 0; }
  .konfig-form .actions { grid-column: 1 / -1; }
  .cols { gap: 0 14px; }
  .actions.sticky { padding: .6rem 0; }
  .plist { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .3rem; }
  .pitem { padding: .22rem .4rem .22rem .55rem !important; }
  .pitem .hrs { padding: .15rem .35rem; }
  h3 { margin: .7rem 0 .35rem; }
  .hint { font-size: .8rem; }
}

.updatebar { display: block; flex: none; background: #fff4d6; color: #7a4b00; border-bottom: 1px solid #f0d58a;
  padding: .35rem 1.2rem; font-weight: 600; font-size: .88rem; }
.updatebar:hover { background: #ffecb8; text-decoration: none; }
.tag.neu { background: #fff4d6; color: #7a4b00; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
ul.hint { margin: .4rem 0 0; padding-left: 1.2rem; }
.tiles.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles.drei .tile b { font-size: 1.45rem; }
.tiles.drei .tile small { display: block; line-height: 1.25; }

/* ===== 1.5.0: Stammdaten ===== */
.pagehead .grow { flex: 1; }
.pagehead h1 .tag.dg { font-size: .8rem; vertical-align: 3px; background: #0e1a4f; color: #fff; }
.tag.dg { background: #e6e9f5; color: #0e1a4f; }
.mliste { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 128px auto; gap: .4rem; align-items: center;
  padding: .12rem .3rem; border-bottom: 1px solid #f0f2f4; border-radius: 5px; }
.mrow.on { background: var(--ok-l); }
.mrow label { display: flex; align-items: center; gap: .45rem; min-width: 0; cursor: pointer; font-size: .85rem; }
.mrow label b { min-width: 3.1rem; font-size: .8rem; }
.mrow label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.mrow input[type=date] { font-size: .78rem; padding: .1rem .25rem; width: 128px; }
.mrow input[type=date].ablauf { border-color: var(--rot); color: var(--rot); }
.mrow .mleer { font-size: .72rem; color: var(--ink-3); width: 128px; text-align: center; }
.mrow:not(.on) input[type=date] { opacity: .45; }
.hinweis { background: #fff4d6; color: #6b4300; border-radius: 6px; padding: .4rem .6rem; font-size: .84rem; margin-bottom: .5rem; }
.hinweis.ok { background: var(--ok-l); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: .2rem; }
.chip { font-size: .68rem; font-weight: 700; padding: 0 .3rem; border-radius: 4px; background: #eef0f3; color: var(--ink-2); }
.chip.fs { background: #e6f0fb; color: #1c4f86; }
.chip.abz { background: #fff4d6; color: #7a4b00; }
/* Fällig-Karte */
.faellig-liste { list-style: none; margin: 0; padding: 0; }
.faellig-liste li { display: grid; grid-template-columns: 10px minmax(150px, 220px) minmax(0, 1fr); gap: .5rem; align-items: center;
  padding: .18rem .2rem; border-bottom: 1px solid #f0f2f4; font-size: .85rem; }
.faellig-liste .punkt { width: 9px; height: 9px; border-radius: 50%; background: #8aa0c8; }
.faellig-liste .rot .punkt { background: var(--rot); }
.faellig-liste .gelb .punkt { background: #e2a300; }
.faellig-liste li a { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.faellig .scrollbox { max-height: 132px; overflow: auto; }
/* Qualifikations-Matrix */
.matrix { width: auto; }
.matrix th.rot90, .matrix td.x { min-width: 34px; }
.matrix tbody td:first-child { min-width: 200px; }
.matrix th.rot90 { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; padding: .4rem .15rem; text-align: left; font-size: .72rem; }
.matrix td.x { text-align: center; color: var(--ok); font-weight: 700; padding: .2rem .1rem; }
.matrix td.x.alt { color: var(--rot); }
.matrix tbody td:first-child { white-space: nowrap; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; }
.tabs a { padding: .3rem .7rem; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .85rem; }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.katform td { padding: .15rem .3rem !important; }
.katform input { font-size: .82rem; padding: .15rem .3rem; width: 100%; }
.katform input.kurz { width: 5rem; } .katform input.zahl { width: 3.5rem; }
@media (min-width: 1200px) {
  .layout.person3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  .layout.person3 .col > .card:not(.grow) { flex: none; }
  .layout.mitglieder3 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .konfig-form #mitglieder ~ .actions { grid-column: auto; align-self: end; }
}
.grid.list td { vertical-align: middle; }
.chips { line-height: 1.3; }
@media (min-width: 1200px) {
  main.voll .layout.person3 { grid-template-rows: minmax(0, 1fr); }
  main.voll .layout.person3 > div.col:first-of-type { overflow: auto; padding-right: 2px; }
}

/* ===== 1.6.0 ===== */
.ampel { display: inline-block; min-width: 2.4rem; text-align: center; font-weight: 700; font-size: .78rem;
  padding: .02rem .35rem; border-radius: 10px; }
.ampel.gruen { background: var(--ok-l); color: var(--ok); }
.ampel.gelb { background: #fff4d6; color: #7a4b00; }
.ampel.rot { background: var(--rot-l); color: var(--rot); }
.tile.ampel-tile.gruen { border-top-color: var(--ok); } .tile.ampel-tile.gelb { border-top-color: #e2a300; }
.chips-check { display: flex; flex-wrap: wrap; gap: 0 .9rem; }
.chips-check label.check { margin: .15rem 0; font-weight: 500; }
.mehrjahr td.num { white-space: nowrap; }
.mehrjahr .mj-wert { display: inline-block; min-width: 3.2rem; }
.mehrjahr .mj-bar { display: inline-block; width: 56px; height: 6px; background: #eef0f3; border-radius: 3px; margin-left: .4rem; vertical-align: 1px; }
.mehrjahr .mj-bar i { display: block; height: 100%; background: var(--rot); border-radius: 3px; }
.mehrjahr tr.abschnitt td { background: #f3f5f8; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
form.jahr.inline { display: flex; gap: .6rem; }
form.jahr.inline label { display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; }
@media (min-width: 1200px) { .actions.nur-schmal { display: none; } }

/* ===== 1.6.2: Anstehende Termine ===== */
.termin-liste { list-style: none; margin: 0; padding: 0; }
.termin-liste li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1.2rem; align-items: baseline;
  padding: .32rem .5rem .32rem .7rem; border-bottom: 1px solid #f0f2f4; border-left: 3px solid #8aa0c8; }
.termin-liste li.gelb { border-left-color: #e2a300; }
.termin-liste li.rot { border-left-color: var(--rot); background: var(--rot-l); }
.termin-liste .wann { display: flex; flex-direction: column; line-height: 1.2; }
.termin-liste .wann b { font-size: .86rem; }
.termin-liste .wann small { color: var(--ink-3); font-size: .74rem; }
.termin-liste .was { font-size: .9rem; color: var(--ink); }
.termin-liste .was a { font-weight: 650; }
.card.faellig .scrollbox { max-height: 150px; overflow: auto; }

/* ===== 1.7.0: PA-Haken, Nachweise ===== */
.pitem .pa { display: inline-flex; align-items: center; gap: .15rem; font-size: .68rem; font-weight: 700; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 .25rem; cursor: pointer; }
.pitem .pa input { width: 13px !important; height: 13px !important; margin: 0; accent-color: #1c4f86; }
.pitem .pa:has(input:checked) { background: #e6f0fb; color: #1c4f86; border-color: #9cc0e6; }
.pitem:not(.on) .pa { display: none; }
form[data-kat=einsatz] .not-einsatz { display: none !important; }
.st { display: inline-block; min-width: 5.6rem; text-align: center; font-size: .76rem; font-weight: 600; padding: .05rem .35rem; border-radius: 5px; }
.st.ok { background: var(--ok-l); color: var(--ok); }
.st.bald { background: #fff4d6; color: #7a4b00; }
.st.abgelaufen, .st.fehlt { background: var(--rot-l); color: var(--rot); }
.st.na { color: #c4cad1; background: none; }
.bereit { font-weight: 700; }
.bereit.ja { color: var(--ok); } .bereit.nein { color: var(--rot); }
.matrix2 td, .matrix2 th { text-align: center; }
.matrix2 td:first-child, .matrix2 th:first-child { text-align: left; }
.pcheck { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .15rem .6rem; max-height: 210px; overflow: auto;
  border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; }
.pcheck label { display: flex !important; flex-direction: row !important; align-items: center; gap: .4rem; font-weight: 500 !important; font-size: .84rem !important; }

/* ===== 1.7.1: PA-Details beim Erfassen ===== */
.pitem { flex-wrap: wrap; }
.pitem .pa-det { display: none; flex-basis: 100%; gap: .25rem; padding-left: 1.6rem; margin-top: .15rem; align-items: center; }
.pitem .pa-det i { font-style: normal; font-size: .7rem; color: var(--ink-3); }
.pitem.on:has(.pa-cb:checked) .pa-det { display: flex; }
.pitem .pa-det input { width: 0; flex: 1; min-width: 0; padding: .12rem .3rem !important; font-size: .76rem; text-align: right; }
.pitem .pa-det input::placeholder { text-align: left; font-size: .7rem; }
.btn.nav-btn[disabled] { opacity: .45; }

/* ---------- 2.0: Benutzermenü, Anmeldung, Verwaltung ---------- */
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; width: 34px; height: 34px; border-radius: 50%; background: var(--rot);
  color: #fff; display: grid; place-items: center; font-weight: 600; user-select: none; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu-box { position: absolute; right: 0; top: 42px; background: #fff; color: var(--ink); border-radius: var(--r);
  box-shadow: 0 8px 30px rgba(0,0,0,.18); min-width: 220px; padding: .4rem; z-index: 20; }
.usermenu-kopf { padding: .5rem .6rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; }
.usermenu-kopf b, .usermenu-kopf small { display: block; }
.usermenu-kopf small { color: var(--ink-3); font-size: .78rem; }
.usermenu-box a, .usermenu-box button { display: block; width: 100%; text-align: left; padding: .5rem .6rem; border-radius: 7px;
  color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.usermenu-box a:hover, .usermenu-box button:hover { background: var(--bg); text-decoration: none; }
.jahr optgroup { color: #aeb8c2; }

body.auth { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 1rem; }
.auth-box { background: var(--card); border-radius: 14px; width: 100%; max-width: 420px; padding: 1.8rem 1.8rem 1.4rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-box.breit { max-width: 640px; }
.auth-kopf { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.3rem; }
.auth-kopf img { height: 46px; }
.auth-kopf strong { display: block; font-size: 1.1rem; }
.auth-kopf small { color: var(--ink-3); }
.auth-box label { display: block; margin-bottom: .8rem; font-weight: 500; }
.auth-box label input { display: block; width: 100%; margin-top: .3rem; }
.auth-box .btn.primary { width: 100%; justify-content: center; padding: .65rem; }
input.code { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.qr { display: flex; gap: 1.2rem; align-items: flex-start; flex-wrap: wrap; margin: .8rem 0 1rem; }
.qr svg { width: 190px; height: 190px; border: 1px solid var(--line); border-radius: 8px; background: #fff; flex: none; }
.geheimnis { font-family: Consolas, monospace; font-size: 1rem; letter-spacing: .08em; word-spacing: .3em;
  background: var(--bg); padding: .5rem .7rem; border-radius: 7px; display: inline-block; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem .9rem; font-family: Consolas, monospace;
  font-size: 1.05rem; background: var(--bg); padding: .9rem 1.1rem; border-radius: 8px; margin: .8rem 0; }
.einmalpw { font-family: Consolas, monospace; font-size: 1.35rem; letter-spacing: .05em; background: var(--bg);
  padding: .7rem 1rem; border-radius: 8px; display: inline-block; margin: .4rem 0 .8rem; user-select: all; }
.tag.ok { background: var(--ok-l); color: var(--ok); }
.tag.aus { background: #eef0f3; color: var(--ink-3); }
.tag.rot { background: var(--rot-l); color: var(--rot); }
.rechte td select { min-width: 9rem; }
.admin-tabs { margin-bottom: 1rem; }
@media print { .top, .no-print { display: none !important; } body.auth { background: #fff; } .auth-box { box-shadow: none; } }
