/* 1.ki Portal — App-Layer über https://ui.1.ki/theme/1ki-theme.css (Theme-Migration
   2026-08-05, Christian-Go, UI-Module_Standard.md Abschnitt 2a). Lädt nach dem
   zentralen Theme, enthält nur, was der Theme nicht abdeckt: Portal-Chrome
   (Kopfleiste, DB-gesteuertes Menü, Kacheln), Formular-Karten, Bierdeckel-Brief.
   Alle Farben kommen aus den Theme-Variablen, Ausnahmen sind einzeln kommentiert. */

/* Nachtrag 2026-08-05 (Christian-Befund "Hintergrund mit embossed Logo fehlt"):
   --theme-bg war fuer das Portal nie gesetzt worden (Theme-Default ist
   "none", 1ki-theme.css Zeile 173) -- bei der Migration fuer web.1.ki
   uebernommen (assets/style.css, recht.css), fuer das Portal aber vergessen.
   Absoluter Pfad, wie ueberall sonst (Custom-Property-Falle aus Abschnitt 6h
   Punkt 2: relative Pfade loesen sich hier gegen 1ki-theme.css auf, nicht
   gegen diese Datei).

   Zwei Rueckfaelle 2026-08-05: (1) eine zweite --theme-bg-Zeile mit
   image-set() als Webp-Upgrade -- Custom Properties kennen kein
   Deklarations-Fallback, bei fehlender image-set()-Unterstuetzung wird
   background-image dadurch komplett unsichtbar statt auf die erste
   Deklaration zurueckzufallen. (2) ein root-relativer Pfad ("/assets/bg.jpg")
   loest sich gegen die Origin von 1ki-theme.css auf (https://ui.1.ki), nicht
   gegen web.1.ki, wo diese Datei liegt -- per echtem Chrome-Tab bestaetigt
   (404). Nur ein schema+host-vollstaendiger Pfad ist sicher. Volle
   Begruendung in web.1.ki/assets/style.css. */
body {
  /* --theme-bg steht seit 2026-08-06 nur noch EINMAL, in
     assets/hintergrund.css, und wird von deploy.py in jede Seite
     eingehaengt. Vorher stand dieselbe Zeile in vier App-CSS-Dateien
     und fehlte prompt in der fuenften. Nicht wieder hier eintragen. */
}

.portal-box {
  margin: auto;
  width: 100%;
  max-width: 26rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(24px, 5vw, 40px);
}

.portal-box h1 {
  margin: 0 0 0.6em;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.portal-box form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 1.2em;
}

.portal-box label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}

.portal-box input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--paper);
  padding: 0.7em 0.9em;
  font-size: 1rem;
}

.portal-box input:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

.portal-box button {
  border: none;
  cursor: pointer;
  margin-top: 0.4em;
}

.portal-error {
  color: var(--danger);
  font-size: 0.9rem;
}

.portal-success {
  color: var(--success);
  font-size: 0.9rem;
}

.portal-box-wide {
  max-width: 42rem;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  margin-top: 1.4em;
}

.portal-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.portal-form-grid input,
.portal-form-grid select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--paper);
  padding: 0.6em 0.8em;
  font-size: 0.95rem;
  font-family: inherit;
}

.portal-form-grid input:focus-visible,
.portal-form-grid select:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 1px;
}

.portal-form-span2 {
  grid-column: span 2;
}

@media (max-width: 560px) {
  .portal-form-grid { grid-template-columns: 1fr; }
  .portal-form-span2 { grid-column: span 1; }
}

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--paper);
  padding: 0.5em 1.1em;
}

/* --- Portal-Menüband: sticky, schrumpft beim Scrollen (portal-header.js) --- */
.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(0, 16, 35, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px clamp(16px, 4vw, 48px);
  transition: padding 0.25s ease;
}

.portal-topbar.is-shrink {
  padding: 8px clamp(16px, 4vw, 48px);
}

.portal-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
}

.portal-topbar .brand img {
  display: block;
  height: clamp(24px, 3vw, 36px);
  width: auto;
  transition: height 0.25s ease;
}

.portal-topbar.is-shrink .brand img {
  height: 20px;
}

.portal-topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--paper);
  opacity: 0.92;
}

.portal-user:hover,
.portal-user:focus-visible {
  opacity: 1;
  color: var(--sky);
}

.portal-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.portal-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.portal-gear {
  display: block;
  color: var(--paper);
  opacity: 0.85;
  line-height: 0;
}

.portal-gear svg {
  width: 22px;
  height: 22px;
  display: block;
}

.portal-gear:hover,
.portal-gear:focus-visible {
  opacity: 1;
  color: var(--sky);
}

@media (max-width: 560px) {
  .portal-user-name { display: none; }
}

/* --- Burger-Menü als Hover-Flyout statt Vollbild-Overlay (2026-07-25, Christian-Vorgabe) ---
   .portal-nav-wrap umschließt Button + Nav, damit der Hover beim Wechsel vom Button in die
   Liste nicht abreißt. :focus-within hält es für Tastaturnutzer offen, data-open="true"
   (von main.js beim Klick gesetzt) hält es für Touch offen -- drei unabhängige Trigger,
   gleiche sichtbare Öffnen-Klasse. */
.portal-nav-wrap {
  position: relative;
}

.portal-nav-wrap .site-nav.portal-flyout-nav {
  position: absolute;
  inset: auto 0 auto auto;
  top: calc(100% + 12px);
  width: min(300px, 86vw);
  max-width: none;
  height: auto;
  display: block;
  background: rgba(0, 16, 35, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5);
  padding: 18px 20px;
  z-index: 25;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: max-height 0.28s ease, opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.28s;
}

.portal-nav-wrap:hover .site-nav.portal-flyout-nav,
.portal-nav-wrap:focus-within .site-nav.portal-flyout-nav,
.portal-nav-wrap .site-nav.portal-flyout-nav[data-open="true"] {
  max-height: 75vh;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: max-height 0.32s ease, opacity 0.25s ease, transform 0.25s ease;
}

.portal-nav-wrap .site-nav.portal-flyout-nav ul {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 12px;
}

.portal-nav-wrap .site-nav.portal-flyout-nav a {
  font-size: 1rem;
  font-weight: 600;
}

.portal-nav-wrap .site-nav.portal-flyout-nav a[aria-current="page"] {
  color: var(--sky);
}

/* main.js setzt beim Klick body.style.overflow = hidden (fürs Vollbild-Overlay der
   Startseite gedacht) -- für das kleine Flyout im Portal unnötig, hier zurückgesetzt. */
body:has(.portal-flyout-nav[data-open="true"]) {
  overflow: auto;
}

/* --- Fileshare-Seite (2026-07-25) --- */
.portal-fileshare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.portal-fileshare-head h1 {
  margin: 0;
}

.portal-filesection {
  margin-top: 2em;
  padding-top: 1.4em;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-filesection h2 {
  font-size: 1.05rem;
  margin: 0 0 0.8em;
}

.portal-filelist {
  list-style: none;
  margin: 0 0 1.2em;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-filelist li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.6em 0.8em;
}

.portal-filelist a {
  color: var(--paper);
  font-weight: 600;
}

.portal-filelist a:hover,
.portal-filelist a:focus-visible {
  color: var(--sky);
}

.portal-file-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.2em 0.5em;
  color: rgba(255, 255, 255, 0.8);
}

.portal-file-meta {
  margin-left: auto;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}

.portal-upload-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 1em 0 1.6em;
}

.portal-upload-form input[type="file"] {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
}

/* --- DB-gesteuertes Menü, bis zu 3 Ebenen (2026-07-25) --- */
.site-nav-sub {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-nav-sub a {
  font-size: 0.7em;
  opacity: 0.85;
}

.site-nav-sub .site-nav-sub a {
  font-size: 0.85em;
  opacity: 0.7;
}

/* --- Individualisierter Willkommens-Inhalt (2026-07-25) --- */
.portal-welcome {
  max-width: 46rem;
}

.portal-welcome-hero {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.4em;
}

.portal-welcome-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-top: -0.4em;
}

.portal-welcome-body {
  margin-top: 1.2em;
  line-height: 1.6;
}

.portal-welcome-body p:first-child {
  margin-top: 0;
}

/* --- Admin-Oberfläche (2026-07-25) --- */
.portal-admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.6em;
  flex-wrap: wrap;
}

.portal-admin-tabs a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  padding: 0.5em 1em;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
}

.portal-admin-tabs a[aria-current="page"] {
  background: var(--sky);
  border-color: var(--sky);
  color: var(--midnight);
  font-weight: 700;
}

.portal-admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2em;
  font-size: 0.9rem;
}

.portal-admin-table th,
.portal-admin-table td {
  text-align: left;
  padding: 0.6em 0.7em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: top;
}

.portal-admin-table th {
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.portal-admin-table tr.is-inactive {
  opacity: 0.45;
}

.portal-admin-scope {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.15em 0.5em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* Aktionen-Zelle (2026-07-25, überarbeitet): früher Textbuttons ("Bearbeiten"/"Löschen"),
   jetzt Icon-Buttons (Stift/Papierkorb). align-items:center statt des Flex-Defaults
   "stretch" -- verhindert, dass das <form> (Block-Element, wird zum Flex-Item) sich auf
   die Zeilenhöhe aufzieht. Alte ".portal-admin-actions button"-Regel entfernt: sie kollidierte
   per Spezifität mit .portal-icon-btn (padding/font-size gewannen dort fälschlich). */
.portal-admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.portal-admin-actions form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.portal-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  line-height: 0;
  flex: none;
}

.portal-icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.portal-icon-btn:hover,
.portal-icon-btn:focus-visible {
  border-color: var(--sky);
  color: var(--sky);
}

.portal-icon-btn.is-danger:hover,
.portal-icon-btn.is-danger:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
}

.portal-admin-table td:last-child {
  white-space: nowrap;
}

.portal-form-grid textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: var(--paper);
  padding: 0.7em 0.9em;
  font-size: 0.92rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: 180px;
  resize: vertical;
}

.portal-form-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.3em 0 0;
}

.portal-admin-section {
  margin-bottom: 2.5em;
}

.portal-admin-section h2 {
  font-size: 1.05rem;
  margin: 0 0 0.9em;
}

/* --- Bierdeckel-Brief (v0.9, 2026-07-26, Entwurf) ---
   Design-Freigabe 2026-07-25/26, Vorlage: portal/_prototyp_bierdeckel-brief.html.
   Nutzt ausschließlich Brand-Variablen aus dem zentralen Theme (--sky/--midnight/
   --paper/--stone/--cosmos/--pulse). Theme-Migration 2026-08-05: die lokale
   :root-Neudeklaration von --cosmos/--pulse entfällt, das Theme liefert seit
   Version 1.1 identische Werte -- Cosmos->Pulse-Gradient bleibt der einzige
   Akzent, der nur für den Angebots-Bereich genutzt wird, sonst nirgends im Portal. */

.brief-page {
  max-width: 46rem;
  margin: 0 auto;
  width: 100%;
}

.brief-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 24px);
  margin-bottom: clamp(24px, 6vh, 56px);
}

/* Darstellungsstufen-Umschalter (2026-08-06): die Bierdeckel-Kopfleiste ist
   bewusst als zentriertes Logo-Lockup gestaltet (Design-Freigabe
   2026-07-26) -- absolut positioniert, damit die Zentrierung unangetastet
   bleibt und der Umschalter trotzdem sichtbar am rechten Rand sitzt, statt
   im nun schmalen Footer keinen Platz mehr zu finden. */
.brief-topbar .a11y-mount {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 480px) {
  /* Schmale Geräte: absolute Positionierung würde den Umschalter über das
     Logo legen. Stattdessen fällt die Zeile um und der Umschalter rutscht
     zentriert darunter. */
  .brief-topbar { flex-wrap: wrap; row-gap: 10px; }
  .brief-topbar .a11y-mount {
    position: static;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

.brief-topbar-divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.2);
}

.brief-topbar img.brief-impact-logo {
  height: clamp(16px, 2vw, 20px);
  width: auto;
  opacity: 0.85;
}

.brief-hero {
  text-align: left;
  margin-bottom: clamp(32px, 6vh, 56px);
}

.brief-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--sky);
  margin-bottom: 0.9em;
}

.brief-hero h1 {
  margin: 0 0 0.4em;
  font-size: clamp(1.7rem, 4.4vw, 2.6rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brief-hero .brief-sub {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.brief-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: clamp(28px, 5vh, 44px);
}

.brief-card h2 {
  margin: 0 0 0.7em;
  font-size: 1.15rem;
  font-weight: 700;
}

.brief-coaster-wrap {
  display: flex;
  justify-content: center;
  padding: clamp(16px, 3vw, 28px) 0 clamp(8px, 2vw, 16px);
}

.brief-coaster {
  position: relative;
  width: min(280px, 68vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  /* Bewusste Ausnahme von Regel 1 (keine rohen Hex-Werte): Holz-/Bierdeckel-Anmutung,
     kein Markenfarbton, gehört nicht ins Theme -- einmaliges dekoratives Motiv. */
  background: radial-gradient(circle at 32% 28%, #3a3226 0%, #24201a 55%, #17140f 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-4deg);
}

.brief-coaster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.18);
}

.brief-coaster-label {
  max-width: 72%;
  text-align: center;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.6);
}

.brief-coaster-label strong {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  margin-bottom: 0.3em;
}

/* Echtes Foto (prospect_brief.php) -- gleicher runder Rahmen wie der Platzhalter,
   damit die Seite mit oder ohne Foto gleich aussieht. */
.brief-coaster-photo {
  width: min(280px, 68vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 6px rgba(255, 255, 255, 0.06);
  transform: rotate(-4deg);
}

.brief-photo-caption {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.4em 0 0;
}

.brief-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 1.1em;
}

.brief-focus-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.brief-focus-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--midnight);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.7em;
}

.brief-focus-item h3 {
  margin: 0 0 0.35em;
  font-size: 0.95rem;
  font-weight: 700;
}

.brief-focus-item p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.brief-summary-note {
  margin: 1.2em 0 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
  .brief-focus-grid { grid-template-columns: 1fr; }
}

.brief-offer {
  position: relative;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--cosmos) 0%, var(--pulse) 100%);
  margin-bottom: clamp(28px, 5vh, 44px);
}

.brief-offer-inner {
  background: var(--midnight);
  border-radius: 14px;
  padding: clamp(22px, 4vw, 34px);
}

.brief-offer-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pulse);
  margin-bottom: 0.8em;
}

.brief-offer-inner h2 {
  margin: 0 0 0.5em;
  font-size: 1.3rem;
  font-weight: 700;
}

.brief-offer-inner p {
  margin: 0 0 1em;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.brief-offer-inner p:last-of-type {
  margin-bottom: 1.4em;
}

.brief-bonus {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255, 0, 212, 0.08);
  border: 1px solid rgba(255, 0, 212, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 1.5em;
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.brief-cta-row {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.brief-cta-secondary {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
}

.brief-cta-secondary:hover,
.brief-cta-secondary:focus-visible {
  color: var(--sky);
}

.brief-signoff {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: clamp(20px, 4vh, 32px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.brief-signoff img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}

.brief-signoff-text p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.brief-signoff-text .brief-signoff-name {
  font-weight: 700;
}

.brief-signoff-text .brief-signoff-role {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

/* --- Debug-/Vorschau-Leiste (v0.10, Testphase, ?debug=1 für Portal-Admins) --- */
.brief-debug-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--flash) 95%, transparent);
  color: var(--midnight);
  padding: 8px clamp(16px, 4vw, 48px);
  font-size: 0.82rem;
  font-weight: 700;
}

.brief-debug-label {
  white-space: nowrap;
}

.brief-debug-bar select {
  flex: 1;
  max-width: 28rem;
  padding: 0.35em 0.6em;
  border-radius: 6px;
  border: 1px solid rgba(0, 16, 35, 0.3);
  font-size: 0.85rem;
  font-family: inherit;
}

.brief-mock-flag {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: color-mix(in srgb, var(--flash) 95%, transparent);
  color: var(--midnight);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  z-index: 50;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

/* --- Danke-Seite (Bierdeckel-Formular-Redirect, v0.11, 2026-07-26 Redesign) ---
   Christian-Vorgabe: gleicher Look wie die Rückseite des Business-Flyers
   (09 Ressourcen/Assets/Factsheets/Business Flyer/) -- Emboss-Hintergrund, Sprechblase
   mit Text, Foto darunter. --cosmos wird hier als reine (teiltransparente) Füllfarbe für
   die Sprechblase verwendet, NICHT der Cosmos->Pulse-Gradient -- der bleibt exklusiv dem
   Angebots-Akzent auf der Brief-Seite vorbehalten (siehe Kommentar weiter oben). */
body.danke-body {
  background-image: url("/assets/danke-bg-emboss.jpg");
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  background-color: var(--midnight);
}

.danke-page {
  max-width: 40rem;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.danke-hero {
  margin-bottom: clamp(28px, 5vh, 40px);
}

.danke-hero h1 {
  margin: 0 0 0.4em;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.danke-sub {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.82);
}

.danke-bubble {
  position: relative;
  background: rgba(33, 23, 87, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: clamp(24px, 5vw, 40px) clamp(20px, 5vw, 36px);
  margin: 0 0 44px;
}

.danke-bubble-kicker {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.2em;
}

.danke-steps {
  display: grid;
  gap: 16px;
  text-align: left;
}

@media (min-width: 640px) {
  .danke-steps { grid-template-columns: repeat(3, 1fr); }
}

.danke-step {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 16px;
}

.danke-step h3 {
  margin: 0.5em 0 0.35em;
  font-size: 0.95rem;
  font-weight: 700;
}

.danke-step p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

.danke-bubble-tail {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: 30px;
  height: 18px;
  background: rgba(33, 23, 87, 0.55);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

.danke-photo-wrap {
  margin: 0 auto;
  width: clamp(120px, 22vw, 160px);
}

.danke-photo {
  width: 100%;
  height: auto;
  display: block;
}

.danke-signoff {
  margin-top: 6px;
}

.danke-signoff img {
  height: 30px;
  width: auto;
  margin-bottom: 0.5em;
}

.danke-signoff-name {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.danke-signoff-role {
  margin: 0.15em 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
}

.danke-note {
  margin: clamp(28px, 5vh, 40px) auto 0;
  max-width: 30rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}

.danke-note a {
  color: var(--sky);
}

/* =============================================================================
   Freigabenseite: Prüfung in zwei Spalten (2026-08-19)
   -----------------------------------------------------------------------------
   Christian: "die erfüllten Sachen in einer Tabellenbox links zu haben und die,
   die noch offen sind, rechts mit klickbaren Optionen zu bereinigen."

   Die rechte Spalte ist die wichtige -- dort steht, was zu tun ist. Deshalb
   trägt sie Farbe und die linke nicht. Ist rechts nichts offen, kippt sie ins
   Ruhige: kein Alarm für einen Zustand, der in Ordnung ist.
   ========================================================================== */

.angebot-pruefung {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0 0 .8em;
}

@media (max-width: 760px) {
  /* Umbruch nicht erst bei 640: zwei Spalten mit Knöpfen darin werden vorher
     unlesbar. Offen kommt dabei ZUERST -- auf dem Telefon sieht man sonst erst
     eine Liste von Haken und muss scrollen, um zu erfahren, was fehlt. */
  .angebot-pruefung { grid-template-columns: 1fr; }
  .angebot-spalte-offen { order: -1; }
}

.angebot-spalte {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 10px);
  background: rgba(255, 255, 255, .025);
}

.angebot-spalte-offen {
  border-color: var(--warning, #FFC96B);
  background: rgba(255, 201, 107, .06);
}

/* Nichts offen ist kein Warnzustand. */
.angebot-spalte-leer {
  border-color: var(--success, #8CE6A8);
  background: rgba(140, 230, 168, .06);
}

.angebot-spalte-titel {
  margin: 0 0 .5em;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.angebot-spalte-ok    .angebot-spalte-titel { color: var(--text-muted); }
.angebot-spalte-offen .angebot-spalte-titel { color: var(--warning, #FFC96B); }
.angebot-spalte-leer  .angebot-spalte-titel { color: var(--success, #8CE6A8); }

.angebot-liste { list-style: none; margin: 0; padding: 0; }
.angebot-liste li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 0 0 .45em;
  font-size: .9rem;
  line-height: 1.45;
}
.angebot-liste li:last-child { margin-bottom: 0; }

.angebot-haken { color: var(--success, #8CE6A8); flex: 0 0 auto; }
.angebot-marke { flex: 0 0 auto; font-weight: 700; }
.angebot-sperre  { color: var(--danger, #FF8A8A); }
.angebot-warnung { color: var(--warning, #FFC96B); }

/* Erledigtes ist Beleg, kein Inhalt -- es darf zurücktreten. */
.angebot-spalte-ok .angebot-liste li { color: var(--text-muted); }

.angebot-aktion { margin-top: .35em; }

/* --- Versandzeile und Vorgangs-Zeitachse (2026-08-19) --------------------- */
.angebot-versand {
  display: flex;
  gap: .5em;
  align-items: center;
  flex-wrap: wrap;
  margin: .6em 0 0;
  padding-top: .6em;
  border-top: 1px solid var(--line);
}
.angebot-versand-titel { flex: 0 0 auto; }
.angebot-testmarke {
  color: var(--warning, #FFC96B);
  font-size: .78rem;
}

/* Die Zeitachse eines Vorgangs. Erledigte Stationen tragen Farbe, offene
   bleiben grau -- an der ersten grauen sieht man, wo es hängt. */
.vorgang-achse {
  list-style: none;
  margin: 0;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--line);
}
.vorgang-station {
  position: relative;
  padding: 0 0 1em 14px;
  font-size: .92rem;
}
.vorgang-station:last-child { padding-bottom: 0; }
.vorgang-punkt {
  position: absolute;
  left: -25px;
  top: .35em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-0, #001023);
  border: 2px solid var(--line-strong, #1d3350);
}
.vorgang-erledigt .vorgang-punkt {
  background: var(--success, #8CE6A8);
  border-color: var(--success, #8CE6A8);
}
.vorgang-wann {
  margin-left: .6em;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.vorgang-erledigt .vorgang-wann { color: var(--text); }


/* =========================================================================
   P3, Anpassungsrunde Admin Pages (2026-08-23) — Freigaben-/Pitchpages-Seite
   ========================================================================= */

/* C5: volle Seitenbreite am Desktop, Handy bleibt responsiv. Ueberschreibt
   das max-width: var(--measure) aus dem Theme nur fuer die breiten Seiten. */
.page.page-wide {
  max-width: none;
  padding-inline: clamp(12px, 2.5vw, 44px);
}

/* C2: Pin-Leiste mit Sprungpunkten zu jeder Landingpage. */
.angebot-pins {
  display: flex;
  flex-wrap: wrap;
  gap: .45em;
  margin: 0 0 1.4em;
}
.angebot-pins a {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .35em .85em;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  font-size: .88rem;
  text-decoration: none;
  color: rgba(255, 255, 255, .85);
  white-space: nowrap;
}
.angebot-pins a:hover,
.angebot-pins a:focus-visible {
  border-color: var(--sky);
  color: var(--sky);
}
.angebot-pins .pin-offen {
  display: inline-block;
  min-width: 1.35em;
  text-align: center;
  padding: 0 .3em;
  border-radius: 999px;
  background: var(--sky);
  color: var(--midnight);
  font-size: .78rem;
  font-weight: 700;
}

/* C4: Funktions-Pills in einer Zeile, Icon zuerst, Text bei Hover/Fokus. */
.pill-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .45em;
  margin: 0 0 1.2em;
  overflow-x: auto;
  padding-bottom: .15em;
}
.pill-row form { display: inline; flex: 0 0 auto; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  white-space: nowrap;
  flex: 0 0 auto;
}
.btn-icon .pill-text { display: none; }
.btn-icon:hover .pill-text,
.btn-icon:focus-visible .pill-text { display: inline; }
@media (max-width: 640px) {
  .pill-row { flex-wrap: wrap; overflow-x: visible; }
}

/* C6/F7: Mailversand-Schalter — Mail-Symbol plus gruener On/Off-Toggle. */
.mail-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: none;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: .35em .85em;
  color: inherit;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
}
.mail-toggle:hover,
.mail-toggle:focus-visible { border-color: var(--sky); }
.mail-toggle .mt-track {
  position: relative;
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .28);
  transition: background .15s ease;
  flex: 0 0 auto;
}
.mail-toggle .mt-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left .15s ease;
}
.mail-toggle.is-on .mt-track { background: #2ecc71; }
.mail-toggle.is-on .mt-knob { left: 18px; }
.mail-toggle.is-off .mt-label { color: var(--text-muted); }

/* C3/F5: "Standard-Landingpage" als aufklappbarer Punkt in der Tab-Leiste. */
.portal-admin-tabs .portal-admin-more { position: relative; margin-left: auto; }
.portal-admin-tabs .portal-admin-more summary {
  list-style: none;
  cursor: pointer;
  color: rgba(255, 255, 255, .75);
  padding: .5em 1em;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, .25);
  font-size: .9rem;
  white-space: nowrap;
}
.portal-admin-tabs .portal-admin-more summary::-webkit-details-marker { display: none; }
.portal-admin-tabs .portal-admin-more summary::after { content: " ▾"; }
.portal-admin-tabs .portal-admin-more[open] summary::after { content: " ▴"; }
.portal-admin-tabs .portal-admin-more-liste {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: rgba(0, 16, 35, .97);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
  z-index: 20;
  min-width: 13rem;
}
@media (max-width: 640px) {
  .portal-admin-tabs .portal-admin-more { margin-left: 0; }
  .portal-admin-tabs .portal-admin-more-liste { position: static; box-shadow: none; }
}
