/* ---------------------------------------------------------------------------
   DLRG Führerscheinkontrolle - Gestaltung nach dem Corporate Design der DLRG.
   Farben, Radien und Bedienhöhen entsprechen dem Stylesheet von dlrg.de.
   Hausschrift ist Univers 55 Roman; da sie nicht frei lizenziert ist, wird
   Archivo als metrisch naher Ersatz geladen.
--------------------------------------------------------------------------- */

/* Selbst gehostet, damit keine Anfragen an Dritte gehen (DSGVO).
   Archivo, SIL Open Font License 1.1 - siehe public/fonts/LICENSE.txt */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/archivo-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --dlrg-red: #e30613;
  --dlrg-red-dark: #b3050f;
  --dlrg-yellow: #ffed00;
  --dlrg-blue: #0069b4;
  --dlrg-blue-dark: #005194;
  --dlrg-blue-tint: #e8f1f8;
  --grey-text: #575756;
  --ink: #212529;
  --muted: #6c757d;
  --line: #dee2e6;
  --line-soft: #eef0f2;
  --surface: #ffffff;
  --page: #f8f9fa;
  --green: #28a745;
  --green-dark: #1e7e34;
  --green-tint: #e8f6ec;
  --yellow-tint: #fff8cc;
  --yellow-text: #7a6a00;
  --red-tint: #fdeaec;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Archivo', 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--dlrg-blue);
  text-decoration: none;
}

a:hover {
  color: var(--dlrg-blue-dark);
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

/* --------------------------------------------------------------- Kopfzeile */

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  background: var(--dlrg-red);
}

.app-header .wordmark {
  display: block;
  height: 20px;
  width: auto;
}

.app-header .divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.4);
}

.app-header .title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
}

.app-header .title a {
  color: #fff;
  text-decoration: none;
}

.app-header .org {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.app-header .spacer {
  flex-grow: 1;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.avatar:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.3);
}

/* ------------------------------------------------------------------ Layout */

.layout {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 64px);
}

.sidebar {
  width: 248px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--grey-text);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-item:hover {
  background: var(--page);
  color: var(--ink);
  text-decoration: none;
}

.nav-item.active {
  background: var(--dlrg-blue-tint);
  color: var(--dlrg-blue);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--dlrg-blue);
}

/* Zahl der offenen Selbstauskünfte neben dem Navigationspunkt. */
.nav-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 11px;
  background: var(--dlrg-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.nav-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #adb5bd;
  margin: 20px 12px 6px;
}

.nav-spacer {
  flex-grow: 1;
}

.nav-logout {
  border: 0;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  font-size: 14px;
}

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

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.page-head .spacer {
  flex-grow: 1;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}

.page-sub {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------- Bausteine */

.card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.card-body {
  padding: 18px 20px;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.card.accent-red {
  border-top: 3px solid var(--dlrg-red);
}

/* Aufklappbare Karte: eigener Pfeil statt des Browser-Dreiecks */
details.card > summary {
  list-style: none;
}

details.card > summary::-webkit-details-marker {
  display: none;
}

details.card > summary::after {
  content: '';
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
}

details.card[open] > summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

details.card > summary:hover {
  background: var(--page);
}

.columns {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.col-main {
  flex-grow: 1;
  min-width: 0;
}

.col-side {
  width: 344px;
  flex-shrink: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 24px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.kpi {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.kpi-number {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.kpi-hint {
  font-size: 13px;
  color: var(--muted);
}

.value-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.value {
  margin-top: 4px;
  font-size: 16px;
  color: var(--ink);
  word-break: break-word;
}

.definition {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.definition + .definition {
  margin-top: 9px;
}

.definition dt,
.definition .dt {
  flex-grow: 1;
  font-size: 14px;
  color: var(--grey-text);
}

.definition dd,
.definition .dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95em;
}

.small {
  font-size: 13px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------------------------------------------- Schaltflächen */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  background: var(--page);
  color: var(--ink);
  text-decoration: none;
}

.btn-primary {
  background: var(--dlrg-blue);
  border-color: var(--dlrg-blue);
  color: #fff;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--dlrg-blue-dark);
  border-color: var(--dlrg-blue-dark);
  color: #fff;
}

.btn-danger {
  border-color: #f3b9be;
  color: var(--dlrg-red-dark);
}

.btn-danger:hover {
  background: var(--red-tint);
  color: var(--dlrg-red-dark);
}

.btn-link {
  border: 0;
  background: none;
  height: auto;
  padding: 0;
  color: var(--dlrg-blue);
  font-weight: 500;
}

.btn-link:hover {
  background: none;
  color: var(--dlrg-blue-dark);
  text-decoration: underline;
}

.btn-lg {
  height: 52px;
  font-size: 17px;
  font-weight: 600;
  width: 100%;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------- Abzeichen */

.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ok {
  background: var(--green-tint);
  color: var(--green-dark);
}

.badge-warn {
  background: var(--yellow-tint);
  color: var(--yellow-text);
}

.badge-danger {
  background: var(--red-tint);
  color: var(--dlrg-red-dark);
}

.badge-danger-solid {
  background: var(--dlrg-red);
  color: #fff;
}

.badge-neutral {
  background: var(--line-soft);
  color: var(--grey-text);
}

.badge-info {
  background: var(--dlrg-blue-tint);
  color: var(--dlrg-blue);
}

.class-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--line-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

/* Auswahl der Fahrerlaubnisklassen in der Selbstauskunft. Die Fläche ist
   bewusst groß genug, um sie am Handy mit dem Daumen zu treffen. */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.class-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.class-option:hover {
  border-color: var(--dlrg-blue);
}

.class-option input[type='checkbox'] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--dlrg-blue);
  flex-shrink: 0;
}

.class-option .code {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  min-width: 30px;
}

.class-option .hint {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.class-option:has(input:checked) {
  border-color: var(--dlrg-blue);
  background: var(--dlrg-blue-tint);
}

/* Direkt in der Tabelle bearbeitbare Zeilen (Fahrerlaubnisklassen). Die
   Felder werden flacher, damit die Zeile nicht auseinanderfaellt. */
.table-edit input[type='text'],
.table-edit input[type='date'] {
  height: 34px;
  padding: 0 8px;
  font-size: 14px;
}

.table-edit .btn {
  height: 34px;
  padding: 0 12px;
}

/* Übersicht "wer ist auf was eingewiesen": Personen als Zeilen, Fahrzeuge als
   Spalten. Die Namensspalte bleibt beim Querscrollen stehen. */
.matrix th,
.matrix td {
  text-align: center;
  vertical-align: middle;
}

.matrix .matrix-name {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 1;
}

.matrix thead .matrix-name {
  background: var(--page);
}

.matrix-head {
  min-width: 104px;
  line-height: 1.3;
}

.matrix-cell {
  min-width: 104px;
  line-height: 1.2;
}

.matrix-ok {
  background: var(--green-tint);
  color: var(--green-dark);
}

.matrix-warn {
  background: var(--yellow-tint);
  color: var(--yellow-text);
}

.matrix-danger {
  background: var(--red-tint);
  color: var(--dlrg-red-dark);
}

.matrix-open {
  color: var(--muted);
}

.matrix-blocked {
  background: var(--page);
  color: #adb5bd;
}

.matrix-key {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* Benutzer bearbeiten: Das Formular klappt in der Tabellenzeile auf. Zwei
   Spalten, damit die acht Felder nicht zu einer langen Wurst werden. */
.user-edit > summary {
  cursor: pointer;
  color: var(--dlrg-blue);
  font-size: 14px;
  list-style: none;
}

.user-edit > summary::-webkit-details-marker {
  display: none;
}

.user-edit > summary::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}

.user-edit[open] > summary::before {
  transform: rotate(45deg) translateY(-2px);
}

.user-edit-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 12px 18px;
  width: 620px;
  max-width: 100%;
  margin: 14px 0 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--page);
}

.user-edit-panel .field {
  margin-bottom: 0;
}

.user-edit-panel .checkbox {
  margin-bottom: 0;
}

.user-edit-panel .span-2 {
  grid-column: 1 / -1;
}

.user-edit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 620px;
  max-width: 100%;
  margin-bottom: 6px;
}

/* Formular zum Ausdrucken (Erklärung zur Unterweisung). Es liegt bewusst
   außerhalb des Admin-Layouts: Was hier steht, geht aufs Papier. */
.sheet {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 28px 40px;
  background: var(--surface);
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--dlrg-red);
}

.sheet-org {
  font-size: 17px;
  font-weight: 700;
}

.sheet-title {
  margin-left: auto;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}

.sheet-table {
  width: 100%;
  margin-top: 22px;
  border-collapse: collapse;
}

.sheet-table th,
.sheet-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.sheet-table th {
  width: 210px;
  font-weight: 600;
  color: var(--grey-text);
}

.sheet-section {
  margin-top: 24px;
}

.sheet-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.sheet-list {
  margin: 0 0 10px;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.7;
}

.sheet-signatures {
  display: flex;
  gap: 24px;
  margin-top: 52px;
}

.sheet-signatures > div {
  flex: 1;
}

.sheet-line {
  border-bottom: 1px solid var(--ink);
  height: 28px;
  margin-bottom: 6px;
}

.sheet-footer {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sheet-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--page);
}

@media print {
  body {
    background: #fff;
  }

  .sheet {
    max-width: none;
    padding: 0;
  }

  .sheet-actions {
    display: none;
  }
}

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

.table-wrap {
  overflow-x: auto;
}

table.table {
  width: 100%;
  border-collapse: collapse;
}

table.table th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.table td {
  padding: 12px 20px;
  text-align: left;
  font-size: 15px;
  color: var(--grey-text);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

table.table tbody tr:last-child td {
  border-bottom: 0;
}

table.table tbody tr:hover {
  background: #fbfcfd;
}

table.table td.strong {
  font-weight: 500;
  color: var(--ink);
}

table.table td.tight,
table.table th.tight {
  padding-left: 8px;
  padding-right: 8px;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* --------------------------------------------------------------- Formulare */

.field {
  display: block;
  margin-bottom: 16px;
}

.field > label,
.label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.hint {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='date'],
input[type='number'],
input[type='time'],
select,
textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ced4da;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--dlrg-blue);
  outline-offset: 1px;
  border-color: var(--dlrg-blue);
}

.input-narrow {
  width: 110px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.checkbox input[type='checkbox'],
.radio input[type='radio'] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--dlrg-blue);
  flex-shrink: 0;
}

.checkbox label,
.radio label {
  font-size: 15px;
  color: var(--ink);
}

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form .field {
  margin-bottom: 0;
}

/* ------------------------------------------------------------ Rückmeldungen */

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.5;
}

.flash-success {
  background: var(--green-tint);
  color: var(--green-dark);
}

.flash-error {
  background: var(--red-tint);
  color: var(--dlrg-red-dark);
}

.flash-info {
  background: var(--dlrg-blue-tint);
  color: var(--dlrg-blue-dark);
}

.notice {
  padding: 14px 16px;
  border-left: 4px solid var(--dlrg-yellow);
  background: #fffdf0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--grey-text);
}

.notice-red {
  border-left-color: var(--dlrg-red);
  background: #fdf2f3;
}

.notice-blue {
  border-left-color: var(--dlrg-blue);
  background: #f5fafd;
}

/* --------------------------------------------------------------- Zeitachse */

.timeline-item {
  display: flex;
  gap: 12px;
}

.timeline-item + .timeline-item {
  margin-top: 14px;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.timeline-dot.control {
  background: var(--green);
}

.timeline-dot.escalation {
  background: var(--dlrg-red);
}

.timeline-dot.chip,
.timeline-dot.person,
.timeline-dot.settings {
  background: var(--dlrg-blue);
}

.timeline-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-meta {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

/* ------------------------------------------------------------------ Reiter */

.tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 22px 0 24px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  padding: 10px 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--grey-text);
  white-space: nowrap;
  text-decoration: none;
}

.tab.active {
  color: var(--dlrg-blue);
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--dlrg-blue);
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--grey-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.chip:hover {
  color: var(--ink);
  text-decoration: none;
}

.chip.active {
  background: var(--dlrg-blue);
  border-color: var(--dlrg-blue);
  color: #fff;
}

.chip.active:hover {
  color: #fff;
}

/* ------------------------------------------------- Anmeldung und Mitglieder */

.split {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
}

.split-brand {
  width: 44%;
  max-width: 620px;
  padding: 56px 60px;
  background: var(--dlrg-red);
  display: flex;
  flex-direction: column;
  color: #fff;
}

.split-brand .claim {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dlrg-yellow);
}

.split-brand h1 {
  margin-top: 14px;
  font-size: 44px;
  font-weight: 700;
  text-wrap: pretty;
}

.split-brand p {
  margin-top: 16px;
  max-width: 420px;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
}

.split-form {
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: var(--surface);
}

.split-form .inner {
  width: 100%;
  max-width: 400px;
}

.member {
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 20px 40px;
  background: var(--surface);
  min-height: calc(100vh - 56px);
}

.member-header {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  background: var(--dlrg-red);
}

.member-header .wordmark {
  height: 16px;
  width: auto;
}

.member-header .title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

.member h1 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  text-wrap: pretty;
}

.member p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--grey-text);
}

.scan-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 24px 16px;
  border: 2px dashed #b8d4e8;
  border-radius: 8px;
  background: #f5fafd;
  text-align: center;
}

.scan-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid #dbeaf5;
}

.scan-circle.pulsing {
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 105, 180, 0.35);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(0, 105, 180, 0);
  }
}

.success-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--green-tint);
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 16px;
  border: 1px solid #dbeaf5;
  border-radius: 8px;
  background: #f5fafd;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--dlrg-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.fact-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact-list .head {
  padding: 10px 14px;
  background: var(--page);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact-list .body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.fact .key {
  width: 128px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--muted);
}

.fact .val {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

/* ---------------------------------------------------------------- Anpassung */

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .columns {
    flex-direction: column;
  }

  .col-side {
    width: 100%;
  }
}

@media (max-width: 900px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
  }

  .nav-section,
  .nav-spacer {
    display: none;
  }

  .nav-item.active {
    box-shadow: none;
  }

  .main {
    padding: 20px 16px 40px;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .split {
    flex-direction: column;
    min-height: 0;
  }

  .split-brand {
    width: 100%;
    max-width: none;
    padding: 28px 24px;
  }

  .split-brand h1 {
    font-size: 32px;
  }

  .split-brand .stats {
    display: none;
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-header {
    padding: 0 14px;
    gap: 10px;
  }

  .app-header .org {
    display: none;
  }

  .page-title {
    font-size: 24px;
  }
}

@media print {
  .sidebar,
  .app-header,
  .btn,
  .filter-chips {
    display: none !important;
  }

  body {
    background: #fff;
  }
}
