/* ===================================================================
   Klima Heinzel – Seiten außerhalb des One-Pagers:
   Bewertungsformular (/bewerten) und Verwaltung (/verwaltung).
   Baut auf style.css auf (Farben, Schriften, Buttons).
   =================================================================== */

.app { background: var(--ice-2); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Kopf, Inhalt, Fuß */
.app-kopf { background: #fff; border-bottom: 1px solid var(--line); }
.app-kopf-innen {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px;
}
.app-inhalt { padding: 48px 0 80px; }
.app-schmal { max-width: 680px; }
.app-breit { max-width: 1000px; }
.app-fuss { border-top: 1px solid var(--line); padding: 20px 0; font-size: .92rem; }
.app-fuss .container { display: flex; gap: 20px; }
.app-fuss a { color: var(--muted); }

.app-titel { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 12px; }
.app-intro { color: var(--muted); font-size: 1.08rem; margin-bottom: 32px; max-width: 60ch; }
.app-zwischentitel { font-size: 1.4rem; margin: 48px 0 16px; }
.app-intro a, .app-form a { color: var(--blue); text-decoration: underline; }

/* Buttons auf hellem Grund */
.app .btn-outline { color: var(--blue); border-color: var(--line); background: #fff; }
.app .btn-outline:hover { border-color: var(--blue); background: var(--ice); }
.app .btn-sm { min-height: 44px; }
.btn-link-gefahr {
  background: none; border: 0; color: #B42318; text-decoration: underline; font-weight: 600;
  padding: 0 4px; min-height: 44px; cursor: pointer; font: inherit;
}
.btn-link-gefahr:hover { color: #7A271A; }

/* Navigation der Verwaltung */
.app-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-weight: 600; }
.app-nav a { color: var(--charcoal); padding: 10px 2px; }
.app-nav a:hover { color: var(--blue); }
.app-inline { display: inline; margin: 0; }

.app-reiter {
  display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 8px 0 28px;
  border-bottom: 1px solid var(--line);
}
.app-reiter a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
  color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.app-reiter a:hover { color: var(--blue); }
.app-reiter a[aria-current="page"] { color: var(--charcoal); border-bottom-color: var(--blue); }
.app-zahl {
  min-width: 24px; padding: 1px 7px; border-radius: 999px; font-size: .82rem; text-align: center;
  background: var(--ice); color: var(--charcoal);
}

/* Formulare */
.app-form { display: flex; flex-direction: column; gap: 20px; }
.app-form-schmal { max-width: 420px; }
.app-feld { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.app-feld > label, .app-feld > legend { font-weight: 700; font-size: .95rem; color: var(--charcoal); }
.app-feld > legend { margin-bottom: 6px; padding: 0; }
.app-pflicht { font-weight: 400; color: var(--muted); }
.app-hilfe { font-size: .9rem; color: var(--muted); margin: 0; }
.app-zeile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.app-form input[type="text"], .app-form input[type="email"], .app-form input[type="password"],
.app-form select, .app-form textarea, .app-link-feld input {
  width: 100%; padding: 12px 14px; min-height: 48px;
  border: 1.5px solid #9AA4AE; border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
.app-form textarea { resize: vertical; }
.app-form input:focus-visible, .app-form select:focus-visible, .app-form textarea:focus-visible,
.app-link-feld input:focus-visible {
  outline: 3px solid var(--blue); outline-offset: 1px; border-color: var(--blue);
}
.app-form [aria-invalid="true"] { border-color: #B42318; }
.app-feldfehler { color: #B42318; font-weight: 600; font-size: .92rem; margin: 0; }
.app-check { display: flex; align-items: flex-start; gap: 12px; font-size: .95rem; color: var(--ink); }
.app-check input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }

/* Sternewahl: echte Radio-Buttons, per Tastatur bedienbar */
.sterne-wahl { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.sterne-wahl input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sterne-wahl label { cursor: pointer; padding: 4px; border-radius: 8px; line-height: 0; }
.sterne-wahl svg { fill: #E4E7EC; stroke: #98A2B3; stroke-width: 1.2; transition: fill .15s; }
.sterne-wahl input:checked ~ label svg,
.sterne-wahl label:hover svg, .sterne-wahl label:hover ~ label svg { fill: #F5B400; stroke: #8A5A00; }
.sterne-wahl input:focus-visible + label { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Meldungen */
.app-meldung { border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 24px; }
.app-meldung ul { margin: 6px 0 0 18px; }
.app-meldung a { color: inherit; text-decoration: underline; }
.app-meldung-fehler { background: #FEF3F2; border: 1px solid #FDA29B; color: #7A271A; }
.app-meldung-ok { background: #ECFDF3; border: 1px solid #75E0A7; color: #05603A; }
.app-meldung:focus { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Karten und Listen */
.app-karte { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.app-karte h2 { font-size: 1.3rem; margin-bottom: 18px; }
.app-neuer-link {
  background: #EEF5FB; border: 2px solid var(--blue); border-radius: var(--radius);
  padding: 24px; margin-bottom: 28px;
}
.app-neuer-link h2 { font-size: 1.3rem; margin-bottom: 8px; }
.app-neuer-link p { margin-bottom: 14px; }
.app-link-feld { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.app-link-feld input { flex: 1 1 280px; font-family: ui-monospace, Consolas, monospace; font-size: .92rem; }
.app-link-aktionen { display: flex; gap: 10px; flex-wrap: wrap; }
.app-leer { background: #fff; border: 1px dashed #9AA4AE; border-radius: var(--radius-sm); padding: 20px; color: var(--muted); }

.app-tabelle-rahmen { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.app-tabelle { width: 100%; min-width: 620px; border-collapse: collapse; }
.app-tabelle th { text-align: left; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; border-bottom: 2px solid var(--line); }
.app-tabelle td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }

.app-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; }
.app-status-offen, .app-status-eingereicht { background: #FEF0C7; color: #7A2E0E; }
.app-status-eingeloest, .app-status-freigegeben { background: #DCFAE6; color: #085D3A; }
.app-status-abgelaufen, .app-status-widerrufen, .app-status-ausgeblendet { background: #EAECF0; color: #344054; }
.app-status-abgelehnt { background: #FEE4E2; color: #912018; }

.app-bewertungen { list-style: none; display: grid; gap: 16px; }
.app-bewertung { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.app-bewertung-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.app-sterne { display: flex; gap: 2px; margin: 0; }
.app-sterne svg { fill: #E4E7EC; stroke: #98A2B3; stroke-width: 1.2; }
.app-sterne svg.an { fill: #F5B400; stroke: #8A5A00; }
.app-bewertung-text { font-size: 1.05rem; color: var(--ink); white-space: pre-wrap; margin: 0 0 12px; }
.app-bewertung-wer { margin: 0 0 6px; color: var(--charcoal); }
.app-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

@media (max-width: 640px) {
  .app-zeile { grid-template-columns: 1fr; }
  .app-inhalt { padding: 32px 0 56px; }
  .app-karte, .app-bewertung, .app-neuer-link { padding: 18px; }
}
