/* ============================================================================
   Dashboard (/app) – Layout in einer zentrierten Spalte
   Baut auf lernbereich.css (.lb-karte, .lb-knopf, .lb-balken) und hivis.css auf.
   Alle Klassen mit Präfix dsh-, damit nichts mit anderen Seiten kollidiert.
   ========================================================================== */
#dashboard-app.lb { max-width: 1180px; }

/* Kopfzeile */
.dsh-kopf { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dsh-kopf h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; color: var(--tx, #e8eaee); }
.dsh-kopf p { margin: 0; color: var(--tx-2, #9aa1ad); line-height: 1.5; }

/* Gäste-Banner */
.dsh-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px;
  margin-bottom: 16px; padding: 14px 18px; border-radius: var(--r, 12px);
  background: var(--orange-dim, rgba(232,116,42,.14)); border: 1px solid var(--orange, #e8742a);
}
.dsh-banner p { margin: 0; flex: 1 1 380px; color: var(--tx, #e8eaee); line-height: 1.5; }
.dsh-banner a.dsh-link { color: var(--tx, #e8eaee); font-weight: 600; text-decoration: underline; }

/* Zeilen aus Karten */
.dsh-zeile { display: grid; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dsh-zeile.z-2 { grid-template-columns: 1fr 1fr; }
.dsh-zeile.z-gross { grid-template-columns: 1.7fr 1fr; }
.dsh-zeile.z-breit { grid-template-columns: 1.7fr 1fr; }
.dsh-zeile > .lb-karte { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.dsh-zeile h2, .dsh-karte-kopf h2 { margin: 0; }
.dsh-karte-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.dsh-link { color: var(--orange-hi, var(--orange, #e8742a)); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }
.dsh-link:hover { text-decoration: underline; }
.dsh-gross { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--tx, #e8eaee); margin: 0 0 6px; }
.dsh-text { color: var(--tx-2, #9aa1ad); line-height: 1.55; margin: 0; }

/* Lernstand mit Ring */
.dsh-stand { display: flex; align-items: center; gap: 26px; flex: 1; }
.dsh-ring {
  --p: 0; flex: 0 0 auto; width: 128px; height: 128px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--orange, #e8742a) calc(var(--p) * 1%), var(--surface-hi, #1a1e26) 0);
  display: flex; align-items: center; justify-content: center;
}
.dsh-ring::before { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface, #14171d); }
.dsh-ring span { position: relative; font-size: 28px; font-weight: 800; color: var(--tx, #e8eaee); }
.dsh-stand-text { min-width: 0; }
.dsh-stand-text .lb-reihe { margin-top: 12px; }

/* So läuft die Prüfung */
.dsh-ablauf { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 14px; flex: 1; }
.dsh-ablauf li { display: flex; gap: 12px; align-items: flex-start; }
.dsh-ablauf strong { display: block; color: var(--tx, #e8eaee); }
.dsh-ablauf span.t { color: var(--tx-2, #9aa1ad); font-size: 14px; line-height: 1.5; }

/* Icon im abgerundeten Quadrat */
.dsh-icon {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-dim, rgba(232,116,42,.14)); border: 1px solid var(--line-hi, rgba(255,255,255,.14));
}

/* Kennzahlen-Leiste */
.dsh-leiste {
  display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 16px; overflow: hidden;
  background: var(--surface, #14171d); border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 12px);
}
.dsh-feld { padding: 16px 18px; min-width: 0; border-left: 1px solid var(--line, rgba(255,255,255,.07)); }
.dsh-feld:first-child { border-left: 0; }
.dsh-feld .dsh-wert { display: block; font-size: 24px; font-weight: 800; line-height: 1.25; margin: 4px 0 2px; color: var(--tx, #e8eaee); }
.dsh-feld .dsh-wert.klein { font-size: 18px; padding: 3px 0; }
.dsh-feld .lb-klein { display: block; }

/* Sachgebiete */
.dsh-sg { display: grid; gap: 4px; }
.dsh-sg-zeile { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
.dsh-sg-zeile:first-child { border-top: 0; }
.dsh-badge {
  display: inline-flex; align-items: center; justify-content: center; height: 30px; border-radius: 8px;
  font-size: 13px; font-weight: 800; color: #14171d; background: hsl(var(--h, 48) 80% 62%);
}
.dsh-sg-zeile.gesperrt .dsh-badge { opacity: .45; }
.dsh-sg-name { display: block; font-weight: 600; color: var(--tx, #e8eaee); overflow-wrap: anywhere; }
.dsh-sg-zeile .lb-balken { margin: 6px 0 4px; height: 5px; }
.dsh-sg-zeile .lb-balken span { background: hsl(var(--h, 48) 80% 62%); }

/* Letzte Probeprüfungen */
.dsh-liste { list-style: none; margin: 0 0 12px; padding: 0; flex: 1; }
.dsh-liste li { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
.dsh-liste li:first-child { border-top: 0; }
.dsh-liste strong { color: var(--tx, #e8eaee); white-space: nowrap; }

/* Schnellzugriff */
.dsh-schnell { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dsh-kachel {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-width: 0; text-decoration: none;
  background: var(--surface, #14171d); border: 1px solid var(--line, rgba(255,255,255,.07)); border-radius: var(--r, 12px);
}
.dsh-kachel:hover { border-color: var(--orange, #e8742a); }
.dsh-kachel strong { display: block; color: var(--tx, #e8eaee); }
.dsh-kachel span.u { display: block; font-size: 13px; color: var(--tx-3, #6b7280); }

@media (max-width: 900px) {
  .dsh-zeile.z-2, .dsh-zeile.z-gross, .dsh-zeile.z-breit { grid-template-columns: 1fr; }
  .dsh-schnell { grid-template-columns: 1fr; }
  .dsh-leiste { grid-template-columns: 1fr 1fr; }
  .dsh-feld:nth-child(odd) { border-left: 0; }
  .dsh-feld:nth-child(n+3) { border-top: 1px solid var(--line, rgba(255,255,255,.07)); }
  .dsh-kopf h1 { font-size: 24px; }
}
@media (max-width: 480px) {
  .dsh-stand { flex-direction: column; align-items: flex-start; }
  .dsh-feld { padding: 14px; }
  .dsh-feld .dsh-wert { font-size: 20px; }
  .dsh-sg-zeile { grid-template-columns: 46px 1fr auto; gap: 10px; }
}
