/* Verwaltung im Stil einer Mac-App (Apple-Briefing: Sidebar 256, Toolbar 52, Text 13/16, Zeilen 24/32, Formulargruppen)
   Farben: Driving Club. Auf dem iPhone klappt die Sidebar ein. */
:root {
  --forest: #24412D; --forest-hover: #1B3322; --paper: #F5F3EE; --raised: #FFFFFF; --ink: #1C221B;
  --label-2: rgba(28,34,27,.62); --label-3: rgba(28,34,27,.38); --sep: rgba(28,34,27,.10); --row-sep: rgba(28,34,27,.06);
  --fill-2: rgba(28,34,27,.07); --fill-4: rgba(28,34,27,.03); --sel: rgba(36,65,45,.12); --rot: #8E2A1F; --gelb: #8A6A12; --gruen: #2C6A3F;
  --sidebar-w: 256px; --toolbar-h: 52px; --r: 8px; --r-gruppe: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 13px/16px var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: var(--forest); }
:focus-visible { outline: 3px solid rgba(36,65,45,.45); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; }

.fenster { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100%; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px; background: rgba(250,250,248,.8); border-right: 1px solid var(--sep);
  -webkit-backdrop-filter: blur(30px) saturate(180%); backdrop-filter: blur(30px) saturate(180%); display: flex; flex-direction: column; gap: 14px; }
.marke { font: 700 15px/20px var(--font); letter-spacing: -.01em; padding: 6px 8px 2px; }
.marke small { display: block; font: 400 11px/14px var(--font); color: var(--label-2); }
.abschnitt { display: grid; gap: 2px; }
.abschnitt__kopf { font: 700 11px/18px var(--font); color: var(--label-2); padding: 0 8px; }
.sidebar a { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin: 0 -4px; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.sidebar a:hover { background: var(--fill-2); }
.sidebar a[aria-current="page"] { background: var(--sel); font-weight: 600; }
.sidebar a .zahl { margin-left: auto; color: var(--label-2); font-variant-numeric: tabular-nums; }
.sidebar svg { width: 16px; height: 16px; flex: none; color: var(--forest); }
.sidebar form { margin-top: auto; }

.haupt { min-width: 0; }
.toolbar { position: sticky; top: 0; z-index: 5; height: var(--toolbar-h); display: flex; align-items: center; gap: 8px; padding: 0 16px;
  background: rgba(245,243,238,.85); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); border-bottom: .67px solid var(--row-sep); }
.toolbar h1 { font: 700 15px/20px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toolbar .untertitel { font: 400 11px/13px var(--font); color: var(--label-2); }
.toolbar .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.knopf.menue-knopf { display: none; }
.inhalt { padding: 20px; display: grid; gap: 20px; max-width: 1280px; }

.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 0 14px; border-radius: 6px; border: 0;
  font: 500 13px/16px var(--font); background: var(--fill-2); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; }
.knopf:hover { background: rgba(28,34,27,.11); }
.knopf:active { transform: scale(.98); }
.knopf--haupt { background: var(--forest); color: #fff; }
.knopf--haupt:hover { background: var(--forest-hover); }
.knopf--gefahr { color: var(--rot); }
.knopf--klein { min-height: 24px; padding: 0 10px; }
.inline { display: inline; }

.gruppe { background: var(--raised); border-radius: var(--r-gruppe); box-shadow: 0 0 0 .5px var(--sep), 0 1px 2px rgba(0,0,0,.03); }
.gruppe__kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--row-sep); }
.gruppe__kopf h2 { font: 600 13px/16px var(--font); }
.gruppe__inhalt { padding: 12px 16px; }
.zeilen { display: grid; }
.zeilen > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; padding: 8px 16px; border-bottom: 1px solid var(--row-sep); }
.zeilen > div:last-child { border-bottom: 0; }
.zeilen dt, .zeilen .k { color: var(--label-2); }
.zeilen dd { margin: 0; text-align: right; overflow-wrap: anywhere; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.kachel { background: var(--raised); border-radius: var(--r-gruppe); box-shadow: 0 0 0 .5px var(--sep); padding: 14px 16px; display: grid; gap: 4px; text-decoration: none; color: inherit; }
.kachel .wert { font: 600 26px/32px var(--font); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.kachel .k { color: var(--label-2); font-size: 12px; }
.kachel--hinweis .wert { color: var(--gelb); }
a.kachel:hover { box-shadow: 0 0 0 1px var(--forest); }

.tabelle-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font: 600 11px/14px var(--font); color: var(--label-2); padding: 8px 12px; border-bottom: 1px solid var(--sep); white-space: nowrap; }
td { padding: 6px 12px; height: 32px; border-bottom: 1px solid var(--row-sep); white-space: nowrap; }
tbody tr:nth-child(even) td { background: rgba(28,34,27,.018); }
tbody tr:hover td { background: var(--sel); }
td a { font-weight: 600; text-decoration: none; }
.zahl { text-align: right; }

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--label-3); }
.status--bestaetigt::before { background: var(--gruen); }
.status--angefragt::before { background: var(--gelb); }
.status--warteliste::before { background: #3D6A9A; }
.status--abgelehnt::before, .status--storniert::before { background: var(--rot); }
.ok { color: var(--gruen); font-weight: 600; }
.fehlt { color: var(--gelb); font-weight: 600; }

.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.segment { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--fill-2); }
.segment a { padding: 4px 10px; border-radius: 5px; color: var(--ink); text-decoration: none; font-weight: 500; }
.segment a[aria-current="true"] { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
input, select, textarea { font: 500 13px/16px var(--font); color: var(--ink); background: #fff; border: 1px solid rgba(28,34,27,.18); border-radius: 6px; min-height: 28px; padding: 4px 8px; }
textarea { width: 100%; min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(36,65,45,.18); }
.feld { display: grid; gap: 4px; }
.feld label { font-weight: 500; color: var(--label-2); }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.spalten { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 20px; align-items: start; }
.stapel { display: grid; gap: 20px; }
.meldung { padding: 10px 14px; border-radius: var(--r); font-weight: 500; }
.meldung--fehler { background: #F6E3DF; color: #6E1E15; }
.meldung--ok { background: #E3EFE6; color: #1F4A2B; }
.meldung--info { background: var(--fill-2); }
.leer { padding: 32px 16px; text-align: center; color: var(--label-2); }
.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { display: flex; gap: 12px; padding: 6px 16px; border-bottom: 1px solid var(--row-sep); font-size: 12px; }
.verlauf time { color: var(--label-2); width: 120px; flex: none; }
.sensibel { color: var(--label-2); font-style: italic; }
.zimmerkarten { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.zimmerkarte { background: var(--raised); border-radius: var(--r-gruppe); box-shadow: 0 0 0 .5px var(--sep); padding: 12px; display: grid; gap: 8px; align-content: start; }
.zimmerkarte h3 { font: 600 13px/16px var(--font); display: flex; justify-content: space-between; }
.zimmerkarte ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.zimmerkarte li { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 24px; }
.belegung { color: var(--label-2); font-weight: 400; }
.voll { color: var(--gruen); }

/* Anmeldung */
.anmeldung { min-height: 100%; display: grid; place-items: center; padding: 20px; }
.anmeldung form { width: min(100%, 340px); background: var(--raised); border-radius: 14px; box-shadow: 0 0 0 .5px var(--sep), 0 18px 48px rgba(0,0,0,.10); padding: 24px 20px 20px; display: grid; gap: 14px; }
.anmeldung h1 { font: 700 17px/22px var(--font); text-align: center; }
.anmeldung p { margin: 0; text-align: center; color: var(--label-2); }
.anmeldung input { min-height: 36px; width: 100%; font-size: 15px; }
.anmeldung .knopf { min-height: 36px; width: 100%; }

@media (max-width: 860px) {
  .fenster { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 20; inset: 0 auto 0 0; width: min(85vw, var(--sidebar-w)); transform: translateX(-100%); transition: transform .25s cubic-bezier(.2,.8,.2,1); box-shadow: 0 18px 48px rgba(0,0,0,.25); }
  .fenster.menue-offen .sidebar { transform: none; }
  .knopf.menue-knopf { display: inline-flex; }
  .spalten { grid-template-columns: 1fr; }
  body { font-size: 15px; line-height: 20px; }
  input, select, textarea { font-size: 16px; min-height: 36px; }
  .knopf { min-height: 36px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .sidebar, .toolbar { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); } }
@media print { .sidebar, .toolbar .rechts { display: none; } .fenster { grid-template-columns: 1fr; } }

.voll-breit { width: 100%; }
.rechts-aus { margin-left: auto; }
.raster-12 { display: grid; gap: 12px; }
.raster-8 { display: grid; gap: 8px; }
.vorformatiert { white-space: pre-wrap; text-align: left; }
.hotel-titel { font: 600 15px/20px var(--font); }

/* Neuer Ablauf: Status, Link-Kasten, Gefahrenzone, Formularzeilen */
.status--eingeladen::before { background: #3D6A9A; }
.status--eingereicht::before { background: var(--gelb); box-shadow: 0 0 0 3px rgba(138,106,18,.2); }
.status--gebucht::before { background: var(--gruen); }
.marke-zahlung { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; background: var(--fill-2); color: var(--label-2); }
.marke-zahlung--bezahlt { background: #E3EFE6; color: #1F4A2B; }
.marke-zahlung--teilweise { background: #F4ECD6; color: #6B520E; }
.marke-zahlung--offen { background: #F6E3DF; color: #6E1E15; }
.linkbox { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--r-gruppe); background: #E3EFE6; color: #1F4A2B; }
.linkbox .filter input { flex: 1 1 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; background: var(--raised); border-radius: var(--r-gruppe); box-shadow: 0 0 0 .5px var(--sep); }
.aktionen .hinweis { color: var(--label-2); flex-basis: 100%; }
.gefahrzone { border: 1px solid rgba(142,42,31,.25); }
.gefahrzone .gruppe__kopf h2 { color: var(--rot); }
.formular { display: grid; gap: 12px; padding: 12px 16px; }
.formular .raster { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.formular .knopfzeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.formular fieldset { border: 0; border-top: 1px solid var(--row-sep); margin: 4px 0 0; padding: 12px 0 0; display: grid; gap: 12px; }
.formular legend { font-weight: 600; color: var(--label-2); padding: 0 6px 0 0; }
details.ausklapp > summary { cursor: pointer; padding: 10px 16px; font-weight: 600; color: var(--forest); list-style: none; }
details.ausklapp > summary::-webkit-details-marker { display: none; }
details.ausklapp > summary::before { content: "＋ "; }
details.ausklapp[open] > summary::before { content: "－ "; }
.segment .anzahl { color: var(--label-2); font-weight: 400; margin-left: 4px; }
.klein { font-size: 11px; color: var(--label-2); }
.formular .feld input, .formular .feld select { width: 100%; min-width: 0; }
.formular .raster > * { min-width: 0; }
.inhalt { grid-template-columns: minmax(0, 1fr); } .inhalt > * { min-width: 0; }
