/* PASVATEK Eventanfrage – generiert aus dem Prototyp, Werte in :root anpassen */
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Quicksand"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/quicksand/quicksand-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/figtree/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("/fonts/figtree/figtree-latin-ext-400-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/figtree/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("/fonts/figtree/figtree-latin-ext-500-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/figtree/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("/fonts/figtree/figtree-latin-ext-600-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/figtree/figtree-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/figtree/figtree-latin-ext-700-normal.woff2") format("woff2"); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2C60-2C7F, U+A720-A7FF; }

/* Layout: oben ein Umschalter Website ↔ Backend; Website = zentrierte Formularspalte, Backend = Seitenleiste + Arbeitsfläche.
   Theme nach dem PASVATEK-Logo: Signalrot im Verlauf, Schwarz, viel Weiß, geometrische Rundschrift. */
:root {
  --bg: #f5f4f4;
  --surface: #ffffff;
  --sunk: #ecebeb;
  --ink: #1a1a1a;
  --muted: #676264;
  --line: #dcd9d9;
  --accent: #b8282d;      /* Logo-Rot (dunkles Ende des Verlaufs) */
  --accent-2: #d4605f;    /* Logo-Rot (helles Ende) */
  --accent-ink: #ffffff;
  --accent-soft: #f7e3e2;
  --brass: #b8282d;       /* Zeiten im Ablauf */
  --ok: #2f7a4b; --ok-soft: #dff0e4;
  --warn: #9a6a12; --warn-soft: #f6ead0;
  --info: #2c5d8a; --info-soft: #dde8f3;
  --bad: #8e1d22; --bad-soft: #f3dcdc;
  --paper: #ffffff; --paper-ink: #1a1a1a; --paper-muted: #6f6a6c; --paper-line: #e4e1e1; --paper-band: #f5f3f3; --paper-accent: #b8282d;
  --f-display: "Quicksand", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212; --surface: #1c1b1b; --sunk: #252323; --ink: #f0eeee; --muted: #a39d9f; --line: #353132;
    --accent: #e8615f; --accent-2: #f08a86; --accent-ink: #1a0b0b; --accent-soft: #3c1d1e; --brass: #f08a86;
    --ok: #7cc996; --ok-soft: #1f3a29; --warn: #e3b55c; --warn-soft: #3d3018; --info: #8ab8e3; --info-soft: #1e3247; --bad: #ff9b93; --bad-soft: #47201f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1c1b1b; --sunk: #252323; --ink: #f0eeee; --muted: #a39d9f; --line: #353132;
    --accent: #e8615f; --accent-2: #f08a86; --accent-ink: #1a0b0b; --accent-soft: #3c1d1e; --brass: #f08a86;
    --ok: #7cc996; --ok-soft: #1f3a29; --warn: #e3b55c; --warn-soft: #3d3018; --info: #8ab8e3; --info-soft: #1e3247; --bad: #ff9b93; --bad-soft: #47201f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* Buttons & Felder */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 10px 16px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13.5px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); font-weight: 500; }
input:not([type]), input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time], input[type=password], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 10px 12px; min-height: 42px; }
textarea { min-height: 88px; resize: vertical; }
.invalid input, .invalid select, .invalid textarea { border-color: var(--bad); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .checks { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pkg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 520px) { .pkg { grid-template-columns: 1fr; } }
.pkg .check { flex-direction: column; gap: 2px; position: relative; padding-left: 36px; }
.pkg .check input { position: absolute; left: 12px; top: 12px; margin: 0; }
.pkg .check small { color: var(--muted); }
.yesno { display: flex; gap: 8px; }
.yesno .check { flex: 1; justify-content: center; }

/* ---------- Website ---------- */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .in { max-width: 1040px; margin: 0 auto; padding-block: 14px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; align-items: center; gap: 16px; }
.logo { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.logo .wm { display: flex; flex-direction: column; line-height: 1; gap: 5px; }
.logo .wm b { font-family: var(--f-display); font-size: 25px; font-weight: 500; letter-spacing: .06em; }
.logo .wm small { font-family: var(--f-display); font-size: 8.5px; letter-spacing: .52em; font-weight: 600; }
.logo .bar { width: 1.5px; align-self: stretch; background: var(--ink); }
.logo svg { flex: none; }
.tag { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 3px 9px; }
.site-head nav { margin-left: auto; display: flex; gap: 18px; font-size: 14px; }
.site-head nav a { color: var(--muted); text-decoration: none; }
@media (max-width: 560px) { .site-head nav { display: none; } }

.hero { max-width: 1040px; margin: 0 auto; padding-block: 40px 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: end; }
@media (max-width: 800px) { .hero { grid-template-columns: 1fr; gap: 18px; padding-block: 28px 4px; } }
.hero h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(32px, 5.2vw, 54px); line-height: 1.05; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: var(--accent); -webkit-text-fill-color: transparent; }
.hero p { margin: 0; color: var(--muted); max-width: 46ch; font-size: 16px; }
.hero-facts { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 14px; font-size: 13.5px; }
.hero-facts div { display: flex; flex-direction: column; }
.hero-facts b { font-family: var(--f-display); font-size: 22px; font-weight: 600; }

.formwrap { max-width: 1040px; margin: 0 auto; padding-block: 24px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.stripes { display: flex; flex-direction: column; gap: 5px; width: 64px; margin-bottom: 14px; }
.stripes i { height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.stripes i:nth-child(2) { width: 70%; } .stripes i:nth-child(3) { width: 40%; }
.formcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(18px, 3.5vw, 36px); display: flex; flex-direction: column; gap: 30px; }
.fsec { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
@media (max-width: 800px) { .fsec { grid-template-columns: 1fr; gap: 14px; } }
.fsec + .fsec { border-top: 1px solid var(--line); padding-top: 28px; }
.fsec h2 { font-family: var(--f-display); font-weight: 600; font-size: 22px; }
.fsec .fsec-intro { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.fsec .fields { display: flex; flex-direction: column; gap: 16px; }
.amp { display: flex; align-items: center; gap: 12px; color: var(--accent); font-family: var(--f-display); font-weight: 600; font-size: 20px; }
.amp::before, .amp::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.submitrow { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; max-width: 60ch; }
.consent input { margin-top: 3px; accent-color: var(--accent); }
.site-foot { border-top: 1px solid var(--line); }
.site-foot .in { max-width: 1040px; margin: 0 auto; padding-block: 20px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.vlink { border: 0; background: none; padding: 6px 0 0; text-align: left; font-size: 12px; color: var(--muted); cursor: pointer; font-family: var(--f-mono); }
.vlink:hover { color: var(--accent); }
.release { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; }
@media (max-width: 640px) { .release { grid-template-columns: 1fr; gap: 10px; } }
.release .ver { font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1; }
.release .meta { font-size: 13px; color: var(--muted); margin-top: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.release h3 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.release ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; max-width: 70ch; }
.release .group + .group { margin-top: 16px; }
.req { color: var(--accent); margin-left: 3px; font-weight: 700; }
.reqnote { font-size: 13px; color: var(--muted); }
.legal { max-width: 760px; margin: 0 auto; padding-block: 40px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 22px; }
.legal h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 5vw, 42px); line-height: 1.1; }
.legal h2 { font-family: var(--f-display); font-weight: 600; font-size: 21px; display: flex; gap: 12px; align-items: baseline; scroll-margin-top: 16px; }
.legal h2 .n { font-family: var(--f-mono); font-size: 13px; color: var(--accent); font-weight: 600; }
.legal h3 { font-size: 15px; font-weight: 700; margin-top: 4px; }
.legal section { display: flex; flex-direction: column; gap: 10px; }
.legal section + section { border-top: 1px solid var(--line); padding-top: 22px; }
.legal p, .legal li { max-width: 68ch; margin: 0; }
.legal ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.legal address { font-style: normal; line-height: 1.6; }
.legal .lead { font-size: 16px; color: var(--muted); }
.legal .toc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); font-size: 14px; }
@media (max-width: 560px) { .legal .toc { grid-template-columns: 1fr; } }
.legal .toc a { text-decoration: none; color: var(--ink); display: flex; gap: 10px; }
.legal .toc a span { font-family: var(--f-mono); color: var(--accent); font-size: 12.5px; min-width: 20px; }
.legal .box { border: 1px solid var(--accent); border-radius: var(--r); padding: 14px 16px; background: var(--accent-soft); display: flex; flex-direction: column; gap: 8px; }
.legal table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 14px; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); }
.legal th { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.legal .tw { overflow-x: auto; }
mark.ph { background: var(--warn-soft); color: var(--ink); border-bottom: 1px dashed var(--warn); padding: 0 3px; border-radius: 2px; }
.evt[data-type="geburtstag"] .only-h, .evt[data-type="hochzeit"] .only-g { display: none !important; }
.typepick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.typepick .check { flex-direction: column; gap: 2px; position: relative; padding: 14px 14px 14px 44px; }
.typepick .check input { position: absolute; left: 16px; top: 17px; margin: 0; }
.typepick b { font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.chip { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.chip.g { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.thanks { max-width: 720px; margin: 0 auto; padding-block: 48px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 18px; }
.thanks h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(30px, 5vw, 44px); }
.demo-note { border: 1px dashed var(--brass); border-radius: var(--r); padding: 14px 16px; font-size: 13.5px; background: color-mix(in srgb, var(--brass) 8%, var(--surface)); display: flex; flex-direction: column; gap: 10px; }
.demo-note .eyebrow { color: var(--brass); }

/* Mail-Vorschau */
.mail { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.mail-head { padding: 10px 14px; background: var(--sunk); font-size: 13px; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 8px; }
.mail-head span:nth-child(odd) { color: var(--muted); }
.mail-head span { overflow-wrap: anywhere; }
.mail-body { padding: 16px 18px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; }
.mail-body table { border-collapse: collapse; font-size: 14px; }
.mail-body td { padding: 4px 14px 4px 0; vertical-align: top; }
.mail-body td:first-child { color: var(--muted); white-space: nowrap; }

/* ---------- Backend ---------- */
.app { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) { .side { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); gap: 4px; align-items: center; } .side .brand, .side .me { display: none; } }
.side .brand { padding: 4px 10px 16px; }
.side .brand .logo .wm b { font-size: 19px; }
.side .brand .logo .wm small { font-size: 6.5px; letter-spacing: .45em; }
.side .brand .logo { gap: 10px; }
.side .brand > .sub { display: block; margin-top: 12px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 500; font-size: 14px; color: var(--ink); width: 100%; }
@media (max-width: 860px) { .nav { width: auto; } }
.nav:hover { background: var(--sunk); }
.nav[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav .count { margin-left: auto; font-size: 12px; background: var(--sunk); border-radius: 999px; padding: 0 8px; color: var(--muted); }
.side .me { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--line); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.main { padding-block: 24px 56px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); min-width: 0; }
@media (min-width: 861px) { .main { padding-left: 32px; padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.mainin { max-width: 1080px; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pagehead h1 { font-family: var(--f-display); font-weight: 600; font-size: 30px; line-height: 1.1; }
.pagehead .sp { flex: 1; }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-info { color: var(--info); background: var(--info-soft); }
.t-warn { color: var(--warn); background: var(--warn-soft); }
.t-ok { color: var(--ok); background: var(--ok-soft); }
.t-muted { color: var(--muted); background: var(--sunk); }
.t-bad { color: var(--bad); background: var(--bad-soft); }

.statusstrip { display: flex; gap: 8px; flex-wrap: wrap; }
.statusstrip button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 8px; align-items: center; }
.statusstrip button b { font-variant-numeric: tabular-nums; }
.statusstrip button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text] { max-width: 320px; }
.toolbar select { width: auto; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.list { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
table.list th { text-align: left; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--sunk); }
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.datecell { display: flex; gap: 12px; align-items: center; }
.cal { width: 46px; flex: none; border: 1px solid var(--line); border-radius: 8px; text-align: center; overflow: hidden; line-height: 1.1; }
.cal small { display: block; background: var(--accent); color: var(--accent-ink); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 0; font-weight: 600; }
.cal b { display: block; font-size: 18px; padding: 3px 0 4px; font-variant-numeric: tabular-nums; }
.couple { font-weight: 600; }
.progress { width: 70px; height: 6px; border-radius: 999px; background: var(--sunk); overflow: hidden; display: inline-block; vertical-align: middle; }
.progress i { display: block; height: 100%; background: var(--accent); }
.empty { padding: 32px; text-align: center; color: var(--muted); }

/* Kartei */
.casehead { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; }
@media (max-width: 720px) { .casehead { grid-template-columns: 1fr; } }
.casehead h1 { font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 4vw, 34px); line-height: 1.1; }
.casehead .facts { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }
.casehead .facts span b { font-weight: 600; }
.caseactions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 220px; }
@media (max-width: 720px) { .caseactions { min-width: 0; } }
.caseactions .row { display: flex; gap: 8px; }
.caseactions select { min-height: 38px; padding: 6px 10px; }
.alert { border-radius: var(--r); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.alert.warn { background: var(--warn-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); }
.alert.ok { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .cols { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel h3 { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.panel h3 .sp { flex: 1; }
dl.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 520px) { dl.kv { grid-template-columns: 1fr; gap: 2px; } dl.kv dd { margin-bottom: 8px; } }
.timeline { display: flex; flex-direction: column; }
.timeline .ti { display: grid; grid-template-columns: 64px 14px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 32px; }
.timeline .ti time { font-family: var(--f-mono); font-weight: 600; color: var(--brass); font-size: 14px; text-align: right; }
.timeline .ti .dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--brass); background: var(--surface); justify-self: center; position: relative; }
.timeline .ti:not(:last-child) .dot::after { content: ""; position: absolute; left: 50%; top: 10px; width: 2px; height: 24px; transform: translateX(-50%); background: color-mix(in srgb, var(--brass) 35%, transparent); }
.linkbox { display: flex; gap: 8px; align-items: stretch; }
.linkbox input { font-family: var(--f-mono); font-size: 12.5px; }
.note { border-left: 2px solid var(--line); padding: 2px 0 2px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.note small { color: var(--muted); }
.note p { margin: 0; white-space: pre-line; }
.log { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.log div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.log span:first-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.detsec { display: flex; flex-direction: column; gap: 16px; }
.detsec + .detsec { border-top: 1px solid var(--line); padding-top: 22px; }
.detsec h3 { font-family: var(--f-display); font-weight: 600; font-size: 21px; display: flex; gap: 10px; align-items: baseline; }
.detsec .internal-tag { font-family: var(--f-body); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); font-weight: 600; }
.stickybar { position: sticky; bottom: 0; padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(transparent, var(--bg) 35%); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* Projektblatt (bleibt in beiden Themes Papier) */
.sheetwrap { overflow-x: auto; padding: 4px; }
.sheet { width: 794px; min-height: 1123px; margin: 0 auto; background: var(--paper); color: var(--paper-ink); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 8px 28px rgba(0,0,0,.10); font-size: 12.5px; }
.sheet .band { background: var(--paper-band); padding: 34px 48px 22px; }
.sheet .band .eb { font-size: 9.5px; letter-spacing: .16em; color: var(--paper-muted); }
.sheet .band .sl { display: flex; align-items: center; gap: 10px; }
.sheet .band h2 { font-family: var(--f-display); font-weight: 600; font-size: 28px; margin: 6px 0 4px; }
.sheet .band .meta { font-size: 13px; }
.sheet .band .meta2 { font-size: 9.5px; color: var(--paper-muted); margin-top: 6px; }
.sheet .body { padding: 10px 48px 40px; }
.sheet h4 { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--paper-accent); margin: 20px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--paper-line); }
.sheet .r { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 10px; padding: 3px 0; }
.sheet .r span:first-child { color: var(--paper-muted); }
.sheet .r span:last-child { white-space: pre-line; }
.sheet .tl { display: grid; grid-template-columns: 90px 1fr; padding: 3px 0; font-size: 13px; }
.sheet .tl b { font-family: var(--f-mono); }
.sheet .foot { display: flex; justify-content: space-between; color: var(--paper-muted); font-size: 9.5px; padding: 0 48px 24px; }
.codebox { background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; font-family: var(--f-mono); font-size: 12px; overflow: auto; max-height: 460px; white-space: pre; margin: 0; }
.exportgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .exportgrid { grid-template-columns: 1fr; } }
.exportopt { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; text-align: left; cursor: pointer; }
.exportopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.exportopt b { font-size: 15px; }
.exportopt span { font-size: 13px; color: var(--muted); }

/* Login */
.login { max-width: 400px; margin: 0 auto; padding-block: 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login .panel { gap: 16px; padding: 26px; }
.login h1 { font-family: var(--f-display); font-weight: 600; font-size: 26px; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 50; box-shadow: 0 6px 24px rgba(0,0,0,.2); max-width: calc(100% - 32px); }
.modalback { position: fixed; inset: 0; background: rgba(10,14,16,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 40; }
.modal { background: var(--surface); border-radius: 14px; padding: 22px; max-width: 520px; width: 100%; display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 32px); overflow: auto; }
.modal h2 { font-family: var(--f-display); font-weight: 600; font-size: 24px; }
.row-end { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (prefers-reduced-motion: no-preference) { .fade { animation: fade .22s ease-out; } @keyframes fade { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } } }

/* --- Ergänzungen für die Server-Version --- */
html, body { min-height: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
[hidden] { display: none !important; }
.flash { border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.flash.ok { background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.error { background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); }
.inline-form { display: contents; }
details.danger summary { cursor: pointer; color: var(--bad); font-weight: 600; font-size: 14px; }
details.danger[open] summary { margin-bottom: 10px; }
.secret-state { font-size: 12.5px; color: var(--ok); font-weight: 600; }
.pagination-note { font-size: 13px; color: var(--muted); }
.nav { text-decoration: none; }
a.btn { text-decoration: none; }
.tabs .tablink { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs .tablink[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.statusstrip .btn b { margin-left: 2px; }
details > summary::-webkit-details-marker { display: none; }
.logo-link:focus-visible { outline-offset: 6px; }
