/* DAScampus – Gestaltung
   Idee: Schreibtinte und Stundenplan. Königsblaue Tinte als Markenfarbe, eine kühle helle Fläche,
   Stundennummern als große Ziffern an einer Zeitleiste, Vertretungen gelb wie auf dem
   ausgehängten Vertretungsplan. Schriften liegen auf dem eigenen Server (keine Google-Anfragen, DSGVO).
   Keine Build-Pipeline nötig – die Datei wird so hochgeladen. */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-ext-standard-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Bricolage Grotesque"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "Atkinson Hyperlegible Next"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Ziffern: Atkinson zeichnet die Null mit Schrägstrich – für Daten und Uhrzeiten wirkt das technisch,
   deshalb kommen 0–9 im Fließtext aus der Bricolage. */
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); unicode-range: U+0030-0039; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/bricolage-grotesque-latin-standard-normal.woff2") format("woff2"); unicode-range: U+0030-0039; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "DAS Text"; font-style: normal; font-display: swap; font-weight: 400;
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: "DAS Text"; font-style: normal; font-display: swap; font-weight: 700;
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ground: #eef2f8;      /* Fläche */
  --surface: #ffffff;     /* Papier */
  --sunken: #f5f7fb;
  --ink: #141c2f;         /* Text */
  --muted: #586379;
  --line: #d8dfeb;
  --line-strong: #b9c4d8;
  --brand: #2445b8;       /* Königsblaue Tinte */
  --brand-deep: #142a6b;  /* Kopfzeile */
  --brand-ink: #ffffff;
  --accent: #e3e9fb;      /* Tinte, stark verdünnt */
  --marker: #ffe45c;      /* Textmarker – Vertretungen */
  --marker-ink: #3d3200;
  --ok: #1c7c52; --warn: #8f5b00; --bad: #c8352a;
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  --head: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --body: "DAS Text", "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 0 rgba(20, 42, 107, .06);
  --lift: 0 6px 22px -10px rgba(20, 42, 107, .35);
  color-scheme: light;
  /* ältere Namen, die einzelne Seiten noch verwenden */
  --bg: var(--ground); --radius: var(--r-lg);
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0f1524; --surface: #182035; --sunken: #141b2d; --ink: #e7ebf5; --muted: #9ba6bd; --line: #2a3550; --line-strong: #3a4766;
    --brand: #8fa8ff; --brand-deep: #0b1638; --brand-ink: #0c1530; --accent: #22305a;
    --marker: #f2d44a; --marker-ink: #2b2300; --ok: #5fcf98; --warn: #e8b552; --bad: #ff8a7d;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3); --lift: 0 8px 26px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--body); background: var(--ground); color: var(--ink); }
a { color: var(--brand); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 20px; font-weight: 650; margin: 28px 0 12px; }
h3 { font-size: 16px; font-weight: 650; margin: 22px 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.big { font-family: var(--head); font-size: 32px; font-weight: 700; }
svg { flex: 0 0 auto; }

/* --- Kopfzeile ----------------------------------------------------------------- */
header.top { background: var(--brand-deep); color: #fff; position: sticky; top: 0; z-index: 20; }
header.top .bar { max-width: 1180px; margin: 0 auto; padding: 8px 20px; display: flex; gap: 14px; align-items: center; min-height: 58px; }
header.top a, header.top select, header.top button { color: inherit; }
.brand { text-decoration: none; display: flex; align-items: center; }
.wm { font-family: var(--head); font-size: 21px; font-weight: 400; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.wm b { font-weight: 800; letter-spacing: -.01em; }
header.top .wm b { color: #fff; }
header.top .wm { color: #b8c6f5; }
header.top .school { color: #b8c6f5; font-size: 13.5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.18); }
header.top form select { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--r-sm); padding: 4px 8px; font: inherit; font-size: 14px; }
header.top .spacer { flex: 1; }
.mainnav { display: flex; gap: 2px; margin-left: 6px; }
.mainnav a { text-decoration: none; color: #d5ddf7; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 15px; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; }
.mainnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mainnav a.active { background: #fff; color: var(--brand-deep); }
.nbadge { background: var(--marker); color: var(--marker-ink); border-radius: 999px; font-size: 12px; padding: 0 7px; line-height: 19px; font-weight: 700; }
.nbadge[hidden] { display: none; }
.lang { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; color: #b8c6f5; }
.lang svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.lang select { width: auto; background: transparent; border: 0; padding: 4px 2px; font: inherit; font-size: 14px; color: #fff; cursor: pointer; }
.lang select option { color: #141c2f; }
.me { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 3px 10px 3px 3px; border-radius: 999px; max-width: 220px; }
.me:hover { background: rgba(255,255,255,.08); }
.me-ava { width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--brand-deep); display: grid; place-items: center; font: 700 13px/1 var(--head); flex: 0 0 auto; }
.me-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { background: none; border: 0; padding: 7px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; color: #d5ddf7; }
.icon-btn:hover { background: rgba(255,255,255,.1); color: #fff; }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 1100px) { header.top .school, .me-name { display: none; } .me { padding-right: 3px; } }
@media (max-width: 760px) {
  header.top { position: static; }
  header.top .bar { flex-wrap: wrap; padding: 8px 12px 0; gap: 8px; }
  .mainnav { order: 10; width: calc(100% + 24px); margin: 4px -12px 0; padding: 6px 12px 10px; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
}

main { max-width: 1180px; margin: 0 auto; padding: 30px 20px 72px; }
@media (max-width: 760px) { main { padding: 20px 14px 56px; } }

/* --- Bausteine ------------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.grid2 > .card, .grid3 > .card { margin-bottom: 0; }
.grid2 + .grid2, .grid2 + .card, .card + .grid2 { margin-top: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1 1 180px; }
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi .card { margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 13px; color: var(--muted); font-weight: 700; background: var(--sunken); }
thead th:first-child { border-top-left-radius: var(--r-sm); } thead th:last-child { border-top-right-radius: var(--r-sm); }
tbody tr:hover td { background: color-mix(in srgb, var(--accent) 45%, transparent); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: center; font-family: var(--head); font-variant-numeric: tabular-nums; }
td.excluded { color: var(--muted); }
td.selected { font-weight: 700; }
.table-wrap { overflow-x: auto; }

label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 5px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=file] { font: inherit; font-size: 14px; padding: 10px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); width: 100%; background: var(--sunken); }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 17px; height: 17px; }
input.grade { width: 4.4em; text-align: center; padding: 7px; }
textarea { min-height: 220px; line-height: 1.5; }
.checks label, label.checks { font-weight: 400; display: flex; gap: 9px; align-items: center; margin: 8px 0; }

.btn { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-weight: 700; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 999px; padding: 10px 20px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { background: color-mix(in srgb, var(--brand) 86%, #000); }
.btn.secondary { background: var(--surface); color: var(--brand); border-color: var(--line-strong); }
.btn.secondary:hover { border-color: var(--brand); background: var(--accent); }
.btn.small { padding: 6px 13px; font-size: 14px; }
button.link { background: none; border: 0; font: inherit; cursor: pointer; color: var(--brand); padding: 0; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.linkbtn:hover { color: var(--brand); text-decoration: underline; }

.flash { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--r-md); padding: 11px 16px; margin-bottom: 20px; box-shadow: var(--shadow); }
.flash.errors, .errors { color: var(--bad); }
.flash.errors { border-left-color: var(--bad); }
.notice { border-left: 4px solid var(--warn); background: var(--surface); padding: 11px 16px; border-radius: var(--r-sm); margin: 12px 0; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: var(--sunken); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: transparent; }
.pill.warn { color: var(--marker-ink); background: var(--marker); border-color: transparent; }
.pill.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: transparent; }
.pill.active { background: var(--accent); color: var(--brand); border-color: transparent; }
.chip { display: inline-block; font: 700 13px/1 var(--body); padding: 5px 10px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); vertical-align: 2px; margin-left: 6px; }
.letter-body { white-space: pre-wrap; }
.back { margin: 0 0 10px; }
.back a { text-decoration: none; font-weight: 700; }

/* --- Anmeldung ------------------------------------------------------------------ */
.login-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: center; max-width: 900px; margin: 6vh auto 0; }
.login { margin: 0; padding: 28px; }
.login h1 { font-size: 28px; }
.login .btn { width: 100%; justify-content: center; margin-top: 8px; }
.login-brand { color: var(--brand-deep); }
.wm.big { font-size: clamp(44px, 7vw, 76px); color: var(--brand); display: block; margin-bottom: 26px; }
.wm.big b { color: var(--brand-deep); }
.login-plan { display: grid; gap: 7px; max-width: 320px; }
.lp-row { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; }
.lp-row b { font: 700 22px/1 var(--head); color: var(--muted); text-align: right; }
.lp-row span { display: block; border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 11%, var(--surface)); border-radius: var(--r-sm); padding: 6px 12px; font-weight: 700; color: var(--ink); }
.lp-row i { display: block; height: 32px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-sm); }
@media (prefers-color-scheme: dark) { .login-brand, .wm.big b { color: #fff; } }
@media (max-width: 760px) { .login-wrap { grid-template-columns: 1fr; gap: 16px; margin-top: 2vh; } .login-plan { display: none; } .wm.big { margin: 0; } }

/* --- Startseite ------------------------------------------------------------------ */
.hello { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 22px; }
.hello h1 { margin: 0; }
.today-line { margin: 0; color: var(--muted); font-size: 17px; }
.home.has-plan { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr); gap: 22px; align-items: start; }
.home.has-plan.multi { grid-template-columns: 1fr; }
.home.has-plan:not(.multi) .tiles { grid-template-columns: 1fr; gap: 8px; }
@media (max-width: 900px) { .home.has-plan { grid-template-columns: 1fr; } .home.has-plan:not(.multi) .tiles { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { position: relative; display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--brand); box-shadow: var(--lift); }
.t-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.tile svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.t-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.t-title { font-weight: 700; line-height: 1.3; }
.t-text { color: var(--muted); font-size: 14px; line-height: 1.35; }
.tile.accent { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.tile.accent .t-icon { background: rgba(255,255,255,.16); color: inherit; }
.tile.accent .t-text { color: inherit; opacity: .85; }
.badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--marker); color: var(--marker-ink); font: 700 14px/26px var(--head); text-align: center; flex: 0 0 auto; }

/* --- Stundenplan ------------------------------------------------------------------ */
.tt-toolbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-bottom: 18px; }
.tt-toolbar h1 { margin: 0; display: flex; align-items: center; gap: 4px; }
.tt-for select { width: auto; min-width: 230px; font-weight: 700; border-radius: 999px; padding: 8px 14px; }
.tt-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.tt-nav .btn.small { padding: 7px 13px; }
.tt-seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.tt-seg a { padding: 4px 13px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--muted); border-radius: 999px; }
.tt-seg a.active { background: var(--brand); color: var(--brand-ink); }
.tt-weektype { display: inline-block; margin-left: 10px; padding: 5px 10px; border-radius: 999px; font: 700 13px/1 var(--body); background: var(--brand); color: var(--brand-ink); vertical-align: middle; }
.tt-date { margin: 4px 0 14px; font-size: 21px; }

/* Zeitleiste: große Stundenziffern links, verbunden durch eine feine Linie */
.tt-day { display: flex; flex-direction: column; gap: 8px; position: relative; }
.tt-row { display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: stretch; position: relative; }
.tt-time { display: flex; flex-direction: column; align-items: flex-end; padding: 2px 14px 0 0; border-right: 2px solid var(--line); line-height: 1.25; font: 500 13px/1.25 var(--head); font-variant-numeric: tabular-nums; color: var(--muted); position: relative; }
.tt-time strong { font: 700 28px/1 var(--head); color: var(--ink); letter-spacing: -.02em; margin-bottom: 3px; }
.tt-row.free .tt-time strong { color: var(--line-strong); }
.tt-row.free .tt-slot { border: 1.5px dashed var(--line); border-radius: var(--r-md); min-height: 34px; }
.tt-row.now .tt-time { border-right-color: var(--brand); }
.tt-row.now .tt-time strong { color: var(--brand); }
.tt-row.now .tt-time::after { content: ""; position: absolute; right: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.tt-row.now .tt-card { box-shadow: var(--lift); }
.tt-slot { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tt-card { --c: var(--brand); border-left: 6px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-radius: var(--r-md); padding: 10px 14px; }
.tt-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tt-subj { font: 700 18px/1.25 var(--head); }
.tt-meta { display: flex; flex-wrap: wrap; gap: 3px 16px; font-size: 14px; color: var(--muted); margin-top: 2px; }
.tt-room { display: inline-flex; align-items: center; gap: 4px; }
.tt-card svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tt-badge { font-size: 12.5px; font-weight: 700; border-radius: 4px; padding: 1px 8px; white-space: nowrap; }
.tt-badge.bad { background: var(--bad); color: #fff; }
/* Vertretung: wie mit dem Textmarker angestrichen */
.tt-badge.warn { background: var(--marker); color: var(--marker-ink); transform: rotate(-1.5deg); border-radius: 3px 6px 4px 7px; }
.tt-substitute, .tt-changed { background: color-mix(in srgb, var(--marker) 16%, var(--surface)); }
.tt-cancelled { background: var(--sunken); border-left-color: var(--line-strong); }
.tt-cancelled .tt-subj, .tt-cancelled .tt-meta { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.tt-covered { opacity: .62; }
.tt-note { font-size: 13.5px; margin-top: 5px; color: var(--muted); }
.tt-topic, .tt-hw { display: flex; gap: 7px; align-items: flex-start; font-size: 14px; margin-top: 7px; line-height: 1.4; }
.tt-topic svg, .tt-hw svg { margin-top: 2px; color: var(--c); }
.tt-hw { background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 25%, var(--line)); border-radius: var(--r-sm); padding: 6px 9px; }
.tt-rec { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 13.5px; font-weight: 700; text-decoration: none; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.tt-rec:hover { border-color: var(--brand); }
.tt-rec.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.tt-empty { padding: 10px 0; }
.tt-holiday { padding: 18px; border-radius: var(--r-md); background: color-mix(in srgb, var(--marker) 35%, var(--surface)); color: var(--marker-ink); font-weight: 700; margin: 0; }
@media (prefers-color-scheme: dark) { .tt-holiday { color: var(--ink); } }

.tt-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tt-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; min-width: 0; }
.tt-col.today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.tt-colhead { font: 700 16px/1.2 var(--head); margin: 2px 2px 10px; }
.tt-col .tt-row { grid-template-columns: 24px 1fr; gap: 8px; }
.tt-col .tt-time { border-right: 0; padding: 4px 0 0; align-items: center; }
.tt-col .tt-time strong { font-size: 17px; }
.tt-col .tt-card { padding: 8px 10px; }
.tt-col .tt-subj { font-size: 15.5px; }
.tt-col .tt-meta { font-size: 13px; gap: 0 10px; }
.tt-col .tt-rec { font-size: 12.5px; padding: 2px 8px 2px 6px; }
.tt-day.compact .tt-time span { display: none; }
.tt-day.compact .tt-time span:first-of-type { display: block; }
.tt-col .tt-day.compact .tt-time span { display: none; }
@media (max-width: 900px) { .tt-week { grid-template-columns: 1fr; } }

.tt-home { display: grid; gap: 18px; }
.tt-home.multi { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.tt-homecard { margin: 0; padding: 20px 20px 16px; }
.tt-homehead, .tt-homefoot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tt-homehead { margin-bottom: 14px; }
.tt-homehead a { text-decoration: none; color: var(--ink); }
.tt-hometitle { font: 700 22px/1.2 var(--head); }
.tt-homefoot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14.5px; font-weight: 700; }
.tt-homefoot a { text-decoration: none; }
.tt-homecard .tt-row { grid-template-columns: 62px 1fr; }
.tt-row-cancel td { color: var(--muted); }
@media (max-width: 560px) {
  .tt-row, .tt-homecard .tt-row { grid-template-columns: 48px 1fr; gap: 10px; }
  .tt-time { padding-right: 10px; }
  .tt-time strong { font-size: 23px; }
  .tt-homecard { padding: 16px 14px 12px; }
}

/* Klassenbuch: Anwesenheit als Umschalter */
.att td { vertical-align: middle; }
.att-opts { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px; background: var(--sunken); }
.seg label { margin: 0; font-weight: 700; font-size: 13.5px; position: relative; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: block; padding: 4px 11px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 50%, transparent); }
.seg .s-present input:checked + span { background: var(--surface); color: var(--ok); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.seg .s-absent input:checked + span { background: var(--bad); color: #fff; }
.seg .s-late input:checked + span { background: var(--marker); color: var(--marker-ink); }
.att-opts input.mins { width: 5em; }
.att-opts:not(:has(.s-late input:checked)) input.mins { display: none; }
.att td:first-child { padding-top: 12px; padding-bottom: 12px; }
.att tr:has(.s-absent input:checked) td:first-child { color: var(--bad); font-weight: 700; }
.savebar { position: sticky; bottom: 16px; margin-top: 18px; z-index: 5; }
.savebar .btn { box-shadow: var(--lift); padding: 12px 24px; }
@media (max-width: 560px) { .att td { display: block; border: 0; padding: 4px 0; } .att tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; } .att-opts { justify-content: flex-start; } }

/* Untis-Import */
.weeks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.week-cell { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; background: var(--surface); }
.week-cell.current { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.week-cell.holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--sunken) 7px 14px); }
.week-cell select { margin-top: 6px; padding: 5px 8px; font-size: 14px; }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.cred code { font-size: 1.05rem; font-weight: 700; color: var(--brand-deep); }
@media print {
  body { background: #fff; }
  .no-print, header, .mainnav, footer, .flash { display: none !important; }
  .cred { break-inside: avoid; border: 1px dashed #999; box-shadow: none; }
}

/* --- Teams / Chat (zweispaltig wie Teams) -------------------------------------------- */
main.wide { max-width: none; padding: 0; }
body.wide { height: 100vh; display: flex; flex-direction: column; }
body.wide > main { flex: 1; min-height: 0; max-width: none; padding: 0; width: 100%; }
.collab { display: grid; grid-template-columns: 290px 1fr; height: 100%; min-height: 0; }
.c-side { border-right: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding-bottom: 24px; }
.c-side-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 14px 10px; gap: 8px; }
.c-side-head h1, .c-side-head h2 { font-size: 22px; margin: 0; }
.c-team summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px; cursor: pointer; font-weight: 700; }
.c-team summary:hover { background: var(--sunken); }
.c-team summary::-webkit-details-marker { display: none; }
.c-tname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-chan { display: flex; justify-content: space-between; padding: 6px 14px 6px 56px; text-decoration: none; color: var(--muted); font-size: 14.5px; }
.c-chan:hover { background: var(--sunken); }
.c-chan.active { background: var(--accent); color: var(--brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
.c-chan.unread { color: var(--ink); font-weight: 700; }
.c-ava { width: 32px; height: 32px; border-radius: 9px; color: #fff; display: inline-grid; place-items: center; font: 700 13px/1 var(--head); flex: 0 0 auto; }
.c-ava.big { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; }
.c-ava.sm { width: 26px; height: 26px; border-radius: 50%; font-size: 11px; vertical-align: middle; }
.c-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--ground); }
.c-main.c-scroll { overflow-y: auto; }
.c-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-title { display: flex; gap: 12px; align-items: center; }
.c-tname-big { font: 700 19px/1.2 var(--head); }
.c-tabs { display: flex; gap: 4px; }
.c-tabs a { text-decoration: none; color: var(--muted); padding: 8px 10px; border-bottom: 3px solid transparent; font-weight: 700; font-size: 14.5px; }
.c-tabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.c-chanbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 10px 20px; }
.c-chanbar .pill { text-decoration: none; cursor: pointer; font-size: 13.5px; padding: 3px 11px; }
.c-inline { position: relative; }
.c-inline summary { list-style: none; }
.c-inline summary::-webkit-details-marker { display: none; }
.c-inline[open] form, .c-pop { position: absolute; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; min-width: 280px; box-shadow: var(--lift); }
.c-inline.right .c-pop { right: 0; }
.c-pop form { position: static; border: 0; box-shadow: none; padding: 0; margin-bottom: 8px; min-width: 0; }
.c-feed { flex: 1; overflow-y: auto; padding: 8px 20px 18px; }
.c-empty { text-align: center; margin-top: 10vh; }
.c-post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin: 14px 0; box-shadow: var(--shadow); max-width: 900px; }
.c-post-main { display: flex; gap: 12px; padding: 14px 16px 10px; }
.c-body { flex: 1; min-width: 0; }
.c-meta { font-size: 14px; margin-bottom: 2px; }
.c-text { overflow-wrap: anywhere; }
.c-actions { display: inline-flex; gap: 14px; margin-top: 4px; }
.c-translation { margin-top: 8px; padding: 7px 11px; border-left: 3px solid var(--brand); background: var(--accent); border-radius: var(--r-sm); font-size: 15px; }
.c-replies { border-top: 1px solid var(--line); background: var(--sunken); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.c-replies:empty { display: none; }
.c-reply { display: flex; gap: 10px; padding: 10px 16px 8px 60px; }
.c-replyform { padding: 6px 16px 12px 60px; }
.c-replyform summary { cursor: pointer; color: var(--brand); font-size: 14px; font-weight: 700; list-style: none; }
.c-compose textarea { min-height: 0; resize: vertical; }
.c-compose-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.c-compose-main { padding: 12px 20px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.c-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.c-files img { max-width: 260px; max-height: 200px; border-radius: var(--r-md); border: 1px solid var(--line); }
.c-file { display: inline-block; padding: 6px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; font-size: 14px; background: var(--sunken); }
.c-pad { padding: 18px 20px; }
.c-cand { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.c-conv { display: flex; gap: 10px; align-items: center; padding: 10px 14px; text-decoration: none; color: var(--ink); }
.c-conv:hover { background: var(--sunken); }
.c-conv.active { background: var(--accent); box-shadow: inset 3px 0 0 var(--brand); }
.c-conv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.c-conv-text > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-msg { display: flex; gap: 8px; margin: 10px 0; align-items: flex-end; }
.c-msg.mine { justify-content: flex-end; }
.c-bubble { max-width: min(640px, 80%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px 16px 16px 4px; padding: 8px 13px; }
.c-msg.mine .c-bubble { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-radius: 16px 16px 4px 16px; }
.c-msg.mine .c-bubble a, .c-msg.mine .c-bubble .muted, .c-msg.mine .c-bubble .linkbtn { color: inherit; opacity: .85; }
.c-msg.mine .c-translation { background: rgba(255,255,255,.14); border-left-color: rgba(255,255,255,.6); }
.c-people { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 10px; }
@media (max-width: 760px) {
  body.wide { height: auto; display: block; }
  .collab { grid-template-columns: 1fr; height: auto; }
  .c-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 40vh; }
  .c-feed { max-height: 60vh; }
  .c-reply, .c-replyform { padding-left: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .tile, .btn, .tt-rec, .seg span { transition: background-color .12s ease, border-color .12s ease, box-shadow .15s ease, color .12s ease; }
}

/* --- v0.6: Glocke, Kalender, Prüfungsplan, Notenbuch, Einträge -------------------- */
.bell { position: relative; }
.bell .nbadge { position: absolute; top: -2px; right: -4px; font-size: 11px; line-height: 16px; padding: 0 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.chips label { margin: 0; padding: 4px 10px 4px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 14px; }
.chips label:has(input:checked) { border-color: var(--brand); background: var(--accent); color: var(--brand); font-weight: 700; }
.inline-form { display: inline; }
details > summary.linkbtn { list-style: none; cursor: pointer; display: inline-block; margin: 2px 0; font-weight: 700; color: var(--brand); }
details > summary.linkbtn::-webkit-details-marker { display: none; }
details.card > summary { font-size: 15px; }
details[open] > summary.linkbtn { margin-bottom: 8px; }
.decide { margin-top: 6px; display: grid; gap: 6px; max-width: 420px; }
.decide .row > * { flex: 1 1 140px; }
.notice-list { padding: 6px; }
.notice-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); text-decoration: none; color: var(--ink); }
.notice-item:hover { background: var(--sunken); }
.notice-item.unread { box-shadow: inset 3px 0 0 var(--brand); background: color-mix(in srgb, var(--accent) 50%, transparent); }
.home-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; margin-top: 22px; align-items: start; }
.home-more .card { margin: 0; }
.news-item { padding: 10px 0; border-top: 1px solid var(--line); }
.news-item:first-of-type { border-top: 0; padding-top: 0; }
.news-item p { margin: 4px 0 0; }
.cal-list { padding: 8px 16px; }
.cal-list.compact { padding: 0; }
.cal-item { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.cal-item:first-child { border-top: 0; }
.cal-item form { margin-left: auto; }
.cal-date { flex: 0 0 46px; text-align: center; display: flex; flex-direction: column; line-height: 1.1; }
.cal-date strong { font: 700 22px/1 var(--head); }
.cal-date span { font-size: 12.5px; color: var(--muted); text-transform: none; }
.cal-body { min-width: 0; }
.cal-exam .cal-date strong { color: var(--bad); }
.cal-holiday .cal-body strong { color: var(--marker-ink); background: var(--marker); padding: 0 6px; border-radius: 4px; }
.exam-weeks { display: grid; gap: 14px; }
.exam-week { display: grid; grid-template-columns: 90px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.exam-weekhead { font: 700 14px/1.2 var(--head); color: var(--muted); padding-top: 6px; }
.exam-day { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 8px; min-height: 64px; background: var(--surface); }
.exam-day.today { border-color: var(--brand); box-shadow: inset 0 3px 0 var(--brand); }
.exam-day.holiday { background: repeating-linear-gradient(135deg, var(--surface) 0 7px, var(--sunken) 7px 14px); }
.exam-date { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.exam-item { --c: var(--brand); margin-top: 6px; padding: 5px 8px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); border-radius: 6px; display: flex; flex-direction: column; font-size: 13.5px; }
.exam-item.major { background: color-mix(in srgb, var(--c) 16%, var(--surface)); }
.exam-block { margin-top: 4px; padding: 2px 6px; border-radius: 4px; background: var(--sunken); }
.exam-block.hard { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }
@media (max-width: 900px) { .exam-week { grid-template-columns: 1fr; } .exam-weekhead { padding-top: 0; } }
.tt-exam { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--bad); border-radius: 4px; padding: 1px 8px; }
.grade-chip { display: inline-block; min-width: 30px; text-align: center; margin: 0 4px 4px 0; padding: 2px 6px; border-radius: 6px; background: var(--sunken); border: 1px solid var(--line); font: 700 14px/1.3 var(--head); }
.gradebook th { white-space: nowrap; font-weight: 700; line-height: 1.25; }
.gradebook td, .gradebook th { padding: 6px 6px; }
.gradebook .col-written { box-shadow: inset 0 -3px 0 var(--brand); }
.gradebook .new-col { background: color-mix(in srgb, var(--marker) 18%, var(--surface)); }
.gradebook input.grade { width: 3.6em; padding: 6px 4px; }
.new-col-meta { border: 1px dashed var(--line-strong); border-radius: var(--r-md); margin: 14px 0; padding: 4px 14px 12px; }
.new-col-meta legend { font-weight: 700; padding: 0 6px; }
select[multiple] { min-height: 140px; }

/* --- Stufe 2: gemeinsame Bausteine ------------------------------------------------------- */
.actions-right { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; flex: 0 1 auto !important; }
.actions-right form { margin: 0; }
textarea.short { min-height: 84px; }
.kpi-n { font: 700 30px/1.1 var(--head); }
.kpi-n small { font-size: 16px; color: var(--muted); font-weight: 600; }
.reply-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.reply-head h2, .reply-head h3 { margin: 0; }
.ok-mark { color: var(--ok); font-weight: 700; }
.req { color: var(--bad); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }
.btn.ok-btn { background: var(--ok); border-color: var(--ok); color: #fff; }
.hour-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hour-line:first-of-type { border-top: 0; }
.hour-line form { margin: 0; }
.inline-book { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-book select, .inline-book input { width: auto; padding: 6px 9px; font-size: 14px; }
.inline-book label { margin: 0; }
a.linkrow { text-decoration: none; color: inherit; }
a.linkrow:hover .cal-body { color: var(--brand); }

/* Elternbriefe */
.letter-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.lf-list { display: grid; gap: 10px; margin-bottom: 12px; }
.lf-row { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 4px 14px 8px; margin: 0; background: var(--sunken); }
.lf-grid { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 12px; }
.lf-foot { display: flex; justify-content: space-between; align-items: center; }
.lf-answer { margin: 6px 0 4px; }
fieldset.plain { border: 0; padding: 0; margin: 14px 0 4px; }
fieldset.plain legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 6px; }
.sigpad { position: relative; max-width: 520px; }
.sigpad canvas { display: block; width: 100%; height: 150px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); background: #fff; touch-action: none; cursor: crosshair; }
.sigpad [data-clear] { position: absolute; right: 10px; bottom: 8px; }
.sig-thumb { height: 28px; max-width: 110px; background: #fff; border-radius: 4px; border: 1px solid var(--line); vertical-align: middle; }
.sig-thumb.big { height: 60px; max-width: 220px; margin-right: 10px; }
.reply-summary { display: grid; grid-template-columns: minmax(140px, 32%) 1fr; gap: 6px 14px; margin: 12px 0; }
.reply-summary dt { color: var(--muted); font-size: 14px; }
.reply-summary dd { margin: 0; font-weight: 700; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 40%) 1fr 34px; gap: 10px; align-items: center; margin: 6px 0; font-size: 14px; }
.meter { height: 10px; background: var(--sunken); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.bar-row b { text-align: right; font-family: var(--head); }
@media (max-width: 640px) { .lf-grid, .reply-summary { grid-template-columns: 1fr; } }

/* Sprechstunden und Sprechabend */
.appt-list { display: grid; }
.appt { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.appt:first-child, h2 + .appt, .reply-head + .appt { border-top: 0; }
.appt-when { flex: 0 0 82px; display: flex; flex-direction: column; line-height: 1.15; }
.appt-when strong { font: 700 18px/1.1 var(--head); }
.appt-when span { font-size: 13px; color: var(--muted); }
.appt-body { flex: 1; min-width: 0; }
.appt > form, .appt-cancel { margin-left: auto; }
.appt-cancel form { display: flex; gap: 6px; margin-top: 6px; }
.appt-cancel input { padding: 6px 9px; font-size: 14px; }
.teacher-list { display: grid; }
.teacher-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.teacher-row:first-child { border-top: 0; }
.tr-who { min-width: 200px; flex: 1; }
.tr-hours { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hour-chip { display: inline-flex; gap: 8px; align-items: baseline; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: 14px; }
.hour-chip:hover { border-color: var(--brand); background: var(--accent); }
.hour-chip .small { color: var(--brand); font-weight: 700; }
.slot-days { display: grid; gap: 12px; }
.slot-day { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.slot-date { font-weight: 700; padding-top: 6px; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; }
.slot { margin: 0; font-weight: 400; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: inline-block; padding: 6px 11px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font: 600 14px/1.2 var(--head); cursor: pointer; background: var(--surface); }
.slot input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.slot input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
input.cell { padding: 6px 8px; font-size: 14px; min-width: 90px; }
input.cell.warn-cell { background: color-mix(in srgb, var(--marker) 45%, var(--surface)); }
@media (max-width: 640px) { .slot-day { grid-template-columns: 1fr; } .tr-hours { justify-content: flex-start; } }

/* Tagesmeldung */
.daynote p { margin: 0 0 6px; } .daynote p:last-child { margin-bottom: 0; }
.daily-banner { display: flex; gap: 14px; align-items: flex-start; background: var(--marker); color: var(--marker-ink); border-radius: var(--r-lg); padding: 12px 16px; margin: -6px 0 20px; }
.daily-banner p { margin: 0; } .daily-banner p + p { margin-top: 4px; }
.db-label { display: inline-flex; gap: 6px; align-items: center; font: 700 15px/1.4 var(--head); white-space: nowrap; }
.db-label svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.db-body { flex: 1; min-width: 0; white-space: pre-wrap; }
.db-more { color: inherit; font: 700 22px/1 var(--head); text-decoration: none; }
.monitor-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.monitor-line:first-of-type { border-top: 0; }
.monitor-line strong { min-width: 140px; }
.monitor-line input { flex: 1 1 260px; width: auto; font-size: 13px; padding: 7px 9px; }
.monitor-line form { margin: 0; }
.tile.danger { background: var(--bad); border-color: var(--bad); color: #fff; }

/* Monitor (Bildschirm im Foyer/Lehrerzimmer) */
body.monitor { background: #0d1a44; color: #f2f5ff; height: 100vh; display: flex; flex-direction: column; overflow: hidden; font-size: clamp(16px, 1.35vw, 26px); }
.mon-head { display: flex; align-items: baseline; gap: 1.2em; padding: .7em 1.4em; background: #142a6b; }
.mon-head .wm { font: 700 1.25em/1 var(--head); color: #9db2ff; } .mon-head .wm b { color: #fff; }
.mon-school { opacity: .8; } .mon-kind { font-weight: 700; color: var(--marker); }
.mon-clock { margin-left: auto; font: 700 1.6em/1 var(--head); }
.mon-main { flex: 1; overflow: hidden; padding: .8em 1.4em; max-width: none; margin: 0; width: 100%; }
.mon-day { min-width: 0; }
.mon-days { display: grid; gap: 1.6em; }
.mon-days-2 { grid-template-columns: 1fr 1fr; }
.mon-day h1 { font-size: 1.5em; color: #fff; margin: 0 0 .4em; }
.mon-note { background: var(--marker); color: #2b2300; border-radius: 10px; padding: .5em .8em; margin-bottom: .6em; font-weight: 700; }
.mon-note p { margin: 0; white-space: pre-wrap; } .mon-note .mon-note-tr { font-weight: 400; opacity: .85; margin-top: .2em; }
.mon-absent { margin: 0 0 .6em; color: #c9d4ff; }
.mon-table { font-size: 1em; }
.mon-table th { background: transparent; color: #9db2ff; font-size: .75em; border-bottom: 2px solid #2b3f86; }
.mon-table td { border-bottom: 1px solid #22346f; padding: .32em .5em; }
.mon-table tr.grp td { border-top: 2px solid #3a5099; }
.mon-table tr.cancel td { color: #ffb3aa; }
.mon-table tbody tr:hover td { background: transparent; }
.mon-table .dim, .mon-table s.dim { opacity: .6; }
.mon-pill { display: inline-block; font-size: .78em; font-weight: 700; padding: .05em .55em; border-radius: 99px; background: var(--marker); color: #2b2300; }
.mon-pill.bad { background: #ff8a7d; color: #3b0700; }
.mon-foot { padding: .3em 1.4em; font-size: .7em; opacity: .6; }
@media (max-width: 900px) { .mon-days-2 { grid-template-columns: 1fr; } body.monitor { overflow: auto; height: auto; } .mon-main { overflow: visible; } }

/* Feueralarm */
.fire-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.fire-head.active { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 2px solid var(--bad); border-radius: var(--r-lg); padding: 12px 16px; }
.fire-head h1 { margin: 0; }
.period-pick { display: flex; gap: 8px; align-items: center; margin: 0 0 14px; }
.period-pick label { margin: 0; font-weight: 400; } .period-pick select { width: auto; padding: 6px 9px; font-size: 14px; }
.fire-kpi { margin-bottom: 14px; }
.fire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.fire-class { margin: 0; padding: 14px 16px; border-left: 6px solid var(--line-strong); }
.fire-class.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.fire-class.bad { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad) 7%, var(--surface)); }
.fire-class.away { opacity: .7; }
.fire-class header { display: flex; justify-content: space-between; align-items: baseline; }
.fc-name { font: 700 22px/1 var(--head); }
.fc-count { font-family: var(--head); color: var(--muted); } .fc-count b { font-size: 22px; color: var(--ink); }
.fc-where { margin-top: 6px; }
.fc-room { font-weight: 700; background: var(--accent); color: var(--brand); padding: 0 6px; border-radius: 4px; }
.fc-absent { margin: 8px 0 0; padding-left: 18px; }
.fc-check { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fc-check form { margin: 0; }
.fc-missing { display: flex; gap: 6px; flex: 1 1 100%; }
.fc-missing input { padding: 6px 9px; font-size: 14px; }

/* AGs */
.ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ag-card { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ag-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ag-card h2 { margin: 0; font-size: 19px; }
.ag-card a { text-decoration: none; }
.ag-card p { margin: 2px 0; }
.ag-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); margin: 0; }
.ag-child form { margin: 0; }

/* Zeugnisse */
.term-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.term-tools form { margin: 0; }
.term-tools input[type=date] { width: auto; padding: 6px 9px; font-size: 14px; }
table.matrix td, table.matrix th { padding: 6px 7px; }
table.matrix td.num { font-weight: 700; }
td.cell-bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
td.cell-miss { color: var(--marker-ink); background: color-mix(in srgb, var(--marker) 45%, transparent); }
.rc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.rc-card { margin: 0; }
.rc-card label { margin-top: 10px; }
.rc-links { font-size: 14px; }
.suggest { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.suggest .linkbtn { color: var(--brand); }
.sticky-save { position: sticky; bottom: 12px; text-align: right; }
.sticky-save .btn { box-shadow: var(--lift); }
@media (max-width: 520px) { .rc-list { grid-template-columns: 1fr; } }

@media print {
  .noprint, .actions-right, .period-pick, .tile, .back { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .fire-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- Module: Reiter im Modul, Tabelle „Module & Kacheln“ ---------------------------------- */
.modtabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -8px 0 22px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; width: fit-content; max-width: 100%; box-shadow: var(--shadow); }
.modtabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 6px 14px; border-radius: 999px; white-space: nowrap; }
.modtabs a:hover { color: var(--brand); background: var(--accent); }
.modtabs a.active { background: var(--brand); color: var(--brand-ink); }
@media (max-width: 640px) { .modtabs { border-radius: var(--r-md); width: 100%; overflow-x: auto; flex-wrap: nowrap; } }
.mod-matrix td.num { text-align: center; }
.mod-matrix th.num { font-size: 12px; white-space: normal; min-width: 72px; }
.mod-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; }
.mod-name svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-name a { color: var(--ink); text-decoration: none; }
.mod-settings { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.mod-settings .card { margin: 0; }
.mod-settings h3 { display: flex; gap: 8px; align-items: center; }
.mod-settings h3 svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mod-setting { padding: 4px 0; border-top: 1px solid var(--line); }
.mod-setting:first-of-type { border-top: 0; }
.mod-setting .small { margin: 0 0 6px 26px; }
@media (max-width: 520px) { .mod-settings { grid-template-columns: 1fr; } }

/* Passwort vergessen: nur die Karte, mittig */
.login-wrap.single { grid-template-columns: minmax(0, 440px); justify-content: center; }

/* --- Office-Editor -------------------------------------------------------------------------- */
.office { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.office-bar { display: flex; gap: 12px; align-items: center; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.office-bar .spacer { flex: 1; }
.office-name { font: 700 16px/1.2 var(--head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.office-bar input.office-newname { width: auto; flex: 0 1 340px; min-width: 200px; padding: 6px 10px; font-weight: 700; }
.office-status { font-size: 13.5px; color: var(--muted); }
.office-status.ok { color: var(--ok); } .office-status.warn { color: var(--warn); } .office-status.bad { color: var(--bad); }
.office-frame { flex: 1; width: 100%; border: 0; background: #fff; min-height: 400px; }
.office-conflict { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 16px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-bottom: 1px solid var(--bad); }
.office-versions { position: relative; }
.office-vlist { position: absolute; right: 0; top: 28px; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--lift); padding: 8px 12px; min-width: 320px; }
.office-vlist form { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.office-vlist form:first-child { border-top: 0; }
.office-new { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }

.office-conflict[hidden] { display: none; }

/* Reaktionen unter Nachrichten und Beiträgen */
.c-reacts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 6px; }
.c-reacts:empty { display: none; }
.c-react { display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 2px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.c-react span { font-size: 15px; font-weight: 400; }
.c-react.mine { border-color: var(--brand); background: var(--accent); color: var(--brand); }
.c-react:disabled { cursor: default; opacity: 1; }
.c-react:not(:disabled):hover { border-color: var(--brand); }
.c-react-add { position: relative; display: inline-block; }
.c-react-add > summary { list-style: none; display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border-radius: 999px;
  border: 1px dashed var(--line); color: var(--muted); cursor: pointer; font-size: 15px; opacity: .8; }
.c-react-add > summary::-webkit-details-marker { display: none; }
.c-react-add > summary small { font-size: 11px; margin-left: 1px; }
.c-react-add > summary:hover, .c-react-add[open] > summary { opacity: 1; border-color: var(--brand); color: var(--brand); }
.c-react-pick { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: 0; display: flex; gap: 2px; padding: 5px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 8px 24px rgba(10, 20, 50, .18); }
.c-react-pick button { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; font-size: 20px; cursor: pointer; line-height: 1; }
.c-react-pick button:hover, .c-react-pick button:focus-visible { background: var(--accent); transform: scale(1.15); }
.c-msg.mine .c-reacts { justify-content: flex-end; }
.c-msg.mine .c-react-pick { left: auto; right: 0; }
.c-msg.mine .c-bubble .c-react { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: inherit; }
.c-msg.mine .c-bubble .c-react.mine { background: rgba(255,255,255,.32); border-color: rgba(255,255,255,.8); }
.c-msg.mine .c-bubble .c-react-add > summary { border-color: rgba(255,255,255,.45); color: inherit; }
.c-msg.mine .c-react-pick button { color: initial; }

/* Oberstufenwahl */
.ch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ch-side { position: sticky; top: 72px; }
@media (max-width: 900px) { .ch-layout { grid-template-columns: 1fr; } .ch-side { position: static; } }
.ch-group h2 { margin-top: 0; }
.ch-subject { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.ch-subject:first-of-type { border-top: 0; }
.ch-subject.on .ch-name b { color: var(--brand); }
.ch-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.ch-seg label { margin: 0; font-weight: 400; }
.ch-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ch-seg span { display: inline-block; padding: 5px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; white-space: nowrap; color: var(--muted); }
.ch-seg span small { opacity: .75; }
.ch-seg input:checked + span { background: var(--surface); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(10, 20, 50, .15); }
.ch-seg input[value="E"]:checked + span { background: var(--brand); color: var(--brand-ink); }
.ch-seg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.ch-seg input:disabled + span { cursor: default; }
.ch-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ch-num { background: var(--sunken); border-radius: var(--r-sm); padding: 8px; text-align: center; }
.ch-num b { display: block; font-size: 24px; line-height: 1.1; }
.ch-num span { font-size: 12px; color: var(--muted); }
.ch-num.low b { color: var(--bad); }
.ch-field { margin: 7px 0; font-size: 13px; }
.ch-field-head { display: flex; justify-content: space-between; color: var(--muted); }
.ch-field .meter i { background: var(--warn); }
.ch-field.ok .meter i { background: var(--ok); }
.ch-msgs { list-style: none; padding: 0; margin: 12px 0 0; font-size: 14px; }
.ch-msg { display: flex; gap: 8px; padding: 5px 0; align-items: flex-start; }
.ch-ico { flex: 0 0 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; margin-top: 1px; }
.ch-msg.error .ch-ico { background: var(--bad); }
.ch-msg.warning .ch-ico { background: var(--warn); }
.ch-msg.ok .ch-ico { background: var(--ok); }
.ch-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.ch-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; }
.ch-status-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.ch-status-actions form { margin: 0; }
.ch-exams { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ch-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.ch-row:hover { border-color: var(--brand); }
.ch-offer input[type=number] { width: 64px; display: inline-block; }
.ch-offer-cell { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 400; }
.ch-tally { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.ch-tally a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 14px; background: var(--surface); }
.ch-tally a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.ch-bars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 24px; }
.ch-bar { display: grid; grid-template-columns: 70px 1fr 32px; gap: 8px; align-items: center; font-size: 14px; }
.ch-bar-t { height: 10px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.ch-bar-t span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ch-bar b { text-align: right; }
.ch-matrix th.rot { height: 90px; vertical-align: bottom; white-space: nowrap; }
.ch-matrix th.rot span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 13px; }
.ch-matrix tbody th { text-align: left; white-space: nowrap; font-size: 13px; }
.ch-matrix td.diag { background: var(--sunken); color: var(--muted); }
@media print { .ch-layout { display: block; } .ch-seg input:not(:checked) + span { display: none; } }
/* Ohne Reaktionen sitzt der Auswahl-Knopf auf dem Rand der Blase und erscheint am Desktop erst beim Überfahren */
.c-bubble, .c-body { position: relative; }
.c-reacts:not(:has(.c-react)) { position: absolute; right: 10px; bottom: -14px; margin: 0; z-index: 2; }
.c-msg.mine .c-reacts:not(:has(.c-react)) { right: auto; left: 10px; }
.c-reacts:not(:has(.c-react)) .c-react-add > summary { background: var(--surface); border-style: solid; }
.c-msg.mine .c-bubble .c-reacts:not(:has(.c-react)) .c-react-add > summary { background: var(--surface); color: var(--muted); border-color: var(--line); }
.c-msg { margin-bottom: 16px; }
@media (hover: hover) {
  .c-reacts .c-react-add:not([open]) { opacity: 0; transition: opacity .12s; }
  .c-bubble:hover .c-react-add, .c-body:hover .c-react-add, .c-react-add:focus-within { opacity: 1; }
}
.school-line { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ch-offer tbody tr:not(:has(input[type=checkbox]:checked)) td { opacity: .5; }

/* Mein Konto / Profilbild */
.pf-photo { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.pf-pic { width: 128px; height: 128px; border-radius: 50%; overflow: hidden; background: var(--accent); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.pf-pic img { width: 100%; height: 100%; object-fit: cover; }
.pf-initials { font-size: 44px; font-weight: 700; color: var(--brand); }
.pf-body { flex: 1 1 260px; }
.pf-body h2 { margin-top: 0; }
.pf-consent { margin: 10px 0 0; padding: 10px 12px; background: var(--marker); color: var(--marker-ink); border-radius: var(--r-sm); }
img.c-ava-img { object-fit: cover; padding: 0; background: var(--sunken); }
.me-ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.c-orig-toggle { font-size: 12.5px; margin-top: 2px; }
.c-auto .c-tr { }

/* Krankmeldung Personal */
.sa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.sa-row:first-of-type { border-top: 0; }
.sa-row > div:first-child { flex: 1 1 220px; }
.sa-row form { margin: 0; }
.sa-inline { display: inline-flex; gap: 6px; align-items: center; }
.sa-inline input { width: auto; }
.sa-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; align-items: center; }
.sa-days a { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); font-size: 14px; }
.sa-days a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.sa-days a b { font-size: 13px; }
.sa-pick input { width: auto; padding: 4px 8px; }
.sa-person header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; }
.sa-note { background: var(--sunken); padding: 8px 12px; border-radius: var(--r-sm); white-space: pre-line; }
.sa-lessons td { padding: 5px 8px; }
.sa-lessons tr.st-cancelled td { opacity: .6; }

/* Benutzerverwaltung */
.us-filter { max-width: 640px; align-items: end; }
.us-table td { vertical-align: middle; }
.us-table tr.us-off td { opacity: .55; }
.us-pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 12px 0; }
.us-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.us-btns form { margin: 0; }
.linkbtn.danger { color: var(--bad); }
h1 .c-ava.big { vertical-align: middle; margin-right: 6px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.imp-map label { margin: 0; font-weight: 400; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.imp-map label span { font-weight: 700; font-size: 13px; }
.imp-table tr.imp-skip td { opacity: .55; }
.imp-prob { color: var(--warn); }
.code-block { background: var(--sunken); padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; overflow-x: auto; white-space: pre; }
.ad-steps li { margin: 6px 0; }

/* Kalender: Monat, Woche, Tag */
:root { --k-event: #2f5bd3; --k-parents_evening: #8a4fbf; --k-conference: #0f8a8a; --k-trip: #2e8b46; --k-sports: #d0661a; --k-project: #c4417a; --k-deadline: #c8352a; --k-exam: #b58900; --k-holiday: #8a94a8; }
.cv-h1 { margin-bottom: 4px; }
.cv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 14px; }
.cv-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cv-title { margin: 0 0 0 8px; font-size: 20px; }
.cv-views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--sunken); }
.cv-views a { padding: 5px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.cv-views a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 20, 50, .15); }
[class*="k-"] { --k: var(--k-event); }
.k-event { --k: var(--k-event); } .k-parents_evening { --k: var(--k-parents_evening); } .k-conference { --k: var(--k-conference); }
.k-trip { --k: var(--k-trip); } .k-sports { --k: var(--k-sports); } .k-project { --k: var(--k-project); } .k-deadline { --k: var(--k-deadline); }
.k-exam { --k: var(--k-exam); } .k-holiday { --k: var(--k-holiday); }

.cv-month { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cv-head, .cv-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cv-head div { padding: 8px; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); background: var(--sunken); }
.cv-day { position: relative; min-height: 112px; padding: 4px 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cv-week .cv-day:last-child { border-right: 0; }
.cv-week:last-child .cv-day { border-bottom: 0; }
.cv-day.we { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
.cv-day.out { background: var(--sunken); }
.cv-day.out .cv-num { color: var(--muted); opacity: .6; }
.cv-day.hol { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, color-mix(in srgb, var(--k-holiday) 10%, var(--surface)) 8px 16px); }
.cv-num { align-self: flex-start; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 13.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.cv-num:hover { background: var(--accent); }
.cv-day.today .cv-num { background: var(--brand); color: var(--brand-ink); }
.cv-hol { font-size: 11.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-chip { display: block; font-size: 12px; line-height: 1.3; padding: 2px 6px; border-radius: 5px; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--k) 13%, var(--surface)); border-left: 3px solid var(--k); }
.cv-chip:hover { background: color-mix(in srgb, var(--k) 22%, var(--surface)); }
.cv-chip.multi { border-radius: 5px 0 0 5px; }
.cv-chip.cont { border-left-style: dashed; opacity: .85; }
.cv-chip b { font-weight: 700; }
.cv-chip .who { color: var(--muted); }
.cv-more { font-size: 11.5px; color: var(--brand); text-decoration: none; font-weight: 600; }
.cv-dots { display: none; gap: 3px; }
.cv-dots i, .cv-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--k); display: inline-block; }
.cv-add { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 700; }
.cv-day:hover .cv-add, .cv-add:focus { opacity: 1; background: var(--accent); color: var(--brand); }
.cv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; }
.cv-legend span { display: inline-flex; align-items: center; gap: 5px; }

.cv-grid { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.cv-gh { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--sunken); text-decoration: none; color: var(--ink); }
.cv-gh:first-child { border-left: 0; }
.cv-gh span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.cv-gh b { font-size: 19px; }
.cv-gh.today b { color: var(--brand); }
.cv-allday-l { padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; font-size: 11px; }
.cv-allday { padding: 4px; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-height: 30px; min-width: 0; }
.cv-allday.hol { background: repeating-linear-gradient(135deg, var(--surface) 0 8px, color-mix(in srgb, var(--k-holiday) 10%, var(--surface)) 8px 16px); }
.cv-hours div { height: 48px; border-bottom: 1px solid var(--line); position: relative; }
.cv-hours span { position: absolute; top: -8px; right: 6px; font-size: 11px; color: var(--muted); background: var(--surface); padding: 0 2px; }
.cv-hours div:first-child span { top: 2px; }
.cv-col { position: relative; border-left: 1px solid var(--line); }
.cv-col.we { background: color-mix(in srgb, var(--sunken) 55%, var(--surface)); }
.cv-col.today { background: color-mix(in srgb, var(--accent) 45%, var(--surface)); }
.cv-slot { height: 48px; border-bottom: 1px solid var(--line); }
.cv-slot { background-image: linear-gradient(to bottom, transparent calc(50% - .5px), color-mix(in srgb, var(--line) 45%, transparent) calc(50% - .5px), color-mix(in srgb, var(--line) 45%, transparent) calc(50% + .5px), transparent calc(50% + .5px)); }
.cv-ev { position: absolute; left: 3px; right: 3px; overflow: hidden; padding: 3px 6px; border-radius: 6px; font-size: 12px; line-height: 1.3; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--k) 16%, var(--surface)); border-left: 3px solid var(--k); box-shadow: 0 1px 2px rgba(10, 20, 50, .08); z-index: 1; }
.cv-ev:hover { z-index: 2; box-shadow: 0 4px 12px rgba(10, 20, 50, .18); }
.cv-ev b { display: block; font-size: 11px; color: var(--k); }
.cv-ev .loc { display: block; color: var(--muted); font-size: 11px; }
.cv-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; }
.cv-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cv-details { margin-top: 16px; }
.cv-detail { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-left: 4px solid var(--k); background: color-mix(in srgb, var(--k) 6%, var(--surface)); border-radius: var(--r-sm); margin: 8px 0; }
.cv-detail:target { outline: 2px solid var(--k); }
.cv-desc { margin: 6px 0 0; white-space: pre-line; }

@media (max-width: 760px) {
  .cv-day { min-height: 62px; padding: 3px; }
  .cv-day .cv-chip, .cv-day .cv-hol, .cv-day .cv-more { display: none; }
  .cv-dots { display: flex; margin-top: auto; }
  .cv-num { width: 24px; height: 24px; font-size: 12.5px; }
  .cv-head div { padding: 6px 2px; text-align: center; font-size: 11px; }
  .cv-grid:not(.one) { grid-template-columns: 40px repeat(var(--cols), minmax(0, 1fr)); font-size: 11px; }
  .cv-grid:not(.one) .cv-ev { font-size: 10.5px; padding: 2px 3px; }
  .cv-grid:not(.one) .cv-ev .loc, .cv-grid:not(.one) .cv-chip { display: none; }
  .cv-hours span { font-size: 10px; right: 2px; }
  .cv-title { font-size: 17px; margin-left: 4px; }
}
.cv-col.hol { background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--k-holiday) 8%, transparent) 10px 20px); }
.sa-lessons { width: auto; min-width: min(100%, 560px); }
.hello-meta { text-align: right; }
.hello-meta .school-line { margin-top: 1px; }
@media (max-width: 640px) { .hello-meta { text-align: left; } }

/* Anhänge im Chat/Kanal: Vorschau, Drag & Drop */
.c-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.c-file { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 3px 4px 3px 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunken); font-size: 13px; }
.c-file img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.c-file-ic { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; }
.c-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.c-file-x { border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.c-file-x:hover { background: var(--accent); color: var(--bad); }
body.c-dragging .c-compose-main { position: relative; outline: 3px dashed var(--brand); outline-offset: -6px; background: var(--accent); }
body.c-dragging .c-compose-main::after { content: attr(data-drop-hint); position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--brand); background: color-mix(in srgb, var(--accent) 85%, transparent); pointer-events: none; border-radius: inherit; }
/* Profil- und Teambild: Ablegen/Einfügen */
[data-paste-image] { border-radius: var(--r-md); transition: background .15s; }
[data-paste-image].drag { background: var(--accent); outline: 3px dashed var(--brand); outline-offset: 4px; }
.tm-image { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tm-image form { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tm-image .small { flex-basis: 100%; }
.tm-pic img, .tm-pic .c-ava { width: 64px; height: 64px; border-radius: 14px; font-size: 22px; object-fit: cover; }
[hidden] { display: none !important; }
.tm-image label.btn, .tm-image button.btn { display: inline-flex; width: auto; margin: 0; }
.tm-image > div:last-child { flex: 1; min-width: 0; }
.tm-image form > label.btn, .tm-image form > button.btn { flex: 0 0 auto; width: max-content !important; }

/* Klassenbuch / Kursbuch */
.bk-filter { max-width: 720px; align-items: end; }
.bk-day h2 { margin-top: 0; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.bk-table td { vertical-align: top; }
.bk-table tr.bk-cancelled td { opacity: .55; }
.bk-table tr.bk-missing td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.bk-miss { color: var(--bad); font-weight: 700; font-size: 13px; }
.bk-abs { display: inline-block; padding: 0 6px; margin: 1px 2px 1px 0; border-radius: 999px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); font-size: 12px; }
.bk-abs.late { background: var(--marker); color: var(--marker-ink); }
.bk-group { display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: var(--ink); }
.bk-group b { font-size: 18px; }
.bk-group:hover { border-color: var(--brand); }
/* Hausaufgaben */
.hw-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
.hw-item:first-child { border-top: 0; }
.hw-check { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line-strong, var(--line)); background: var(--surface); font-size: 17px; font-weight: 700; color: #fff; cursor: pointer; display: grid; place-items: center; }
.hw-done .hw-check { background: var(--ok); border-color: var(--ok); }
.hw-done .hw-text { text-decoration: line-through; color: var(--muted); }
.hw-late .hw-check { border-color: var(--bad); }
.hw-late-text, .hw-late { color: var(--bad); font-weight: 700; }
.hw-text { white-space: pre-line; }

/* Klassenleitung */
.cl-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 16px; border-bottom: 1px solid var(--line); }
.cl-tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.cl-tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.cl-listopts .chips { margin-bottom: 8px; }
.cl-print { width: 100%; }
.cl-print td.blank, .cl-print th.blank { width: 44px; border-left: 1px solid var(--line); }
.cl-print td { border-bottom: 1px solid var(--line); }
.print-only { display: none; }
.gs-table th { text-align: center; font-size: 13px; }
.gs-table td.gs-name { white-space: nowrap; font-weight: 600; position: sticky; left: 0; background: var(--surface); }
.gs-cell { text-align: center; font-size: 12.5px; border-left: 1px solid var(--line); min-width: 64px; }
.gs-grades span { display: inline-block; margin: 0 2px; }
.gs-grades span.w { font-weight: 700; text-decoration: underline; }
.gs-avg { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.gs-avg b { color: var(--ink); }
.st-wrap { margin: 10px 0; }
.st-board { text-align: center; padding: 6px; border-radius: 6px; background: #2f4f3a; color: #fff; font-weight: 700; letter-spacing: .1em; margin: 0 auto 14px; max-width: 60%; }
.st-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px; }
.st-seat { min-height: 54px; border: 2px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 4px; background: var(--surface); }
.st-st { display: inline-block; padding: 6px 8px; border-radius: 8px; background: var(--accent); color: var(--brand); font-weight: 700; font-size: 13px; cursor: grab; text-align: center; line-height: 1.2; user-select: none; }
.st-st small { font-weight: 400; color: var(--muted); }
.st-st.sel, .st-st.dragging { outline: 3px solid var(--brand); }
.st-pool { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--sunken); min-height: 56px; }
.du-now td { background: var(--accent); }
.ho-item label { margin-top: 0; }
.ho-old { background: var(--sunken); padding: 6px 10px; border-radius: 6px; margin: 4px 0; }
.li-card header { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.li-card h2 { margin: 0; font-size: 17px; }
.li-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; margin-top: 10px; }
.li-check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; padding: 4px 0; }
.li-text { display: flex; flex-direction: column; gap: 2px; font-weight: 400; margin: 0; font-size: 13px; }
@media print {
  .print-only { display: block; }
  .cl-tabs, .noprint, header.top, .back { display: none !important; }
  .st-seat { border: 1px solid #999; }
  .st-st { background: none; color: #000; }
  .gs-table { font-size: 9pt; }
}
.dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.dir-card { display: flex; gap: 12px; align-items: flex-start; margin: 0; }
.dir-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dir-contact { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.dir-contact a { overflow-wrap: anywhere; }
.gs-table td.gs-name { max-width: 200px; }
.dir-body { align-items: flex-start; }

/* ---------- Räume & Geräte ---------- */
.rs-pick { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.rs-pick select { width: auto; min-width: 160px; }
table.rs-grid { table-layout: fixed; min-width: 640px; }
table.rs-grid th, table.rs-grid td { padding: 0; height: 40px; border: 1px solid var(--line); text-align: center; font-size: 13px; }
table.rs-grid thead th { padding: 6px 4px; }
table.rs-grid th.rs-p { width: 72px; padding: 2px 6px; text-align: left; background: var(--sunken); }
table.rs-grid th.rs-p span { display: block; }
.rs-lesson { background: var(--sunken); color: var(--muted); }
.rs-booked { background: var(--accent); color: var(--brand); padding: 2px 4px !important; position: relative; }
.rs-booked.mine { background: color-mix(in srgb, var(--ok) 16%, var(--surface)); color: var(--ok); }
.rs-booked .rs-x { position: absolute; top: 1px; right: 4px; margin: 0; }
.rs-off { background: repeating-linear-gradient(45deg, var(--sunken) 0 6px, transparent 6px 12px); color: var(--muted); }
.rs-past { background: transparent; }
.rs-free a { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 38px; text-decoration: none; color: transparent; font-weight: 700; font-size: 18px; }
.rs-free a:hover, .rs-free a:focus-visible { color: var(--brand); background: var(--accent); }
.rs-legend { display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: center; }
.rs-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -2px; }
.rs-item summary { cursor: pointer; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rs-item.inactive { opacity: .65; }
.rs-import { margin-top: 6px; }
.rs-return { display: flex; gap: 6px; margin: 0 0 4px; }
.rs-return input { min-width: 140px; }

/* ---------- Mängelmeldungen ---------- */
.rp-filter { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.rp-filter .pill { text-decoration: none; font-size: 13.5px; padding: 4px 11px; }
a.rp-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; text-decoration: none; color: inherit; padding: 10px 14px; margin-bottom: 8px; }
a.rp-item:hover { border-color: var(--brand); }
.rp-item img, .rp-noimg { width: 64px; height: 48px; object-fit: cover; border-radius: var(--r-sm); background: var(--sunken); display: flex; align-items: center; justify-content: center; font-size: 22px; }
.rp-item.prio-urgent { border-left: 3px solid var(--bad); }
.rp-st-new { color: var(--brand); background: var(--accent); border-color: transparent; }
.rp-st-approval { color: var(--marker-ink); background: var(--marker); border-color: transparent; }
.rp-st-approved, .rp-st-in_progress { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border-color: transparent; }
.rp-st-rejected { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border-color: transparent; }
.rp-photo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); }
[data-paste-image].drag .rp-photo { border-color: var(--brand); background: var(--accent); }
.rp-preview img { max-height: 120px; max-width: 220px; border-radius: var(--r-sm); display: block; }
.rp-photo label.btn { margin: 0; }
.rp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.rp-detail aside .card { margin-bottom: 14px; }
.rp-detail aside label:first-of-type { margin-top: 4px; }
.rp-big { max-width: 100%; max-height: 420px; border-radius: var(--r-md); border: 1px solid var(--line); display: block; margin: 8px 0 14px; }
.rp-c { padding: 8px 0; border-bottom: 1px solid var(--line); }
.rp-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; font-size: 14.5px; }
.rp-dl dt { color: var(--muted); } .rp-dl dd { margin: 0; }
@media (max-width: 860px) { .rp-detail { grid-template-columns: 1fr; } }

/* ---------- Termine mit Teilnehmenden ---------- */
.ev-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Umfragen ---------- */
.sv-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; color: inherit; padding: 12px 16px; margin-bottom: 8px; }
a.sv-item:hover { border-color: var(--brand); }
.sv-q { padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.sv-q:last-of-type { border-bottom: 0; }
.sv-q.has-error legend, .sv-q.has-error > label { color: var(--bad); }
.sv-q .error { color: var(--bad); margin: 4px 0 0; }
.sv-scale-l { align-self: center; }
.sv-bar { display: grid; grid-template-columns: minmax(90px, 220px) 1fr 90px; gap: 10px; align-items: center; margin: 5px 0; font-size: 14.5px; }
.sv-track { height: 14px; background: var(--sunken); border-radius: 7px; overflow: hidden; }
.sv-track span { display: block; height: 100%; background: var(--brand); border-radius: 7px; }
.sv-n { text-align: right; font-weight: 700; }
.sv-text { margin: 6px 0; padding: 8px 12px; background: var(--sunken); border-radius: var(--r-sm); white-space: pre-wrap; }
@media print { .sv-res { break-inside: avoid; } .sv-track span { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ---------- Dokumente ---------- */
.dc-folder header { margin-bottom: 6px; }
.dc-edit { text-align: left; }
.dc-edit[open] { position: relative; }
.dc-edit[open] > form:first-of-type { min-width: min(520px, 80vw); }
table.dc-files td { padding: 7px 8px; }
.dc-up { margin-top: 10px; }
.chips a.pill { text-decoration: none; }
@media (max-width: 640px) { .rs-mine td:nth-child(4) { display: none; } .rs-mine td { padding: 8px 6px; } }

/* ---------- Projekttage ---------- */
.pj-kid h2 { margin-top: 0; }
.pj-wishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 14px; align-items: end; }
.pj-wishes label { margin-top: 8px; }
.pj-save { display: flex; gap: 10px; align-items: center; padding-top: 12px; grid-column: 1 / -1; }
.pj-result { font-size: 17px; margin: 4px 0; }
.pj-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.pj-actions form { display: flex; gap: 10px; align-items: center; margin: 0; }
.pj-actions label.checks { margin: 0; font-size: 14px; }
.pj-table summary { margin: 8px 0; }
tr.pj-open td:first-child { color: var(--bad); font-weight: 700; }
.pj-hit { font-weight: 700; color: var(--ok); }
.pj-move { display: flex; gap: 6px; align-items: center; margin: 0; }
.pj-move select { min-width: 180px; padding: 5px 8px; font-size: 14px; }
@media print { .pj-list { break-after: page; } }

/* ---------- Klasseneinteilung ---------- */
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.cp-class { margin: 0; }
.cp-class h2 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; }
.cp-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cp-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.cp-list li form { margin: 0 0 0 auto; display: flex; gap: 4px; align-items: center; }
.cp-list select { padding: 2px 6px; font-size: 13px; width: auto; }
.cp-ico { width: 18px; text-align: center; font-weight: 700; color: var(--ok); }
.cp-miss .cp-ico { color: var(--bad); }
.cp-name { flex: 1; min-width: 0; }
@media print { .cp-grid { display: block; } .cp-class { break-inside: avoid; margin-bottom: 10px; } }

/* ---------- Bücher ---------- */
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 10px; }
.bk-grid .sv-item { margin: 0; }
.bk-filter { margin-bottom: 12px; }
.bx-item { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 12px 16px; margin-bottom: 8px; }
.bx-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; margin: 0; }
.bx-gone { opacity: .6; }
button.ag-paid { cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 700; }

/* ---------- Bereiche: Reiter oben, Suche auf der Startseite ---------- */
.grouptabs { display: flex; gap: 2px; flex-wrap: wrap; margin: -10px 0 16px; border-bottom: 1px solid var(--line); }
.grouptabs a { text-decoration: none; color: var(--muted); font-weight: 700; font-size: 15px; padding: 9px 14px 10px; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.grouptabs a:hover { color: var(--brand); }
.grouptabs a.active { color: var(--brand); border-bottom-color: var(--brand); }
.grouptabs + .modtabs { margin-top: 0; }
@media (max-width: 640px) { .grouptabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } }
.tile-search { margin: -8px 0 18px; }
.tile-search input { max-width: 460px; padding-left: 40px; border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23586379' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 18px; }
.tile-none { grid-column: 1 / -1; }
.tiles .tile[hidden] { display: none; }
