/* Bezirkskalender – Erscheinungsbild wie das Anmeldeportal (nak-nordost.de, „design2022“):
   Cremeweiß als Grund, weiße Flächen, NAK-Blau, Arial, keine Webfonts. */
:root {
  --nak-blau: #2786cf;
  --nak-blau-dunkel: #1f6ba7;
  --nak-blau-hell: #e8f2fb;
  --nak-violett: #6c0b73;
  --text: #111;
  --text-leise: #6b6b6b;
  --rand: #e3ded4;
  --rand-feld: #bfb8aa;
  --hintergrund: #f9f6ef;
  --flaeche: #ffffff;
  --fehler: #b3261e;
  --fehler-hell: #fdecea;
  --erfolg: #1e7d43;
  --erfolg-hell: #e9f6ee;
  --hinweis-hell: #fdf1d8;
  --hinweis-rand: #e2c173;
  --ferien: #fff3b8;
  --we: #f4f0e6;
  --radius: 4px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--hintergrund); color: var(--text); font: 16px/1.45 Arial, Helvetica, sans-serif; }
a { color: var(--nak-blau); }
h1 { font-size: 1.5rem; margin: 0 0 .6rem; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
.leise { color: var(--text-leise); }
.klein { font-size: .85rem; }
.umbruch { white-space: pre-wrap; }
code { background: var(--nak-blau-hell); padding: 1px 4px; border-radius: 3px; }

.demo-band { background: var(--nak-violett); color: #fff; text-align: center; font-size: .8rem; padding: 3px 8px; }

/* Kopf */
.kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 10px 16px; background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.marke { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.marke span { display: flex; flex-direction: column; line-height: 1.15; }
.marke strong { font-size: 1.1rem; }
.marke small { color: var(--text-leise); }
.hauptnav { display: flex; flex-wrap: wrap; gap: 2px; flex: 1; }
.hauptnav a { padding: 7px 10px; border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: bold; font-size: .95rem; }
.hauptnav a:hover { background: var(--nak-blau-hell); }
.hauptnav a[aria-current] { background: var(--nak-blau); color: #fff; }
.zahl { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 10px; background: var(--fehler); color: #fff; font-size: .75rem; text-align: center; line-height: 1.4em; }
.wer { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--text-leise); }
.wer form { margin: 0; }
.link-knopf { background: none; border: 0; color: var(--nak-blau); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

.inhalt { max-width: 1360px; margin: 0 auto; padding: 16px; }

/* Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.formular-karte { max-width: 640px; }
.formular-karte.breit { max-width: 820px; }
.knopf { display: inline-block; background: var(--nak-blau); color: #fff; border: 1px solid var(--nak-blau); border-radius: var(--radius); padding: 8px 14px; font: bold .95rem Arial, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf:hover { background: var(--nak-blau-dunkel); }
.knopf.zweit { background: var(--flaeche); color: var(--nak-blau); }
.knopf.zweit:hover { background: var(--nak-blau-hell); }
.knopf.gefahr { background: var(--flaeche); color: var(--fehler); border-color: var(--fehler); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.knopfreihe form { margin: 0; }
.meldung { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid; }
.meldung ul { margin: 0; padding-left: 18px; }
.meldung.erfolg { background: var(--erfolg-hell); border-color: var(--erfolg); }
.meldung.hinweis { background: var(--hinweis-hell); border-color: var(--hinweis-rand); }
.meldung.fehler { background: var(--fehler-hell); border-color: var(--fehler); }
.fehlertext { color: var(--fehler); }

.feld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-weight: bold; font-size: .9rem; flex: 1; }
.feld.schmal { flex: 0 0 120px; }
.feld input, .feld select, .feld textarea { font: 16px Arial, sans-serif; padding: 8px 10px; border: 1px solid var(--rand-feld); border-radius: var(--radius); background: #fff; width: 100%; font-weight: normal; }
.feld input[type=color] { padding: 2px; height: 40px; }
.feld .leise { font-weight: normal; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .knopf:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--nak-blau); outline-offset: 2px; }
.zeile { display: flex; flex-wrap: wrap; gap: 0 12px; }
.zeile[hidden] { display: none; }
.haken { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 12px; }
.haken input { margin-top: 3px; }
fieldset { border: 1px solid var(--rand); border-radius: var(--radius); margin: 8px 0 14px; padding: 10px 14px; }
legend { font-weight: bold; padding: 0 6px; }
.kopierzeile { display: flex; gap: 6px; }
.kopierzeile input { font-family: Menlo, Consolas, monospace; font-size: 13px; color: var(--text-leise); }

/* Kopfleiste der Ansichten */
.leiste { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.leiste h1 { margin: 0; }
.blaettern { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.blaettern h1 { min-width: 9ch; }
.blaettern input[type=date] { font: 16px Arial; padding: 6px 8px; border: 1px solid var(--rand-feld); border-radius: var(--radius); }

/* Ebenen-Schalter */
.ebenen-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ebene-schalter { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: 16px; font-size: .85rem; cursor: pointer; user-select: none; }
.ebene-schalter input { position: absolute; opacity: 0; pointer-events: none; }
.ebene-schalter .punkt { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--farbe); background: var(--farbe); }
.ebene-schalter:has(input:not(:checked)) { color: var(--text-leise); text-decoration: line-through; }
.ebene-schalter:has(input:not(:checked)) .punkt { background: transparent; }
.ebene-schalter:has(input:focus-visible) { outline: 2px solid var(--nak-blau); }
.ebene-chip { display: inline-block; padding: 1px 8px; border-radius: 10px; border-left: 4px solid var(--farbe); background: color-mix(in srgb, var(--farbe) 12%, white); font-size: .85rem; margin: 1px 2px 1px 0; color: var(--text); text-decoration: none; }
.ebenen-punkt { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--farbe); margin-right: 3px; }
.marke-vorl { display: inline-block; font-size: .75rem; padding: 0 6px; border: 1px dashed #a06b00; color: #7a5200; border-radius: 8px; background: var(--hinweis-hell); }
.marke-bl { display: inline-block; font-size: .8rem; padding: 0 6px; border-radius: 8px; background: var(--nak-blau-hell); color: var(--nak-blau-dunkel); }

/* Termin-Chips */
.chip { position: relative; display: block; margin: 2px 0; padding: 1px 5px; border-radius: 3px; border-left: 4px solid var(--farbe); background: color-mix(in srgb, var(--farbe) 13%, white); color: var(--text); font-size: .8rem; line-height: 1.3; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip:hover { background: color-mix(in srgb, var(--farbe) 25%, white); }
.chip .zeit { color: var(--text-leise); font-variant-numeric: tabular-nums; }
.chip.vorlaeufig { border: 1px dashed var(--farbe); border-left: 4px dashed var(--farbe); background: #fff; }
.feiertag { position: relative; display: block; color: var(--fehler); font-size: .75rem; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ferien-flaeche { position: absolute; inset: 0; background: var(--ferien); z-index: 0; pointer-events: none; }

/* Monat */
.monat { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--flaeche); border: 1px solid var(--rand); }
.monat th { padding: 6px; font-size: .85rem; color: var(--text-leise); border-bottom: 1px solid var(--rand); }
.monat td { position: relative; vertical-align: top; height: 112px; padding: 4px; border: 1px solid var(--rand); }
.monat td > * { position: relative; z-index: 1; }
.monat td > .ferien-flaeche { position: absolute; z-index: 0; }
.monat td.we { background: var(--we); }
.monat td.fremd { opacity: .45; }
.monat td.heute .nr { background: var(--nak-blau); color: #fff; border-radius: 50%; }
.tag-kopf { display: flex; align-items: center; gap: 6px; }
.tag-kopf .nr { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; font-weight: bold; }
.hat-feiertag .nr, .hat-feiertag .datum { color: var(--fehler); }
.tag-kopf .kw { font-size: .7rem; color: var(--text-leise); }
.tag-kopf .plus { margin-left: auto; text-decoration: none; font-weight: bold; width: 22px; height: 22px; border-radius: 50%; text-align: center; line-height: 22px; opacity: 0; }
.monat td:hover .plus, .plus:focus-visible { opacity: 1; background: var(--nak-blau-hell); }

/* Jahr – angelehnt an das bisherige PDF */
.halbjahr { margin-bottom: 20px; overflow-x: auto; }
.jahr { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; background: var(--flaeche); border: 1px solid #999; font-size: .78rem; }
.jahr th { padding: 4px; font-size: 1rem; border: 1px solid #999; background: var(--flaeche); }
.jahr th a { color: var(--text); text-decoration: none; }
.jahr td { position: relative; border: 1px solid #c9c4b8; padding: 1px 4px; height: 22px; vertical-align: middle; }
.jahr td > * { position: relative; z-index: 1; }
.jahr td > .ferien-flaeche, .jahr .tag-inhalt > .ferien-flaeche { position: absolute; z-index: 0; }
.jahr td.sa { background: #f6f1e4; font-weight: bold; }
.jahr td.so { background: #f3e3cf; font-weight: bold; }
.jahr td.leer { background: #e6e6e6; }
.jahr td.heute { outline: 2px solid var(--nak-blau); outline-offset: -2px; }
.jahr .datum { display: inline-block; width: 3.3em; white-space: nowrap; }
.jahr .tag-inhalt { display: inline; position: static; }
.jahr .chip { display: inline-block; max-width: calc(100% - 5.2em); vertical-align: middle; font-size: .74rem; margin: 0 2px 0 0; padding: 0 4px; font-weight: bold; }
.jahr .feiertag { display: inline; font-size: .74rem; }
.jahr .kw { position: absolute; right: 3px; top: 3px; font-size: .65rem; color: var(--text-leise); font-weight: normal; }
.nur-drucken { display: none; }

/* Liste */
.terminliste { list-style: none; margin: 0; padding: 0; }
.terminliste li { border-left: 5px solid var(--farbe); margin: 0 0 6px; background: color-mix(in srgb, var(--farbe) 6%, white); border-radius: 3px; }
.terminliste li.vorlaeufig { border-left-style: dashed; }
.terminliste li.mit-knopf { display: flex; align-items: center; gap: 10px; padding-right: 10px; }
.terminliste li.mit-knopf a { flex: 1; }
.terminliste li.mit-knopf form { margin: 0; }
.terminliste a { display: grid; grid-template-columns: minmax(200px, 1.2fr) 2fr 1fr auto; gap: 4px 14px; padding: 8px 12px; color: var(--text); text-decoration: none; }
.terminliste a:hover { background: color-mix(in srgb, var(--farbe) 14%, white); }
.terminliste .wann { font-variant-numeric: tabular-nums; }
.terminliste .wo { color: var(--text-leise); }
.terminliste .ebene { color: var(--text-leise); font-size: .85rem; text-align: right; }

/* Termin */
.termin { border-top: 6px solid var(--farbe); max-width: 720px; }
.ebene-marke { display: flex; align-items: center; gap: 6px; margin: 0 0 4px; color: var(--text-leise); font-size: .9rem; }
.ebene-marke .punkt { width: 12px; height: 12px; border-radius: 50%; background: var(--farbe); }
.angaben { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 12px 0; }
.angaben dt { color: var(--text-leise); }
.angaben dd { margin: 0; }
.verlauf { margin: 0; padding-left: 18px; font-size: .9rem; }

/* Änderungen */
.aenderungen { list-style: none; margin: 0; padding: 0; }
.aenderung { display: grid; grid-template-columns: 130px 1fr auto; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--rand); border-left: 4px solid var(--farbe); margin-bottom: 4px; }
.aenderungen.gesehen .aenderung { opacity: .75; }
.aenderung .art { font-size: .8rem; font-weight: bold; text-transform: uppercase; letter-spacing: .02em; }
.art-angelegt { color: var(--erfolg); }
.art-geaendert { color: var(--nak-blau-dunkel); }
.art-geloescht { color: var(--fehler); }
.art-freigegeben { color: var(--nak-violett); }
.aenderung .wer { text-align: right; }

/* Tabellen */
.tabelle-huelle { overflow-x: auto; padding: 0; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th, .tabelle td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--rand); vertical-align: top; }
.tabelle th { font-size: .85rem; color: var(--text-leise); }
.rechte-tabelle th:not(:first-child), .rechte-tabelle td:not(:first-child) { text-align: center; width: 80px; }
.rechte-tabelle input { width: 18px; height: 18px; }

/* Anmelden */
.anmelde-raster { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
.demo-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.demo-liste form { margin: 0; }
.demo-person { width: 100%; display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; text-align: left; padding: 8px 12px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); font: .9rem Arial, sans-serif; cursor: pointer; }
.demo-person:hover { border-color: var(--nak-blau); background: var(--nak-blau-hell); }
.demo-person .art { color: var(--text-leise); font-size: .8rem; }
.abo-ebenen { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }

/* Handy */
@media (max-width: 760px) {
  .anmelde-raster { grid-template-columns: 1fr; }
  .monat td { height: 74px; padding: 2px; }
  .monat .chip { font-size: .68rem; padding: 0 3px; }
  .monat .chip .zeit { display: none; }
  .tag-kopf .kw { display: none; }
  .terminliste a { grid-template-columns: 1fr; }
  .terminliste .ebene { text-align: left; }
  .aenderung { grid-template-columns: 1fr; }
  .aenderung .wer { text-align: left; }
  .angaben { grid-template-columns: 1fr; }
  .demo-person { grid-template-columns: 1fr; }
}

/* Druck: Jahresübersicht wie das bisherige PDF, ein Halbjahr je Seite */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; font-size: 10px; }
  .kopf, .demo-band, .nicht-drucken, .meldung { display: none !important; }
  .inhalt { padding: 0; max-width: none; }
  .nur-drucken { display: block; }
  .halbjahr { page-break-after: always; overflow: visible; }
  .halbjahr h2 { font-size: 20px; margin: 0 0 4px; }
  .jahr { min-width: 0; font-size: 8.5px; }
  .jahr td { height: 16.5px; }
  .jahr th { font-size: 12px; }
  .chip { background: none !important; border-left-width: 3px; font-size: 8px !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---- Stand 2: Burgermenü, Rollen, Gruppen, Liste als Tabelle ---- */
.kopf { position: relative; }
.menue { margin-left: auto; position: relative; }
.menue-knopf { display: inline-flex; align-items: center; gap: 10px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); padding: 7px 10px; font: bold .9rem Arial, sans-serif; color: var(--text); cursor: pointer; }
.menue-knopf:hover, .menue-knopf[aria-expanded="true"] { border-color: var(--nak-blau); background: var(--nak-blau-hell); }
.burger { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.burger span { display: block; height: 2px; background: currentColor; border-radius: 1px; }
.menue-tafel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 260px; background: var(--flaeche); border: 1px solid var(--rand); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px 0; }
.menue-tafel[hidden] { display: none; }
.menue-wer { display: flex; flex-direction: column; padding: 8px 16px 10px; border-bottom: 1px solid var(--rand); }
.menue-gruppe { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--rand); }
.menue-gruppe:last-child { border-bottom: 0; }
.menue-gruppe form { margin: 0; }
.menue-titel { padding: 4px 16px; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-leise); }
.menue-gruppe a, .menue-link { display: block; width: 100%; text-align: left; padding: 8px 16px; color: var(--text); text-decoration: none; font: .95rem Arial, sans-serif; background: none; border: 0; cursor: pointer; }
.menue-gruppe a:hover, .menue-link:hover { background: var(--nak-blau-hell); }
.menue-gruppe a[aria-current] { font-weight: bold; color: var(--nak-blau-dunkel); box-shadow: inset 3px 0 0 var(--nak-blau); }
.nur-mobil { display: none; }
.wer { display: none; }
.hauptnav { flex: 0 1 auto; }

.marke-rolle { display: inline-block; font-size: .75rem; font-weight: bold; padding: 1px 7px; border-radius: 8px; margin-right: 3px; }
.marke-rolle.admin { background: #2b2b2b; color: #fff; }
.marke-rolle.bl { background: var(--nak-violett); color: #fff; }
.gruppen-chip { display: inline-block; font-size: .8rem; padding: 1px 8px; border-radius: 10px; background: var(--nak-blau-hell); color: var(--nak-blau-dunkel); margin: 1px 3px 1px 0; }
.ebene-chip.schreibt { font-weight: bold; }
.ebene-chip.klein { font-size: .75rem; padding: 0 6px; }
.gruppen-wahl { display: grid; gap: 6px; }
.gruppe-option { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--rand); border-radius: var(--radius); cursor: pointer; }
.gruppe-option:has(input:checked) { border-color: var(--nak-blau); background: var(--nak-blau-hell); }
.gruppe-option input { margin-top: 3px; width: 18px; height: 18px; }
fieldset.ohne-rahmen { border: 0; padding: 0; margin: 0; }
fieldset[disabled] { opacity: .7; }
.rollen-raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.rolle-karte { border: 1px solid var(--rand); border-radius: var(--radius); padding: 10px 12px; }
.rolle-karte p { margin: 6px 0 0; }
.rechte-matrix th, .rechte-matrix td { vertical-align: middle; }
.matrix-kopf { text-align: center !important; white-space: nowrap; font-weight: normal; }
.matrix-kopf .senkrecht { display: block; font-size: .75rem; margin-top: 4px; max-width: 80px; white-space: normal; line-height: 1.15; }
.matrix-zelle { text-align: center !important; }
.recht-schreibt { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: var(--farbe); color: #fff; font-size: .8rem; }
.mitglieder { margin: 0; padding-left: 18px; }
.protokoll-liste { list-style: none; margin: 0; padding: 0; }
.protokoll-liste li { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--rand); }
.demo-person { grid-template-columns: 1.1fr 1.6fr auto; }

/* Liste als Tabelle – alles linksbündig, gleiche Spalten über alle Monate */
.liste-tabelle { width: 100%; border-collapse: collapse; }
.liste-tabelle th, .liste-tabelle td { text-align: left; padding: 7px 12px; vertical-align: top; }
.liste-tabelle thead th { position: sticky; top: 0; background: var(--flaeche); font-size: .85rem; color: var(--text-leise); border-bottom: 2px solid var(--rand); user-select: none; touch-action: none; cursor: grab; white-space: nowrap; }
.liste-tabelle thead th .griff { display: inline-block; margin-right: 6px; color: #b5afa3; letter-spacing: -2px; }
.liste-tabelle thead th:hover .griff, .liste-tabelle thead th:focus-visible .griff { color: var(--nak-blau); }
.liste-tabelle thead th.wird-gezogen { cursor: grabbing; background: var(--nak-blau-hell); }
.liste-tabelle thead th.ziel-links { box-shadow: inset 3px 0 0 var(--nak-blau); }
.liste-tabelle thead th.ziel-rechts { box-shadow: inset -3px 0 0 var(--nak-blau); }
.liste-tabelle .monat-zeile th { padding: 16px 12px 6px; font-size: 1.05rem; color: var(--text); background: var(--flaeche); border-bottom: 1px solid var(--rand); }
.liste-tabelle tbody:first-of-type .monat-zeile th { padding-top: 10px; }
.termin-zeile { cursor: pointer; border-bottom: 1px solid #f0ece3; }
.termin-zeile:hover { background: color-mix(in srgb, var(--farbe) 9%, white); }
.termin-zeile td:first-child { box-shadow: inset 4px 0 0 var(--farbe); }
.termin-zeile.vorlaeufig td:first-child { box-shadow: inset 4px 0 0 transparent; border-left: 4px dashed var(--farbe); }
.termin-zeile td[data-spalte="termin"] a { color: var(--text); font-weight: bold; text-decoration: none; }
.termin-zeile td[data-spalte="termin"] a:hover { text-decoration: underline; }
.termin-zeile td[data-spalte="datum"], .termin-zeile td[data-spalte="zeit"] { font-variant-numeric: tabular-nums; }
.termin-zeile td[data-spalte="ort"], .termin-zeile td[data-spalte="ebene"] { color: var(--text-leise); }
.termin-zeile .ebenen-punkt { width: 10px; height: 10px; margin-right: 6px; }
.nowrap { white-space: nowrap; }
.spalten-hinweis { margin: -4px 0 8px; }

@media (max-width: 760px) {
  .hauptnav { display: none; }
  .nur-mobil { display: flex; }
  .menue-name { display: none; }
  .menue-tafel { right: 0; width: calc(100vw - 32px); min-width: 0; max-height: calc(100vh - 140px); overflow-y: auto; }
  .liste-tabelle th, .liste-tabelle td { padding: 6px 8px; font-size: .88rem; }
  .protokoll-liste li { grid-template-columns: 1fr; gap: 2px; }
  .spalten-hinweis { display: none; }
}

/* Jahresansicht: ausgeschriebene Titel umbrechen statt abschneiden */
.jahr td { height: auto; min-height: 22px; }
.jahr .chip { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.2; vertical-align: top; max-width: calc(100% - 5.4em); }
.jahr .datum { vertical-align: top; }
.jahr .chip { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; overflow: hidden; }

/* Volle Breite am Rechner – Formulare behalten ihre eigene, schmalere Breite */
.inhalt { max-width: none; padding: 16px 24px; }
@media (max-width: 760px) { .inhalt { padding: 12px 16px; } }

/* Liste: Spaltenbreite ziehen */
.liste-tabelle thead th { position: sticky; }
.breite-griff { position: absolute; top: 0; right: 0; width: 10px; height: 100%; cursor: col-resize; touch-action: none; z-index: 2; }
.breite-griff::after { content: ""; position: absolute; top: 20%; bottom: 20%; right: 3px; width: 2px; border-radius: 1px; background: var(--rand-feld); opacity: .6; }
.breite-griff:hover::after, .breite-griff.aktiv::after { background: var(--nak-blau); opacity: 1; top: 0; bottom: 0; }
.liste-tabelle.feste-breiten { table-layout: fixed; }
.liste-tabelle.feste-breiten th, .liste-tabelle.feste-breiten td { overflow: hidden; text-overflow: ellipsis; }
.liste-tabelle.feste-breiten .monat-zeile th { overflow: visible; }

/* Drag & drop in Monat und Jahr */
.ziehbar-termin { cursor: grab; }
.ziehbar-termin:active { cursor: grabbing; }
.chip.wird-verschoben { opacity: .4; }
td.ablage-ziel { outline: 2px dashed var(--nak-blau); outline-offset: -3px; background-color: var(--nak-blau-hell) !important; }
.freigabe-haken { padding: 10px 12px; border: 1px solid var(--hinweis-rand); background: var(--hinweis-hell); border-radius: var(--radius); }

/* Gruppenfarben */
.gruppen-chip { --farbe: var(--nak-blau); border-left: 4px solid var(--farbe); background: color-mix(in srgb, var(--farbe) 12%, white); color: var(--text); }
.gruppen-punkt { display: inline-block; width: 11px; height: 11px; border-radius: 3px; background: var(--farbe); margin-right: 6px; vertical-align: baseline; }
.gruppe-option:has(input:checked) { border-color: var(--nak-blau); }

.knopfgruppe { display: flex; gap: 8px; flex-wrap: wrap; }

/* Liste am Handy: jede Zeile als kleine Karte – Datum und Zeit oben, Titel groß, Ort und Ebene darunter.
   Unabhängig davon, wie die Spalten am Rechner sortiert oder breit gezogen wurden. */
@media (max-width: 760px) {
  .liste-tabelle, .liste-tabelle.feste-breiten { display: block; width: 100% !important; table-layout: auto; }
  .liste-tabelle thead { display: none; }
  .liste-tabelle tbody { display: block; }
  .liste-tabelle .monat-zeile, .liste-tabelle .monat-zeile th { display: block; }
  .liste-tabelle .monat-zeile th { padding: 14px 12px 6px; }
  .liste-tabelle .termin-zeile {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "datum zeit" "termin termin" "ort ebene";
    gap: 2px 10px;
    padding: 9px 12px 9px 14px;
    box-shadow: inset 4px 0 0 var(--farbe);
  }
  .liste-tabelle .termin-zeile.vorlaeufig { box-shadow: none; border-left: 4px dashed var(--farbe); }
  .liste-tabelle .termin-zeile td {
    display: block; padding: 0; width: auto !important; white-space: normal;
    overflow: visible; text-overflow: clip; box-shadow: none; border: 0; font-size: .95rem;
  }
  .liste-tabelle .termin-zeile td:first-child { box-shadow: none; border-left: 0; }
  .termin-zeile td[data-spalte="datum"] { grid-area: datum; font-weight: bold; }
  .termin-zeile td[data-spalte="zeit"] { grid-area: zeit; color: var(--text-leise); }
  .termin-zeile td[data-spalte="termin"] { grid-area: termin; font-size: 1.02rem; }
  .termin-zeile td[data-spalte="ort"] { grid-area: ort; font-size: .85rem; }
  .termin-zeile td[data-spalte="ebene"] { grid-area: ebene; font-size: .85rem; justify-self: end; text-align: right; }
  .liste-tabelle .breite-griff { display: none; }
  .tabelle-huelle:has(.liste-tabelle) { overflow-x: visible; }
}

/* Druckwahl Hoch/Quer in der Liste */
.druckwahl { display: inline-flex; align-items: center; }
.druckwahl-titel { font-size: .85rem; color: var(--text-leise); margin-right: 8px; }
.druckwahl .knopf { border-radius: 0; }
.druckwahl .knopf:first-of-type { border-radius: var(--radius) 0 0 var(--radius); }
.druckwahl .knopf:last-of-type { border-radius: 0 var(--radius) var(--radius) 0; border-left: 0; }

/* Excel-Import */
.schritte { padding-left: 20px; }
.schritte li { margin-bottom: 4px; }
.hochladen { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.import-kopf { margin: 0; }
.import-tabelle td, .import-tabelle th { padding: 6px 10px; font-size: .9rem; }
.import-tabelle tr.import-fehler { background: var(--fehler-hell); }
.import-tabelle tr.import-doppelt { color: var(--text-leise); }
.import-tabelle input[type=checkbox] { width: 18px; height: 18px; }

/* Postausgang: Mail-Vorschau */
.mail-vorschau { width: 100%; max-width: 760px; height: 760px; border: 1px solid var(--rand); border-radius: var(--radius); background: #fff; }
.import-tabelle td.import-original { color: var(--text-leise); font-style: italic; min-width: 150px; }
.import-tabelle td.import-original .klein { font-style: normal; }
.ct-zugang { border: 1px solid var(--rand, #ddd); border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.ct-zugang legend { font-weight: 700; padding: 0 6px; }
.ct-zugang .punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--farbe); margin-right: 6px; }
