/* Rundschau-Kalender – Oberfläche */
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif"; font-weight: 600; font-display: swap;
  src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif"; font-weight: 700; font-display: swap;
  src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }

:root {
  --brand: #c8102e;
  --brand-dark: #1d2733;
  --bg: #f5f3ef;
  --card: #ffffff;
  --ink: #1d2733;
  --muted: #6b7480;
  --line: #e4e0d8;
  --soft: #faf8f5;
  --ok: #2e7d4f;
  --warn: #b7791f;
  --err: #b42318;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29,39,51,.06), 0 4px 16px rgba(29,39,51,.05);
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
small, .muted { color: var(--muted); }
code, .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .92em; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--brand-dark); color: #dfe4ea; padding: 22px 16px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; color: #fff; }
.brand img { max-height: 34px; max-width: 160px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700;
  font-size: 19px; color: #fff; flex: none; }
.brand-text b { display: block; font-family: var(--serif); font-size: 16px; line-height: 1.15; white-space: nowrap; }
.brand-text span { font-size: 12px; opacity: .65; }
.nav a { display: flex; align-items: center; gap: 11px; color: #c9d1da; padding: 9px 10px;
  border-radius: 9px; font-weight: 500; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .45;
  padding: 16px 10px 6px; }
.side-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px;
  font-size: 13px; }
.side-foot .who { display: flex; align-items: center; gap: 10px; padding: 0 8px 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.12);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; color: #fff; flex: none; }
.side-foot button { background: none; border: 0; color: #c9d1da; cursor: pointer; padding: 6px 8px;
  font: inherit; }
.side-foot button:hover { color: #fff; }
.main { padding: 30px 36px 60px; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; flex-wrap: wrap; }
.page-head .kicker { font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--brand); margin-bottom: 6px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }

/* ---------- Karten & Raster ---------- */
.grid { display: grid; gap: 20px; }
.g-dash { grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px 22px; }
.card > h2, .card > h3 { margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 14px; }
.stack > * + * { margin-top: 20px; }

/* ---------- Dashboard ---------- */
.hero { background: var(--brand-dark); color: #fff; border-radius: var(--radius);
  padding: 26px 28px; position: relative; overflow: hidden; margin-bottom: 20px; }
.hero::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px;
  height: 260px; border-radius: 50%; background: var(--brand); opacity: .9; }
.hero::before { content: ""; position: absolute; right: 120px; bottom: -90px; width: 180px;
  height: 180px; border-radius: 50%; border: 28px solid rgba(255,255,255,.06); }
.hero > * { position: relative; z-index: 1; }
.hero .date { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; opacity: .7; }
.hero h1 { font-size: 34px; margin: 6px 0 10px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 16px; }
.hero-stats div { min-width: 110px; }
.hero-stats b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.hero-stats span { font-size: 13px; opacity: .7; }
.tag-holiday { display: inline-block; background: rgba(255,255,255,.14); padding: 3px 10px;
  border-radius: 99px; font-size: 13px; }

.agenda-day { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 12px 0;
  border-top: 1px solid var(--line); }
.agenda-day:first-of-type { border-top: 0; padding-top: 0; }
.agenda-day .d b { display: block; font-family: var(--serif); font-size: 16px; }
.agenda-day .d span { font-size: 13px; color: var(--muted); }
.agenda-day.is-today .d b { color: var(--brand); }
.ev { display: flex; gap: 10px; align-items: baseline; padding: 5px 0; }
.ev .t { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; width: 86px; flex: none; }
.ev .dot { width: 9px; height: 9px; border-radius: 3px; flex: none; transform: translateY(1px); }
.ev .title { font-weight: 550; }
.ev .loc { color: var(--muted); font-size: 13px; }
.empty-day { color: #a0a7b0; font-size: 14px; padding: 5px 0; }
.hol { display: inline-block; font-size: 12px; background: #e9f3ec; color: var(--ok);
  border-radius: 99px; padding: 1px 8px; margin-left: 6px; font-weight: 600; }

.people { display: flex; flex-direction: column; gap: 10px; }
.person { display: flex; align-items: center; gap: 11px; }
.person .avatar { background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.person .meta { font-size: 13px; color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600;
  border-radius: 99px; padding: 2px 9px; background: var(--soft); border: 1px solid var(--line); }
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fact { display: flex; gap: 14px; align-items: center; }
.fact-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  flex: none; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.fact b { display: block; }
.fact span { font-size: 13px; color: var(--muted); }
.cta { background: linear-gradient(135deg, #fff 0%, #fff5f6 100%); border-color: #f2c9cf; }

/* ---------- Formulare ---------- */
label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 5px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=password], input[type=email], input[type=date],
input[type=datetime-local], input[type=number], input[type=time], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d6d1c7;
  border-radius: 9px; padding: 9px 11px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
input[type=color] { width: 44px; height: 38px; padding: 2px; border: 1px solid #d6d1c7;
  border-radius: 9px; background: #fff; cursor: pointer; }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px;
  margin: 0 0 8px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit;
  font-weight: 600; font-size: 14px; border-radius: 9px; padding: 9px 16px; cursor: pointer;
  border: 1px solid transparent; background: var(--brand); color: #fff; text-decoration: none;
  transition: filter .15s, background .15s; white-space: nowrap; }
.btn:hover { filter: brightness(.94); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--ink); border-color: #d6d1c7; }
.btn.secondary:hover { background: var(--soft); filter: none; }
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; padding: 6px 10px; }
.btn.ghost:hover { color: var(--ink); background: var(--soft); }
.btn.danger { background: #fff; color: var(--err); border-color: #f0c8c4; }
.btn.danger:hover { background: #fdf1f0; filter: none; }
.btn.small { padding: 5px 11px; font-size: 13px; }
.btn.big { padding: 12px 22px; font-size: 15px; }
.btn svg { width: 16px; height: 16px; }
.inline { display: inline; }

.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; font-weight: 500;
  border: 1px solid; display: flex; gap: 10px; align-items: flex-start; }
.flash.ok { background: #edf7f0; border-color: #c4e3cf; color: #1e5b39; }
.flash.warn { background: #fdf6e7; border-color: #f0dcae; color: #7a5212; }
.flash.error { background: #fdf1f0; border-color: #f0c8c4; color: #8c1d14; }

/* ---------- Tabellen ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.inactive td { opacity: .5; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; border-radius: 6px;
  padding: 2px 7px; background: var(--soft); border: 1px solid var(--line); margin: 1px 2px 1px 0; }
.badge.admin { background: #fde8eb; border-color: #f4c2ca; color: #9d0d24; }
.badge.urlaub { background: #e8f1fb; border-color: #c4dbf3; color: #1d5b94; }
.badge.redaktion { background: #fdf3e2; border-color: #f1d9ad; color: #8a5a07; }
.badge.ok { background: #edf7f0; border-color: #c4e3cf; color: #1e5b39; }
.badge.off { background: #f1f1f1; color: #777; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; }

/* ---------- Abwesenheitsplaner ---------- */
.planner-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; box-shadow: var(--shadow); }
table.planner { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.planner th, .planner td { border-bottom: 1px solid #efebe4; }
.planner th.name, .planner td.name { position: sticky; left: 0; background: #fff; z-index: 2;
  text-align: left; padding: 7px 14px; min-width: 190px; font-size: 13.5px; font-weight: 550;
  border-right: 1px solid var(--line); }
.planner thead th { background: #fff; font-weight: 600; padding: 6px 0; text-align: center;
  color: var(--muted); }
.planner thead th.day { width: 30px; min-width: 30px; }
.planner thead th.day b { display: block; font-size: 13px; color: var(--ink); }
.planner th.we, .planner td.we { background: #f6f3ee; }
.planner th.hd, .planner td.hd { background: #e9f3ec; }
.planner th.today b { background: var(--brand); color: #fff; border-radius: 6px; padding: 0 4px; }
.planner tr.school td.cell { padding: 0; height: 6px; }
.planner tr.school td.on { background: #f3c46b; }
.planner td.cell { padding: 3px 1px; text-align: center; }
.planner .blk { height: 22px; border-radius: 5px; display: block; color: #fff; font-size: 10.5px;
  font-weight: 700; line-height: 22px; overflow: hidden; }
.planner .blk.half { background-image: linear-gradient(135deg, rgba(255,255,255,.45) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.45) 50%, rgba(255,255,255,.45) 75%, transparent 75%); background-size: 8px 8px; }
.planner td.cell.can:hover { background: #fff5f6; cursor: pointer; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Dialog ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, 94vw);
  box-shadow: 0 20px 60px rgba(29,39,51,.3); color: var(--ink); }
dialog::backdrop { background: rgba(29,39,51,.45); backdrop-filter: blur(2px); }
.dlg-head { padding: 18px 22px 0; display: flex; justify-content: space-between; align-items: center; }
.dlg-body { padding: 16px 22px; }
.dlg-foot { padding: 14px 22px 18px; display: flex; gap: 10px; justify-content: flex-end;
  border-top: 1px solid var(--line); background: var(--soft); }
.dlg-foot .left { margin-right: auto; }

/* ---------- Kalender (FullCalendar) ---------- */
.cal-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; align-items: start; }
.cal-side .card { padding: 16px; }
.cal-toggle { display: flex; align-items: center; gap: 9px; padding: 6px 4px; cursor: pointer;
  font-size: 14px; border-radius: 7px; }
.cal-toggle:hover { background: var(--soft); }
.cal-toggle input { display: none; }
.cal-toggle .box { width: 16px; height: 16px; border-radius: 5px; border: 2px solid; flex: none;
  display: grid; place-items: center; }
.cal-toggle input:checked + .box { background: currentColor; }
.cal-toggle input:checked + .box::after { content: ""; width: 4px; height: 8px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.cal-toggle .ro { margin-left: auto; font-size: 11px; color: var(--muted); }
#calendar { background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); }
.fc { --fc-border-color: #ebe7df; --fc-today-bg-color: #fff5f6; --fc-page-bg-color: #fff;
  --fc-neutral-bg-color: #f6f3ee; --fc-button-bg-color: #fff; --fc-button-border-color: #d6d1c7;
  --fc-button-text-color: var(--ink); --fc-button-hover-bg-color: var(--soft);
  --fc-button-hover-border-color: #c9c3b8; --fc-button-active-bg-color: var(--brand-dark);
  --fc-button-active-border-color: var(--brand-dark); --fc-event-border-color: transparent;
  font-size: 13.5px; }
.fc .fc-toolbar-title { font-family: var(--serif); font-size: 22px; }
.fc .fc-button { font-weight: 600; border-radius: 8px !important; padding: 6px 12px;
  box-shadow: none !important; text-transform: none; }
.fc .fc-button-primary:not(:disabled).fc-button-active { color: #fff; }
.fc .fc-button-group { gap: 4px; }
.fc .fc-col-header-cell-cushion { color: var(--muted); font-weight: 600; text-transform: uppercase;
  font-size: 12px; letter-spacing: .05em; padding: 8px 4px; }
.fc .fc-daygrid-day-number { color: var(--ink); font-weight: 500; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--brand); color: #fff; border-radius: 7px;
  margin: 3px; padding: 1px 7px; }
.fc-event { border-radius: 5px !important; padding: 1px 3px; cursor: pointer; }
.fc-h-event .fc-event-title { font-weight: 600; }
.fc .fc-list-event:hover td { background: var(--soft); }
.fc .fc-timegrid-now-indicator-line { border-color: var(--brand); border-width: 2px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art { background: var(--brand-dark); color: #fff; padding: 48px; position: relative;
  overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: var(--brand); right: -140px; bottom: -120px; }
.auth-art > * { position: relative; z-index: 1; }
.auth-art h1 { font-size: 44px; max-width: 420px; }
.auth-art p { opacity: .7; max-width: 380px; font-size: 16px; }
.auth-form { display: grid; place-items: center; padding: 40px; }
.auth-form .box { width: min(380px, 100%); }
.auth-form h2 { font-size: 28px; margin-bottom: 6px; }
.auth-form .lead { color: var(--muted); margin: 0 0 24px; }
.code-input { font-size: 26px !important; letter-spacing: .4em; text-align: center;
  font-variant-numeric: tabular-nums; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px;
  display: inline-block; }
.qr svg { display: block; width: 190px; height: 190px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 14px 38px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -1px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--brand-dark); color: #fff; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; }

.token { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 22px; letter-spacing: .06em;
  background: var(--soft); border: 1px dashed #cfc8bb; border-radius: 10px; padding: 12px 16px;
  display: inline-block; user-select: all; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-all; }

.sheet { border: 2px solid var(--brand-dark); border-radius: 14px; padding: 24px; background: #fff; }

@media (max-width: 1100px) {
  .g-dash, .g-3 { grid-template-columns: 1fr; }
  .cal-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 10px 14px; gap: 6px; }
  .brand { border: 0; padding: 0; margin: 0 10px 0 0; }
  .brand-text span, .nav-label, .side-foot .who { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 7px 9px; font-size: 13px; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 20px 16px 40px; }
  .g-2 { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .hero h1 { font-size: 27px; }
}
@media print {
  .side, .no-print, .flash { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions select { width: auto; }
.checks { display: flex; flex-wrap: wrap; gap: 2px 18px; }
@media (max-width: 820px) {
  .agenda-day { grid-template-columns: 64px 1fr; gap: 10px; }
  .ev .t { width: 70px; }
  .page-head h1 { font-size: 25px; }
}
