/* ==========================================================================
   ADMIN_MASTER — Swiss Prime Taste Design System
   Verbindlich: Skill `spt-design-system`. Leitbild ist rtc.spoti.ch.
   Schwarz dominiert, Gold ist der einzige Akzent, Creme ist Text.
   ========================================================================== */

:root {
  /* Flächen */
  --bg:          #0E0D0B;
  --surface:     #16150F;
  --overlay:     #080807;
  --border:      #262521;
  --hover-ghost: #1E1D18;

  /* Akzent — der einzige. Kein Blau, kein Verlauf, keine zweite Farbe. */
  --gold:        #D9B44A;
  --gold-hover:  #C79E33;
  --gold-light:  #E3CD86;

  /* Text */
  --text:        #FDFBF7;  /* Creme, primär — Überschriften und Werte */
  --text-label:  #BDB7AC;  /* Spaltentitel und Kennzahl-Labels */
  --text-muted:  #9A948A;  /* Lauftext, sekundär */

  /* Status — gedämpft, damit Gold der Akzent bleibt */
  --ok:          #4EA46A;
  --error:       #D9584E;
  --warn:        #D9A13C;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    var(--font-display);
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --radius: 2px;                          /* nie 8 oder 12 */
  --motion: 150ms cubic-bezier(.2, 0, 0, 1);
  --sidebar: 236px;
}

/* Schriften liegen lokal — nie von einem fremden Server. Google Fonts würde
   bei jedem Aufruf des Panels die IP an Google melden, und die CSP in
   app/Core/Response.php verbietet es ohnehin.

   Seit 15.10.2026 liegen die Dateien in assets/fonts/ (Lateinisch, je Schnitt
   eine Datei, SIL Open Font License — Lizenztexte daneben). Vorher griff die
   Systemschrift-Kette, und das Panel stand in Helvetica und Menlo. Anlass war
   der gemeinsame Fuss: Er sollte auf admin.spoti.ch genau so aussehen wie auf
   den anderen Anmeldungen, und dort steht er in Plus Jakarta Sans. */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');
}

/* --------------------------------------------------------------- Grundlage */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hover); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Alle Zahlen in Mono, rechtsbündig, mit gleich breiten Ziffern — sonst
   springen die Spalten beim Aktualisieren. */
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  text-align: right;
}

/* Mono-Label über jeder Sektion — ohne das sieht es nicht nach SPT aus. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

/* Grössen nach spt-design-system, für die Dichte eines Dashboards eine Stufe
   unter der Web-Skala. Die Farbe steht ausdrücklich da und wird nicht geerbt:
   eine Überschrift darf nie versehentlich im gedämpften Lauftextton landen. */
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text);
  letter-spacing: -0.02em;
}
h1 { font-size: 34px; line-height: 1.2;  font-weight: 700; }
h2 { font-size: 24px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; }
h3 { font-size: 18px; line-height: 1.4;  font-weight: 600; letter-spacing: -0.01em; }

.lead { color: var(--text-muted); font-size: 14px; margin: 4px 0 0; }
.muted { color: var(--text-muted); }
.accent { color: var(--gold-light); }   /* ein Wort der Headline, nicht mehr */

/* ---------------------------------------------------------------- Struktur */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  border-right: 1px solid var(--border);
  background: var(--overlay);
  padding: 24px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 0 20px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  text-align: center;
}
/* Die Wortmarke wird nie nachgebaut, umgefärbt oder verzerrt — nur skaliert,
   mit grosszügigem Weissraum. Die Datei ist bereits die Digitalfassung:
   weiss auf transparent. */
.brand-logo {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 14px;   /* mittig unter der Wortmarke wie auf der Anmeldung */
}
.brand-mark {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

/* Der Menübaum hat drei Stufen, und jede hat ihre eigene Helligkeit:
   Gruppentitel gold, Einträge hell, der aktive Eintrag weiss mit goldener
   Kante. Dazu trennt eine Haarlinie die Gruppen voneinander — Farbe allein
   reicht nicht, wenn zwölf Zeilen untereinander stehen. */
.nav-group {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 18px 20px 8px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
/* Der erste Titel steht direkt unter der Wortmarke — dort trennt schon
   deren Linie. */
.nav-group:first-child { margin-top: 0; border-top: 0; padding-top: 4px; }

.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 20px 7px 28px;
  color: var(--text-label);
  font-size: 14px;
  border-left: 2px solid transparent;
  transition: color var(--motion), background var(--motion);
}
.nav a:hover { background: var(--hover-ghost); color: var(--text); }
.nav a.is-active {
  color: var(--text);
  border-left-color: var(--gold);
  background: var(--hover-ghost);
}
.nav a .num { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.main { flex: 1; min-width: 0; padding: 28px 32px 64px; }

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.page-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ------------------------------------------------------------------- Karten */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.panel-body { padding: 20px; }

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.kpi { background: var(--surface); padding: 16px 18px; }
.kpi-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-label);
}
.kpi-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 8px;
  letter-spacing: -0.01em;
}
.kpi-value.is-warn  { color: var(--warn); }
.kpi-value.is-error { color: var(--error); }
.kpi-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.kpi-foot .up   { color: var(--ok); }
.kpi-foot .down { color: var(--error); }

/* --------------------------------------------------------------- Tabellen */

/* Gilt auf JEDER Breite, nicht nur auf dem Handy: Eine dichte Tabelle in einer
   schmalen Spalte läuft sonst aus ihrem Panel heraus, und die ganze Seite
   bekommt einen waagrechten Balken. */
.table-scroll { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-label);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table th.num, .table td.num { text-align: right; }
.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background var(--motion); }
.table tbody tr:hover { background: var(--hover-ghost); }
.table a { color: var(--text); }
.table a:hover { color: var(--gold); }

.cell-name { font-weight: 500; }
.cell-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Statusbadge — Pill ist hier die einzige erlaubte Ausnahme vom 2-px-Radius.
   Immer mit Textlabel, nie nur als farbiger Punkt. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}
.badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 9999px;
  background: currentColor;
  flex: 0 0 5px;
}
.badge.is-ok    { color: var(--ok);    border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); }
.badge.is-warn  { color: var(--warn);  border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.badge.is-error { color: var(--error); border-color: color-mix(in srgb, var(--error) 35%, var(--border)); }
.badge.is-muted { color: var(--text-muted); }

/* ------------------------------------------------------------- Bedienelemente */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  /* Hover ändert nur die Farbe — kein scale(), kein Bounce. */
  transition: background var(--motion), color var(--motion), border-color var(--motion);
}
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--gold-hover); color: var(--bg); }
.btn-secondary { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-secondary:hover { background: var(--hover-ghost); color: var(--gold-hover); border-color: var(--gold-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-ghost:hover { background: var(--hover-ghost); color: var(--text); }
.btn-danger { background: transparent; border-color: var(--error); color: var(--error); }
.btn-danger:hover { background: var(--hover-ghost); }

.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.seg a {
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  transition: background var(--motion), color var(--motion);
}
.seg a:last-child { border-right: none; }
.seg a:hover { background: var(--hover-ghost); color: var(--text); }
.seg a.is-active { background: var(--gold); color: var(--bg); }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--motion);
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: var(--text-muted); }
textarea.input { min-height: 84px; resize: vertical; }
.input-mono { font-family: var(--font-mono); font-size: 13px; }

/* Vom Browser ausgefüllte Felder färbt Chrome hellblau ein — auf Schwarz und
   Gold ein Fremdkörper, das Designsystem kennt kein Blau. Der eingesetzte
   innere Rahmen in der Feldfarbe ist kein Schatten, sondern der einzige Weg,
   Chromes Füllfarbe zu überdecken; gleich gelöst wie in SPT-LOGIN. */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--bg) inset;
  box-shadow: 0 0 0 1000px var(--bg) inset;
  transition: border-color var(--motion), background-color 9999s ease-out 0s;
}

.notice {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-left-width: 2px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 20px;
}
.notice-error { border-left-color: var(--error); color: var(--error); }
.notice-ok    { border-left-color: var(--ok);    color: var(--ok); }
.notice-info  { border-left-color: var(--gold);  color: var(--text-muted); }

/* ------------------------------------------------------------ Leerzustände */

.empty { padding: 44px 24px; text-align: center; color: var(--text-muted); }
.empty-title { color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.empty-text { font-size: 13px; max-width: 46ch; margin: 0 auto; line-height: 1.6; }

/* ------------------------------------------------------------- Diagramme */

.chart { width: 100%; height: 260px; display: block; }
.chart-axis { font-family: var(--font-mono); font-size: 10px; fill: var(--text-muted); }
.chart-grid { stroke: var(--border); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.chart-area { fill: var(--gold); opacity: 0.08; }
.chart-line-second { fill: none; stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-dot { fill: var(--gold); }
.chart-hit { fill: transparent; cursor: crosshair; }

.spark { display: block; width: 88px; height: 22px; }
.spark path { fill: none; stroke: var(--text-muted); stroke-width: 1.25; }
.spark.is-up path   { stroke: var(--ok); }
.spark.is-down path { stroke: var(--error); }

.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--motion);
  z-index: 10;
}
.chart-tip.is-visible { opacity: 1; }
.chart-tip b { color: var(--gold); font-weight: 600; }

.chart-wrap { position: relative; }

.legend {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 2px; background: var(--gold); display: inline-block; }
.legend i.second { background: var(--text-muted); }

/* ---------------------------------------------------------------- Anmeldung */

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card { width: 100%; max-width: 380px; }
.login-head { text-align: center; margin-bottom: 40px; }

/* Gross und prominent, aber mit Luft — die Wortmarke trägt die Seite. */
.login-logo {
  display: block;
  width: min(280px, 72%);
  height: auto;
  margin: 0 auto 26px;
}
.login-mark {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--text-muted);
}

/* ------------------------------------------------------------------ Raster */

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.stack > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-end { margin-left: auto; }

.bar {
  height: 3px;
  background: var(--gold);
  opacity: 0.5;
  border-radius: var(--radius);
  margin-top: 5px;
}

/* ----------------------------------------------------------------- Schmal */

@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex: none;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
  }
  .nav { display: flex; flex-wrap: wrap; }
  .nav-group { display: none; }
  /* Waagrecht nebeneinander: die Einrückung des Baums ergibt hier keinen
     Sinn mehr, und die Kante wandert von links nach unten. */
  .nav a { padding: 7px 14px; border-left: none; border-bottom: 2px solid transparent; }
  .nav a.is-active { border-left-color: transparent; border-bottom-color: var(--gold); }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 26px; }
  h2 { font-size: 20px; }
  .kpi-value { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ------------------------------------------------- Hilfsklassen
   Die Content-Security-Policy erlaubt kein style="…" im Markup
   (style-src 'self', ohne 'unsafe-inline'). Ein inline gesetzter Stil wird
   vom Browser stillschweigend verworfen — das Layout wäre kaputt, ohne dass
   irgendetwas fehlschlägt. Deshalb steht hier alles, was sonst inline stünde. */

.mb-12 { margin-bottom: 12px; }
.mb-14 { margin-bottom: 14px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }

.ta-right  { text-align: right; }
.d-inline  { display: inline; }
.w-full    { width: 100%; justify-content: center; }
.col-value { width: 90px; }
.flex-grow { flex: 1; min-width: 180px; }

.kpi-value-sm { font-size: 18px; }

/* Ankreuzfeld mit Fliesstext daneben — nicht das Mono-Versal-Label der Felder. */
.check-label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}

/* Balken in den Ranglisten, in 5-%-Stufen. Ein prozentgenauer Wert müsste
   inline gesetzt werden und würde an der CSP scheitern; optisch ist der
   Unterschied bei 3 px Höhe nicht wahrnehmbar. */
.bar-5{width:5%}    .bar-10{width:10%}  .bar-15{width:15%}  .bar-20{width:20%}
.bar-25{width:25%}  .bar-30{width:30%}  .bar-35{width:35%}  .bar-40{width:40%}
.bar-45{width:45%}  .bar-50{width:50%}  .bar-55{width:55%}  .bar-60{width:60%}
.bar-65{width:65%}  .bar-70{width:70%}  .bar-75{width:75%}  .bar-80{width:80%}
.bar-85{width:85%}  .bar-90{width:90%}  .bar-95{width:95%}  .bar-100{width:100%}

/* Gedankenstrich statt Kurve, wenn es keinen Verkehr gab. */
.spark { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }

/* Zweiter Abschnitt innerhalb eines Panels, klar abgesetzt. */
.panel-divided { border-top: 1px solid var(--border); }

/* ------------------------------------------------------------- Linkkacheln
   Der Startpunkt auf der Anmeldeseite und im Panel. Ein Symbol, eine
   Bezeichnung, optional eine Notiz — mehr braucht eine Kachel nicht.
   Hover ändert nur Farbe und Rahmen, nie die Grösse. */

.links-section { margin-top: 44px; }

.links-group + .links-group { margin-top: 28px; }

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 10px;
}

.link-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-width: 0;
  transition: background var(--motion), border-color var(--motion), color var(--motion);
}
.link-tile:hover {
  background: var(--hover-ghost);
  border-color: var(--gold);
  color: var(--text);
}
.link-tile:hover .link-tile-icon { color: var(--gold-hover); }

.link-tile-icon {
  flex: 0 0 auto;
  color: var(--gold);
  display: flex;
  transition: color var(--motion);
}

/* Nur die Überschrift, immer einzeilig, immer gleich hoch. Grossbuchstaben
   mit etwas Laufweite — bei 14px wirkte Versal zu wuchtig, 13px gleicht das
   optisch aus. */
.link-tile-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Auf der Anmeldeseite darf das Raster breiter werden als das Formular. */
/* Die Anmeldeseite ist sonst ein zentriertes Raster (place-items: center),
   in dem jedes Kind auf seine Inhaltsbreite schrumpft. Mit Links darunter
   soll das Formular zentriert bleiben, das Kachelraster aber die volle
   Breite nutzen — deshalb hier Flex mit stretch statt des geerbten center. */
.login-shell.has-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 56px 24px 72px;
}
.login-shell.has-links .login-card { margin: 0 auto; }
/* Die Trennlinie klebt nicht am Knopf (Chris, 16.10.2026: «sieht bissle
   gedrückt aus»): oben mehr Luft als darunter — die Linie gehört zu den
   Kacheln, nicht zum Formular. */
.links-public {
  width: 100%;
  max-width: 1080px;
  margin: 48px auto 0;
  border-top: 1px solid var(--border);
  padding-top: 36px;
}

/* Der gemeinsame Fuss (SPT-FOOTER v1, assets/spt-footer.css) unter den
   Kacheln — gesetzt wie auf den übrigen Anmeldungen (SPT-LOGIN): Abstand nach
   Designsystem, ohne eigene Fläche und Trennlinie, der Firmenname in Schrift
   statt der Wortmarke, die oben schon gross steht. */
.login-shell.has-links { padding-bottom: 0; }
.login-shell .spt-footer {
  align-self: stretch;
  margin-top: clamp(64px, 12vh, 136px);
  background: transparent;
  border-top: 0;
}
.spt-footer .spt-login__lockup {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
}

/* Symbolauswahl im Pflegeformular */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
}
.icon-option {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--motion), border-color var(--motion), background var(--motion);
}
.icon-option:hover { color: var(--text); background: var(--hover-ghost); }
.icon-option input { position: absolute; opacity: 0; pointer-events: none; }
.icon-option:has(input:checked) {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--hover-ghost);
}

/* Zeile in der Linkverwaltung */
.link-row-icon { color: var(--gold); display: flex; }
.link-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

@media (max-width: 860px) {
  .links-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .login-shell.has-links { padding: 32px 16px 56px; }
  .links-public { margin-top: 36px; padding-top: 28px; }
}
.col-icon { width: 26px; }

/* Kopfzeile der Seite: Zeitraumumschalter und Datum stehen zusammen rechts.
   Der Umschalter gehört ans Blatt, nicht an ein einzelnes Panel — er bestimmt
   Kennzahlen, Diagramm und Projekttabelle gleichzeitig. */
.page-head-side {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Untertitel in einem Panelkopf: sagt, worüber die Zahlen darunter laufen. */
.panel-sub {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Hinweis «Datenbank ergänzen»: Text und Knopf in einer Zeile, auf dem Handy untereinander. */
.db-pending { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
