/* G8 2.5.12: 2 consecutive stylesheets, source order preserved. */

/* BEGIN schichtkalender/css/app.css */
/* ============================================================
   SchichtKalender – App CSS
   Modernes Design, CSS Variables, Dark Mode
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --purple:       #17365d;
  --purple-2:     #2f75b5;
  --purple-soft:  #e9f1fa;
  /* Violett als TEXT- und Akzentfarbe. Im Dunkelmodus muss es aufgehellt
     werden: #17365d erreicht dort nur 1.34:1 und ist unlesbar. */
  --purple-text:  #17365d;

  --bg:           #e8eaf0;
  --surface:      #ffffff;
  --surface-2:    #fafafa;
  --border:       rgba(0,0,0,.09);
  --text:         #1c1c1e;
  --text-2:       #3a3a3c;
  --muted:        #6b7280;

  /* H-03: Statusfarben sind auch als kleine Textkennzeichnung AA-kontrastreich. */
  --green:        #137333;
  --red:          #b42318;
  --blue:         #0057b8;
  --amber:        #9a5700;
  --teal:         #0f766e;

  --radius:       18px;
  --radius-sm:    12px;
  --shadow:       0 4px 24px rgba(0,0,0,.07);
  --shadow-sm:    0 2px 10px rgba(0,0,0,.05);

  --nav-h:        64px;
  --header-h:     56px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]){
    /* Angehoben, damit oberhalb der Tagesflaeche ueberhaupt Platz fuer
       eine weitere Ebene bleibt. Vorher lag die gesamte dunkle
       Oberflaeche in unter 2% der Helligkeitsskala. */
    --bg:        #0a0c10;
    --surface:   #1f2430;
    --surface-2: #2b3140;
    --border:    rgba(255,255,255,.09);
    --text:      #f1f1f8;
    --text-2:    #c8c8d8;
    --muted:     #888899;
    --shadow:    0 4px 24px rgba(0,0,0,.35);
    --purple-text: #b57ae8;   /* 5.11:1 gegen die Kachelflaeche */
    --purple-soft: #2a1f3d;
    --green: #69d794;
    --red: #ff8d85;
    --blue: #7db7ff;
    --amber: #f0b65b;
    --teal: #5eead4;
  }
}

  :root[data-theme="dark"]{
    /* Angehoben, damit oberhalb der Tagesflaeche ueberhaupt Platz fuer
       eine weitere Ebene bleibt. Vorher lag die gesamte dunkle
       Oberflaeche in unter 2% der Helligkeitsskala. */
    --bg:        #0a0c10;
    --surface:   #1f2430;
    --surface-2: #2b3140;
    --border:    rgba(255,255,255,.09);
    --text:      #f1f1f8;
    --text-2:    #c8c8d8;
    --muted:     #888899;
    --shadow:    0 4px 24px rgba(0,0,0,.35);
    --purple-text: #b57ae8;   /* 5.11:1 gegen die Kachelflaeche */
    --purple-soft: #2a1f3d;
    --green: #69d794;
    --red: #ff8d85;
    --blue: #7db7ff;
    --amber: #f0b65b;
    --teal: #5eead4;
  }


/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 15px; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  padding-top: var(--header-h);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}

a { color: var(--purple-text); text-decoration: none; }
button { font-family: inherit; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* ── Header ────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.brand { flex: 1; min-width: 0; }
.brand .logo  { font-size: 20px; line-height: 1; }
.brand .title  { font-size: 18px; font-weight: 900; color: var(--purple-text); letter-spacing: -.2px; }
.brand .sub    { font-size: 12px; color: var(--muted); margin-top: 1px; }
.hdr-actions   { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Bottom Nav ────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  padding: 8px 0 6px;
  transition: color .15s;
  position: relative;
}
.bn-item.active { color: var(--purple-text); }
.bn-item.active::before {
  content: "";
  position: absolute;
  top: 0; left: 25%; right: 25%;
  height: 2.5px;
  border-radius: 0 0 3px 3px;
  background: var(--purple);
}
.bn-ico { font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.bn-ico svg { width: 24px; height: 24px; display: block; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, transform .06s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover  { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--purple); color: #fff; border-color: transparent; }
.btn.primary:hover { background: var(--purple-2); }
.btn.sm { height: 34px; padding: 0 12px; font-size: 12px; }
.btn.icon { width: 40px; padding: 0; border-radius: 50%; font-size: 17px; }

/* ── Cards ─────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 12px 14px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.card-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form { display: grid; gap: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field input,
.field select,
input, select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus {
  border-color: var(--purple-text);
  box-shadow: 0 0 0 3px rgba(87,6,140,.12);
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid-2 { grid-template-columns: 1fr; } }

/* ── Login ─────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: 0;
}
.login-box {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo .app-name { font-size: 26px; font-weight: 900; color: var(--purple-text); }
.login-logo .app-sub  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.login-err { color: var(--red); font-size: 13px; text-align: center; margin-top: 10px; }

/* ── Calendar Grid ─────────────────────────────────────────── */
/* ── Freizeit-Ebene ─────────────────────────────────────────────
   Die FLAECHE traegt die Information, nicht eine Kante. Grund: Die App
   wird im Werk bei Tageslicht benutzt. Duenne Linien waschen bei hoher
   Umgebungshelligkeit aus, und eine schwach getoente Flaeche verschwindet
   ganz. Zielwerte gegen die normale Tagesflaeche: 1.76:1 hell, 1.93:1
   dunkel - beides auch draussen erkennbar.

   Eine durchgehende Kante links entfaellt bewusst: im Raster liest sie
   sich als Spaltentrenner, nicht als Tageszustand. Die Akzentfarbe wird
   nur noch fuer die Trennlinie des Halbtags gebraucht.

   Teal ist ausschliesslich fuer Freizeit reserviert. Blau bedeutet nur
   noch "heute", Violett nur noch Marke.
   ───────────────────────────────────────────────────────────── */
:root {
  --free-fill:  #70d5be;
  --free-edge:  #0b7d70;
  --free-text:  #04443e;

  /* Altnamen, damit bestehende Regeln weiterlaufen */
  --block-bg:   var(--free-fill);
  --block-text: var(--free-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]){
    --free-fill: #1d5a4a;
    --free-edge: #3ee0bd;
    --free-text: #c8f5e9;
  }
}

  :root[data-theme="dark"]{
    --free-fill: #1d5a4a;
    --free-edge: #3ee0bd;
    --free-text: #c8f5e9;
  }


.cal-wrap { max-width: 1200px; margin: 0 auto; padding: 10px; }

.cal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  gap: 10px;
}
.cal-top-label { font-size: 17px; font-weight: 800; color: var(--text); }
.cal-nav { display: flex; gap: 6px; }
.cal-options {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
}
.cal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  box-shadow: var(--shadow-sm);
  user-select: none;
  cursor: pointer;
}
.cal-toggle input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--purple-text);
}
.cal-toggle small {
  color: var(--muted);
  font-weight: 650;
}
@media (max-width: 720px) {
  .cal-top { flex-wrap: wrap; }
  .cal-top-label { order: 3; flex: 1 1 100%; text-align: center; }
  .cal-options { justify-content: center; }
}

#multiCalendar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
/* Desktop/Notebook: bei kleiner Fensterbreite vertikal stapeln statt horizontal snappen.
   Dadurch funktioniert normales Mausrad-/Touchpad-Scrollen zuverlässig. */
@media (max-width: 1000px) and (hover: hover),
       (max-width: 1000px) and (pointer: fine) {
  #multiCalendar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Smartphone/Tablet: horizontaler Monats-Slider bleibt erhalten. */
@media (max-width: 1000px) and (hover: none) and (pointer: coarse) {
  #multiCalendar {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
  }
  .month-block { min-width: min(320px, 90vw); scroll-snap-align: center; }
}

.month-block {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.month-title {
  text-align: center;
  padding: 11px;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
}
.weekday-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.weekday-header div {
  padding: 6px 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
}

.day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 3px 2px 2px;
  border: 0.5px solid var(--border);
  cursor: pointer;
  font-size: 11px;
  position: relative;
  background: var(--surface);
  transition: background .1s;
  overflow: hidden;
  min-height: 42px;
  appearance: none;
  color: var(--text);
  font-family: inherit;
  text-align: center;
}
.day:hover       { background: var(--surface-2); }
.day.other-month { opacity: .32; }
.day.sunday      { background: color-mix(in srgb, var(--amber) 6%, var(--surface)); }
.day.selected    { background: color-mix(in srgb, var(--purple) 18%, var(--surface)) !important; outline: 2px solid var(--purple); outline-offset: -2px; border-radius: 3px; }
.day.holiday     { background: color-mix(in srgb, var(--red) 7%, var(--surface)); }

/* Heutiger Tag: blauer Ring um die Tageszahl + leichter Hintergrund */
.day.today {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
}
.day.today .day-num {
  background: var(--blue);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0,122,255,.45);
}
.day.today.selected { outline-color: var(--blue); }
.day.vacation    { background: color-mix(in srgb, var(--blue) 5%, var(--surface)); }
/* Freier Block: Kante links + getoente Flaeche.
   Die Kante liegt innen (inset), damit sie das Raster nicht verschiebt. */
.day.block {
  background: var(--free-fill);
  color: var(--free-text);
}
.day.block .day-num,
.day.block .shift-info { color: var(--free-text); }

/* Nach einer verfahrenen Nachtschicht ist nur der freie Tagesanteil markiert.
   Die harte Trennlinie auf halber Hoehe traegt die Aussage - vorher lag
   zwischen oberer und unterer Haelfte nur 1.12:1, also praktisch nichts. */
.day.block-half-after-ns {
  background: linear-gradient(
    to bottom,
    var(--surface) 0 calc(50% - 1px),
    var(--free-edge) calc(50% - 1px) calc(50% + 1px),
    var(--free-fill) calc(50% + 1px) 100%
  );
}
.day.block-half-after-ns .day-num { color: var(--text); }
.day.block-half-after-ns .shift-info { color: var(--free-text); }

.day.shift-TS .shift-info,
.day.shift-NS .shift-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  padding: 1px 5px;
  border-radius: 999px;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 800;
}
.day.shift-TS .shift-info {
  color: #1d4ed8;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.22);
}
.day.shift-NS .shift-info {
  color: #4338ca;
  background: rgba(99,102,241,.14);
  border: 1px solid rgba(99,102,241,.24);
}

.day-num {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}
.day.sunday .day-num { color: var(--amber); }
.day.holiday .day-num { color: var(--red); }

.shift-info {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
  margin-top: 1px;
}

.entry-badge {
  font-size: 8.5px;
  font-weight: 800;
  background: var(--purple);
  color: #fff;
  border-radius: 3px;
  padding: 0px 3px;
  margin-top: 2px;
  line-height: 1.4;
}
.entry-st {
  font-size: 8.5px;
  font-weight: 800;
  background: var(--teal);
  color: #fff;
  border-radius: 3px;
  padding: 0px 3px;
  margin-top: 2px;
  line-height: 1.4;
}

.holiday-badge {
  font-size: 7.5px;
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  margin-top: 1px;
}
.vacation-bar {
  /* Seitlich eingerueckt und abgerundet: sonst laufen die Balken
     benachbarter Ferientage zu einer durchgehenden Linie zusammen und
     lesen sich als Tabellenlinie statt als Tagesmarkierung. */
  position: absolute;
  top: 0; left: 6px; right: 6px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
  opacity: 1;
  z-index: 2;
}
.day.vacation .day-num { margin-top: 3px; }
/* Eigene Skala, dem Jahreslauf folgend. Bewusst ausserhalb der
   Zustandsfarben: kein Violett (Marke), kein Teal (Freizeit),
   kein reines Blau (heute), kein Rot (Feiertag). Dadurch lesen die
   fuenf Balken als zusammengehoerige Familie statt als konkurrierende
   Signale. */
.vac-ostern     { background: #a3b565; }  /* Fruehling  – Oliv     */
.vac-pfingsten  { background: #c9a227; }  /* Spaetfruehling – Gold */
.vac-sommer     { background: #d98324; }  /* Sommer     – Orange   */
.vac-herbst     { background: #a4552e; }  /* Herbst     – Rost     */
.vac-weihnachten{ background: #6b7a8f; }  /* Winter     – Schiefer */

/* ── Month Footer (Zeitkonto) ──────────────────────────────── */
.month-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.konto-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.k-box { text-align: center; }
.k-box .lbl { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 2px; }
.k-box .val { font-size: 12px; font-weight: 800; display: block; }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-bold  { color: var(--text); }
.text-purple { color: var(--purple-text); }

/* SETO 2.1.143 · Todo #59: kompakter AFZ-Monatsendstand. */
.afz-month-balance {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 2px 8px;
  margin: 7px 0 8px;
  padding: 7px 9px;
  border: 1px solid rgba(13,148,136,.22);
  border-radius: 9px;
  background: rgba(13,148,136,.07);
}
.afz-month-balance > span { font-size: 10px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.afz-month-balance > strong { justify-self: end; font-size: 12px; font-weight: 900; color: var(--text); }
.afz-month-balance > small { grid-column: 1 / -1; font-size: 10px; color: var(--muted); line-height: 1.3; }

.fsq-wrap { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.fsq-bar  { height: 100%; background: var(--purple); border-radius: 3px; transition: width .4s; }
.fsq-label { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; }

.month-note-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.month-note-label { display:block; font-size:10px; font-weight:800; color:var(--muted); text-transform:uppercase; margin-bottom:5px; }
.month-note-row { display:flex; align-items:stretch; gap:6px; }
.month-note-input { flex:1; min-width:0; resize:vertical; min-height:48px; max-height:100px; border:1px solid var(--border); border-radius:9px; background:var(--surface); color:var(--text); padding:7px 8px; font:inherit; font-size:12px; line-height:1.35; }
.month-note-input:focus { outline:2px solid var(--purple-soft); border-color:rgba(87,6,140,.35); }
.month-note-save { align-self:flex-end; white-space:nowrap; }
.compare-month-note { min-width:180px; max-width:280px; white-space:normal !important; text-align:left; line-height:1.35; }

/* ── Editor Panel ──────────────────────────────────────────── */
#editor {
  position: fixed;
  bottom: var(--nav-h);
  left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  padding: 10px 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.editor-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.editor-info .sel-label { font-size: 13px; font-weight: 700; color: var(--text); }
.editor-info .sel-sub   { font-size: 11px; color: var(--muted); }
.entry-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.btn-type {
  flex: 1;
  min-width: 52px;
  max-width: 80px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .12s, transform .08s;
}
.btn-type:hover  { background: var(--purple-soft); border-color: rgba(87,6,140,.3); color: var(--purple-text); }
.btn-type:active { transform: scale(.95); }
.btn-type.delete { color: var(--red); }
.btn-type.delete:hover { background: rgba(255,59,48,.07); border-color: rgba(255,59,48,.3); }

/* ── Toast ─────────────────────────────────────────────────── */
.app-toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: color-mix(in srgb, var(--text) 90%, transparent);
  color: var(--surface);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  white-space: nowrap;
  z-index: 999;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Year Overview ─────────────────────────────────────────── */
.year-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 12px 0 0;
}
.year-nav .year-label { font-size: 20px; font-weight: 900; color: var(--text); min-width: 60px; text-align: center; }

.tab-bar {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.tab.active { background: var(--surface); color: var(--purple-text); box-shadow: var(--shadow-sm); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Jahrestabelle */
.year-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.year-table th {
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
.year-table th:first-child { text-align: left; }
.year-table td {
  padding: 7px 10px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.year-table td:first-child { text-align: left; font-weight: 700; }
.year-table tr:last-child td { border-bottom: none; }
.year-table tr:hover td { background: var(--surface-2); }
.year-table .sum-row td { font-weight: 800; color: var(--purple-text); background: var(--purple-soft); border-radius: 0; }
.cell-green { color: var(--green); }
.cell-red   { color: var(--red);   }

/* SVG Charts */
.chart-wrap {
  width: 100%;
  overflow-x: auto;
}
.chart-wrap svg { width: 100%; height: auto; }

/* Abwesenheitsliste */
.absence-group { margin-bottom: 16px; }
.absence-group-title { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.absence-list { display: flex; flex-wrap: wrap; gap: 6px; }
.absence-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.chip-FS  { background: color-mix(in srgb, var(--purple) 10%, var(--surface)); color: var(--purple-text); }
.chip-U   { background: color-mix(in srgb, var(--blue)   10%, var(--surface)); color: var(--blue); }
.chip-SU, .chip-BU  { background: color-mix(in srgb, #6366f1 12%, var(--surface)); color: #4f46e5; }
.chip-KR  { background: color-mix(in srgb, var(--red)    10%, var(--surface)); color: var(--red); }
.chip-ZT  { background: color-mix(in srgb, var(--green)  10%, var(--surface)); color: #166534; }
.chip-AFZ { background: color-mix(in srgb, var(--amber)  10%, var(--surface)); color: var(--amber); }
.chip-ST  { background: color-mix(in srgb, var(--teal)   10%, var(--surface)); color: var(--teal); }

.empty-hint { text-align: center; color: var(--muted); font-size: 14px; padding: 32px; }

/* ── Profil ─────────────────────────────────────────────────── */
.profil-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.profil-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--purple);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; font-weight: 900;
  flex-shrink: 0;
}
.profil-name   { font-size: 18px; font-weight: 800; }
.profil-sub    { font-size: 13px; color: var(--muted); margin-top: 2px; }
.save-hint { font-size: 12px; color: var(--green); text-align: center; margin-top: 10px; }
.section-label { font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 20px 0 8px; }

/* ── Misc ───────────────────────────────────────────────────── */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.kpi {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.kpi .k-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi .k-val { font-size: 20px; font-weight: 900; color: var(--purple-text); margin-top: 4px; }
.kpi .k-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

@media (max-width: 480px) {
  .kpi .k-val { font-size: 17px; }
}

/* Header title SVG icon */
.title-icon { display:inline-flex; align-items:center; vertical-align:middle; margin-right:6px; }
.title-icon svg { width:20px; height:20px; color:var(--purple); }

/* AFZ-Übertragswarnung */
.afz-warning-box {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
.afz-warning-box.ok { border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.08); }
.afz-warning-box.warn { border-color: rgba(217,119,6,.38); background: rgba(217,119,6,.10); }
.afz-warning-box.bad { border-color: rgba(220,38,38,.38); background: rgba(220,38,38,.10); }
.afz-warning-box b { font-weight: 900; }
.kpi.afz-ok { border-color: rgba(22,163,74,.35); background: rgba(22,163,74,.06); }
.kpi.afz-warn { border-color: rgba(217,119,6,.45); background: rgba(217,119,6,.09); }
.kpi.afz-bad { border-color: rgba(220,38,38,.45); background: rgba(220,38,38,.09); }

/* Abrechnungsvergleich */
.compare-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.compare-table th,
.compare-table td {
  white-space: nowrap;
}
.compare-input,
.compare-note {
  height: 34px;
  min-width: 82px;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 13px;
  text-align: right;
}
.compare-note {
  min-width: 150px;
  text-align: left;
}
.compare-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
}
.payroll-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  border: 1px solid transparent;
}
.legend-TS { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; }
.legend-NS { background:#eff6ff; color:#1d4ed8; border-color:#bfdbfe; }
.legend-block { background:#ecfeff; color:#0e7490; border-color:#a5f3fc; }
.legend-holiday { background:#ffe4e6; color:#be123c; border-color:#fecdd3; }
.legend-ferien { background:#edf4fb; color:#245f96; border-color:#cfe6fa; }
@media print {
  @page { margin: 8mm; }
  html, body {
    height: auto;
    background: #fff !important;
  }
  body {
    padding: 0 !important;
    color: #111 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .no-print,
  .bottom-nav,
  .app-header { display: none !important; }
  .legend-pill { font-size: 6.8pt; padding: 2px 5px; }
  }
@media (max-width: 390px) {
  .bn-item { font-size: 10px; }
  .bn-ico svg { width: 22px; height: 22px; }
}

/* --- Jahresuebersicht --- */
.cell-yellow { color: #b45309; }

/* --- Menue-Seite --- */
.menu-grid{display:grid;grid-template-columns:1fr;gap:12px}
.menu-grid{grid-template-columns:1fr 1fr}
.menu-link{display:flex;align-items:center;gap:12px;padding:15px;border-radius:16px;border:1px solid color-mix(in srgb,var(--purple) 22%,var(--border));background:color-mix(in srgb,var(--purple) 14%,var(--surface));color:var(--text);text-decoration:none;box-shadow:0 3px 12px rgba(0,0,0,.08);transition:background .15s,border-color .15s,transform .08s,box-shadow .15s}
.menu-link:hover{background:color-mix(in srgb,var(--purple) 20%,var(--surface));border-color:color-mix(in srgb,var(--purple) 40%,var(--border));box-shadow:0 5px 16px rgba(0,0,0,.12)}
.menu-link:active{transform:scale(.985)}
.menu-icon{width:38px;height:38px;border-radius:13px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb,var(--purple) 24%,var(--surface));color:var(--purple-text);font-size:20px;flex:0 0 auto}
.menu-title{font-weight:850;color:var(--text)}
.menu-desc{font-size:12px;color:var(--text-2);margin-top:2px;line-height:1.35}
@media (prefers-color-scheme: dark){
  :root:not([data-theme]) .menu-link{background:color-mix(in srgb,var(--purple) 24%,var(--surface));border-color:color-mix(in srgb,var(--purple) 38%,var(--border));}
  :root:not([data-theme]) .menu-link:hover{background:color-mix(in srgb,var(--purple) 32%,var(--surface));}
  :root:not([data-theme]) .menu-icon{background:color-mix(in srgb,var(--purple) 36%,var(--surface));color:#e8d6f7;}
  :root:not([data-theme]) .menu-desc{color:var(--text-2);}
}

  :root[data-theme="dark"] .menu-link{background:color-mix(in srgb,var(--purple) 24%,var(--surface));border-color:color-mix(in srgb,var(--purple) 38%,var(--border));}
  :root[data-theme="dark"] .menu-link:hover{background:color-mix(in srgb,var(--purple) 32%,var(--surface));}
  :root[data-theme="dark"] .menu-icon{background:color-mix(in srgb,var(--purple) 36%,var(--surface));color:#e8d6f7;}
  :root[data-theme="dark"] .menu-desc{color:var(--text-2);}

.section-label{font-size:12px;font-weight:850;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin:18px 4px 8px}
@media(min-width:650px){.menu-grid{grid-template-columns:1fr 1fr}}

/* --- Hilfeseite --- */
/* Eigene, leichte Styles nur für die Hilfeseite – nutzt die globalen CSS-Variablen */
  .help-h2 {
    font-size: 17px; font-weight: 800; color: var(--purple-text);
    margin: 4px 0 10px; display: flex; align-items: center; gap: 8px;
  }
  .help-h3 { font-size: 14px; font-weight: 700; color: var(--text); margin: 16px 0 6px; }
  .help-p  { font-size: 14px; line-height: 1.55; color: var(--text-2); margin: 8px 0; }
  .help-li { font-size: 14px; line-height: 1.5; color: var(--text-2); margin: 5px 0; padding-left: 18px; position: relative; }
  .help-li::before { content: "•"; color: var(--purple-text); position: absolute; left: 4px; font-weight: 700; }
  .help-note {
    background: var(--purple-soft); border-left: 3px solid var(--purple);
    border-radius: 8px; padding: 10px 12px; margin: 12px 0;
    font-size: 13px; line-height: 1.5; color: var(--text-2);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .help-note{ background: rgba(122,31,162,.15); }
  }

    :root[data-theme="dark"] .help-note{ background: rgba(122,31,162,.15); }
  
  .help-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
  .help-table th, .help-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--border); }
  .help-table th { color: var(--muted); font-weight: 600; font-size: 12px; }
  .help-table td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
  .formula {
    font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px;
    background: rgba(0,0,0,.05); border-radius: 6px; padding: 8px 10px; margin: 8px 0;
    color: var(--text); overflow-x: auto; white-space: pre;
  }
  @media (prefers-color-scheme: dark) { :root:not([data-theme]) .formula{ background: rgba(255,255,255,.06); } }
 :root[data-theme="dark"] .formula{ background: rgba(255,255,255,.06); } 
  .badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
  .b-tag { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; }
  .toc a { display: block; padding: 8px 0; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--border); }
  .toc a:last-child { border-bottom: none; }

/* --- Zeitstrahl (Reiter in der Jahresuebersicht) -----------------------
   Diese Regeln fehlten seit der V1 vollstaendig: Die Ansicht wurde
   gerendert, war aber ohne Formatierung praktisch unlesbar. */
.timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
}
.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.timeline-mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.timeline-month {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
}
.timeline-month:last-child { border-bottom: none; }
.tm-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.timeline-events {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  min-height: 20px;
}
.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.timeline-dot.fs  { background: var(--purple); }
.timeline-dot.u   { background: var(--blue); }
.timeline-dot.bu  { background: var(--teal); }
.timeline-dot.kr  { background: var(--red); }
.timeline-dot.afz { background: var(--amber); }
.timeline-dot.st  { background: var(--green); }

/* --- Abgleich Soll/Ist in der Abrechnung --- */
.compare-status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}
.compare-status.ok   { background: color-mix(in srgb, var(--green) 18%, transparent); color: #15803d; }
.compare-status.warn { background: color-mix(in srgb, var(--amber) 20%, transparent); color: #b45309; }
.compare-status.bad  { background: color-mix(in srgb, var(--red) 16%, transparent);   color: var(--red); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .compare-status.ok{ color: #4ade80; }
  :root:not([data-theme]) .compare-status.warn{ color: #fbbf24; }
}

  :root[data-theme="dark"] .compare-status.ok{ color: #4ade80; }
  :root[data-theme="dark"] .compare-status.warn{ color: #fbbf24; }


/* --- Kleinere Luecken aus der V1 --- */
.card-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 2px;
}
.btn.danger {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 35%, var(--border));
}
.btn.danger:active { background: color-mix(in srgb, var(--red) 10%, transparent); }


/* SETO 1.0.30 – reduzierte Kalender-Kopfzeile */
.calendar-app-header{gap:14px}.calendar-heading{display:flex;align-items:center;gap:11px;flex:1;min-width:0}.header-home-link{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:32px;padding:0 10px;border:1px solid color-mix(in srgb,var(--purple) 24%,var(--border));border-radius:10px;background:color-mix(in srgb,var(--purple) 8%,var(--surface));color:var(--purple-text);font-size:11px;font-weight:900;letter-spacing:.06em;text-decoration:none;transition:background .15s,border-color .15s}.header-home-link:hover{background:color-mix(in srgb,var(--purple) 15%,var(--surface));border-color:color-mix(in srgb,var(--purple) 42%,var(--border))}.calendar-heading .brand{flex:1}.calendar-heading .brand .title{font-size:17px;letter-spacing:-.15px}.calendar-heading .brand .sub{font-size:11px}


/* SETO 1.0.45 – gleichmäßige, schlichte Kalender-Steuerleiste */
.cal-top{display:grid;grid-template-columns:auto minmax(140px,1fr) auto;align-items:center;gap:12px;padding:10px 12px;border-radius:14px}
.cal-nav{gap:6px}
.cal-nav .btn{height:38px;border-radius:10px;box-shadow:none}
.cal-nav .btn.icon{width:38px;padding:0;border-radius:10px}
.cal-nav .btn.sm{height:38px;min-width:72px;padding:0 13px}
.cal-top-label{text-align:center;font-size:17px}
.cal-options{display:flex;justify-content:flex-end;align-items:center;gap:6px;margin:0}
.cal-toggle{min-height:38px;padding:0 11px;border-radius:10px;box-shadow:none;background:var(--surface);font-size:11.5px}
.cal-toggle input{width:16px;height:16px}
.cal-toggle small{font-size:10.5px}
@media(max-width:900px){
  .cal-top{grid-template-columns:1fr auto}
  .cal-top-label{grid-column:1/-1;grid-row:1;text-align:center}
  .cal-nav{grid-column:1;grid-row:2}
  .cal-options{grid-column:2;grid-row:2;flex-wrap:wrap}
}
@media(max-width:640px){
  .cal-top{display:flex;flex-direction:column;align-items:stretch}
  .cal-top-label{order:-1}
  .cal-nav,.cal-options{justify-content:center}
  .cal-toggle{flex:1;justify-content:center}
}

/* SETO 1.0.51 – G-03 Sync-Diagnose */
.sync-diagnostics{display:grid;gap:14px}
.sync-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.sync-status{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;border:1px solid var(--border);background:var(--surface-2);font-size:11px;font-weight:850;color:var(--muted);white-space:nowrap}
.sync-status[data-state="idle"]{color:var(--green);border-color:color-mix(in srgb,var(--green) 30%,var(--border));background:color-mix(in srgb,var(--green) 8%,var(--surface))}
.sync-status[data-state="syncing"]{color:var(--blue);border-color:color-mix(in srgb,var(--blue) 30%,var(--border));background:color-mix(in srgb,var(--blue) 8%,var(--surface))}
.sync-status[data-state="error"]{color:var(--red);border-color:color-mix(in srgb,var(--red) 32%,var(--border));background:color-mix(in srgb,var(--red) 8%,var(--surface))}
.sync-status[data-state="offline"]{color:var(--amber);border-color:color-mix(in srgb,var(--amber) 35%,var(--border));background:color-mix(in srgb,var(--amber) 9%,var(--surface))}
.sync-facts{display:grid;grid-template-columns:2fr 1fr 1fr;gap:10px}
.sync-facts>div{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-2)}
.sync-facts span{font-size:10.5px;color:var(--muted)}
.sync-facts strong{font-size:12.5px;color:var(--text)}
.sync-error{padding:11px 12px;border-radius:10px;border:1px solid color-mix(in srgb,var(--red) 30%,var(--border));background:color-mix(in srgb,var(--red) 7%,var(--surface))}
.sync-error strong{font-size:12.5px}.sync-error p{margin:5px 0;color:var(--text);font-size:12px;line-height:1.4}.sync-error small{color:var(--muted)}
.sync-recommendation{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 13px;border:1px solid var(--border);border-radius:11px;background:var(--surface-2)}
.sync-recommendation>div{min-width:0}.sync-recommendation-kicker{display:block;margin-bottom:3px;font-size:10px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.sync-recommendation strong{display:block;font-size:13px}.sync-recommendation p{margin:4px 0 0;font-size:11.5px;line-height:1.45;color:var(--muted)}
.sync-recommendation[data-state="ok"]{border-color:color-mix(in srgb,#2f7d4a 28%,var(--border));background:color-mix(in srgb,#2f7d4a 7%,var(--surface))}
.sync-recommendation[data-state="warn"]{border-color:color-mix(in srgb,#b7791f 32%,var(--border));background:color-mix(in srgb,#b7791f 8%,var(--surface))}
.sync-recommendation[data-state="error"]{border-color:color-mix(in srgb,var(--red) 32%,var(--border));background:color-mix(in srgb,var(--red) 7%,var(--surface))}
.sync-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.sync-actions .btn:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:650px){.sync-head{align-items:center}.sync-facts{grid-template-columns:1fr}.sync-recommendation{align-items:flex-start;flex-direction:column}.sync-actions{align-items:flex-start;flex-direction:column}}

/* SETO 1.0.52 – H-02 Smartphone Hoch-/Querformat */
@media(max-width:640px){
  .calendar-app-header{padding-left:10px;padding-right:10px;gap:8px}
  .calendar-heading{gap:8px}
  .header-home-link{min-width:44px;height:36px;padding:0 8px}
  .calendar-heading .brand .title{font-size:16px}
  .hdr-actions .btn{height:36px;padding:0 10px}
  .cal-wrap{padding:8px}
  .cal-top{gap:8px;padding:9px}
  .cal-top-label{font-size:16px}
  .cal-nav{display:grid;grid-template-columns:44px minmax(94px,1fr) 44px;width:100%;max-width:330px;margin:auto}
  .cal-nav .btn.icon,.cal-nav .btn.sm{width:100%;min-width:0}
  .cal-options{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:6px}
  .cal-toggle{min-width:0;padding:0 8px;white-space:normal;text-align:left}
  .cal-toggle small{display:none}
  #multiCalendar{-webkit-overflow-scrolling:touch;scroll-padding-inline:8px}
  .month-block{min-width:calc(100vw - 28px);max-width:calc(100vw - 28px)}
  .editor-info{align-items:flex-start}
  .entry-buttons{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
  .btn-type{width:100%;min-width:0;max-width:none;height:40px}
  .bottom-nav{padding-left:max(2px,env(safe-area-inset-left,0px));padding-right:max(2px,env(safe-area-inset-right,0px))}
  .bn-item{min-width:0;padding-left:2px;padding-right:2px}
}
@media(max-width:640px) and (orientation:portrait){
  .cal-top{display:flex;flex-direction:column;align-items:stretch}
  .cal-top-label{order:-1}
}
@media(max-height:500px) and (orientation:landscape){
  :root{--header-h:48px;--nav-h:52px}
  .calendar-heading .brand .sub{display:none}
  .calendar-heading .brand .title{font-size:15px}
  .calendar-app-header{padding-left:10px;padding-right:10px}
  .cal-wrap{padding-top:6px}
  .cal-top{grid-template-columns:auto minmax(120px,1fr) auto;gap:7px;padding:7px 9px;margin-bottom:8px}
  .cal-top-label{grid-column:auto;grid-row:auto;font-size:15px}
  .cal-nav{grid-column:auto;grid-row:auto;display:flex;width:auto;max-width:none}
  .cal-options{grid-column:auto;grid-row:auto;display:flex;width:auto;flex-wrap:nowrap}
  .cal-toggle{height:36px;min-height:36px;font-size:10.5px}
  .cal-toggle small{display:none}
  .bottom-nav .bn-ico{font-size:18px}
  .bottom-nav .bn-item{font-size:10px;gap:1px;padding-top:5px;padding-bottom:4px}
  #editor{padding-top:7px;padding-bottom:7px;gap:6px}
  .editor-info .sel-sub{display:none}
  .entry-buttons{display:flex;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .btn-type{flex:0 0 54px;height:34px}
}


/* SETO 1.0.67 – Kalender startet direkt unter der gemeinsamen Topbar */
body.seto-calendar-page .cal-wrap{padding-top:12px}
body.seto-calendar-page .cal-top{margin-top:0}


/* SETO 1.0.69 – Kalender-Schalter: Zustand deutlich sichtbar */
.cal-toggle{position:relative;transition:background .15s ease,border-color .15s ease,color .15s ease;gap:8px}
.cal-toggle::after{content:"AUS";display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:20px;padding:0 6px;border-radius:999px;background:var(--surface-2,#eef1f6);color:var(--muted);font-size:9px;font-weight:900;letter-spacing:.04em}
.cal-toggle:has(input:checked){border-color:color-mix(in srgb,var(--purple) 55%,var(--border));background:color-mix(in srgb,var(--purple-soft) 45%,var(--surface));color:var(--purple)}
.cal-toggle:has(input:checked)::after{content:"AN";background:var(--purple);color:#fff}
.cal-toggle input{accent-color:var(--purple)}

/* SETO 1.0.87 – Feedback: Kalender-Steuerung nicht abschneiden */
.cal-top,.cal-nav,.cal-options,.cal-toggle{overflow:visible}
.cal-toggle::after{flex:0 0 auto}
@media(max-width:640px){
  .cal-options{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .cal-toggle{width:100%;max-width:100%;box-sizing:border-box;overflow:visible}
}


/* SETO 1.1.00 – Mobiler Kalender: mehr Kalenderfläche, kompakter Monatskopf */
@media(max-width:640px){
  body.seto-calendar-nav-page .cal-wrap{padding:7px 7px 10px}
  body.seto-calendar-nav-page .cal-top{
    display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;
    gap:7px 8px;padding:8px 9px;margin-bottom:8px;border-radius:13px
  }
  body.seto-calendar-nav-page .cal-top-label{
    grid-column:1;grid-row:1;order:initial;text-align:left;font-size:16px;font-weight:850;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  body.seto-calendar-nav-page .cal-nav{
    grid-column:2;grid-row:1;display:grid;grid-template-columns:36px 62px 36px;width:134px;max-width:none;margin:0;gap:3px
  }
  body.seto-calendar-nav-page .cal-nav .btn{height:34px;min-height:34px;border-radius:9px;font-size:10.5px}
  body.seto-calendar-nav-page .cal-nav .btn.icon{width:36px}
  body.seto-calendar-nav-page .cal-nav .btn.sm{min-width:0;padding:0 5px}
  body.seto-calendar-nav-page .cal-options{
    grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);width:100%;gap:5px;margin:0
  }
  body.seto-calendar-nav-page .cal-toggle{min-height:34px;height:34px;padding:0 7px;justify-content:space-between;font-size:10.5px;white-space:nowrap}
  body.seto-calendar-nav-page .cal-toggle input{width:15px;height:15px}
  body.seto-calendar-nav-page .cal-toggle::after{min-width:25px;height:18px;padding:0 5px;font-size:8px}
  body.seto-calendar-nav-page .month-block{min-width:calc(100vw - 22px);max-width:calc(100vw - 22px)}
}
@media(max-width:370px){
  body.seto-calendar-nav-page .cal-top{grid-template-columns:1fr}
  body.seto-calendar-nav-page .cal-top-label{grid-column:1;grid-row:1;text-align:center}
  body.seto-calendar-nav-page .cal-nav{grid-column:1;grid-row:2;justify-self:center}
  body.seto-calendar-nav-page .cal-options{grid-column:1;grid-row:3}
}

.chip-GT { background: color-mix(in srgb, #0f766e 12%, var(--surface)); color:#0f766e; }


/* SETO 2.1.010: KR/AU-Einwilligung erst bei tatsächlicher Nutzung. */
.health-consent-dialog{width:min(620px,calc(100vw - 28px));padding:0;border:0;border-radius:22px;background:transparent;color:var(--text);box-shadow:0 24px 80px rgba(0,0,0,.34)}
.health-consent-dialog::backdrop{background:rgba(8,12,20,.68);backdrop-filter:blur(5px)}
.health-consent-panel{display:grid;gap:15px;margin:0;padding:22px;background:var(--card);border:1px solid var(--border);border-radius:22px}
.health-consent-panel h2{margin:0;font-size:22px}.health-consent-panel p{margin:0;line-height:1.55}
.health-consent-kicker{font-size:11px;font-weight:900;letter-spacing:.08em;color:var(--muted)}
.health-consent-check{display:flex;gap:11px;align-items:flex-start;padding:14px;border:1px solid var(--border);border-radius:14px;background:var(--surface-2,#f4f6fa);line-height:1.45}
.health-consent-check input{margin-top:3px;flex:0 0 auto}.health-consent-meta{font-size:12px;color:var(--muted)}
.health-consent-error{padding:11px 12px;border-radius:10px;background:rgba(180,35,24,.10);color:var(--danger,#b42318);font-size:12px;font-weight:700}
.health-consent-actions{display:flex;gap:9px;justify-content:flex-end;flex-wrap:wrap}
@media(max-width:640px){.health-consent-panel{padding:18px}.health-consent-actions>.btn{flex:1 1 100%}}

/* ── SETO 2.1.092 · Jahresplanung im Design der Monatsübersicht ── */
.year-plan-panel {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}
.year-plan-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.year-plan-toolbar-copy { min-width: 0; }
.year-plan-toolbar .card-title { margin-bottom: 4px; }
.year-plan-toolbar .compare-help { margin: 0; max-width: 720px; }
.year-plan-options {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.year-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.year-plan-month {
  min-width: 0;
  margin: 0;
}
.year-plan-month .month-title {
  padding: 11px;
  font-size: 14px;
}
.year-plan-days .day,
.year-plan-day-empty {
  min-height: 46px;
  aspect-ratio: 1;
}
.year-plan-day-empty {
  border: .5px solid var(--border);
  background: color-mix(in srgb, var(--surface-2) 72%, var(--surface));
  opacity: .42;
}
.year-plan-days .day {
  width: 100%;
}
.year-plan-days .day .holiday-badge {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.year-plan-days .day.selected {
  z-index: 2;
}
.year-plan-editor {
  position: fixed;
  bottom: var(--nav-h);
  left: 0;
  right: 0;
  width: auto;
  transform: none;
  z-index: 96;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.year-plan-editor-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.year-plan-editor-info .sel-label { font-size: 13px; font-weight: 700; color: var(--text); }
.year-plan-editor-info .sel-sub { font-size: 11px; color: var(--muted); }
.year-plan-editor-actions { display: flex; align-items: center; gap: 6px; }
.year-plan-entry-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow: visible;
  padding: 0;
}
.year-plan-entry-buttons .btn-type {
  flex: 1;
  min-width: 52px;
  max-width: 80px;
}
@media (max-width: 899px) {
  .year-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-plan-toolbar { align-items: flex-start; flex-direction: column; }
  .year-plan-options { width: 100%; justify-content: flex-start; }
}
@media (max-width: 620px) {
  .year-plan-grid { grid-template-columns: 1fr; gap: 10px; }
  .year-plan-toolbar { padding: 10px; }
  .year-plan-options { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .year-plan-days .day, .year-plan-day-empty { min-height: 44px; }
  .year-plan-editor { bottom: var(--nav-h); padding-top: 7px; padding-bottom: 7px; gap: 6px; }
  .year-plan-editor-info { align-items: flex-start; }
  .year-plan-editor-info .sel-sub { display: none; }
  .year-plan-entry-buttons { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .year-plan-entry-buttons .btn-type { flex: 0 0 62px; }
}

/* SETO 2.1.122 — robuste Kalender-Bereichsnavigation, unabhängig von der App-Shell */
.calendar-section-nav{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  width:100%;
  margin:0 0 12px;
  padding:5px;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--card);
  box-shadow:var(--shadow);
}
.calendar-section-link{
  min-width:0;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:7px 8px;
  border-radius:10px;
  color:var(--muted);
  font-size:11px;
  line-height:1.15;
  font-weight:780;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
}
.calendar-section-link:hover{background:color-mix(in srgb,var(--purple) 7%,transparent);color:var(--text);}
.calendar-section-link.active{background:color-mix(in srgb,var(--purple) 13%,var(--card));color:var(--purple-text);}
@media(max-width:480px){
  .calendar-section-nav{gap:3px;margin-bottom:9px;padding:4px;border-radius:12px;}
  .calendar-section-link{min-height:38px;padding:6px 3px;font-size:10px;letter-spacing:-.08px;}
}
@media(max-width:360px){
  .calendar-section-link{font-size:9.3px;padding-inline:1px;}
}

/* SETO 2.1.142 · Jahresplaner Quick-Wins */
.year-nav .year-label.year-label-emphasis{
  min-width:92px;padding:6px 14px;border:1px solid color-mix(in srgb,var(--purple) 24%,var(--border));
  border-radius:14px;background:color-mix(in srgb,var(--purple) 9%,var(--surface));
  color:var(--purple-text,var(--purple));font-size:clamp(26px,4vw,34px);line-height:1;font-weight:950;letter-spacing:.02em;
}
.year-plan-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.plan-year-emphasis{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;background:color-mix(in srgb,var(--purple) 10%,var(--surface));color:var(--purple-text,var(--purple));font-size:1.08em;font-weight:950}
.year-plan-print-link{white-space:nowrap;align-self:center}
@media(max-width:760px){.year-plan-print-link{grid-column:1/-1;width:100%}}

/* SETO 2.1.145 · nachgelagerter Verdiensthinweis-Rechner */
.earnings-advisor-card{margin:14px;border:1px solid color-mix(in srgb,var(--purple) 20%,var(--border,#dfe3e8));border-radius:14px;background:color-mix(in srgb,var(--purple) 3%,var(--card,#fff));padding:14px 16px}
.earnings-advisor-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}
.earnings-advisor-count{display:inline-flex;min-width:24px;height:24px;padding:0 7px;align-items:center;justify-content:center;border-radius:999px;background:color-mix(in srgb,var(--purple) 12%,transparent);font-size:12px;margin-left:5px}
.earnings-advisor-sub,.earnings-advisor-detail,.earnings-advisor-note,.earnings-advisor-foot,.earnings-advisor-empty{font-size:12px;line-height:1.45;color:var(--muted,#667085)}
.earnings-advisor-item{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;padding:11px 0;border-top:1px solid var(--border,#e5e7eb)}
.earnings-advisor-item:first-of-type{border-top:0}
.earnings-advisor-copy{margin-top:3px;font-size:13px;line-height:1.45}
.earnings-advisor-detail{margin-top:3px}
.earnings-advisor-badge{flex:0 0 auto;display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;background:color-mix(in srgb,var(--purple) 10%,transparent);color:var(--purple)}
.earnings-advisor-afz .earnings-advisor-badge{background:color-mix(in srgb,#b45309 11%,transparent);color:#92400e}
.earnings-advisor-note{margin-top:8px;padding-top:8px;border-top:1px dashed var(--border,#e5e7eb)}
.earnings-advisor-foot{margin-top:10px;padding-top:10px;border-top:1px solid var(--border,#e5e7eb)}
@media(max-width:640px){.earnings-advisor-card{margin:10px;padding:12px}.earnings-advisor-item{gap:8px}.earnings-advisor-badge{font-size:10px;padding:3px 7px}}

/* SETO 2.1.148 · Verdiensthinweise in Jahresübersicht/Jahresplaner */
.earnings-advisor-kpi{border-color:color-mix(in srgb,var(--purple) 24%,var(--border,#dfe3e8));background:color-mix(in srgb,var(--purple) 3%,var(--card,#fff))}
.earnings-advisor-kpi.has-hints{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--purple) 20%,transparent)}
.year-plan-entry-advisor{margin:0 0 12px;padding:11px 13px;border:1px solid color-mix(in srgb,var(--purple) 24%,var(--border,#dfe3e8));border-radius:12px;background:color-mix(in srgb,var(--purple) 4%,var(--card,#fff));font-size:12px;line-height:1.45}
.year-plan-entry-advisor[hidden]{display:none!important}
.year-plan-advisor-title{font-size:13px;font-weight:800;margin-bottom:5px;color:var(--text,#182230)}
.year-plan-advisor-row{padding:7px 0;border-top:1px solid var(--border,#e5e7eb)}
.year-plan-advisor-row:first-of-type{border-top:0}
.year-plan-advisor-row span{color:var(--muted,#667085)}
.year-plan-advisor-note,.year-plan-advisor-more{margin-top:5px;color:var(--muted,#667085)}
.year-plan-day.advisor-opportunity{outline:2px solid color-mix(in srgb,var(--purple) 68%,transparent);outline-offset:-2px;box-shadow:0 0 0 2px color-mix(in srgb,var(--purple) 10%,transparent)}
.year-plan-day.advisor-opportunity::after{content:"€";position:absolute;right:2px;bottom:2px;display:flex;width:14px;height:14px;align-items:center;justify-content:center;border-radius:50%;font-size:9px;font-weight:900;background:var(--purple,#6941c6);color:#fff}
@media(max-width:640px){.year-plan-entry-advisor{margin:0 0 9px;padding:9px 10px}.year-plan-advisor-row{padding:6px 0}}

/* SETO calendar annotations – private planning notes without payroll effect */
.calendar-annotations-card{margin-top:14px;padding:14px 16px}.calendar-annotations-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.calendar-annotation-editor{margin-top:12px;padding:12px;border:1px solid var(--border,#d7dde6);border-radius:14px;background:var(--surface-2,rgba(255,255,255,.55))}.calendar-annotation-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}.calendar-annotation-editor label{display:grid;gap:5px;font-size:.84rem;font-weight:700}.calendar-annotation-editor input,.calendar-annotation-editor textarea{width:100%;box-sizing:border-box;border:1px solid var(--border,#ccd5e1);border-radius:10px;padding:9px 10px;background:var(--surface,#fff);color:inherit;font:inherit}.calendar-annotation-editor-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:10px}.calendar-annotation-editor-hint{min-height:1.2em;margin-top:8px;font-size:.78rem;color:var(--muted,#667085)}.calendar-annotation-list{display:grid;gap:8px;margin-top:12px}.calendar-annotation-item{display:grid;grid-template-columns:minmax(110px,auto) minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--border,#dde3eb);border-radius:12px;background:var(--surface,#fff)}.calendar-annotation-date{border:0;background:none;color:var(--purple,#5842a8);font:inherit;font-weight:800;text-align:left;padding:0;cursor:pointer}.calendar-annotation-text{white-space:pre-wrap;overflow-wrap:anywhere}.calendar-annotation-actions{display:flex;gap:6px}.day.has-calendar-annotation,.year-plan-day.has-calendar-annotation{position:relative}.calendar-annotation-marker{position:absolute;right:4px;bottom:3px;font-size:.6rem;line-height:1;color:var(--purple,#5842a8);filter:drop-shadow(0 1px 1px rgba(255,255,255,.7));pointer-events:none}.day.has-calendar-annotation{box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--purple,#5842a8) 24%,transparent)}
@media(max-width:700px){.calendar-annotation-fields{grid-template-columns:1fr}.calendar-annotation-item{grid-template-columns:1fr}.calendar-annotation-actions{justify-content:flex-start}.calendar-annotations-head{align-items:center}}

/* Feedback 107/108: nur eine permanente Kalender-Bereichsnavigation; seltene Jahresdetails eingeklappt. */
.year-detail-menu{margin:10px 0 14px;border:1px solid var(--border,#d9e0e8);border-radius:12px;background:var(--surface,#fff)}.year-detail-menu>summary{cursor:pointer;list-style:none;padding:10px 13px;font-weight:800;display:flex;justify-content:space-between;align-items:center}.year-detail-menu>summary::-webkit-details-marker{display:none}.year-detail-menu-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:0 10px 10px}.year-detail-tab{border:1px solid var(--border,#d5dde7);background:var(--surface-2,#f7f9fc);color:inherit;border-radius:9px;padding:9px 10px;font:inherit;font-weight:750;cursor:pointer}.year-detail-tab.active{background:var(--purple,#5842a8);color:#fff;border-color:transparent}@media(max-width:700px){.year-detail-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.day.contractual-off {
  background: color-mix(in srgb, var(--muted) 7%, var(--surface));
}
.day.contractual-off .shift-info {
  font-size: 8px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.day.contractual-block {
  background: repeating-linear-gradient(135deg, color-mix(in srgb,var(--purple,#5842a8) 9%,var(--surface)) 0 6px, color-mix(in srgb,var(--purple,#5842a8) 4%,var(--surface)) 6px 12px);
  box-shadow: inset 0 2px 0 color-mix(in srgb,var(--purple,#5842a8) 28%,transparent), inset 0 -2px 0 color-mix(in srgb,var(--purple,#5842a8) 28%,transparent);
}
.day.contractual-block.contractual-off .shift-info { color:var(--purple-text,var(--purple,#5842a8)); font-weight:800; }

/* SETO 2.1.220 – Monatsnotizen unter dem Jahresplaner */
.calendar-annotation-month-overview{margin-top:14px;padding-top:14px;border-top:1px solid var(--border,#d7dde6)}
.calendar-annotation-month-overview-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:10px}
.calendar-annotation-month-overview-head span{font-size:.78rem;color:var(--muted,#667085)}
.calendar-annotation-month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.calendar-annotation-month{border:1px solid var(--border,#dde3eb);border-radius:12px;background:var(--surface,#fff);padding:10px;min-width:0}
.calendar-annotation-month-head{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}
.calendar-annotation-month-notes{display:grid;gap:6px}
.calendar-month-note{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;padding:7px;border-radius:9px;background:var(--surface-2,#f6f8fb);font-size:.8rem}
.calendar-month-note-date{border:0;background:none;padding:0;color:var(--purple,#5842a8);font:inherit;font-weight:800;cursor:pointer}
.calendar-month-note-empty{padding:7px 2px;color:var(--muted,#667085);font-size:.78rem}
@media(max-width:900px){.calendar-annotation-month-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.calendar-annotation-month-grid{grid-template-columns:1fr}.calendar-annotation-month-overview-head{display:block}.calendar-month-note{grid-template-columns:1fr}.calendar-annotation-month-head .btn{min-height:34px}}

/* SETO 2.1.220 – einheitliche Monatsbemerkungs-Datenbasis */
.calendar-annotation-month-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.calendar-month-note-primary{grid-template-columns:1fr;background:color-mix(in srgb,var(--purple,#5842a8) 5%,var(--surface-2,#f6f8fb))}
.calendar-month-note-kind{font-size:.72rem;font-weight:800;color:var(--muted,#667085);text-transform:uppercase;letter-spacing:.03em}
.calendar-month-note-edit{display:grid;gap:7px;padding:8px;border:1px solid var(--border,#dde3eb);border-radius:9px;background:var(--surface-2,#f6f8fb)}
.calendar-month-note-edit textarea{width:100%;box-sizing:border-box;border:1px solid var(--border,#ccd5e1);border-radius:9px;padding:8px 9px;background:var(--surface,#fff);color:inherit;font:inherit;resize:vertical}
.calendar-month-note-empty-dated{border-top:1px dashed var(--border,#dde3eb);padding-top:9px;margin-top:2px}
@media(max-width:600px){.calendar-annotation-month-actions{width:100%;justify-content:flex-start}.calendar-annotation-month-head{align-items:flex-start;flex-wrap:wrap}}

/* SETO 2.1.234 – Kalender-UX-Abschluss: Touch, Monatskontext, Jahresplaner */
.day.other-month{
  opacity:.42;
  cursor:pointer;
}
.day.other-month:hover{
  background:color-mix(in srgb,var(--purple) 6%,var(--surface));
}

.entry-buttons,
.year-plan-entry-buttons{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.entry-button-row{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.entry-button-row .btn-type{
  flex:1 1 52px;
  min-width:52px;
  max-width:80px;
}

.year-plan-quick-nav{
  display:none;
}
.year-detail-action{
  grid-column:1/-1;
  background:color-mix(in srgb,var(--surface-2) 82%,var(--surface));
  color:var(--muted);
}

@media(max-width:640px){
  .calendar-section-link{
    min-height:44px;
    padding:7px 3px;
    font-size:10.8px;
  }
  body.seto-calendar-nav-page .cal-nav{
    grid-template-columns:44px minmax(72px,1fr) 44px;
    width:min(100%,176px);
  }
  body.seto-calendar-nav-page .cal-nav .btn,
  body.seto-calendar-nav-page .cal-nav .btn.icon,
  body.seto-calendar-nav-page .cal-nav .btn.sm{
    min-height:44px;
    height:44px;
  }
  body.seto-calendar-nav-page .cal-nav .btn.icon{width:44px}
  body.seto-calendar-nav-page .cal-toggle{
    min-height:44px;
    height:44px;
    font-size:11px;
  }
  body.seto-calendar-nav-page .cal-toggle::after{
    min-width:28px;
    height:20px;
    font-size:9px;
  }
  #editor{
    padding:8px 10px;
    gap:6px;
  }
  #editor .editor-info .btn,
  .year-plan-editor .year-plan-editor-actions .btn{
    min-height:44px;
  }
  .entry-buttons,
  .year-plan-entry-buttons{
    display:flex;
    flex-direction:column;
    gap:5px;
    overflow:visible;
  }
  .entry-button-row{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    width:100%;
  }
  .entry-button-row .btn-type,
  .year-plan-entry-buttons .entry-button-row .btn-type{
    width:100%;
    min-width:0;
    max-width:none;
    height:44px;
    min-height:44px;
    flex:none;
  }
  .year-plan-options .btn,
  .year-plan-options .cal-toggle{
    min-height:44px;
    height:44px;
  }
  .year-plan-quick-nav{
    position:sticky;
    top:calc(var(--header-h,56px) + 4px);
    z-index:18;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
    margin:0 0 10px;
    padding:5px;
    border:1px solid var(--border);
    border-radius:12px;
    background:color-mix(in srgb,var(--surface) 95%,transparent);
    box-shadow:var(--shadow-sm);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
  }
  .year-plan-quick-link{
    min-height:40px;
    border:0;
    border-radius:9px;
    background:transparent;
    color:var(--muted);
    font:inherit;
    font-size:10.5px;
    font-weight:800;
    cursor:pointer;
  }
  .year-plan-quick-link.active{
    background:color-mix(in srgb,var(--purple) 13%,var(--surface));
    color:var(--purple-text);
  }
  .year-plan-month{
    scroll-margin-top:calc(var(--header-h,56px) + 62px);
  }
}

@media(max-width:360px){
  .calendar-section-link{
    min-height:44px;
    font-size:10.5px;
    padding-inline:2px;
  }
  .entry-button-row .btn-type{
    font-size:11px;
  }
  .year-plan-quick-link{
    font-size:10px;
  }
}

@media(max-height:500px) and (orientation:landscape){
  #editor .entry-button-row,
  .year-plan-editor .entry-button-row{
    display:flex;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  #editor .entry-button-row .btn-type,
  .year-plan-editor .entry-button-row .btn-type{
    flex:0 0 58px;
    width:58px;
    height:44px;
  }
}

/* SETO 2.1.234 – Editor darf die letzten Kalenderzeilen nicht verdecken. */
@media(max-width:760px){
  body.seto-calendar-nav-page:has(#editor:not(.hidden)) .cal-wrap{padding-bottom:180px}
  body.seto-calendar-nav-page:has(.year-plan-editor:not(.hidden)) main.container{padding-bottom:190px}
  .year-plan-editor{bottom:var(--seto-calendar-nav-total-h,var(--nav-h))}
}
@media(min-width:761px){
  body.seto-calendar-nav-page:has(#editor:not(.hidden)) .cal-wrap{padding-bottom:165px}
  body.seto-calendar-nav-page:has(.year-plan-editor:not(.hidden)) main.container{padding-bottom:175px}
  .year-plan-editor{bottom:0}
}

/* SETO 2.2.7 – Jahresplaner: Notizen direkt unter jedem Quartal */
.year-plan-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:18px;
}
.year-plan-quarter{
  display:grid;
  gap:10px;
  min-width:0;
  scroll-margin-top:calc(var(--header-h,56px) + 16px);
}
.year-plan-quarter-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  padding:0 2px;
  color:var(--muted);
  font-size:.78rem;
}
.year-plan-quarter-head strong{
  color:var(--text);
  font-size:.9rem;
}
.year-plan-quarter-months{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.year-plan-quarter-notes{
  padding:10px;
  border:1px solid var(--border,#dde3eb);
  border-radius:14px;
  background:color-mix(in srgb,var(--surface-2,#f6f8fb) 72%,var(--surface,#fff));
}
.year-plan-quarter-notes-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.year-plan-quarter-notes-head strong{font-size:.86rem}
.year-plan-quarter-notes-head span{font-size:.75rem;color:var(--muted,#667085)}
.year-plan-quarter-notes .calendar-annotation-month-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
#calendarAnnotationsYear .calendar-annotation-list{margin-top:10px}
@media(max-width:899px){
  .year-plan-quarter-months{grid-template-columns:repeat(2,minmax(0,1fr))}
  .year-plan-quarter-notes .calendar-annotation-month-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){
  .year-plan-quarter{gap:8px}
  .year-plan-quarter-months{grid-template-columns:1fr;gap:10px}
  .year-plan-quarter-notes .calendar-annotation-month-grid{grid-template-columns:1fr}
  .year-plan-quarter-notes-head{display:block}
}

/* SETO 2.2.47 – einheitliche Kalenderdialoge statt Browser-alert/confirm */
.seto-calendar-dialog{
  width:min(460px,calc(100% - 28px));
  max-width:460px;
  border:0;
  padding:0;
  border-radius:16px;
  background:var(--surface,#fff);
  color:var(--text,#111827);
  box-shadow:0 18px 50px rgba(15,23,42,.22);
}
.seto-calendar-dialog::backdrop{background:rgba(15,23,42,.42)}
.seto-calendar-dialog-card{padding:18px;display:grid;gap:18px}
.seto-calendar-dialog-copy{display:grid;gap:8px}
.seto-calendar-dialog-copy h2{margin:0;font-size:1.05rem;line-height:1.3}
.seto-calendar-dialog-copy p{margin:0;color:var(--muted,#667085);font-size:.92rem;line-height:1.5;white-space:pre-line}
.seto-calendar-dialog-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.seto-calendar-dialog-actions .btn{min-height:44px;min-width:96px}
.seto-calendar-dialog-actions .btn.danger{background:#b42318;color:#fff;border-color:#b42318}
@media(max-width:480px){
  .seto-calendar-dialog-actions{display:grid;grid-template-columns:1fr 1fr}
  .seto-calendar-dialog-actions .btn:only-child{grid-column:1/-1}
}

/* END schichtkalender/css/app.css */

/* BEGIN schichtkalender/css/auswertung.css */
/* SchichtKalender – auswertung.css
 *
 * Mehrseitige Auswertung, DIN A4 Hochformat.
 * Jeder .page-Block ist ein Blatt und beginnt beim Druck auf einer neuen Seite.
 *
 *   A4 hoch      210 x 297 mm
 *   Rand          12 mm ringsum
 *   nutzbar      186 x 273 mm
 */

.page {
  width: 210mm;
  min-height: 297mm;
  padding: 12mm;
  margin: 0 auto 16px;
  background: #fff;
  color: #111318;
  box-shadow: 0 2px 18px rgba(0, 0, 0, .18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  box-sizing: border-box;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: .4mm solid #333;
  padding-bottom: 2mm;
  margin-bottom: 4mm;
}
.page-title { font-size: 13pt; font-weight: 800; }
.page-meta  { font-size: 8pt; color: #6b7280; }
.page-foot  { margin-top: 4mm; font-size: 7pt; color: #6b7280;
              display: flex; justify-content: space-between; }

.sec-title {
  font-size: 9.5pt;
  font-weight: 800;
  margin: 5mm 0 2mm;
  padding-bottom: 1mm;
  border-bottom: .2mm solid #b8bcc6;
}
.sec-title:first-of-type { margin-top: 0; }

/* ── Tabellen ──────────────────────────────────────────────────────── */
.rt { width: 100%; border-collapse: collapse; font-size: 8pt; }
.rt th {
  background: #eef0f4;
  font-weight: 800;
  text-align: right;
  padding: 1.4mm 1.6mm;
  border: .2mm solid #b8bcc6;
  white-space: nowrap;
}
.rt th:first-child, .rt td:first-child { text-align: left; }
.rt td {
  padding: 1.3mm 1.6mm;
  border: .2mm solid #cdd1d8;
  text-align: right;
  white-space: nowrap;
}
.rt tr:nth-child(even) td { background: #f7f8fa; }
.rt .sum td { font-weight: 800; background: #e4e6eb !important; border-top: .35mm solid #333; }
.rt .neg { color: #a1231b; }
.rt .pos { color: #15702f; }
.rt .mut { color: #6b7280; }

/* Ampel im Abgleich – zusätzlich mit Zeichen, damit Graustufen tragen */
.st-ok::before   { content: "\2713 "; }
.st-warn::before { content: "\26A0 "; }
.st-bad::before  { content: "\2717 "; }
.st-none::before { content: "\2013 "; }
.st-ok   { color: #15702f; font-weight: 800; }
.st-warn { color: #92610b; font-weight: 800; }
.st-bad  { color: #a1231b; font-weight: 800; }
.st-none { color: #6b7280; }

/* ── Kennzahlen ────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5mm;
  margin-bottom: 4mm;
}
.kpi-box {
  border: .2mm solid #b8bcc6;
  padding: 2mm 2.5mm;
  background: #f7f8fa;
}
.kpi-label { font-size: 7pt; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 13pt; font-weight: 800; margin-top: .5mm; }
.kpi-sub   { font-size: 7pt; color: #6b7280; }

/* ── Schichtliste, mehrspaltig ─────────────────────────────────────── */
.shift-cols {
  column-count: 4;
  column-gap: 4mm;
  font-size: 7.2pt;
}
.shift-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5mm;
  padding: .5mm 1mm;
  border-bottom: .15mm solid #e2e4e9;
  break-inside: avoid;
}
.shift-row .sd { color: #6b7280; min-width: 16mm; }
.shift-row .sw { min-width: 6mm; }
.shift-row .ss { font-weight: 800; min-width: 7mm; text-align: right; }
.shift-row .se { font-weight: 800; min-width: 8mm; text-align: right; }
.shift-row.is-ft { background: #e4e6eb; }
.shift-row.is-entry { background: #f0f1f4; }
.month-head {
  font-size: 8pt; font-weight: 800;
  margin: 2mm 0 1mm; padding-bottom: .5mm;
  border-bottom: .2mm solid #b8bcc6;
  break-after: avoid;
}

.hinweis {
  font-size: 7.5pt;
  color: #6b7280;
  line-height: 1.5;
  margin-top: 3mm;
  padding: 2mm 2.5mm;
  background: #f7f8fa;
  border-left: .6mm solid #b8bcc6;
}

/* ── Ausdruck ──────────────────────────────────────────────────────── */
@page { size: A4 portrait; margin: 0; }

@media print {
  html, body { margin: 0; padding: 0; background: #fff; }
  .app-header, .bottom-nav, .no-print { display: none !important; }
  .page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
    page-break-after: always;
  }
  .page:last-of-type { page-break-after: auto; }
  .rt, .kpi-grid { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* END schichtkalender/css/auswertung.css */
