/* Vertretungs-Notifier 2.4 - minimalistisch, Mobile first. Handy: Tab-Leiste unten wie eine App.
   Desktop: schlanke Leiste oben, Inhalt mittig. Keine Inline-Styles (CSP). */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --raised: #ffffff;
  --line: #e4e4e9;
  --text: #121215;
  --muted: #6c6c76;
  --faint: #a3a3ad;
  --accent: #4f46e5;
  --accent-soft: #eeedfd;
  --on-accent: #ffffff;
  --red: #dc2f3f;
  --red-soft: #fdeeef;
  --green: #16a067;
  --green-soft: #e8f7f0;
  --amber: #c26a00;
  --amber-soft: #fdf3e4;
  --radius: 18px;
  --radius-sm: 12px;
  --bar-h: 56px;
  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0b0d; --surface: #161619; --surface-2: #1e1e22; --raised: #2e2e35; --line: #2a2a30;
    --text: #f3f3f5; --muted: #9b9ba6; --faint: #5f5f69;
    --accent: #8f8cff; --accent-soft: #23224a; --on-accent: #0b0b0d;
    --red: #ff6470; --red-soft: #3a1619; --green: #43d394; --green-soft: #102b20;
    --amber: #ffb547; --amber-soft: #33240e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0b0d; --surface: #161619; --surface-2: #1e1e22; --raised: #2e2e35; --line: #2a2a30;
  --text: #f3f3f5; --muted: #9b9ba6; --faint: #5f5f69;
  --accent: #8f8cff; --accent-soft: #23224a; --on-accent: #0b0b0d;
  --red: #ff6470; --red-soft: #3a1619; --green: #43d394; --green-soft: #102b20;
  --amber: #ffb547; --amber-soft: #33240e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font: 16px/1.5 system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.02em; }
h1 { font-size: 1.9rem; font-weight: 750; }
h2 { font-size: 1.15rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .75rem; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
code { background: var(--surface-2); padding: .05rem .35rem; border-radius: 6px; }
svg.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9;
        stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; } .mt-sm { margin-top: .6rem; } .mb0 { margin-bottom: 0; }
.right { margin-left: auto; }
hr { border: none; border-top: 1px solid var(--line); margin: 1rem 0; }

/* ------------------------------------------------------------ App-Leiste */
.bar {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-inner {
  max-width: 1040px; margin: 0 auto; height: var(--bar-h);
  padding: 0 max(16px, env(safe-area-inset-left)) 0 max(16px, env(safe-area-inset-right));
  display: flex; align-items: center; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.bar-actions { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; font-size: 1.05rem;
}
.icon-btn:hover, .icon-btn.active { background: var(--surface-2); color: var(--text); text-decoration: none; }

/* Navigation: Desktop in der Leiste, Handy als Tab-Leiste unten */
.tabs { display: flex; gap: .2rem; }
.tabs a {
  position: relative; display: flex; align-items: center; gap: .45rem; padding: .45rem .8rem;
  border-radius: 999px; color: var(--muted); font-weight: 550; font-size: .95rem; white-space: nowrap;
}
.tabs a svg.i { width: 19px; height: 19px; }
.tabs a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.tabs a.active { color: var(--text); background: var(--raised); box-shadow: 0 0 0 1px var(--line); }
.count {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff;
  font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}

main { max-width: 720px; margin: 0 auto; padding: .75rem 16px 3rem; }
main.wide { max-width: 1040px; }
footer { text-align: center; color: var(--faint); font-size: .78rem; padding: 0 16px 1.5rem; }

@media (max-width: 760px) {
  h1 { font-size: 1.75rem; }
  .bar-inner { gap: .5rem; }
  .hide-m { display: none !important; }
  body.authed main { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 2rem); }
  body.authed footer { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 1rem); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; gap: 0;
    height: calc(var(--tab-h) + var(--safe-b)); padding: 0 6px var(--safe-b);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tabs a {
    flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 0; border-radius: 0;
    font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  }
  .tabs a svg.i { width: 24px; height: 24px; }
  .tabs a:hover { background: none; }
  .tabs a.active { background: none; box-shadow: none; color: var(--accent); }
  .tabs a.active svg.i { stroke-width: 2.3; }
  .tabs .count { position: absolute; top: 6px; left: calc(50% + 6px); }
}
@media (min-width: 761px) {
  .show-m { display: none !important; }
  .tabs { margin: 0 auto; }
}

/* ---------------------------------------------------------------- Kopf */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .8rem; margin: .75rem 0 1.25rem; }
.page-head p, .page-head h1 { margin-bottom: 0; }
.page-head .muted { margin-top: .25rem; }
.eyebrow { color: var(--muted); font-weight: 600; margin: .9rem 0 .4rem; }
.lead { color: var(--muted); margin: -.1rem 0 1.25rem; }
.section-title {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  margin: 1.75rem 4px .55rem;
}

/* ---------------------------------------------------------------- Flächen */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1rem;
  border: 1px solid var(--line);
}
.card > :last-child { margin-bottom: 0; }
.grid { display: grid; gap: .9rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.stat { display: flex; flex-direction: column; gap: .1rem; }
.stat .value { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
.stat .label { color: var(--muted); font-size: .85rem; }

/* Das Wichtigste groß: nächster Ausfall bzw. Status */
.hero {
  display: block; border-radius: 22px; padding: 1.25rem 1.3rem 1.3rem; margin-bottom: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
}
a.hero:hover { text-decoration: none; }
a.hero:active { transform: scale(.99); }
.hero-label { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700;
              text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hero-main { display: block; font-size: 2rem; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: .45rem 0 .35rem; }
.hero-sub { display: block; color: var(--muted); font-size: 1rem; }
.hero-sub strong { color: var(--text); }
.hero-more { display: inline-flex; margin-top: .9rem; font-weight: 650; font-size: .92rem; }
.hero .btn { margin-top: 1rem; }
.hero.alert { background: #d6293b; border-color: transparent; color: #fff; }
.hero.alert .hero-label, .hero.alert .hero-sub, .hero.alert .hero-sub strong { color: rgba(255, 255, 255, .88); }
.hero.alert .hero-more { color: #fff; }
.hero.ok .hero-label { color: var(--green); }
.hero.todo .hero-label { color: var(--accent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero.ok .pulse { background: var(--green); }

/* Kleine Kennzahlen */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .75rem .8rem; color: var(--text); display: flex; flex-direction: column; gap: .1rem; min-width: 0;
}
a.tile:hover { text-decoration: none; border-color: var(--faint); }
.tile b { font-size: 1.3rem; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { color: var(--muted); font-size: .78rem; }
.tile.warn b { color: var(--amber); }

/* Listen im iOS-Einstellungen-Stil */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.list > :not(:first-child), .entries > :not(:first-child) { border-top: 1px solid var(--line); }
.row label { margin: 0; font: inherit; cursor: pointer; }
.row {
  display: flex; align-items: center; gap: .8rem; min-height: 54px; padding: .7rem 1rem; color: var(--text);
  width: 100%; background: none; border: none; font: inherit; text-align: left;
}
a.row:hover, button.row:hover { text-decoration: none; background: var(--surface-2); }
button.row { cursor: pointer; }
.row .row-main { flex: 1; min-width: 0; }
.row .row-title { display: block; font-weight: 550; }
.row .row-sub { display: block; color: var(--muted); font-size: .85rem; }
.row .val { color: var(--muted); white-space: nowrap; font-size: .95rem; }
.row .chev { color: var(--faint); }
.row .chev svg.i { width: 18px; height: 18px; }
.row .ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); color: var(--muted);
}
.row .ico svg.i { width: 19px; height: 19px; }
.row .ico.red { background: var(--red-soft); color: var(--red); }
.row .ico.accent { background: var(--accent-soft); color: var(--accent); }
.row .ico.green { background: var(--green-soft); color: var(--green); }
.row.danger, .row.danger .row-title { color: var(--red); }
form.row { margin: 0; }

/* Hinweis-Leiste */
.nudge {
  display: flex; align-items: center; gap: .7rem; padding: .8rem 1rem; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent); font-weight: 600; margin-bottom: 1rem;
}
.nudge:hover { text-decoration: none; }
.nudge span { flex: 1; }

/* -------------------------------------------------------------- Ausfälle */
.day { margin-bottom: 1.4rem; }
.day-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; font-size: 1.05rem; margin: 0 4px .55rem; }
.day-head .rel { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
                 color: var(--accent); background: var(--accent-soft); padding: .12rem .5rem; border-radius: 99px; }
.day-head .rel.today { color: #fff; background: #d6293b; }
.entries { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.entry { display: flex; gap: .9rem; align-items: center; padding: .8rem 1rem; }
.entry + .entry { border-top: 1px solid var(--line); }
.period {
  flex: none; width: 46px; height: 46px; border-radius: 13px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1; background: var(--surface-2);
}
.period b { font-size: 1.25rem; font-weight: 800; }
.period small { font-size: .62rem; color: var(--muted); margin-top: 2px; font-weight: 600; }
.entry.entfall .period { background: var(--red-soft); color: var(--red); }
.entry.entfall .period small { color: var(--red); opacity: .8; }
.entry.change .period { background: var(--amber-soft); color: var(--amber); }
.entry .body { flex: 1; min-width: 0; }
.entry .title { font-weight: 700; }
.entry.entfall .title .kind { color: var(--red); }
.entry.change .title .kind { color: var(--amber); }
.entry .meta { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.day.past { opacity: .6; }
details.more { margin: 1.25rem 0; }
details.more > summary { cursor: pointer; color: var(--muted); font-weight: 600; margin: 0 4px .7rem; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }

.empty { text-align: center; padding: 2.5rem 1.25rem; color: var(--muted); }
.empty .big { font-size: 2.4rem; margin-bottom: .4rem; }
.empty h2 { color: var(--text); }
.empty .btn { margin-top: .5rem; }

/* ------------------------------------------------------------- Formulare */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field { margin-bottom: .95rem; }
.hint { color: var(--muted); font-size: .82rem; margin-top: .3rem; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: .7rem .85rem; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s, background .15s; -webkit-appearance: none; appearance: none;
}
input[type=text][readonly] { color: var(--muted); cursor: default; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
input[aria-invalid=true] { border-color: var(--red); }
textarea { min-height: 120px; resize: vertical; }
input[type=file] { font: inherit; font-size: .9rem; color: var(--muted); max-width: 100%; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px;
  padding: .6rem 1.1rem; font: inherit; font-weight: 650; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; background: var(--accent); color: var(--on-accent); text-decoration: none; white-space: nowrap;
  transition: filter .15s, transform .05s, background .15s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface-2); color: var(--text); }
.btn.ghost:hover { filter: none; background: var(--line); }
.btn.light { background: rgba(255, 255, 255, .2); color: #fff; }
.btn.danger { background: var(--red); color: #fff; }
.btn.small { min-height: 34px; padding: .35rem .8rem; font-size: .875rem; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
form.inline { display: inline; }
.switch { display: flex; align-items: center; gap: .75rem; font-weight: 550; cursor: pointer; margin: 0; }
.toggle { position: relative; flex: none; width: 51px; height: 31px; }
.toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.toggle span::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { transform: translateX(20px); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.js .js-hide { display: none !important; }

details.card > summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; margin-left: auto; color: var(--muted); font-size: 1.3rem; line-height: 1; }
details.card[open] > summary::after { content: "–"; }
details.card[open] > summary { margin-bottom: 1rem; }

/* ----------------------------------------------------------- Meldungen */
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 550; font-size: .95rem; }
.flash.ok { background: var(--green-soft); color: var(--green); }
.flash.error { background: var(--red-soft); color: var(--red); }
.flash.info { background: var(--accent-soft); color: var(--accent); }
.flash.small { font-size: .85rem; }
.badge, .chip {
  display: inline-block; padding: .12rem .55rem; border-radius: 99px; font-size: .74rem; font-weight: 700;
  background: var(--surface-2); color: var(--muted); vertical-align: middle; white-space: nowrap;
}
.badge.ok, .chip.ok { background: var(--green-soft); color: var(--green); }
.badge.err, .chip.err { background: var(--red-soft); color: var(--red); }
.badge.warn, .chip.warn { background: var(--amber-soft); color: var(--amber); }
.badge.primary, .chip.primary { background: var(--accent-soft); color: var(--accent); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .4rem; background: var(--faint); vertical-align: middle; }
.dot.ok { background: var(--green); } .dot.err { background: var(--red); } .dot.warn { background: var(--amber); }

/* ---------------------------------------------------------- Stundenplan */
.seg {
  display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: .9rem;
  position: sticky; top: calc(var(--bar-h) + 4px); z-index: 5;
}
.seg button {
  flex: 1; border: none; background: none; font: inherit; font-weight: 650; color: var(--muted);
  padding: .5rem 0; border-radius: 9px; cursor: pointer; position: relative;
}
.seg button.active { background: var(--raised); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg button.has-error::after { content: ""; position: absolute; top: 5px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.plan {
  display: grid; gap: .45rem; grid-template-columns: 40px repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(11, auto); grid-auto-flow: column;
}
.plan .day { display: contents; margin: 0; }
.plan .head { font-weight: 700; text-align: center; padding: .3rem 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.plan .num { display: grid; place-items: center; font-weight: 700; color: var(--faint); font-size: .9rem; }
.plan-mobile-day { display: none; }
.cell { display: flex; flex-direction: column; gap: .2rem; }
.cell input.teacher {
  text-align: center; font-weight: 700; padding: .55rem .3rem; background: var(--surface-2);
}
.cell.filled input.teacher { background: var(--accent-soft); color: var(--accent); }
.cell.invalid input.teacher { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.cell .cell-label { display: none; }
.cell-error { color: var(--red); font-size: .75rem; font-weight: 600; text-align: center; }
.save-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.1rem; }

@media (max-width: 760px) {
  .plan { display: flex; flex-direction: column; gap: 1rem; }
  .plan .day.nums, .plan .head { display: none; }
  .plan .day {
    display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  }
  .plan.tabbed .day:not(.active) { display: none; }
  .plan.tabbed .plan-mobile-day { display: none; }
  .plan-mobile-day { display: block; font-weight: 700; padding: .75rem 1rem .25rem; }
  .cell { flex-direction: row; flex-wrap: wrap; align-items: center; gap: .8rem; padding: .45rem .6rem .45rem 1rem; }
  .cell + .cell { border-top: 1px solid var(--line); }
  .cell .cell-label { display: block; flex: 1; font-weight: 600; color: var(--muted); }
  .cell input.teacher { width: 7.5rem; flex: none; }
  .cell-error { flex-basis: 100%; text-align: right; }
  .save-bar {
    position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 10px); z-index: 6; margin-top: 1rem;
  }
  .save-bar .btn { width: 100%; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
  .save-bar .hint { display: none; }
}

/* --------------------------------------------------------- Mitteilungen */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: .2rem 0 0; }
ol.steps > li { counter-increment: step; position: relative; padding-left: 2.5rem; }
ol.steps > li + li { margin-top: 1.2rem; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  display: grid; place-items: center; font-weight: 750; font-size: .85rem; background: var(--surface-2); color: var(--muted);
}
ol.steps > li.done::before { content: "✓"; background: var(--green-soft); color: var(--green); }
ol.steps > li > strong { display: block; margin-bottom: .25rem; }
ol.steps p { margin-bottom: .5rem; }
.push-state { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }
.push-state::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex: none; }
#push-card[data-state="on"] .push-state::before { background: var(--green); }
#push-card[data-state="off"] .push-state::before { background: var(--amber); }
#push-card[data-state="blocked"] .push-state::before, #push-card[data-state="error"] .push-state::before { background: var(--red); }
.push-install { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1rem; }
.push-install .done { color: var(--green); font-weight: 600; margin: 0; }
.ios-share { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .35rem; border-radius: 6px; background: var(--surface-2); font-size: .9em; font-weight: 600; }

/* ---------------------------------------------------------- Anmeldung */
.auth-wrap { min-height: calc(100dvh - var(--bar-h) - 80px); display: grid; place-items: center; padding: 1rem 0; }
.auth-card { width: 100%; max-width: 400px; background: transparent; border: none; padding: 0; }
.auth-card .auth-logo { display: block; width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 1.1rem; }
.auth-card h1 { text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.5rem; }
.auth-card form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.subtle-link { color: var(--muted); text-decoration: underline; text-decoration-color: var(--line); }
.subtle-link:hover { color: var(--accent); }

/* ------------------------------------------------------------- Discord */
.code-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.45rem; font-weight: 700;
  letter-spacing: .08em; padding: .8rem 1rem; border-radius: var(--radius-sm); text-align: center;
  background: var(--accent-soft); color: var(--accent); user-select: all; word-break: break-all;
}
.link-status { display: flex; gap: .8rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--radius-sm); background: var(--accent-soft); }
.link-status-text { font-weight: 700; color: var(--accent); }
.spinner {
  flex: none; width: 20px; height: 20px; margin-top: .1rem; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } * { transition: none !important; } }

/* -------------------------------------------------------------- Admin */
.table-wrap { overflow-x: auto; margin: 0 -1.15rem; padding: 0 1.15rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .55rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 650; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: none; }
pre.log {
  max-height: 420px; overflow: auto; background: #0c0c0f; color: #d4d4dc; padding: 1rem; border-radius: var(--radius-sm);
  font-size: .76rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; margin: 0;
}
.grid > form, form.grid > div { align-self: end; }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .card { padding: 1rem; }
  .table-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .hero-main { font-size: 1.85rem; }
}
a.entry { color: var(--text); }
a.entry:hover { text-decoration: none; background: var(--surface-2); }
