/* Gridmeter Partner-Portal – Design "Mischung A+B" (Praezision + Klarheit)
   Bildmarke & Monospace-Messwerte aus Richtung A, helle formularfreundliche
   Flaeche aus Richtung B. Absender: "Ein Produkt der RCo-Energie GmbH". */

:root {
  --papier: #F5F6F2;
  --weiss: #FFFFFF;
  --graphit: #0E1311;   /* dunkle Flaechen: Hero, Messwert-Karte */
  --flaeche: #151C19;
  --linie-dunkel: #26312C;
  --linie-dunkel2: #3A4842;
  --nebel: #E9EEEB;      /* Text auf dunkel */
  --stahl: #9AA6A0;      /* Sekundaertext auf dunkel */
  --tinte: #14211C;      /* Text auf hell */
  --schiefer: #5A6762;   /* Sekundaertext auf hell */
  --rand-hell: #E1E4DE;
  --signal: #FFB547;     /* Akzent / Primaer-Button (Text dunkel) */
  --signal-text: #9A5B00;/* Signal als Text auf hell (Kontrast ~5:1) */
  --rot: #C0392B;
  --gruen-ok: #0B6E69;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--papier);
  color: var(--tinte);
  min-height: 100vh;
}

.mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace; }

/* --- Gesamtlayout: Hero links, Formularkarte rechts --- */
.shell {
  max-width: 1040px;
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 28px;
  padding: 28px;
  align-items: stretch;
}

/* --- Hero (dunkel, Graphit) --- */
.hero {
  background: var(--graphit);
  color: var(--nebel);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
}
.hero::after { /* dezenter Rasterschein */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(520px 320px at 85% 15%, rgba(255,181,71,.10), transparent 60%);
  pointer-events: none;
}
.marke { display: flex; align-items: center; gap: 11px; }
.marke .wort { font-family: 'IBM Plex Mono', monospace; font-size: 23px; font-weight: 500; letter-spacing: -.5px; }
.kicker {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--signal);
}
.hero h1 { margin: 0; font-size: 44px; line-height: 1.04; font-weight: 600; letter-spacing: -1px; }
.hero .sub { margin: 0; font-size: 16px; line-height: 1.5; color: #B7C2BC; max-width: 34ch; }

/* Messwert-Karte im Hero (Monospace, Richtung A) */
.messwert {
  margin-top: auto;
  background: var(--flaeche);
  border: 1px solid var(--linie-dunkel);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 7px;
}
.messwert .zeile { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--stahl); }
.messwert .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); display: inline-block; margin-right: 6px; vertical-align: middle; }
.messwert .wert { font-family: 'IBM Plex Mono', monospace; font-size: 32px; font-weight: 500; color: var(--nebel); }
.messwert .wert small { font-size: 15px; color: var(--stahl); }
.absender { font-size: 12px; color: var(--stahl); }

/* --- Formular-/Inhaltskarte (hell, Richtung B) --- */
.panel {
  background: var(--weiss);
  border: 1px solid var(--rand-hell);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card { width: 100%; }

h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; letter-spacing: -.4px; color: var(--tinte); }
.lead { margin: 0 0 22px; color: var(--schiefer); font-size: 14.5px; line-height: 1.5; }

label { display: block; font-size: 13.5px; font-weight: 600; margin: 16px 0 7px; color: var(--tinte); }
input, select {
  width: 100%;
  padding: 13px 15px;
  border: 2px solid transparent;
  border-radius: 13px;
  font-size: 15px;
  font-family: inherit;
  background: var(--papier);
  color: var(--tinte);
}
input:focus, select:focus { outline: none; border-color: var(--signal); background: var(--weiss); }

button {
  cursor: pointer; border: none; font-weight: 600;
  font-size: 15px; font-family: inherit;
}
button.primary {
  background: var(--signal); color: var(--graphit);
  width: 100%; margin-top: 22px; padding: 14px 18px; border-radius: 12px;
}
button.primary:hover { background: #ffc266; }
button.ghost { background: transparent; color: var(--signal-text); padding: 6px; font-weight: 600; }
button.klein { padding: 9px 13px; font-size: 13px; border-radius: 10px; background: #EEF1EC; color: var(--tinte); }
button.klein:hover { background: #e4e8e0; }
button:disabled { opacity: .5; cursor: default; }

.wechsel { text-align: center; margin-top: 18px; font-size: 14px; color: var(--schiefer); }

.meldung { margin-top: 16px; padding: 12px 14px; border-radius: 12px; font-size: 14px; display: none; line-height: 1.45; }
.meldung.fehler { background: #fcebe9; color: var(--rot); display: block; }
.meldung.ok { background: #e3efec; color: var(--gruen-ok); display: block; }

/* --- Dashboard: API-Key --- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.aktiv { background: #e3efec; color: var(--gruen-ok); }
.keybox {
  background: var(--graphit); color: var(--nebel);
  border-radius: 12px; padding: 15px 16px; margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace; font-size: 15px; letter-spacing: .5px;
  word-break: break-all;
}
.reihe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.meta { font-size: 12px; color: var(--schiefer); margin-top: 12px; font-family: 'IBM Plex Mono', monospace; }
.hinweis {
  font-size: 13px; color: var(--schiefer); margin-top: 20px; line-height: 1.55;
  border-top: 1px solid var(--rand-hell); padding-top: 16px;
}
.hinweis code { font-family: 'IBM Plex Mono', monospace; background: var(--papier); padding: 1px 6px; border-radius: 6px; }
.hidden { display: none; }

/* --- Mobil --- */
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; padding: 16px; gap: 16px; min-height: auto; }
  .hero { padding: 28px; border-radius: 16px; }
  .hero h1 { font-size: 34px; }
  .panel { padding: 26px; border-radius: 16px; }
  .messwert { margin-top: 24px; }
}
