/* ==========================================================================
   FrigoWatch° Corporate Design
   Swiss International Style: Raster, Hairlines, viel Weissraum.
   Eine warme Signalfarbe, dem Alarm und der Marke vorbehalten.
   ========================================================================== */

:root {
  /* Farben */
  --ink:        #0D2129;   /* Text, fast schwarzes Petrol */
  --ink-soft:   #45606B;   /* Sekundärtext */
  --paper:      #FAFCFC;   /* Grundfläche */
  --mist:       #EDF3F4;   /* getönte Bänder */
  --ice:        #DCEBEF;   /* Akzentfläche kalt */
  --line:       #D4E0E3;   /* Hairlines */
  --brand:      #0B4255;   /* Primär: Tiefsee-Petrol */
  --brand-deep: #082F3D;
  --signal:     #FF5A1F;   /* Signal-Orange: Marke + Alarm */
  --ok:         #177D54;
  --warn:       #C97B08;
  --crit:       #D63415;
  --offline:    #5A7078;

  /* Typografie */
  --font-sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Spline Sans Mono", "SF Mono", Consolas, monospace;

  /* Geometrie */
  --radius: 3px;
  --shell: 1180px;
}

/* ---------- Basis ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; font-weight: 650; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }

p { color: var(--ink-soft); }
strong { color: var(--ink); }

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

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 28px; }
.shell-narrow { max-width: 860px; }

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.mono-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 1.1rem;
}

/* ---------- Marke ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-tile { width: 30px; height: 30px; flex: none; }
.brand-word {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand-word i { font-style: normal; color: var(--signal); }
.brand-word-light { color: #fff; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600; font-size: 0.95rem;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.btn-solid { background: var(--brand); color: #fff; }
.btn-solid:hover { background: var(--brand-deep); }

.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--mist); }

/* ---------- Statuspunkte & Pills ---------- */

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot-ok   { background: var(--ok); }
.dot-warn { background: var(--warn); }
.dot-crit { background: var(--crit); }

.pill {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 2px; white-space: nowrap;
}
.pill-ok   { background: #E2F2EA; color: var(--ok); }
.pill-warn { background: #F9EDD8; color: var(--warn); }
.pill-crit { background: #FBE3DD; color: var(--crit); }
.pill-off  { background: #E5EBED; color: var(--offline); }

/* ==========================================================================
   LANDING
   ========================================================================== */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 252, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 36px;
  height: 66px;
}
.topnav { display: flex; gap: 26px; margin-right: auto; }
.topnav a {
  color: var(--ink-soft); font-weight: 500; font-size: 0.95rem;
  border-bottom: 2px solid transparent; padding: 4px 0;
}
.topnav a:hover { color: var(--ink); border-bottom-color: var(--signal); }
.topbar-actions { display: flex; gap: 10px; }

/* ---------- Hero ---------- */

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--mist) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
  padding-top: 84px; padding-bottom: 84px;
}
.hero-copy h1 { margin-bottom: 1.2rem; }
.lede { font-size: 1.16rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; margin-top: 2rem; flex-wrap: wrap; }

.hero-facts {
  list-style: none;
  display: flex; gap: 0;
  margin-top: 2.6rem;
  border-top: 1px solid var(--line);
}
.hero-facts li {
  flex: 1; padding: 14px 18px 0 0;
  display: flex; flex-direction: column; gap: 2px;
}
.hero-facts li + li { border-left: 1px solid var(--line); padding-left: 18px; }
.hero-facts strong { font-family: var(--font-mono); font-size: 1.15rem; }
.hero-facts span { font-size: 0.82rem; color: var(--ink-soft); }

/* Hero-Chart */

.hero-chart {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: 0 24px 48px -32px rgba(13, 33, 41, 0.35);
}
.chart-head { display: flex; justify-content: space-between; margin-bottom: 10px; }
.chart-date { color: var(--signal); }

.hero-chart svg { width: 100%; height: auto; display: block; }
.hero-chart .grid line { stroke: var(--mist); stroke-width: 1; }
.hero-chart .axis-labels text {
  font-family: var(--font-mono); font-size: 11px; fill: var(--ink-soft);
}
.hero-chart .threshold {
  stroke: var(--warn); stroke-width: 1; stroke-dasharray: 5 5;
}
.hero-chart .threshold-label {
  font-family: var(--font-mono); font-size: 10.5px; fill: var(--warn);
  letter-spacing: 0.05em;
}
.temp-line {
  fill: none; stroke: var(--brand); stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1200; stroke-dashoffset: 1200;
  animation: drawline 2.4s 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes drawline { to { stroke-dashoffset: 0; } }

.alarm-dot { fill: var(--signal); opacity: 0; animation: appear 0.4s 2.1s forwards; }
.alarm-pulse {
  fill: none; stroke: var(--signal); stroke-width: 2; opacity: 0;
  animation: pulse 2s 2.3s ease-out infinite;
}
@keyframes appear { to { opacity: 1; } }
@keyframes pulse {
  0%   { opacity: 0.8; r: 6; }
  70%  { opacity: 0;   r: 22; }
  100% { opacity: 0;   r: 22; }
}
.alarm-stem {
  stroke: var(--signal); stroke-width: 1; stroke-dasharray: 3 3;
  opacity: 0; animation: appear 0.4s 2.2s forwards;
}
.alarm-flag { opacity: 0; animation: appear 0.5s 2.3s forwards; }
.alarm-flag rect { fill: var(--ink); rx: 3; }
.alarm-flag text { font-family: var(--font-mono); font-size: 11px; fill: #BFD4DB; }
.alarm-flag .flag-strong { fill: #fff; font-weight: 600; font-size: 12px; }

.hero-chart figcaption {
  display: flex; gap: 10px; align-items: baseline;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.88rem; color: var(--ink-soft);
}
.hero-chart figcaption .dot { transform: translateY(-1px); }

/* Lade-Animation */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.reveal.d1 { animation-delay: 0.1s; }
.reveal.d2 { animation-delay: 0.2s; }
.reveal.d3 { animation-delay: 0.32s; }
.reveal.d4 { animation-delay: 0.45s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

/* ---------- Bänder ---------- */

.band { padding: 96px 0; border-bottom: 1px solid var(--line); }
.band-tint { background: var(--mist); }

.band-head {
  display: flex; align-items: baseline; gap: 22px;
  margin-bottom: 56px;
  max-width: 880px;
}
.band-head-tight { margin-bottom: 32px; }
.index-no {
  font-family: var(--font-mono); font-weight: 600;
  font-size: 0.85rem; color: var(--signal);
  flex: none;
  border: 1px solid currentColor; border-radius: 2px;
  padding: 2px 7px;
  transform: translateY(-4px);
}

.cols-3 {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.cols-3 article { padding: 28px 32px 0 0; }
.cols-3 article + article { border-left: 1px solid var(--line); padding-left: 32px; }
.cols-3 h3 { margin-bottom: 0.7rem; }

/* Schritte */

.steps {
  list-style: none; counter-reset: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.steps li:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -26px rgba(13, 33, 41, 0.4);
}
.step-no {
  font-family: var(--font-mono); font-weight: 600; font-size: 0.95rem;
  color: #fff; background: var(--brand);
  width: 30px; height: 30px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem;
}
.steps h3 { margin-bottom: 0.6rem; }
.steps p { font-size: 0.96rem; }

/* Dunkles Band */

.band-dark { background: var(--brand-deep); border-bottom: none; }
.band-dark h2 { color: #fff; }
.band-dark .index-no { color: var(--signal); }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.feature-grid article {
  padding: 30px 28px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  transition: background 0.2s ease;
}
.feature-grid article:hover { background: rgba(255, 255, 255, 0.05); }
.feature-grid h3 { color: #fff; margin-bottom: 0.6rem; }
.feature-grid h3::before {
  content: ""; display: block;
  width: 22px; height: 3px; background: var(--signal);
  margin-bottom: 14px;
}
.feature-grid p { color: #A9C2CB; font-size: 0.95rem; }

/* ---------- Preise ---------- */

.price-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  max-width: 880px;
}
.price-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 32px;
  display: flex; flex-direction: column; gap: 22px;
}
.price-card-featured { border: 2px solid var(--brand); position: relative; }
.price-card-featured::before {
  content: "Meistgewählt";
  position: absolute; top: -11px; left: 28px;
  background: var(--brand); color: #fff;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 2px;
}
.price-card h3 { font-size: 1.4rem; }
.price-for { font-size: 0.92rem; margin-top: 2px; }
.price-main { display: flex; align-items: baseline; gap: 8px; color: var(--ink); }
.price-main .mono-num { font-size: 2.3rem; font-weight: 600; }
.price-unit { color: var(--ink-soft); font-size: 0.95rem; }
.price-once { font-size: 0.86rem; margin-top: 4px; }
.price-list { list-style: none; display: grid; gap: 9px; }
.price-list li {
  padding-left: 24px; position: relative; font-size: 0.95rem; color: var(--ink-soft);
}
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.price-note { margin-top: 26px; font-size: 0.88rem; max-width: 880px; }

/* Rechnung */

.math-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.math-card {
  border-top: 3px solid var(--brand);
  background: var(--mist);
  padding: 26px 26px 30px;
}
.math-card:nth-child(2) { border-top-color: var(--signal); }
.math-big { display: block; font-size: 2rem; font-weight: 600; margin-bottom: 8px; }
.math-card p { font-size: 0.95rem; }

/* ---------- FAQ ---------- */

#faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px;
}
#faq summary {
  cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.02rem;
  padding: 18px 52px 18px 22px;
  position: relative;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono); font-size: 1.2rem; color: var(--signal);
  transition: transform 0.2s ease;
}
#faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
#faq details p { padding: 0 22px 20px; max-width: 720px; }

/* ---------- Kontakt CTA ---------- */

.band-cta { background: var(--brand); border-bottom: none; }
.band-cta h2 { color: #fff; margin-bottom: 1rem; }
.band-cta .lede { color: #B9D2DA; }
.cta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start;
}
.cta-form {
  background: #fff; border-radius: var(--radius);
  padding: 32px; display: grid; gap: 16px;
}
.cta-form label, .login-form label {
  display: grid; gap: 6px;
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.cta-form input, .login-form input {
  font-family: var(--font-sans); font-size: 1rem;
  padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cta-form input:focus, .login-form input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11, 66, 85, 0.14);
}
.form-hint { font-size: 0.8rem; }
.form-thanks { font-weight: 600; color: var(--ink); padding: 18px 0; }

/* ---------- Footer ---------- */

.footer { background: var(--paper); }
.footer-grid {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px; padding-top: 56px; padding-bottom: 36px;
}
.footer-claim { margin-top: 14px; font-size: 0.9rem; max-width: 340px; }
.footer-grid nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-grid nav a { color: var(--ink-soft); font-size: 0.92rem; }
.footer-grid nav a:hover { color: var(--ink); }
.footer-base {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 18px; padding-bottom: 26px;
}

/* ==========================================================================
   LOGIN
   ========================================================================== */

.login-page { min-height: 100vh; }
.login-split {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
  min-height: 100vh;
}
.login-side {
  background: var(--brand-deep);
  padding: 40px 44px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-side-body { margin: auto 0; position: relative; z-index: 1; }
.login-side-temp {
  font-size: clamp(3rem, 6vw, 4.6rem); font-weight: 600; color: #fff;
  letter-spacing: -0.03em;
}
.login-side-line { color: #A9C2CB; font-size: 1.1rem; margin-top: 14px; }
.login-side-foot { color: #5E7E8A; position: relative; z-index: 1; }
.login-side-curve {
  position: absolute; left: 0; right: 0; bottom: 18%;
  width: 100%; height: 120px; opacity: 0.5;
}
.login-side-curve path { stroke: #1E5B70; stroke-width: 2; }

.login-main { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.login-form { width: 100%; max-width: 400px; display: grid; gap: 16px; }
.login-form h1 { font-size: 2rem; }
.login-sub { margin-bottom: 10px; }
.login-error { color: var(--crit); font-size: 0.88rem; }
.login-aux { display: flex; justify-content: space-between; font-size: 0.88rem; }
.login-demo {
  margin-top: 18px; padding: 16px 18px;
  background: var(--mist); border-radius: var(--radius);
  border-left: 3px solid var(--signal);
}
.login-demo p { font-size: 0.86rem; margin-top: 6px; }
.login-demo code {
  font-family: var(--font-mono); font-size: 0.82rem;
  background: #fff; padding: 1px 6px; border-radius: 2px;
  border: 1px solid var(--line);
}

/* ==========================================================================
   APP / DASHBOARD
   ========================================================================== */

.app { background: var(--mist); min-height: 100vh; }

.appbar {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.appbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 28px;
  height: 62px;
  display: flex; align-items: center; gap: 28px;
}
.appbar-site { border-left: 1px solid var(--line); padding-left: 24px; }
.apptabs { display: flex; gap: 4px; margin-left: auto; }
.apptab {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.92rem;
  color: var(--ink-soft);
  background: none; border: none; cursor: pointer;
  padding: 20px 14px 17px;
  border-bottom: 3px solid transparent;
  transition: color 0.15s ease;
}
.apptab:hover { color: var(--ink); }
.apptab.is-active { color: var(--ink); border-bottom-color: var(--signal); }
.appbar-user { display: flex; align-items: center; gap: 14px; }
.appbar-mail { font-size: 0.85rem; color: var(--ink-soft); }

.appmain { max-width: 1320px; margin: 0 auto; padding: 36px 28px 80px; }

.view { display: none; }
.view.is-active { display: block; animation: viewin 0.3s ease; }
@keyframes viewin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.view-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px;
}
.view-head h1 { font-size: 1.7rem; }

/* Statusbanner */

.status-banner {
  display: flex; align-items: center; gap: 14px;
  background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.status-banner p { font-size: 0.95rem; flex: 1; }
.status-banner .dot { animation: blink 1.6s ease infinite; }
@keyframes blink { 50% { opacity: 0.25; } }

/* KPI */

.kpi-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 24px;
}
.kpi { padding: 18px 22px; display: grid; gap: 6px; }
.kpi + .kpi { border-left: 1px solid var(--line); }
.kpi-label {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.kpi-value { font-size: 1.5rem; font-weight: 600; }
.kpi-warn { color: var(--warn); }

/* Gerätekarten */

.unit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.unit-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px 18px;
  display: grid; gap: 14px;
}
.unit-card.is-warn { border-left: 4px solid var(--warn); }
.unit-card.is-crit { border-left: 4px solid var(--crit); }
.unit-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.unit-name { font-weight: 650; font-size: 1.05rem; }
.unit-place { font-size: 0.82rem; color: var(--ink-soft); margin-top: 2px; }
.unit-temp-row { display: flex; align-items: baseline; gap: 14px; }
.unit-temp { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 600; letter-spacing: -0.02em; }
.unit-temp.t-warn { color: var(--warn); }
.unit-temp.t-crit { color: var(--crit); }
.unit-target { font-size: 0.82rem; color: var(--ink-soft); }
.unit-spark { width: 100%; height: 56px; display: block; }
.unit-spark .spark-line { fill: none; stroke: var(--brand); stroke-width: 1.8; }
.unit-spark .spark-area { fill: var(--ice); opacity: 0.55; }
.unit-spark .spark-warnline { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 4 4; }
.unit-meta {
  display: flex; gap: 18px;
  border-top: 1px solid var(--line); padding-top: 12px;
  font-size: 0.8rem; color: var(--ink-soft);
}
.unit-meta b { color: var(--ink); font-weight: 600; font-family: var(--font-mono); font-size: 0.8rem; }

/* Panels */

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.panel-head h2 { font-size: 1.15rem; }
.panel-head-gap { margin-top: 28px; }
.panel-hint { font-size: 0.88rem; margin-bottom: 16px; }
.panel-actions { margin-top: 16px; }
.panel-wide { grid-column: 1 / -1; }

/* Analyse */

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.seg-btn {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.86rem;
  color: var(--ink-soft); background: none; border: none; cursor: pointer;
  padding: 8px 16px;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.is-active { background: var(--brand); color: #fff; }

.unit-picker { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.unit-pick {
  font-family: var(--font-sans); font-weight: 600; font-size: 0.88rem;
  background: #fff; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 16px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.unit-pick:hover { color: var(--ink); }
.unit-pick.is-active { border-color: var(--brand); color: var(--brand); background: var(--ice); }

.legend { display: flex; gap: 18px; font-size: 0.8rem; color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-line { width: 18px; height: 0; border-top: 2.5px solid var(--brand); display: inline-block; }
.legend-warnl { border-top: 2px dashed var(--warn); }
.legend-critl { border-top: 2px dashed var(--crit); }

#bigChart { width: 100%; height: 320px; display: block; }
.chart-x { display: flex; justify-content: space-between; margin-top: 8px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-cell {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; display: grid; gap: 4px;
}
.stat-cell .kpi-label { font-size: 0.66rem; }
.stat-cell .stat-val { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; }

/* Alarme */

.alarm-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.rules-table { width: 100%; border-collapse: collapse; }
.rules-table th {
  text-align: left;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid var(--line);
}
.rules-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--mist); font-size: 0.94rem; }
.rules-table input {
  font-family: var(--font-mono); font-size: 0.92rem;
  width: 90px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper);
}
.rules-table input:focus { outline: none; border-color: var(--brand); }

.esc-list, .contact-list { list-style: none; display: grid; gap: 0; margin-bottom: 16px; }
.esc-list li, .contact-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--mist);
}
.esc-list span, .contact-list span.mono-num { display: block; font-size: 0.84rem; color: var(--ink-soft); }
.tag {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--mist); color: var(--ink-soft);
  padding: 3px 8px; border-radius: 2px;
}

/* Switch */

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; cursor: pointer;
  background: #C3D2D7; border-radius: 12px;
  transition: background 0.15s ease;
}
.switch span::before {
  content: ""; position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: 0.55; cursor: default; }

/* Historie & Berichte */

.hist-table, .report-table { width: 100%; border-collapse: collapse; }
.hist-table th, .report-table th {
  text-align: left;
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
}
.hist-table td, .report-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 0.93rem;
}
.report-link { font-weight: 600; }

/* Passwort-Dialog */

.pw-dialog {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; width: min(420px, calc(100vw - 40px));
  box-shadow: 0 24px 64px -24px rgba(13, 33, 41, 0.45);
}
.pw-dialog::backdrop { background: rgba(13, 33, 41, 0.45); }
.pw-dialog form { padding: 28px; display: grid; gap: 14px; }
.pw-dialog h2 { font-size: 1.25rem; margin-bottom: 4px; }
.pw-dialog label { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.pw-dialog input {
  font-family: var(--font-sans); font-size: 1rem; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.pw-dialog input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11, 66, 85, 0.14); }
.pw-hint { font-weight: 400; color: var(--ink-soft); font-size: 0.82rem; }
.pw-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* Toast */

.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translate(-50%, 80px);
  background: var(--ink); color: #fff;
  font-size: 0.92rem; font-weight: 500;
  padding: 13px 22px; border-radius: var(--radius);
  opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 100;
  box-shadow: 0 16px 40px -16px rgba(13, 33, 41, 0.5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .cols-3, .steps, .feature-grid, .math-cards { grid-template-columns: 1fr; }
  .cols-3 article { padding-right: 0; }
  .cols-3 article + article { border-left: none; border-top: 1px solid var(--line); padding-left: 0; margin-top: 8px; }
  .price-grid, .cta-grid { grid-template-columns: 1fr; }
  .alarm-layout { grid-template-columns: 1fr; }
  .unit-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi:nth-child(3) { border-left: none; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .login-split { grid-template-columns: 1fr; }
  .login-side { min-height: 260px; }
  .appbar-site { display: none; }
}

@media (max-width: 680px) {
  .topnav { display: none; }
  .hero-grid { padding-top: 52px; padding-bottom: 52px; }
  .band { padding: 64px 0; }
  .band-head { flex-direction: column; gap: 10px; }
  .hero-facts { flex-direction: column; }
  .hero-facts li + li { border-left: none; border-top: 1px solid var(--line); padding-left: 0; padding-top: 14px; margin-top: 12px; }
  .footer-grid, .footer-base { flex-direction: column; }
  .appbar-inner { flex-wrap: wrap; height: auto; padding-top: 10px; gap: 10px; }
  .apptabs { order: 3; width: 100%; margin-left: 0; overflow-x: auto; }
  .apptab { padding: 10px 12px; }
  .appbar-mail { display: none; }
}
