/* =====================================================================
   Portal: Anmeldung, Konto, Meine Sitzungen, Teams, Verwaltung, Einladungen
   Gilt für alle Seiten mit <body class="start p-page">. Wird NACH styles.css, start.css, ui.css (und invite.css)
   geladen und gibt diesen Seiten immer die Optik der einfachen Darstellung: ruhig, rund, klar gegliedert,
   mit Renn-Details (Zielflaggen-Muster, Teamfarbe, Mono-Ziffern wie auf dem Timing-Monitor).
   ===================================================================== */

body.p-page {
  --bg: #0b0f14;
  --panel: #131920;
  --panel-2: #1a212a;
  --panel-3: #222b35;
  --line: #222a34;
  --line-2: #2f3945;
  --text: #eef2f6;
  --muted: #95a1af;
  --dim: #5f6b79;
  --r-lg: 18px;
  --r: 12px;
  --r-sm: 9px;
  --ctl-h: 42px;
  --team-ink: #00141b;
  --err: #ff8a80;
  --checker: repeating-conic-gradient(#fff 0 25%, transparent 0 50%) 0 0 / 8px 8px;

  font-size: 15px; line-height: 1.5;
  background:
    radial-gradient(900px 420px at 0% -8%, color-mix(in srgb, var(--team) 11%, transparent), transparent 70%),
    radial-gradient(700px 380px at 100% 0%, color-mix(in srgb, var(--team) 5%, transparent), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.p-page a { color: var(--team); }
body.p-page .small { font-size: 13px; }
body.p-page h1 { font-size: clamp(26px, 3.2vw, 34px); line-height: 1.12; letter-spacing: -.01em; margin: 0; }
body.p-page .s-h2 { font-size: 18px; margin: 0 0 4px; }
body.p-page .s-err { color: var(--err); font-size: 13px; }
body.p-page .s-err:empty { display: none; }
body.p-page .s-err.ok { color: var(--green); }
body.p-page .s-err.ok::before { content: "✓ "; }

/* ---------- Kopfzeile ---------- */
body.p-page .s-top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 22px; min-height: 64px; padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
/* Teamfarbe, die nach rechts ausläuft, und am Ende ein Stück Zielflagge */
body.p-page .s-top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--team), color-mix(in srgb, var(--team) 35%, transparent) 38%, transparent 70%);
  pointer-events: none;
}
.p-brand { display: flex; align-items: center; gap: 11px; color: inherit !important; text-decoration: none; flex: 0 0 auto; }
.p-logo {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px; position: relative; overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--team) 92%, #fff), color-mix(in srgb, var(--team) 55%, #000));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--team) 30%, transparent);
}
.p-logo::before { /* Zielflagge in der Ecke */
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px;
  background: repeating-conic-gradient(#0b0f14 0 25%, #fff 0 50%) 0 0 / 6px 6px; border-top-left-radius: 6px;
  opacity: .95;
}
.p-logo::after { /* Ideallinie */
  content: ""; position: absolute; left: 6px; top: 7px; width: 16px; height: 14px;
  border: 3px solid var(--team-ink); border-right-color: transparent; border-bottom-color: transparent; border-radius: 12px 2px 2px 2px;
}
.p-brand-t { display: grid; line-height: 1.1; }
.p-brand-t b { font-size: 19px; letter-spacing: .01em; }
.p-brand-t small { color: var(--muted); font-size: 12px; font-weight: 600; }

.p-nav { display: flex; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.p-nav::-webkit-scrollbar { display: none; }
body.p-page .p-nav a {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: color .15s, background .15s;
}
body.p-page .p-nav a:hover { color: var(--text); background: var(--panel-2); }
body.p-page .p-nav a[aria-current="page"] { color: var(--text); background: var(--panel-3); }
.p-nav a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--team); box-shadow: 0 0 8px var(--team); }
body.p-page .s-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* Konto-Chip oben rechts */
body.p-page .s-user { display: flex; align-items: center; gap: 6px; }
.p-me {
  display: inline-flex; align-items: center; gap: 9px; padding: 3px 12px 3px 3px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text) !important; text-decoration: none; line-height: 1.1;
  transition: border-color .15s;
}
.p-me:hover { border-color: var(--muted); }
.p-me[aria-current="page"] { border-color: var(--team); }
.p-me > span { display: grid; }
.p-me b { font-size: 13.5px; white-space: nowrap; }
.p-me small { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.p-av {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  font: 700 12px/1 var(--f-ui); font-style: normal; letter-spacing: .02em; color: var(--team-ink);
  background: linear-gradient(140deg, color-mix(in srgb, var(--team) 85%, #fff), color-mix(in srgb, var(--team) 70%, #000));
}
.p-iconbtn {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--muted);
}
.p-iconbtn:hover { color: var(--text); background: var(--panel-2); border-color: var(--line-2); }
.p-iconbtn svg { width: 18px; height: 18px; }

/* ---------- Bedienelemente ---------- */
body.p-page .btn {
  min-height: 38px; padding: 0 16px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
}
body.p-page .btn:hover { border-color: var(--muted); }
body.p-page .btn:active { transform: translateY(1px); }
body.p-page .btn[disabled] { opacity: .5; cursor: default; transform: none; }
body.p-page .btn-primary, body.p-page a.btn-primary {
  background: var(--team); border-color: var(--team); color: var(--team-ink) !important; font-weight: 700;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--team) 22%, transparent);
}
body.p-page .btn-primary:hover { background: color-mix(in srgb, var(--team) 86%, #fff); border-color: transparent; }
body.p-page .btn-danger { background: transparent; border-color: color-mix(in srgb, var(--red) 55%, var(--line-2)); color: var(--err) !important; }
body.p-page .btn-danger:hover { background: color-mix(in srgb, var(--red) 12%, transparent); border-color: var(--red); }
body.p-page .btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
body.p-page .btn-ghost:hover { color: var(--text); background: var(--panel-2); }
body.p-page .btn-lg { min-height: 46px; font-size: 15.5px; padding: 0 22px; }
body.p-page .btn-block { width: 100%; }
body.p-page .ibtn { border-radius: 8px; height: 28px; padding: 0 10px; }

body.p-page label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
body.p-page label small { font-weight: 400; color: var(--dim); font-size: 12px; margin-left: 4px; }
body.p-page input:not([type="checkbox"]):not([type="radio"]):not([type="color"]), body.p-page select, body.p-page textarea {
  min-height: var(--ctl-h); padding: 9px 13px; border-radius: 10px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text); font-size: 15px; font-weight: 400;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
body.p-page input::placeholder { color: var(--dim); }
body.p-page input:hover, body.p-page select:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line-2)); }
body.p-page input:focus, body.p-page select:focus, body.p-page textarea:focus {
  outline: none; border-color: var(--team); background: var(--panel-3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--team) 22%, transparent);
}
body.p-page .s-code { font: 700 20px/1.2 var(--f-mono) !important; letter-spacing: .1em; text-transform: uppercase; }
body.p-page .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 0; }

/* Passwort mit Auge, Würfeln */
.p-pw, body.p-page .s-pwgen, body.p-page .adm-pw { position: relative; display: flex; gap: 8px; }
.p-pw input { flex: 1; min-width: 0; padding-right: 46px !important; }
.p-pw .p-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 34px; border-radius: 8px; }
.p-eye[aria-pressed="true"] { color: var(--team); }
body.p-page .s-pwgen input, body.p-page .adm-pw input { flex: 1; min-width: 0; }

/* Schalter statt Häkchen (label.p-switch > input[type=checkbox] + span) */
.p-switch { display: flex !important; align-items: center; gap: 12px; cursor: pointer; color: var(--text) !important; font-weight: 600 !important; font-size: 14px !important; }
.p-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.p-switch .p-knob { width: 40px; height: 24px; border-radius: 999px; background: var(--panel-3); border: 1px solid var(--line-2); position: relative; flex: 0 0 auto; transition: background .15s, border-color .15s; }
.p-switch .p-knob::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--muted); transition: transform .18s, background .15s; }
.p-switch input:checked + .p-knob { background: color-mix(in srgb, var(--team) 30%, var(--panel-3)); border-color: var(--team); }
.p-switch input:checked + .p-knob::after { transform: translateX(16px); background: var(--team); }
.p-switch input:focus-visible + .p-knob { outline: 2px solid var(--team); outline-offset: 2px; }
.p-switch small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }

/* ---------- Seitenrahmen, Überschriften, Karten ---------- */
body.p-page .s-main { max-width: 1320px; margin: 0 auto; padding: 32px 24px 56px; }
.p-head { display: flex; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; margin: 0 0 22px; }
.p-head > div:first-child { min-width: 0; }
.p-head .p-sub { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.p-head .p-head-x { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.p-kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--team);
}
.p-kicker::before { content: ""; width: 16px; height: 10px; background: var(--checker); border-radius: 2px; opacity: .85; }

.p-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; }
.p-card-h { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.p-card-h h2 { margin: 0; font-size: 18px; line-height: 1.2; }
.p-card-h p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.p-ico {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 40px;
  background: color-mix(in srgb, var(--team) 13%, var(--panel-2)); color: var(--team); border: 1px solid color-mix(in srgb, var(--team) 28%, var(--line));
}
.p-ico svg { width: 20px; height: 20px; }
.p-hint { position: relative; margin: 0; padding: 11px 14px 11px 42px; border-radius: var(--r); background: var(--panel-2); color: var(--muted); font-size: 13px; }
.p-hint::before { content: "i"; position: absolute; left: 14px; top: 12px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 700 11px/1 var(--f-mono); color: var(--team); border: 1.5px solid currentColor; box-sizing: border-box; }

body.p-page .s-form { display: grid; gap: 16px; margin: 0; padding: 0; background: none; border: 0; }
body.p-page .s-form .row { margin-top: 2px; }

/* allgemeine Karten der bestehenden Seiten */
body.p-page .s-empty {
  background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 26px 26px 24px; max-width: none;
}
body.p-page .s-empty p { margin: 4px 0; }
body.p-page .s-empty p b { color: var(--text); font-size: 16px; }
body.p-page .badge { border-radius: 999px; padding: 2px 9px; font-size: 11.5px; letter-spacing: .02em; }
body.p-page .vchip { padding: 2px 10px; }
body.p-page .s-note { color: var(--dim); }

/* =====================================================================
   Anmeldung (konto.html, nicht angemeldet / Einrichtung / Datenbankfehler)
   ===================================================================== */
.p-auth { min-height: calc(100vh - 65px); display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.p-hero {
  position: relative; overflow: hidden; padding: 64px clamp(28px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; gap: 28px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent 60%, color-mix(in srgb, var(--bg) 85%, transparent)),
    radial-gradient(600px 420px at 18% 30%, color-mix(in srgb, var(--team) 16%, transparent), transparent 70%),
    var(--panel);
}
/* Startnummern-Raster im Hintergrund, wie ein Timing-Monitor */
.p-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000, transparent 75%);
}
/* Zielflaggen-Band am unteren Rand */
.p-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: repeating-conic-gradient(#e9edf2 0 25%, #0b0f14 0 50%) 0 0 / 16px 16px; opacity: .14; }
.p-hero > * { position: relative; z-index: 1; }
.p-hero h1 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.025em; }
.p-hero h1 em { font-style: normal; color: var(--team); }
.p-hero .p-lead { margin: 0; color: var(--muted); font-size: 17px; max-width: 46ch; }
.p-track { width: min(100%, 520px); height: auto; margin: -6px 0 -10px -6px; }
.p-track .tr-bg { fill: none; stroke: var(--panel-3); stroke-width: 14; stroke-linejoin: round; stroke-linecap: round; }
.p-track .tr-line { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-dasharray: 6 8; }
.p-track .tr-hot { fill: none; stroke: var(--team); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 120 1400; animation: p-lap 7s linear infinite; filter: drop-shadow(0 0 6px var(--team)); }
.p-track .tr-s { fill: var(--purple); }
.p-track .tr-sf { fill: url(#p-checker); }
.p-track text { font: 700 11px var(--f-mono); fill: var(--muted); letter-spacing: .08em; }
@keyframes p-lap { from { stroke-dashoffset: 1520; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .p-track .tr-hot { animation: none; } }
.p-feats { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; max-width: 520px; }
.p-feats li { display: grid; grid-template-columns: 40px 1fr; gap: 0 14px; align-items: center; }
.p-feats li b { display: block; font-size: 15px; }
.p-feats li span { color: var(--muted); font-size: 13.5px; }
.p-timing { display: flex; gap: 10px; flex-wrap: wrap; }
.p-timing div { padding: 8px 14px; border-radius: 12px; background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line-2); }
.p-timing span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.p-timing b { font: 700 18px/1.2 var(--f-mono); }
.p-timing b.pb { color: var(--purple); }
.p-timing b.ok { color: var(--green); }

.p-auth-side { display: grid; place-items: center; padding: 48px 24px; }
.p-auth-card { width: min(440px, 100%); display: grid; gap: 22px; }
.p-auth-card > header h1 { font-size: 30px; }
.p-auth-card > header p { margin: 8px 0 0; color: var(--muted); }
.p-auth-card .p-card { padding: 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.p-auth-foot { color: var(--muted); font-size: 13px; display: grid; gap: 8px; }
.p-auth-foot p { margin: 0; }
.p-auth-card code { font-family: var(--f-mono); font-size: 12.5px; background: var(--panel-3); padding: 1px 6px; border-radius: 6px; color: var(--text); }
.p-dberr { border-color: color-mix(in srgb, var(--red) 45%, var(--line)) !important; }
.p-dberr .p-ico { background: color-mix(in srgb, var(--red) 14%, var(--panel-2)); color: var(--err); border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.p-dberr pre { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--bg); color: var(--err); font: 12.5px/1.45 var(--f-mono); white-space: pre-wrap; word-break: break-word; }
.p-dberr pre:empty { display: none; }

/* Zustände von konto.html */
body.p-page[data-acc="out"] .p-nav, body.p-page[data-acc="setup"] .p-nav, body.p-page[data-acc="dberr"] .p-nav,
body.p-page[data-acc="loading"] .p-nav { visibility: hidden; }
body.p-page[data-acc]:not([data-acc="in"]) .s-top .s-right { display: none; }
body.p-page:is([data-acc="out"], [data-acc="setup"], [data-acc="dberr"]) .acc-auth { display: grid !important; }
body.p-page .acc-auth { display: none !important; }
.acc-loading { text-align: center; padding: 18vh 0; }

/* =====================================================================
   Konto (konto.html, angemeldet)
   ===================================================================== */
.p-acc { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 24px; align-items: start; }
.p-acc-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.p-acc-main { display: grid; gap: 18px; }

/* Fahrerlizenz */
.p-lic { border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.p-lic-top {
  position: relative; padding: 16px 20px 54px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--team) 90%, #fff) 0%, var(--team) 40%, color-mix(in srgb, var(--team) 55%, #000) 100%);
  color: var(--team-ink);
}
.p-lic-top::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 38%; background: repeating-conic-gradient(rgba(0,0,0,.22) 0 25%, transparent 0 50%) 0 0 / 14px 14px; mask-image: linear-gradient(90deg, transparent, #000); -webkit-mask-image: linear-gradient(90deg, transparent, #000); }
.p-lic-top span { font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; position: relative; z-index: 1; }
.p-lic-top b { display: block; font: 700 13px var(--f-mono); letter-spacing: .1em; opacity: .8; position: relative; z-index: 1; }
.p-lic-body { padding: 0 20px 20px; margin-top: -38px; position: relative; }
.p-lic-av {
  width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center;
  font: 700 28px/1 var(--f-ui); color: var(--text); letter-spacing: .02em;
  background: linear-gradient(150deg, var(--panel-3), var(--panel-2)); border: 3px solid var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.p-lic-name { margin: 12px 0 2px; font-size: 24px; line-height: 1.15; font-weight: 700; word-break: break-word; }
.p-lic-role { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.p-tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel-3); color: var(--muted); }
.p-tag.team { background: color-mix(in srgb, var(--team) 18%, var(--panel-3)); color: var(--text); }
.p-tag.gold { background: color-mix(in srgb, var(--yellow) 16%, var(--panel-3)); color: var(--yellow); }
.p-tag.ok::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.p-lic dl { margin: 0; display: grid; gap: 1px; background: var(--line); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.p-lic dl > div { background: var(--panel-2); padding: 10px 14px; display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: baseline; }
.p-lic dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.p-lic dd { margin: 0; font-weight: 700; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.p-lic dd.mono { font-family: var(--f-mono); font-size: 13.5px; }
.p-lic dd.none { color: var(--dim); font-weight: 600; }

/* Schnellzugriff */
.p-links { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.p-links a, .p-links button {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 12px 16px; text-align: left;
  color: var(--text) !important; text-decoration: none; background: none; border: 0; border-top: 1px solid var(--line); font: inherit; cursor: pointer;
  transition: background .15s;
}
.p-links > :first-child { border-top: 0; }
.p-links a:hover, .p-links button:hover { background: var(--panel-2); }
.p-links b { display: block; font-size: 14.5px; }
.p-links small { color: var(--muted); font-size: 12.5px; }
.p-links .p-ico { width: 36px; height: 36px; flex-basis: 36px; border-radius: 10px; }
.p-links .p-ico svg { width: 18px; height: 18px; }
.p-links .chev { color: var(--dim); font-size: 18px; }
.p-links .p-out { color: var(--err) !important; }
.p-links .p-out .p-ico { background: color-mix(in srgb, var(--red) 12%, var(--panel-2)); color: var(--err); border-color: color-mix(in srgb, var(--red) 30%, var(--line)); }

.p-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.p-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: st; }
.p-steps li { counter-increment: st; display: grid; grid-template-columns: 26px 1fr; gap: 12px; color: var(--muted); font-size: 13.5px; }
.p-steps li::before { content: counter(st); width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font: 700 12px/1 var(--f-mono); background: var(--panel-3); color: var(--text); }
.p-steps b { color: var(--text); }
.p-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.p-form-grid .full { grid-column: 1 / -1; }

@media (max-width: 1080px) {
  .p-acc { grid-template-columns: minmax(0, 1fr); }
  .p-acc-side { position: static; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}
@media (max-width: 900px) {
  .p-auth { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .p-hero { border-right: 0; border-bottom: 1px solid var(--line); padding: 34px 20px 40px; gap: 20px; }
  .p-hero .p-track, .p-hero .p-timing { display: none; }
  .p-hero .p-lead { font-size: 15.5px; }
  .p-auth-side { padding: 28px 16px 48px; place-items: start center; }
  .p-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .p-acc-side { grid-template-columns: minmax(0, 1fr); }
  .p-form-grid { grid-template-columns: minmax(0, 1fr); }
  .p-feats { display: none; }
  .p-card { padding: 18px 16px; }
  .p-auth-card .p-card { padding: 20px 18px; }
}

/* =====================================================================
   Meine Sitzungen, Rennstall (index.html)
   ===================================================================== */
body.p-page .s-home { grid-template-columns: minmax(0, 1fr) 400px; gap: 28px; }
body.p-page .s-home aside { top: 88px; }
body.p-page .s-ov-h { align-items: center; gap: 10px 16px; margin-bottom: 18px; }
body.p-page .s-ov-h h1 { font-size: clamp(24px, 2.8vw, 32px); }
body.p-page .s-rooms, body.p-page .s-cars { gap: 16px; }

body.p-page .room, body.p-page .car {
  border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--panel);
  box-shadow: inset 0 3px 0 var(--line-2); transition: border-color .15s, transform .15s;
}
body.p-page .room:hover { border-color: var(--line-2); }
body.p-page .room[data-live="true"] { box-shadow: inset 0 3px 0 var(--green); }
body.p-page .car { box-shadow: inset 0 3px 0 var(--c, var(--team)); }
body.p-page .room-h, body.p-page .car-h { padding: 18px 18px 10px; }
body.p-page .room-h h2, body.p-page .car-h h2 { font-size: 19px; }
body.p-page .room-h .sub { margin-top: 6px; gap: 6px 8px; }
body.p-page .room-grid, body.p-page .car-grid { margin: 4px 14px 0; gap: 8px; background: none; border: 0; }
body.p-page .room-grid > div, body.p-page .car-grid > div { background: var(--panel-2); border-radius: 12px; padding: 9px 12px; }
body.p-page .room-grid .l, body.p-page .car-grid .l { font-size: 11.5px; font-weight: 600; }
body.p-page .car-grid .v { font-size: 15px; }
body.p-page .room-grid .v { font-size: 13.5px; }
body.p-page .room-grid > div { padding: 8px 10px; }
body.p-page .room-who, body.p-page .s-viewers { padding: 12px 18px 4px; }
body.p-page .s-viewers { padding: 0 0 16px; }
body.p-page .room-team { padding: 4px 18px 0; }
body.p-page .room-f, body.p-page .car-f { padding: 14px 18px 18px; gap: 8px; }
body.p-page .room-f select.room-share { min-height: 38px; padding: 6px 10px; font-size: 13.5px; max-width: 200px; }
body.p-page .car-who { padding: 0 18px 10px; }

/* Seitenleiste: Beitreten / Neue Sitzung */
body.p-page .s-home .s-join { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px 22px 22px; }
body.p-page .s-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 14px 0 18px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; }
body.p-page .s-tabs button { border: 0; border-radius: 9px; padding: 9px 12px; font-size: 14px; color: var(--muted); transition: background .15s, color .15s; }
body.p-page .s-tabs button:hover { color: var(--text); }
body.p-page .s-tabs button[aria-selected="true"] { background: var(--panel-3); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .25), inset 0 -2px 0 var(--team); }
body.p-page .s-home .s-join [data-pane] > p.muted { margin: 0 0 16px; }
body.p-page .s-home .s-join [data-pane] > p.small:last-child { margin: 16px 0 0; }
body.p-page .s-home .s-form { margin: 0; }
body.p-page [data-dl-plain] { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }

body.p-page .s-created { max-width: 900px; margin: 0 auto; }
body.p-page .s-codebox { border-radius: var(--r-lg); padding: 20px 22px; border: 1px solid color-mix(in srgb, var(--team) 55%, var(--line)); background: color-mix(in srgb, var(--team) 7%, var(--panel)); }
body.p-page .s-codebox b { font-size: 32px; }
body.p-page .s-created-team, body.p-page .s-need-acc { border-radius: var(--r); border: 1px solid var(--line); box-shadow: inset 3px 0 0 var(--team); border-left: 1px solid var(--line); }
body.p-page .s-client-box { border-radius: var(--r-lg); overflow: hidden; }
body.p-page .s-client-box > summary { padding: 14px 18px; }
body.p-page .s-client-box > div { padding: 0 18px 18px; }
body.p-page .s-choice .opt, body.p-page .inv-choice .opt { border-radius: 14px; padding: 18px 20px; }
body.p-page .s-client-note { border-radius: 10px; border-left: 0; box-shadow: inset 3px 0 0 var(--yellow); }
body.p-page .s-sescode { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 4px 3px 12px; }
body.p-page .s-back { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--muted); }
body.p-page .s-back:hover { color: var(--text); border-color: var(--muted); }
body.p-page .s-switch-panel { border-radius: 14px; padding: 8px; }
body.p-page .sw-item { border-radius: 10px; }
body.p-page .conn { border-radius: 999px; }

/* =====================================================================
   Teams und Verwaltung (teams.html, admin.html)
   ===================================================================== */
body.p-page .adm { gap: 28px; }
body.p-page .adm aside.s-join, body.p-page .tm-page aside.s-join { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; top: 88px; }
body.p-page .adm aside .s-h2 { margin-bottom: 14px; }
body.p-page .adm-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; max-width: 100%; overflow-x: auto; grid-template-columns: none; }
body.p-page .adm-tabs button { border-radius: 10px; padding: 9px 16px; white-space: nowrap; }
body.p-page .adm-tabs button i { background: var(--panel-3); color: var(--muted); padding: 1px 7px; border-radius: 999px; margin-left: 6px; }
body.p-page .adm-tabs button[aria-selected="true"] i { background: color-mix(in srgb, var(--team) 25%, var(--panel-3)); color: var(--text); }
body.p-page .adm-table-wrap { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); }
body.p-page .adm-table { font-size: 14px; }
body.p-page .adm-table th { padding: 12px 14px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; background: var(--panel-2); border-bottom: 1px solid var(--line); }
body.p-page .adm-table td { padding: 11px 14px; }
body.p-page .adm-table tbody tr { transition: background .12s; }
body.p-page .adm-table tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
body.p-page .adm-table td.adm-act .btn, body.p-page .adm-act .btn { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
body.p-page .adm-done { border-radius: var(--r); border-color: color-mix(in srgb, var(--green) 55%, var(--line)); background: color-mix(in srgb, var(--green) 6%, var(--panel)); }
body.p-page .adm-filter { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); gap: 14px; }
body.p-page .adm-main > p.small { margin: 14px 2px 0; max-width: 100ch; }
body.p-page section[data-panel] > p.small { margin: 14px 2px 0; max-width: 100ch; }

body.p-page .tm { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: inset 0 3px 0 var(--team); }
body.p-page .tm-h { padding: 20px 20px 12px; }
body.p-page .tm-h h2 { font-size: 21px; }
body.p-page .tm-table { border-radius: 0; border-left: 0; border-right: 0; }
body.p-page .tm-note { border-radius: 10px; border-left: 0; box-shadow: inset 3px 0 0 var(--team); margin: 0 20px 14px; }
body.p-page .tm-note.warn { box-shadow: inset 3px 0 0 var(--yellow); }
body.p-page .tm-add { padding: 16px 20px; }
body.p-page .tm-inv { border-radius: 14px; border-left: 1px solid var(--line-2); box-shadow: inset 3px 0 0 var(--team); margin: 0 20px 18px; }
body.p-page .tm-inv-bar { padding: 0 20px 16px; }
body.p-page .tm-help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
body.p-page .tm-help p { margin: 0 0 12px; line-height: 1.5; }
body.p-page .tm > .row { padding: 0 20px 14px; }

/* =====================================================================
   Einladungsseiten (einladung.php, team-einladung.php)
   ===================================================================== */
body.p-page .inv-card { border-radius: 22px; overflow: hidden; }
body.p-page .tj-confirm { border-radius: 14px; border-left: 1px solid var(--line-2); box-shadow: inset 3px 0 0 var(--team); }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
  body.p-page .s-top { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px 6px; }
  body.p-page .p-nav { order: 3; flex: 1 0 100%; margin: 0 -6px; }
  body.p-page .p-nav a { height: 34px; padding: 0 13px; font-size: 14px; }
  body.p-page .s-home { grid-template-columns: minmax(0, 1fr); }
  body.p-page .s-home aside, body.p-page .adm aside { position: static; }
}
@media (max-width: 560px) {
  .p-brand-t small { display: none; }
  .p-me > span { display: none; }
  .p-me { padding: 3px; }
  body.p-page .s-main { padding: 22px 16px 44px; }
  body.p-page .s-right { gap: 6px; }
  body.p-page .s-right > .btn, body.p-page .s-switch > .btn { min-height: 34px; padding: 0 11px; font-size: 13px; }
  body.p-page .room-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 4px 12px 0; gap: 6px; }
  body.p-page .room-grid > div { padding: 8px 9px; }
  body.p-page .room-grid .v { font-size: 12.5px; white-space: normal; }
  body.p-page .s-right [data-act="uiChooser"] { display: none; }
}

/* ---------- Unter-Reiter im Bereich „Team“ (Teamordner | Mitglieder & Einladungen) ---------- */
.p-subnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
body.p-page .p-subnav a {
  display: flex; flex-direction: column; gap: 1px; padding: 9px 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; font-weight: 600;
}
.p-subnav a small { font-weight: 400; font-size: 12px; color: var(--dim, var(--muted)); }
body.p-page .p-subnav a:hover { color: var(--text); border-color: var(--line-2, var(--line)); }
body.p-page .p-subnav a[aria-current="page"] { color: var(--text); border-color: var(--team); box-shadow: inset 0 0 0 1px var(--team); }
