/* Raum richten – gemeinsames Erscheinungsbild für index.html, todo.html und admin.html
 * Wird NACH den seiteneigenen Stilen geladen und vereinheitlicht Farben, Kopfzeile,
 * Tab-Leiste, Buttons, Dialoge und Meldungen.
 */
:root {
  /* Farben Ev. Kirchengemeinde Sinsheim */
  --brand:         #8CB800;   /* Kirchen-Grün: Balken, Rahmen, Markierungen */
  --brand-strong:  #5E7D00;   /* dunkleres Grün: Schrift und Hauptbuttons (Kontrast 4,8:1) */
  --brand-text:    #5E7D00;
  --brand-mid:     #5E7D00;   /* bisher #7aaa0a – als Schriftfarbe zu blass */
  --brand-light:   #F0F8E0;
  --accent:        var(--brand);
  --accent-light:  var(--brand-light);

  --bg:            #F8F9FA;
  --surface:       #FFFFFF;
  --border:        #E2E6EA;
  --text:          #1A1A2E;
  --muted:         #5F6673;   /* etwas dunkler als bisher: Kontrast 5,9:1 */
  --danger:        #B91C1C;
  --radius:        14px;
  --font:          system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* ToDo-Seite nutzte Blau als Hauptfarbe → jetzt einheitlich Grün */
  --blue:          var(--brand-strong);
  --header-h:      58px;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); }

/* ── Kopfzeile (auf allen Seiten gleich) ─────────────────────────────── */
.header {
  background: #fff;
  border-bottom: 3px solid var(--brand);
  position: sticky; top: 0; z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: .5rem; padding: 0 1.25rem; height: var(--header-h);
  max-width: 1100px; margin: 0 auto;
}
.header-logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; min-width: 0; }
.header-logo img { height: 44px; width: auto; display: block; }
.logo-text { color: var(--text); line-height: 1.25; min-width: 0; }
.logo-text strong { display: block; font-size: .95rem; font-weight: 700; letter-spacing: -.01em; color: var(--brand-text); white-space: nowrap; }
.logo-text span { font-size: .68rem; color: var(--muted); white-space: nowrap; }
.header-right { display: flex; gap: .4rem; align-items: center; flex-shrink: 0; }
.brand-bar { height: 4px; display: flex; }
.brand-bar div { flex: 1; }

.user-chip {
  display: flex; align-items: center; gap: .35rem;
  background: var(--brand-light); border: 1.5px solid var(--brand);
  border-radius: 8px; padding: .3rem .65rem;
  font-size: .8rem; font-weight: 600; color: var(--brand-text);
}

/* ── Tab-Leiste ──────────────────────────────────────────────────────── */
#tab-nav, #fsj-tab-nav {
  position: sticky; top: var(--header-h); z-index: 9;
  background: #fff; border-bottom: 2px solid var(--brand);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
#tab-nav > div { display: flex; max-width: 760px; margin: 0 auto; }
.tab-btn {
  flex: 1; padding: .7rem 0; min-height: 44px; border: none; background: transparent;
  font-size: .8rem; font-weight: 700; font-family: var(--font); cursor: pointer;
  color: var(--muted); border-bottom: 3px solid transparent;
}
.tab-btn.active { color: var(--brand-text); border-bottom-color: var(--brand); }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn-primary, .popup .btn-primary { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn-primary:hover, .popup .btn-primary:hover { background: #4E6900; border-color: #4E6900; color: #fff; }
.btn-login { background: var(--brand-strong); }
.btn-login:hover { background: #4E6900; }
.btn:focus-visible, .tab-btn:focus-visible, button:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(94,125,0,.45); outline-offset: 2px;
}

/* ── Kleine Bildschirme ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --header-h: 52px; }
  .header-inner { padding: 0 .85rem; }
  .header-logo img { height: 38px; }
  .logo-text span { display: none; }
  .logo-text strong { white-space: normal; line-height: 1.1; font-size: .9rem; }
  .header-logo { gap: .5rem; }
  /* Paket 19: Mit dem „?“ wird die Kopfzeile am Handy knapp – das Logo behält seine Größe,
     ein langer Name im Namensschild wird mit „…“ gekürzt. */
  .header-logo img { flex-shrink: 0; }
  .user-chip { min-width: 0; max-width: 26vw; }
  #user-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .header-right { gap: .25rem; }
  .header-right .btn { padding-left: .5rem; padding-right: .5rem; }
  .user-chip { padding: .3rem .5rem; }
}

/* ── Arbeitszeit (FSJler): Kalender-Details ──────────────────────────── */
.cal-detail { display: none; }
.fsj-layout > :empty { display: none; }

/* ── Breite Bildschirme (ab 1024 px): zweispaltige Arbeitszeit-Ansicht ── */
@media (min-width: 1024px) {
  #fsj-section { max-width: 1240px !important; padding: 1.25rem 1.5rem !important; }
  .fsj-layout {
    display: grid;
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    column-gap: 1.5rem;
    align-items: start;
  }
  .fsj-layout > * { grid-column: 1; min-width: 0; }
  .fsj-layout > .fsj-cal-card {
    grid-column: 2; grid-row: 1 / span 12;
    position: sticky; top: calc(var(--header-h) + 58px);
  }
  .fsj-cal-weekdays > div { font-size: .75rem !important; }
  .cal-cell {
    min-height: 84px !important;
    align-items: flex-start !important; justify-content: flex-start !important;
    padding: .35rem .45rem !important; gap: .15rem;
  }
  .cal-cell .cal-day { font-size: .85rem !important; }
  .cal-cell .cal-dot { display: none; }
  /* B25 (Paket 9, Entscheidung 9): lange Wörter wie „Ausgleichstag“ umbrechen statt die Spalte zu sprengen;
     hyphens: auto trennt nach deutscher Silbentrennung (lang="de" an <html>), overflow-wrap fängt den Rest */
  .cal-detail { display: block; font-size: .72rem; line-height: 1.3; text-align: left; overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
  .cal-cell[onclick]:hover { outline: 2px solid var(--brand); outline-offset: -1px; }
}

/* ── Planungsmatrix (VG) ──────────────────────────────────────────────── */
.m-card { background: #fff; border-radius: var(--radius); padding: 1rem; margin-bottom: 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1.5px solid var(--border); }
.m-title { font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: .65rem; text-transform: uppercase; letter-spacing: .04em; }
.m-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.m-nav, .m-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.m-toolbar .btn { font-size: .78rem; padding: .4rem .65rem; min-height: 36px; }
.m-toolbar .btn:disabled { opacity: .45; cursor: default; }
.m-range { font-size: .85rem; margin-left: .35rem; }
.m-hint { font-size: .74rem; color: var(--muted); background: var(--brand-light); border-radius: 8px; padding: .4rem .6rem; margin-bottom: .6rem; }
.m-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 10px; }
.m-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; font-size: .72rem; table-layout: fixed; }
.m-table th, .m-table td { border-right: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; }
.m-table thead th { background: #fafbfc; font-weight: 700; color: var(--muted); padding: .35rem .2rem; text-align: center; line-height: 1.25; position: sticky; top: 0; }
.m-table thead th span { font-weight: 500; font-size: .68rem; }
.m-table th.m-name { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; padding: .45rem .6rem;
  width: 120px; font-size: .8rem; color: var(--brand-text); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-table thead th.m-name { z-index: 3; background: #fafbfc; color: var(--muted); cursor: default; }
.m-we-h { background: #f3f4f6 !important; }
.m-today-h { color: var(--brand-text) !important; box-shadow: inset 0 -3px 0 var(--brand); }
.m-selectable { cursor: pointer !important; }
.m-selectable:hover { background: var(--brand-light) !important; }
.m-cell { height: 50px; padding: .25rem .3rem; vertical-align: top; cursor: pointer; line-height: 1.25; position: relative; }
.m-cell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
.m-cell small { font-size: .64rem; }
.m-today { box-shadow: inset 0 0 0 2px var(--brand); }
.m-sel { outline: 3px solid #2563eb !important; outline-offset: -3px; background-image: linear-gradient(rgba(37,99,235,.12), rgba(37,99,235,.12)); }
.m-plan { background: #eef2ff; color: #4338ca; }
.m-indiv { background: #e0e7ff; color: #3730a3; font-weight: 600; }
.m-off { background: #f5f3ff; color: #6d28d9; }
.m-ok { background: #dcfce7; color: #166534; }
.m-pend { background: #fef9c3; color: #713f12; }
.m-rej, .m-rejplan { background: #fee2e2; color: #991b1b; }
.m-run { background: #dbeafe; color: #1e40af; }
.m-abs { background: #dbeafe; color: #1e40af; }
.m-sick { background: #fee2e2; color: #991b1b; }
.m-we { background: #f9fafb; }
.m-free { background: #f9fafb; color: #9ca3af; }
.m-missing { color: #9ca3af; }
.m-flag::after { content: '!'; position: absolute; top: 2px; right: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #ea580c; color: #fff; font-size: .6rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.m-legend { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .55rem; }
.m-legend span { font-size: .66rem; padding: .12rem .4rem; border-radius: 4px; border: 1px solid #eef0f2; }
.m-flag-l { background: #fff7ed; color: #9a3412; }
/* Ruhezeit zu kurz (Paket 16): Matrix, Kalender je Kachel, Tagesfenster */
.m-rest { color: #b45309; font-weight: 700; }
.m-rest-l { background: #fffbeb; color: #b45309; }
.vgc-rest::after { content: '⚠'; position: absolute; top: -1px; right: 1px; font-size: .55rem; line-height: 1; color: #b45309; }
.rest-warn { background: #fffbeb; border: 1.5px solid #fcd34d; border-left: 4px solid #f59e0b; border-radius: 8px;
  padding: .45rem .6rem; margin-bottom: .6rem; font-size: .78rem; line-height: 1.4; color: #78350f; }
.rest-warn b { display: block; margin-bottom: .15rem; color: #92400e; }
@media (min-width: 1024px) {
  .m-table { font-size: .75rem; }
  .m-cell { height: 56px; }
}

/* ── Stundenkonto und Jahresübersicht (js/konto.js) ───────────────────── */
.k-card { background: #fff; border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.k-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .88rem; font-weight: 700; color: var(--brand-text); margin-bottom: .4rem; }
.k-year { font-size: .72rem !important; padding: .3rem .55rem !important; min-height: 32px; white-space: nowrap; }
.k-section { font-size: .66rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: .55rem 0 .3rem; }
.k-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.k-cell { background: #f8f9fa; border-radius: 10px; padding: .5rem .6rem; }
.k-label { font-size: .7rem; color: var(--muted); font-weight: 600; }
.k-val { font-size: 1.25rem; font-weight: 700; line-height: 1.2; margin-top: .1rem; }
.k-hint { font-size: .64rem; color: var(--muted); }
.k-pos { color: #15803d; }
.k-neg { color: var(--danger); }
.k-sub { font-size: .78rem; color: var(--muted); margin-top: .4rem; }
.k-line { display: flex; flex-wrap: wrap; gap: .35rem 1rem; font-size: .8rem; color: #374151; margin-top: .25rem; }
.k-loading { display: flex; justify-content: center; padding: 1rem 0; }
.k-err { font-size: .8rem; color: var(--danger); padding: .5rem 0; }
.k-year-dlg { background: #fff; border-radius: 14px; padding: 1.2rem; width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,.25); }
.k-year-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.k-year-top h3 { font-size: 1rem; margin: 0; color: var(--brand-text); }
.k-table { width: 100%; border-collapse: collapse; font-size: .8rem; min-width: 560px; }
.k-table th { text-align: right; font-size: .68rem; color: var(--muted); font-weight: 700; padding: .45rem .5rem; border-bottom: 2px solid var(--border); line-height: 1.2; }
.k-table td { text-align: right; padding: .45rem .5rem; border-bottom: 1px solid #f0f1f3; white-space: nowrap; }
.k-table th:first-child, .k-table td:first-child { text-align: left; }
.k-table tr.k-current td { background: var(--brand-light); }
.k-table tr.k-future td { color: #6b7280; font-style: italic; }
.k-table tr.k-future td.k-neg, .k-table tr.k-future td.k-pos { font-style: italic; }

/* ── Planung: Umschalter und Monatsansicht (js/vg-matrix.js) ──────────── */
.m-switch { display: inline-flex; background: #f1f3f5; border-radius: 10px; padding: 3px; margin-bottom: .6rem; }
.m-switch button { border: none; background: transparent; padding: .4rem .85rem; border-radius: 8px; font: 600 .78rem var(--font); color: var(--muted); cursor: pointer; min-height: 34px; }
.m-switch button.on { background: #fff; color: var(--brand-text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.m-open { color: var(--muted); font-weight: 400; }
.mv-person { padding: .4rem .5rem; border: 1.5px solid var(--border); border-radius: 8px; font: 600 .82rem var(--font); min-height: 36px; background: #fff; }
.mv-layout { display: grid; gap: .8rem; grid-template-areas: "panel" "cal" "konto"; }
.mv-panel { grid-area: panel; } .mv-cal { grid-area: cal; } .mv-konto { grid-area: konto; }
.mv-konto { display: grid; gap: .8rem; align-content: start; }
.mv-layout .k-card { margin-bottom: 0; border: 1.5px solid var(--border); box-shadow: none; }
.k-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .45rem; }
.k-facts > div { background: #f8f9fa; border-radius: 10px; padding: .45rem .6rem; display: grid; gap: .05rem; align-content: start; }
.k-facts span { font-size: .68rem; color: var(--muted); font-weight: 600; }
.k-facts b { font-size: 1rem; }
.k-facts small { font-size: .66rem; color: var(--muted); font-weight: 500; }
.mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.mv-head div { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); padding: .25rem 0; }
.mv-cell { min-height: 58px; border-radius: 7px; border: 1px solid #eef0f2; font-size: .68rem; line-height: 1.25; padding: .25rem .3rem; overflow: hidden; }
.mv-out { background: #fcfcfd; border-color: #f5f5f7; cursor: default !important; }
.mv-out .mv-day { color: #d1d5db; }
.mv-day { display: block; font-weight: 700; font-size: .78rem; margin-bottom: .1rem; }
.mv-txt small { font-size: .62rem; }
.mp-panel { margin-bottom: 0; }
.mp-info { font-size: .8rem; line-height: 1.45; display: grid; gap: .3rem; color: #374151; }
.mp-badge { font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; white-space: nowrap; }
.mp-badge.draft { background: #f1f5f9; color: #475569; }
.mp-badge.pub { background: #e0f2fe; color: #075985; }
.mp-badge.ok { background: #dcfce7; color: #166534; }
.mp-warn { color: #9a3412; }
.mp-err { color: var(--danger); font-weight: 600; }
.mp-actions { margin-top: .3rem; }
.mp-actions .btn { width: 100%; justify-content: center; min-height: 40px; }
@media (max-width: 480px) {
  .mv-cell { min-height: 52px; font-size: .6rem; padding: .2rem; }
  .mv-txt small { display: none; }
}
@media (min-width: 1024px) {
  .mv-layout { grid-template-columns: 340px minmax(0, 1fr); grid-template-areas: "panel cal" "konto cal"; align-items: start; }
  .mv-cell { min-height: 76px; font-size: .74rem; }
}
.mv-outside { background: #fafafa; color: #c4c9d0; cursor: default; }

/* Planungsstatus-Karte */
.mp-steps { display: flex; align-items: center; margin: .35rem 0 .7rem; }
.mp-step { display: flex; flex-direction: column; align-items: center; gap: .2rem; font-size: .66rem; font-weight: 600; color: #9ca3af; min-width: 64px; }
.mp-dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 800; background: #f1f3f5; color: #9ca3af; border: 2px solid #e5e7eb; }
.mp-step.done .mp-dot { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.mp-step.done { color: var(--brand-text); }
.mp-step.now .mp-dot { background: #fff; border-color: var(--brand); color: var(--brand-text); box-shadow: 0 0 0 4px var(--brand-light); }
.mp-step.now { color: var(--brand-text); }
.mp-line { flex: 1; height: 2px; background: #e5e7eb; margin-bottom: 1.1rem; }
.mp-frist { display: flex; gap: .6rem; align-items: flex-start; border-radius: 10px; padding: .6rem .7rem; font-size: .78rem; line-height: 1.4; margin-bottom: .6rem; }
.mp-frist > span { font-size: 1.2rem; line-height: 1; }
.mp-frist > div { flex: 1; }
.mp-frist small { color: inherit; opacity: .85; }
.mp-frist.open { background: var(--brand-light); color: #3f5400; }
.mp-frist.late { background: #fff7ed; color: #9a3412; }
.mp-frist.pub { background: #eff6ff; color: #1e40af; }
.mp-frist.over { background: #f3f4f6; color: #6b7280; }
.mp-bar { height: 6px; background: rgba(0,0,0,.08); border-radius: 99px; margin-top: .4rem; overflow: hidden; }
.mp-bar i { display: block; height: 100%; background: var(--brand-strong); border-radius: 99px; }
.mp-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.mp-count { display: flex; align-items: center; gap: .5rem; background: #f8f9fa; border-radius: 10px; padding: .45rem .6rem; }
.mp-count b { font-size: 1.3rem; color: #9ca3af; min-width: 1.1rem; text-align: center; }
.mp-count span { font-size: .68rem; color: var(--muted); line-height: 1.25; }
.mp-count.warn { background: #fff7ed; } .mp-count.warn b { color: #ea580c; }
.mp-count.err { background: #fef2f2; } .mp-count.err b { color: var(--danger); }
.mp-actions { margin-top: .7rem; }
.linkbtn { background: none; border: none; padding: .2rem 0; color: var(--brand-text); font: 600 .8rem var(--font); text-decoration: underline; cursor: pointer; min-height: 32px; }
.m-proposal { background: #fff7ed !important; color: #9a3412 !important; }
@media (max-width: 480px) { .mp-count { flex-direction: column; text-align: center; gap: .1rem; } }

/* ── Aktionsprotokoll (js/audit-ui.js) ─────────────────────────────────── */
.au-dlg { max-width: 820px; }
.au-filter { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .7rem; font-size: .8rem; color: var(--muted); }
.au-filter select, .au-filter input { padding: .4rem .5rem; border: 1.5px solid var(--border); border-radius: 8px; font: .82rem var(--font); min-height: 36px; }
.au-list { display: grid; gap: .25rem; }
.au-day { font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: .6rem 0 .2rem; }
.au-row { border: 1px solid #eef0f2; border-radius: 9px; background: #fff; }
.au-row summary { display: grid; grid-template-columns: 3rem 1.4rem 1fr auto; gap: .4rem; align-items: baseline; padding: .45rem .6rem; cursor: pointer; font-size: .82rem; list-style: none; }
.au-row summary::-webkit-details-marker { display: none; }
.au-row[open] { border-color: var(--brand); }
.au-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.au-text { line-height: 1.35; }
.au-who { font-size: .72rem; color: var(--brand-text); font-weight: 700; white-space: nowrap; text-align: right; }
.au-fsj { display: inline-block; background: #f1f5f9; color: #475569; border-radius: 99px; padding: 0 .4rem; margin-right: .3rem; font-weight: 600; }
.au-delete .au-text { color: var(--danger); }
.au-det { width: calc(100% - 1.2rem); margin: 0 .6rem .6rem; border-collapse: collapse; font-size: .72rem; }
.au-det th { text-align: left; color: var(--muted); font-weight: 700; padding: .25rem .35rem; border-bottom: 1px solid var(--border); }
.au-det td { padding: .25rem .35rem; border-bottom: 1px solid #f3f4f6; word-break: break-word; }
.au-null { color: #cbd5e1; }
.au-empty { color: var(--muted); font-size: .85rem; padding: 1rem 0; text-align: center; }
.au-more { justify-self: center; margin-top: .5rem; }
@media (max-width: 560px) {
  .au-row summary { grid-template-columns: 2.6rem 1fr; }
  .au-ico { display: none; }
  .au-who { grid-column: 2; text-align: left; }
}

/* ── ToDo-Tafel am Desktop (todo.html) ─────────────────────────────────── */
.board-switch { display: none; }
@media (min-width: 1024px) {
  .board-switch { display: inline-flex; align-items: center; gap: 3px; margin-left: auto; background: #f1f3f5; border-radius: 10px; padding: 3px; font-size: .75rem; color: var(--muted); }
  .board-switch span { padding: 0 .4rem; font-weight: 600; }
  .board-switch button { border: none; background: transparent; padding: .35rem .75rem; border-radius: 8px; font: 600 .76rem var(--font); color: var(--muted); cursor: pointer; min-height: 32px; }
  .board-switch button.on { background: #fff; color: var(--brand-text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
  .filter-bar, .toolbar { max-width: 1500px; margin-left: auto; margin-right: auto; }
  .todos-list.is-board { display: block; max-width: 1500px; margin: 0 auto; padding: 0 1.25rem 1.5rem; }
  .todo-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 1rem; align-items: start; }
  .todo-col { background: #eef1f4; border-radius: 12px; padding: .55rem; min-width: 0; }
  .todo-col-head { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; font-weight: 800; color: #4b5563; text-transform: uppercase; letter-spacing: .04em; padding: .2rem .35rem .55rem; }
  .todo-col-n { background: #fff; border-radius: 99px; padding: .05rem .5rem; font-size: .72rem; color: var(--muted); }
  .todo-col-now .todo-col-head { color: #b91c1c; }
  .todo-col-done { opacity: .85; }
  .todo-col-body { display: flex; flex-direction: column; gap: .5rem; max-height: calc(100vh - 250px); overflow-y: auto; padding-right: 2px; }
  .todo-col-empty { color: #9ca3af; text-align: center; padding: 1rem 0; font-size: .85rem; }
  .todo-board .todo-card { grid-template-columns: 1fr; padding: .6rem .7rem; gap: .35rem; }
  .todo-board .todo-title { font-size: .88rem; margin-bottom: .25rem; }
  .todo-board .todo-meta { gap: .2rem .6rem; font-size: .7rem; }
  .todo-board .todo-actions { grid-column: 1; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; }
  .todo-board .todo-actions .btn { font-size: .72rem; padding: .25rem .55rem; }
}
@media (min-width: 1024px) { .todo-board-area .todo-category { display: none; } }

/* ── Raumplan: Wochenübersicht am Desktop (index.html → renderWeek) ─────── */
@media (min-width: 1100px) {
  .content.week-mode { max-width: 1680px; padding: 1.25rem 1.25rem 2rem; }
  .rp-week { display: grid; grid-template-columns: repeat(7, minmax(165px, 1fr)); gap: .6rem; overflow-x: auto; align-items: start; padding-bottom: .5rem; }
  .rp-day { background: #eef1f4; border-radius: 12px; padding: .5rem; min-width: 0; }
  .rp-today { background: var(--brand-light); box-shadow: inset 0 0 0 2px var(--brand); }
  .rp-day-head { display: flex; align-items: baseline; gap: .4rem; padding: .15rem .3rem .5rem; font-size: .8rem; color: #374151; }
  .rp-day-head b { font-size: .88rem; }
  .rp-day-head span { color: var(--muted); }
  .rp-day-head em { margin-left: auto; font-style: normal; background: #fff; border-radius: 99px; padding: 0 .45rem; font-size: .7rem; color: var(--muted); }
  .rp-today .rp-day-head b { color: var(--brand-text); }
  .rp-day-body { display: flex; flex-direction: column; gap: .5rem; }
  .rp-day-body > * { margin: 0 !important; }
  .rp-empty { color: #9ca3af; font-size: .78rem; text-align: center; padding: .8rem 0; }
  .content.week-mode .day-nav { max-width: none; }
  /* Karten in schmalen Spalten: Kopf untereinander statt nebeneinander */
  .rp-day .room-card-header { flex-wrap: wrap; gap: .3rem .5rem; padding: .6rem .65rem; }
  .rp-day .room-info { flex: 1 1 100%; min-width: 0; order: 1; }
  .rp-day .room-color-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; height: auto; border-radius: 0; }
  .rp-day .room-card { position: relative; overflow: hidden; }
  .rp-day .room-name { font-size: .9rem; line-height: 1.2; }
  .rp-day .room-event { white-space: normal; overflow: visible; text-overflow: clip; font-size: .76rem; line-height: 1.3; margin-top: .1rem; }
  .rp-day .room-ready { font-size: .72rem; }
  .rp-day .room-meta { order: 2; margin-left: auto; }
  .rp-day .item-row { font-size: .78rem; }
}
.room-ready.now { color: var(--brand-text); }

/* Kartenkalender der FSJ-Verwaltung: Dienstzeit in einer Zeile, lesbar */
.vgc-time { font-size: .62rem; line-height: 1.15; font-weight: 600; white-space: nowrap; letter-spacing: -.01em; }
.vgc-long { display: none; }
@media (min-width: 600px) {
  .vgc-time { font-size: .74rem; }
  .vgc-long { display: inline; }
  .vgc-short { display: none; }
}

/* Stempel-Buttons: nebeneinander, Text darf am Handy zweizeilig werden */
.stamp-btn { flex: 1 1 0; min-width: 0; padding: .65rem .5rem !important; justify-content: center; text-align: center; white-space: normal; line-height: 1.2; font-size: .85rem; }
@media (max-width: 480px) { .stamp-btn { font-size: .8rem; } }

/* Kategorien für Planung: Dienst, Ausgleich, Urlaub, Seminar/Fortbildung */
.m-sem { background: #ccfbf1; color: #0f766e; }
.kind-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; }
.kind-opt { position: relative; cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: .35rem .4rem; border-radius: 9px; border: 2px solid transparent; font-size: .8rem; font-weight: 600; line-height: 1.2; }
.kind-shift span    { background: #eef2ff; color: #4338ca; }
.kind-off span      { background: #f5f3ff; color: #6d28d9; }
.kind-vacation span { background: #dbeafe; color: #1e40af; }
.kind-seminar span  { background: #ccfbf1; color: #0f766e; }
.kind-opt input:checked + span { border-color: currentColor; box-shadow: 0 0 0 3px rgba(0,0,0,.05); }
.kind-opt input:focus-visible + span { outline: 3px solid rgba(94,125,0,.45); outline-offset: 2px; }

/* Urlaubssperre (Freizeit/Aktion) */
.m-lock { box-shadow: inset 0 3px 0 #1e3a8a; }
.m-lock-l { display: inline-block; font-size: .64rem; font-weight: 700; color: #1e3a8a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.m-lock-leg { background: #eef2ff; color: #1e3a8a; }
.bl-form { display: grid; grid-template-columns: 1fr auto auto auto; gap: .4rem; }
.bl-form input { padding: .45rem .5rem; border: 1.5px solid var(--border); border-radius: 8px; font: .85rem var(--font); min-height: 38px; min-width: 0; }
@media (max-width: 560px) { .bl-form { grid-template-columns: 1fr 1fr; } .bl-form #bl-title { grid-column: 1 / -1; } .bl-form .btn { grid-column: 1 / -1; } }
.bl-row { display: grid; grid-template-columns: auto 1fr auto; gap: .6rem; align-items: center; padding: .5rem .2rem; border-bottom: 1px solid #f0f1f3; font-size: .85rem; }
.bl-lock { font-size: 1.1rem; }
.cal-lock { box-shadow: inset 0 3px 0 #1e3a8a !important; }
.fu-lock-hint { background: #eef2ff; color: #1e3a8a; border-radius: 9px; padding: .5rem .65rem; font-size: .76rem; line-height: 1.45; margin-bottom: .6rem; }

/* ── Gemeinsame Bausteine (js/ui.js) ─────────────────────────────────────
 * Paket 4: nur die Muster, die sich oft wiederholen. Bestehende Inline-Styles
 * werden nicht flächendeckend umgestellt, sondern dann, wenn eine Stelle
 * ohnehin angefasst wird.
 */

/* Meldungen (toast) – vorher nur in index.html, todo.html hatte eigene Inline-Styles */
#toast-container {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: .4rem; align-items: center;
  z-index: 9999; pointer-events: none; width: max-content; max-width: 92vw;
}
.toast {
  padding: .65rem 1.15rem; border-radius: 10px;
  font-size: .85rem; font-weight: 600; font-family: var(--font);
  opacity: 0; transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  pointer-events: auto; max-width: 360px; text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.toast { white-space: pre-line; }   /* mehrzeilige Meldungen, z. B. Excel-Import (A20) */
.toast.show { opacity: 1; transform: translateY(0); }
.toast.ok   { background: #16A34A; color: #fff; }
.toast.err  { background: #DC2626; color: #fff; }
.toast.info { background: var(--brand-strong); color: #fff; }

/* Fenster (openDialog, showConfirm, showPrompt) */
.ui-dlg-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.ui-dlg {
  background: #fff; border-radius: 14px; padding: 1.4rem;
  width: 100%; max-width: 380px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.25); font-family: var(--font); color: var(--text);
}
.ui-dlg-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .85rem; }
.ui-dlg-title { font-size: 1rem; font-weight: 700; margin: 0; }
.ui-dlg-close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 1.2rem; line-height: 1; padding: .2rem .35rem; border-radius: 6px;
}
.ui-dlg-close:hover { background: var(--bg); color: var(--text); }
.ui-dlg-msg { font-size: .9rem; margin: 0 0 1.1rem; line-height: 1.45; white-space: pre-line; }
.ui-dlg-body > .ui-input { margin-bottom: 1rem; }

/* Knopfreihe (rechtsbündig, Knöpfe mind. 44 px hoch für Finger) */
.ui-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .25rem; }
.ui-actions .btn { min-height: 44px; }
.btn-danger-solid, .btn-primary.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover, .btn-primary.btn-danger-solid:hover { background: #991B1B; border-color: #991B1B; color: #fff; }

/* Karte */
.ui-card {
  background: #fff; border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1.5px solid var(--border);
}

/* Formularfeld: graue Beschriftung über dem Eingabefeld */
.ui-field { display: block; margin-bottom: .6rem; }
.ui-label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: .2rem; }
.ui-input {
  width: 100%; box-sizing: border-box; padding: .5rem .6rem;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: var(--font); font-size: .9rem; background: #fff; color: var(--text);
}
.ui-input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(140,184,0,.15); }

/* Graue Beschriftung / Hinweistext */
.ui-muted { font-size: .78rem; color: var(--muted); }
.ui-error { color: var(--danger); font-size: .8rem; min-height: .9rem; }

/* ── Versionsangabe (Admin) ──────────────────────────────────────────── */
.version-info {
  max-width: 900px;
  margin: 1.5rem auto 5rem;
  padding: 0 1.25rem;
  font-size: .75rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.version-info b { color: var(--brand-text); font-weight: 700; }
.version-time { color: var(--muted); }

/* ── Tagesabschnitte (Paket 15, js/abschnitte.js) ── */
.seg-list { display: flex; flex-direction: column; gap: .25rem; margin: .35rem 0; }
.seg-row { border: 1px solid var(--border); border-radius: 8px; padding: .35rem .5rem; font-size: .82rem; }
.seg-row.seg-rej { opacity: .6; }
.seg-row.seg-rej .seg-span { text-decoration: line-through; }
.seg-span { font-weight: 700; }
.seg-badge { float: right; font-size: .7rem; font-weight: 700; }
.seg-note { font-size: .74rem; color: #888; margin-top: .15rem; }
.seg-actions:empty { display: none; }
.seg-actions { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.seg-actions .btn { font-size: .72rem; padding: .2rem .5rem; }
.seg-gap { font-size: .72rem; color: var(--muted); padding: 0 .5rem; }

/* Raumplan: Einstieg „Veranstaltung suchen“ unter der Sieben-Tage-Leiste (A29, Paket 16) */
.rp-search { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem .75rem;
  margin: 1rem auto .5rem; padding: .75rem 1rem; max-width: 700px; text-align: center;
  background: var(--surface, #fff); border: 1.5px dashed var(--border); border-radius: 12px; }
.rp-search span { font-size: .78rem; color: var(--muted); }
.content.week-mode .rp-search { max-width: none; }
