/* Rechtzeitig Intern: the same page anatomy as the website (white top bar, green header band,
   white anchor bar, white cards on #f7f7f5). Colours and type as in CLAUDE.md, design system.
   Red = the page's main action or urgency. Green = brand and everything secondary. */

@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url("fonts/dm-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url("fonts/dm-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url("fonts/dm-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url("fonts/dm-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --green: #00624f;
  --green-dark: #004d3e;
  --green-light: #e8f2f0;
  --red: #b9003f;
  --red-dark: #96002f;
  --red-light: #f9e8ee;
  --amber: #855600;
  --amber-light: #f7eed8;
  --slate: #4a5560;
  --slate-light: #eceeef;
  --text: #1a1a1a;
  --text-2: #555;
  --text-3: #666;            /* the website's #888 is below 4.5:1 on white, so Intern uses #666 */
  --bg: #f7f7f5;
  --surface: #fff;
  --line: #e4e4e0;
  --line-strong: #cfcfc9;
  --radius: 8px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Page frame: content column, side gutters, and the column the header band lines up with. */
  --page: 1080px;
  --gutter: 40px;
  --col: var(--page);
  --pad-l: max(var(--gutter), env(safe-area-inset-left, 0px));
  --pad-r: max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (max-width: 760px) { :root { --gutter: 20px; } }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
/* Link colours are deliberately weak (specificity 0,0,1): every .btn rule below beats them. */
a { color: var(--green); text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }
h1, h2, h3 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.wrap { max-width: calc(var(--page) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--pad-l) var(--pad-r); }

/* ── Top bar: white, logo left, links right (like the website navbar) ── */
.top { position: relative; z-index: 2; background: var(--surface); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.top .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: 8px; text-decoration: none; color: var(--text); }
.brand img { height: 40px; width: auto; display: block; }
.brand span { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); background: var(--green-light); padding: 3px 9px; border-radius: 99px; }
.nav { display: flex; align-self: stretch; gap: 2px; margin-left: auto; }
.nav a { display: flex; align-items: center; white-space: nowrap; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 500; padding: 0 14px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(0, 0, 0, .05); color: var(--text); }
.nav a.on { color: var(--green); font-weight: 700; box-shadow: inset 0 -3px 0 var(--green); }
.nav a.ext::after { content: "↗"; margin-left: 5px; font-size: 12px; color: var(--text-3); }
.me { display: flex; align-items: center; gap: 14px; min-width: 0; margin-left: 12px; padding-left: 16px; border-left: 1px solid var(--line); font-size: 14px; }
.me a { color: var(--text-2); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.me a:hover { color: var(--text); text-decoration: underline; }
.me a[aria-current] { color: var(--green); font-weight: 700; }
.me form { margin: 0; }
.link-button { font: inherit; font-size: 14px; color: var(--text-2); background: none; border: 0; padding: 8px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-button:hover { color: var(--text); }
.me .link-button { font-weight: 500; text-decoration: none; }
.me .link-button:hover { text-decoration: underline; }
.tabbar { display: none; }

/* Phone and small tablet: logo and account on the first line, all links wrapped below, nothing scrolls. */
@media (max-width: 980px) {
  .top .wrap { padding-block: 8px; row-gap: 2px; }
  .me { margin-left: auto; padding-left: 0; border-left: 0; }
  .nav { order: 3; flex-basis: 100%; align-self: auto; flex-wrap: wrap; gap: 4px; margin-left: 0; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav a { padding: 9px 12px; border-radius: 6px; font-size: 15px; }
  .nav a.on { background: var(--green-light); box-shadow: none; }
}

/* ── Page frame: a three-column grid so the header band and the anchor bar can run full width ── */
main { display: grid; grid-template-columns: minmax(var(--pad-l), 1fr) minmax(0, var(--col)) minmax(var(--pad-r), 1fr); align-content: start; padding-bottom: 72px; }
main > * { grid-column: 2; min-width: 0; }
main > .page-head, main > .subnav { grid-column: 1 / -1; }
main > .page-head { margin-bottom: 32px; }
main > .page-head:has(+ .subnav) { margin-bottom: 0; }

/* ── Header band: eyebrow, big white title, white subtitle, actions on the right (like /kontakt) ── */
.page-head {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start;
  background: var(--green); color: #fff;
  padding: 36px max(var(--pad-r), calc((100% - var(--col)) / 2)) 34px max(var(--pad-l), calc((100% - var(--col)) / 2));
}
.page-head > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-content: start; min-width: 0; }
.page-head h1 { font-size: clamp(28px, 4.2vw, 42px); font-weight: 800; letter-spacing: -.01em; line-height: 1.15; color: #fff; overflow-wrap: anywhere; hyphens: auto; }
.page-head p { max-width: 46rem; color: var(--green-light); font-size: 16px; line-height: 1.6; }
.page-head .eyebrow { max-width: none; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #cfe6e1; }
.page-head .back { max-width: none; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.page-head p a { color: #fff; text-underline-offset: 3px; }
.page-head p a:hover { color: #fff; text-decoration-thickness: 2px; }
.page-head .back a { text-decoration: none; }
.page-head .back a:hover { text-decoration: underline; }
.page-head :focus-visible { outline-color: #fff; }
.page-head.with-action { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px 24px; }
.page-head.with-action > .btn, .page-head.with-action > .actions { justify-self: end; }
@media (max-width: 640px) {
  .page-head { padding-block: 28px 26px; }
  .page-head.with-action { grid-template-columns: minmax(0, 1fr); }
  .page-head.with-action > .btn, .page-head.with-action > .actions { justify-self: start; margin-top: 6px; }
}

/* ── Anchor bar: Verwaltung sub-navigation, like the website's "Auf dieser Seite" bar ── */
.subnav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px;
  background: var(--surface); border-bottom: 1px solid var(--line); margin-bottom: 32px;
  padding: 8px max(var(--pad-r), calc((100% - var(--col)) / 2)) 8px max(var(--pad-l), calc((100% - var(--col)) / 2));
}
.subnav a { white-space: nowrap; text-decoration: none; color: var(--text-2); font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 99px; transition: background .15s, color .15s; }
.subnav a:hover { background: var(--bg); color: var(--text); }
.subnav a.on { background: var(--green-light); color: var(--green); }

/* ── Phone chrome (≤ 760px): slim top bar plus a tab bar at the thumb ──
   Top: one white row (logo, "Menü"). The core sections live in the tab bar at the bottom, so "Menü" only
   holds what the tab bar does not: the two external links and "Abmelden". A <details> without content next
   to the links is the switch, `:has()` reads its state, so it needs no script. Browsers without `:has()` keep
   the wrapped links of the block above (and still get the tab bar). Desktop (> 760px) never sees the tab bar. */
.toggle { display: none; }
.toggle summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border: 1.5px solid var(--green); border-radius: 6px; background: var(--surface); color: var(--green); font-size: 15px; font-weight: 600; line-height: 1.2; cursor: pointer; user-select: none; }
.toggle summary::-webkit-details-marker { display: none; }
.toggle summary:hover { background: var(--green-light); }
.toggle[open] summary { background: var(--green-light); color: var(--green-dark); }
.toggle summary::after { content: ""; flex: none; width: 8px; height: 8px; margin: -3px 0 0 2px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.toggle[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }

@media (max-width: 760px) {
  @supports selector(:has(*)) {
    /* Top bar: logo left, "Menü" right. Open, it lists only what the tab bar lacks: the external links and "Abmelden"
       (Übersicht, Kalender, Verwaltung and the account link are in the tab bar). */
    .top .wrap { min-height: 0; padding-block: 3px; gap: 0; }
    .brand { margin-right: 0; }
    .brand img { height: 32px; }
    .top .toggle { display: block; margin-left: auto; }
    .top .toggle summary::before { content: ""; flex: none; width: 16px; height: 12px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat; }
    .nav, .me { display: none; }
    .nav a:not(.ext), .me a { display: none; }
    .top:has(.toggle[open]) .nav:has(a.ext) { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 3px; padding: 6px 0 4px; }
    .top:has(.toggle[open]) .nav a { min-height: 44px; padding: 0 12px; font-size: 16px; }
    .top:has(.toggle[open]) .me { display: flex; order: 4; flex-basis: 100%; justify-content: flex-start; gap: 12px; margin: 0; padding: 2px 12px 4px; border-top: 1px solid var(--line); font-size: 16px; }
    .top:has(.toggle[open]) .me .link-button { display: flex; align-items: center; min-height: 44px; padding: 0; font-size: 16px; }

    /* Verwaltung bar: one control "Verwaltung · Eingang ▾". Open, all sections stack below it as full-width rows. */
    .subnav { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; min-height: 0; margin-bottom: 16px; padding-block: 8px; }
    .subnav .toggle { display: block; }
    .subnav .toggle summary { min-height: 44px; padding: 0 14px; }
    .subnav .toggle summary::after { margin-left: auto; }
    .subnav .toggle .cur { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--green-dark); }
    .subnav .toggle .cur:not(:empty)::before { content: "·"; margin-right: 8px; font-weight: 400; color: var(--text-3); }
    .subnav a { display: none; }
    .subnav:has(.toggle[open]) .toggle { margin-bottom: 4px; }
    .subnav:has(.toggle[open]) a { display: flex; align-items: center; min-height: 48px; padding: 0 14px; border-radius: 6px; font-size: 16px; }
    .subnav:has(.toggle[open]) a.on { font-weight: 700; box-shadow: inset 3px 0 0 var(--green); }

    /* Header band: slimmer, title 26px, a short action ("Termin anlegen") sits beside the text, a longer one drops below it */
    main > .page-head { margin-bottom: 20px; }
    .page-head { gap: 4px; padding-block: 14px; }
    .page-head > div:first-child { gap: 4px; }
    .page-head h1 { font-size: 26px; line-height: 1.15; }
    .page-head p { font-size: 15px; line-height: 1.45; }
    .page-head .eyebrow { font-size: 12px; line-height: 1.3; letter-spacing: .2em; }
    .page-head .back { margin-bottom: 0; }
    .page-head.with-action { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
    .page-head.with-action > div:first-child { flex: 1 1 10rem; }
    .page-head.with-action > .btn, .page-head.with-action > .actions { flex: none; justify-self: auto; margin-top: 0; }
    .page-head .btn:not(.small) { min-height: 40px; padding: 7px 16px; font-size: 14px; }
  }
}

/* Tab bar (≤ 760px): fixed at the bottom, one tap to Übersicht, Kalender, Verwaltung (if allowed) and Konto.
   It has a real height; main gets the same amount of padding so nothing hides under it. Works without `:has()`. */
@media (max-width: 760px) {
  :root { --tab-h: 60px; }
  html { scroll-padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 12px); }
  .tabbar {
    position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: flex;
    height: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
    padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0, 40, 32, .1);
  }
  .tabbar a { position: relative; flex: 1 1 0; min-width: 0; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.2; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .tabbar a:hover { color: var(--text); }
  .tabbar a:active { background: var(--bg); }
  .tabbar a.on { background: var(--green-light); color: var(--green-dark); font-weight: 700; }
  .tabbar a.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); }
  .tabbar a:focus-visible { outline-offset: -3px; }
  .tabbar svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on svg { stroke-width: 2.2; }
  .tabbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  main:not(.auth) { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px); }
}

/* ── Messages ── */
.messages { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 6px; border-left: 4px solid var(--green); background: var(--green-light); color: var(--green-dark); font-weight: 500; }
.messages li.warning { border-left-color: var(--amber); background: var(--amber-light); color: #4d3200; }
.messages li.error { border-left-color: var(--red); background: var(--red-light); color: var(--red-dark); }

/* ── Layout ── */
.grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.grid > * { min-width: 0; }
.stack { display: grid; gap: 14px; align-content: start; min-width: 0; }
.stack + .stack { margin-top: 32px; }
.grid > .stack + .stack { margin-top: 0; }
.card .facts + h2 { margin-top: 10px; }
@media (max-width: 860px) { .grid { grid-template-columns: minmax(0, 1fr); } }

/* Section labels: small red tracked caps, like the website's eyebrows */
.label, .month h2, .form-card h2 { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--red); line-height: 1.4; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 12px; }
.card h2 { font-size: 18px; font-weight: 700; }
.card p { color: var(--text-2); font-size: 15px; }
.empty { color: var(--text-2); padding: 22px 20px; background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
@media (max-width: 520px) { .card { padding: 18px; } }

/* ── Appointment rows (also used for requests and applications) ── */
.appts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.appt { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s; }
.appt:hover { border-color: var(--line-strong); }
.appt.open { border-style: dashed; border-color: var(--line-strong); }
.appt.cancelled .info a, .appt.cancelled .info span { color: var(--text-3); }
.appt.cancelled strong { text-decoration: line-through; }
.date { display: grid; justify-items: center; line-height: 1.1; padding: 7px 0; border-radius: 6px; background: var(--green-light); color: var(--green); font-variant-numeric: tabular-nums; }
.appt.open .date, .appt.cancelled .date { background: var(--slate-light); color: var(--slate); }
.date small { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.date b { font-size: 21px; font-weight: 800; }
.info { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.info a:not(.btn) { color: var(--text); text-decoration: none; }
.info a:not(.btn):hover strong { text-decoration: underline; }
.info strong { font-weight: 700; }
.info span { font-size: 14px; color: var(--text-2); }
.appt form { margin: 0; }
@media (max-width: 520px) {
  .appt { grid-template-columns: 48px minmax(0, 1fr); gap: 12px 14px; }
  .appt > :last-child:not(.info) { grid-column: 2; justify-self: start; }
}

/* Chips and badges */
.chip { display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.4; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.chip.yes { background: var(--green-light); color: var(--green); }
.chip.club { background: var(--slate-light); color: var(--slate); }
.chip.free { background: var(--amber-light); color: var(--amber); }
.chip.no { background: var(--red-light); color: var(--red-dark); }
@media (max-width: 520px) { .chip { white-space: normal; } .table .chip { white-space: nowrap; } }

/* ── Buttons ──
   Red solid (regular size) = the page's main action. Green solid (small) = secondary action in a card or row.
   Green outline = quiet action. Red outline = destructive. Small buttons in a callout are red (urgency). */
.btn { --b: var(--red); --b-hover: var(--red-dark); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; padding: 10px 22px; border-radius: 6px; border: 1.5px solid var(--b); background: var(--b); color: #fff; cursor: pointer; text-decoration: none; text-align: center; transition: background .2s, border-color .2s, color .2s; }
.btn:hover { background: var(--b-hover); border-color: var(--b-hover); color: #fff; }
.btn.small { --b: var(--green); --b-hover: var(--green-dark); min-height: 36px; font-size: 14px; padding: 6px 14px; }
.callout .btn.small { --b: var(--red); --b-hover: var(--red-dark); }
.btn.ghost { background: var(--surface); color: var(--green); border-color: var(--green); }
.btn.ghost:hover { background: var(--green-light); color: var(--green-dark); border-color: var(--green); }
.btn.danger { background: var(--surface); color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red); color: #fff; border-color: var(--red); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* On the green band: red keeps a pale edge (red and green alone are too close), outline becomes white */
.page-head .btn { border-color: rgba(255, 255, 255, .55); }
.page-head .btn:hover { border-color: #fff; }
.page-head .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.page-head .btn.ghost:hover { background: rgba(255, 255, 255, .24); color: #fff; }

/* ── Calendar list ── */
.month { display: grid; gap: 10px; }
.month + .month { margin-top: 28px; }
.switch { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.switch .btn { border-radius: 99px; }

/* ── Detail ── */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 20px; align-items: baseline; margin: 0; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 12px; }
  .facts dd:last-child { margin-bottom: 0; }
}
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.people li { display: flex; justify-content: space-between; gap: 12px; }
.people span { color: var(--text-3); font-size: 14px; }
.notes { white-space: pre-line; overflow-wrap: anywhere; }

/* ── Sign-in and public pages: white bar with the logo, green band, card pulled up into it ── */
.auth { --col: 420px; padding-bottom: 72px; }
.auth:has(.auth-card.wide) { --col: 640px; }
.auth > .page-head { margin-bottom: 0; padding-bottom: 72px; }
/* Berlin skyline behind the band. The photo is multiplied with the brand green, so no pixel can be lighter than
   the plain green band (white text keeps its contrast by construction); the green tint on top softens the dark parts. */
@supports (background-blend-mode: multiply) {
  .auth > .page-head {
    background-image: linear-gradient(rgba(0, 98, 79, .45), rgba(0, 98, 79, .45)), url("berlin.jpg");
    background-size: auto, cover;
    background-position: 0 0, center 60%;
    background-repeat: no-repeat;
    background-blend-mode: normal, multiply;
  }
}
.auth-card { position: relative; margin-top: -36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 20px; align-content: start; box-shadow: 0 8px 30px rgba(0, 0, 0, .08); }
.auth-card p { color: var(--text-2); }
.auth-card .hint { color: var(--green-dark); }
.hint { font-size: 14px; background: var(--green-light); color: var(--green-dark); padding: 10px 14px; border-radius: 6px; border-left: 4px solid var(--green); }
@media (max-width: 520px) { .auth-card { padding: 20px; } }
@media (max-width: 760px) { .auth > .page-head { padding-bottom: 46px; } .auth-card { margin-top: -30px; } }

/* ── Forms ── */
form.fields { display: grid; gap: 18px; }
form.fields > div { display: grid; gap: 6px; }
/* Labels: tracked caps like the website's form labels */
form.fields > div:not(.check-field) > label, .field > label, .field legend, .add-member label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.field .optional { font-weight: 400; color: var(--text-3); text-transform: none; letter-spacing: 0; font-size: 13px; }
form.fields .helptext, form.fields .helptext ul { font-size: 13px; color: var(--text-3); margin: 0; padding-left: 16px; }
form.fields .helptext { padding-left: 0; }
input[type="email"], input[type="password"], input[type="text"], input[type="date"], input[type="time"], input[type="number"], input[type="url"], input[type="tel"], input[type="file"], select, textarea {
  font: inherit; width: 100%; padding: 11px 14px; border: 1.5px solid var(--line-strong); border-radius: 4px; background: var(--bg); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type="file"] { padding: 8px 10px; }
input[type="file"]::file-selector-button { font: inherit; font-size: 14px; font-weight: 600; margin-right: 12px; padding: 6px 14px; border: 1.5px solid var(--green); border-radius: 6px; background: var(--surface); color: var(--green); cursor: pointer; }
input[type="number"] { max-width: 10rem; }
textarea { resize: vertical; min-height: 6rem; }
::placeholder { color: var(--text-3); opacity: 1; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); background: var(--surface); box-shadow: 0 0 0 4px rgba(0, 98, 79, .12); }
.errorlist { list-style: none; margin: 0; padding: 10px 14px; border-radius: 4px; border-left: 4px solid var(--red); background: var(--red-light); color: var(--red-dark); font-size: 14px; font-weight: 500; }
.copy { display: flex; gap: 8px; align-items: stretch; }
.copy input, .copy select { flex: 1; min-width: 0; font-size: 14px; }
.copy .btn { flex: none; }
.small:not(.btn) { font-size: 14px; color: var(--text-3); }

/* ── Verwaltung ── */
.task + .task { margin-top: 36px; }
.task-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.task-head h2 { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.task-head a { font-size: 14px; font-weight: 600; }
.count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 99px; background: var(--red); color: #fff; font-size: 13px; font-weight: 700; }
.all-clear { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--line); }

.callout { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 18px; margin-bottom: 20px; border-radius: 6px; border-left: 4px solid var(--amber); background: var(--amber-light); color: #4d3200; }
.callout.ok { border-left-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.callout.danger { border-left-color: var(--red); background: var(--red-light); color: var(--red-dark); }
.callout form { margin: 0; }
.callout a:not(.btn) { color: inherit; text-decoration: underline; }
.callout .link-button { color: inherit; padding: 0; }
.callout .btn { margin-left: auto; }
form .callout { margin: 0; }
.danger-link { color: var(--red); }
.danger-link:hover { color: var(--red-dark); }

.team li { align-items: center; }
.team .who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--text); font-size: inherit; }
.team form { margin: 0; }
.team .link-button { color: var(--red); font-size: 14px; padding: 4px 0; }
.add-member { display: grid; gap: 8px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line); }
.tips { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tips li { display: grid; gap: 2px; }
.tips .notes { color: var(--text); font-size: 15px; }

/* Forms in Verwaltung */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 46rem; }
.form-card.narrow { max-width: 32rem; }
@media (max-width: 520px) { .form-card { padding: 20px; } }
form.fields > .actions { display: flex; }
.form-card section { display: grid; gap: 16px; }
.form-card section + section { padding-top: 22px; border-top: 1px solid var(--line); }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.field legend { padding: 0; margin-bottom: 6px; }
.field .helptext { font-size: 13px; color: var(--text-3); margin: 0; }
.field .errorlist { padding: 6px 10px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.row.three { grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 600px) { .row, .row.three { grid-template-columns: minmax(0, 1fr); } }

/* Radio buttons as choices: Django renders <div><div><label><input> Text</label></div>…</div> */
.field fieldset > div { display: flex; flex-wrap: wrap; gap: 8px; }
.field fieldset > div > div { display: contents; }
.field fieldset label, #field-groups label:has(input) { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text); padding: 9px 14px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.field fieldset label:hover, #field-groups label:has(input):hover { border-color: var(--green); }
.field fieldset label:has(input:checked), #field-groups label:has(input:checked) { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.field fieldset input, #field-groups input { width: 18px; height: 18px; flex: none; accent-color: var(--green); margin: 0; }
#field-staffing fieldset > div, #field-basis fieldset > div { flex-direction: column; align-items: stretch; }
#field-staffing label, #field-basis label { justify-content: flex-start; }
#field-groups > div { display: flex; flex-wrap: wrap; gap: 8px; }
#field-groups > div > div { display: contents; }

/* ── Requests ── */
.inquiry-row .preview { color: var(--text); }
.message { color: var(--text) !important; font-size: 16px !important; }
.steps { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.steps form { margin: 0; }
.steps button { font: inherit; font-size: 14px; font-weight: 600; min-height: 38px; padding: 7px 16px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer; }
.steps button:hover { border-color: var(--green); color: var(--green); }
.steps .now button { background: var(--green); border-color: var(--green); color: #fff; cursor: default; }
.card form.fields textarea { min-height: 6rem; }

/* ── Members ── */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.check-field { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; font-size: 14px; color: var(--text-2); }
.check-field input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--green); }
.check-field label { font-weight: 400; cursor: pointer; }
.check-field.has-error { color: var(--red-dark); }
.search { margin-bottom: 16px; max-width: 24rem; }
.table-wrap { overflow-x: auto; max-width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; min-width: 38rem; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); background: var(--bg); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfbf9; }
.table td a:not(.btn) { color: var(--text); text-decoration: none; }
.table td a:not(.btn):hover strong { text-decoration: underline; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .chip { margin: 1px 0; }
.steps.static span { display: inline-block; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 99px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--text-3); }
.steps.static .done span { color: var(--green); border-color: var(--green-light); background: var(--green-light); }
.steps.static .now span { background: var(--green); border-color: var(--green); color: #fff; }

/* ── Numbers ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 14px; margin-bottom: 32px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 2px; align-content: start; }
.tile b { font-size: 36px; font-weight: 800; line-height: 1.1; color: var(--green); font-variant-numeric: tabular-nums; }
.tile span { font-weight: 500; }
.tile small { font-size: 13px; color: var(--text-3); }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 8rem minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 15px; }
.bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.bar-value { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: 14px; white-space: nowrap; }
@media (max-width: 520px) { .bars li { grid-template-columns: 6rem minmax(0, 1fr) auto; } }

/* ── General meeting ── */
.mail-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.6 var(--font); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; max-width: 46rem; margin: 0 0 20px; }
.checklist { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.checklist input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }
.checklist li:has(input:checked) label { color: var(--text-3); text-decoration: line-through; }
.checklist label { color: var(--text); font-size: 15px; overflow-wrap: anywhere; }
