/* Handelsregister-Checker: helles Design mit Marineblau und Petrol. */
:root {
  color-scheme: light;
  --grund: #f3f6f7; --flaeche: #fff; --text: #142638; --leise: #566b7d; --linie: #dbe4e9;
  --petrol: #127a78; --petrol-dunkel: #0e6260; --petrol-hell: #e4f3f1;
  --gut: #17693f; --gut-hell: #e4f4ea; --warn: #8a5a00; --warn-hell: #fbf1dc; --schlecht: #b3261e; --schlecht-hell: #fbe9e7; --neutral-hell: #edf1f4;
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; --mono: ui-monospace, "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.55 var(--schrift); }
[hidden] { display: none !important; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 4px; letter-spacing: -.02em; }
h2 { font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 14px; margin: 16px 0 6px; }
a { color: var(--petrol-dunkel); }
code, pre { font-family: var(--mono); font-size: 13px; }

/* Rahmen */
.rahmen { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.seitenleiste { background: var(--flaeche); border-right: 1px solid var(--linie); padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.marke { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 0 6px; line-height: 1.25; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
nav a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
nav a:hover { background: var(--neutral-hell); }
nav a[aria-current="page"] { background: var(--petrol-hell); color: var(--petrol-dunkel); }
main { padding: 30px 34px 60px; min-width: 0; max-width: 1240px; }
.kopf { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.unterzeile { color: var(--leise); margin: 0; max-width: 70ch; }

/* Bausteine */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.kennzahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kennzahl { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 14px 16px; }
.kennzahl b { display: block; font-size: 24px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kennzahl span { display: block; font-size: 13px; color: var(--leise); }
.balken { height: 6px; background: var(--neutral-hell); border-radius: 3px; overflow: hidden; margin: 8px 0 4px; }
.balken i { display: block; height: 100%; background: var(--petrol); }
.tabellenrahmen { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--leise); font-size: 12.5px; font-weight: 600; padding: 7px 10px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #edf1f4; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.klickbar { cursor: pointer; }
tr.klickbar:hover td { background: #f7fafb; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.klein { font-size: 13px; color: var(--leise); }
.umbruch { overflow-wrap: anywhere; }
.leer { color: var(--leise); padding: 22px 6px; text-align: center; }
.marker { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-hell); color: var(--leise); }
.marker.gut { background: var(--gut-hell); color: var(--gut); }
.marker.warn { background: var(--warn-hell); color: var(--warn); }
.marker.schlecht { background: var(--schlecht-hell); color: var(--schlecht); }
.marker.aktiv { background: var(--petrol-hell); color: var(--petrol-dunkel); }
.hinweis { border-radius: 10px; padding: 11px 14px; margin-bottom: 18px; background: var(--warn-hell); color: #5f3f00; }
.hinweis.schlecht { background: var(--schlecht-hell); color: #7c1a14; }
.hinweis.ruhig { background: var(--petrol-hell); color: #0d4f4d; }

/* Formulare */
label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
input, select { width: 100%; font: inherit; color: inherit; padding: 8px 10px; border: 1px solid #b9c7d0; border-radius: 8px; background: #fff; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--petrol); outline-offset: 1px; }
.feld { margin-bottom: 14px; }
.feldhilfe { font-size: 13px; color: var(--leise); margin: 4px 0 0; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.zeile { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filter { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filter > * { flex: 0 1 220px; }
button { font: inherit; font-weight: 600; padding: 7px 13px; border-radius: 8px; border: 1px solid #b9c7d0; background: #fff; color: var(--text); cursor: pointer; }
button:hover { background: var(--neutral-hell); }
button:disabled { opacity: .55; cursor: default; }
button.primaer { background: var(--petrol); border-color: var(--petrol); color: #fff; }
button.primaer:hover { background: var(--petrol-dunkel); }
button.leise { border-color: transparent; background: none; color: var(--leise); text-align: left; }
button.gefahr { color: var(--schlecht); }
.fehlertext { color: var(--schlecht); min-height: 1.3em; margin: 6px 0; font-size: 14px; }

/* Anmeldung */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.anmeldekarte { width: min(380px, 100%); margin: 0; }
.anmeldekarte h1 { font-size: 21px; margin: 10px 0 18px; }
.anmeldekarte button { width: 100%; }

/* Dialog */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 40px); color: var(--text); background: var(--flaeche); box-shadow: 0 20px 60px rgba(20, 38, 56, .25); }
.dialog::backdrop { background: rgba(20, 38, 56, .35); }
#dialoginhalt { padding: 22px 24px; }
.dialogkopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.dialogkopf h2 { margin: 0; overflow-wrap: anywhere; }
pre.block { background: #f4f7f8; border: 1px solid var(--linie); border-radius: 8px; padding: 12px; overflow: auto; max-height: 340px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 12px; }
dl.daten { display: grid; grid-template-columns: minmax(120px, 170px) minmax(0, 1fr); gap: 4px 14px; margin: 0; }
dl.daten dt { color: var(--leise); font-size: 13.5px; }
dl.daten dd { margin: 0; overflow-wrap: anywhere; }
.meldung { position: fixed; bottom: 18px; right: 18px; max-width: min(460px, calc(100vw - 36px)); background: var(--text); color: #fff; padding: 10px 15px; border-radius: 10px; z-index: 5; }
.meldung.fehler { background: var(--schlecht); }

@media (max-width: 760px) {
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .seitenleiste { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--linie); gap: 10px; }
  nav { flex-direction: row; flex-wrap: wrap; }
  main { padding: 20px 16px 50px; }
  dl.daten { grid-template-columns: minmax(0, 1fr); }
  dl.daten dd { margin-bottom: 8px; }
}
