/* ==========================================================================
   TFSI RAL + POPS Portal - Design-System
   Leitidee: ein Diagnose-/Tuninggeraet aus der Werkstatt, kein SaaS-Dashboard.
   Dunkles, warmes Graphit (nicht reines Blauschwarz), Zifferblatt-Amber als
   Akzent (Drehzahlmesser-Rotbereich), gefaste statt abgerundete Ecken (wie
   ein Gehaeuseblech), Monospace fuer alles was eine echte Speicheradresse
   oder ein Dateiname ist.
   ========================================================================== */

:root {
  --graphite-950: #15120f;
  --graphite-900: #1d1812;
  --graphite-800: #241e17;
  --graphite-700: #352c22;
  --graphite-600: #4a3f33;

  --steel-300: #c8bfb2;
  --steel-400: #a89d8f;
  --steel-500: #8a8178;
  --steel-600: #6b6459;

  --spark-400: #f5b942;
  --spark-500: #e8962c;
  --spark-600: #c96f1f;

  --redline-500: #d1402c;
  --redline-600: #a8301f;

  --ok-500: #5fae8a;
}

* { box-sizing: border-box; }

html, body {
  background: var(--graphite-950);
  color: var(--steel-300);
}

body {
  font-family: "Inter", sans-serif;
  font-feature-settings: "tnum" 1;
}

h1, h2, h3, .font-display {
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.01em;
}

code, .font-mono, input, select, textarea, .mono {
  font-family: "IBM Plex Mono", monospace;
}

::selection { background: var(--spark-600); color: var(--graphite-950); }

a { color: inherit; }

input[type="checkbox"] { accent-color: var(--spark-500); }

/* Gefaste Flaeche statt abgerundeter Karte - wie ein Gehaeuseblech */
.panel {
  background: var(--graphite-900);
  border: 1px solid var(--graphite-600);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
  padding: 1.5rem;
}

.panel-tight { padding: 1rem 1.25rem; }

/* Eingabefelder im Geraete-Look: flach, scharfe Kante, Monospace */
.field {
  background: var(--graphite-800);
  border: 1px solid var(--graphite-600);
  color: var(--steel-300);
  padding: 0.55rem 0.75rem;
  width: 100%;
  font-size: 0.9rem;
}
.field:focus {
  outline: none;
  border-color: var(--spark-500);
}
.field:disabled { opacity: 0.4; }

/* Primaerer "Zuendung"-Button: gefaste Ecke, Amber, keine Weichheit */
.btn-ignite {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--spark-500);
  color: var(--graphite-950);
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border: none;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background-color 0.15s ease;
  cursor: pointer;
}
.btn-ignite:hover { background: var(--spark-400); }
.btn-ignite:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--steel-300);
  border: 1px solid var(--graphite-600);
  padding: 0.7rem 1.4rem;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--spark-500); color: var(--spark-400); }

/* Statusanzeige - kleine gefaste Chips statt runder Pillen */
.status-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  border: 1px solid currentColor;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.status-ok { color: var(--ok-500); }
.status-warn { color: var(--spark-400); }
.status-bad { color: var(--redline-500); }
.status-idle { color: var(--steel-500); }

/* Kippschalter statt Standard-Checkbox - fuer RAL/Pops&Bangs/KFTVSA an/aus */
.rocker { display: inline-flex; align-items: center; gap: 0.65rem; cursor: pointer; user-select: none; }
.rocker input { position: absolute; opacity: 0; width: 0; height: 0; }
.rocker-track {
  position: relative;
  width: 42px;
  height: 22px;
  background: var(--graphite-700);
  border: 1px solid var(--graphite-600);
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.rocker-track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: var(--steel-400);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.rocker input:checked + .rocker-track { background: var(--graphite-600); border-color: var(--spark-600); }
.rocker input:checked + .rocker-track::after { transform: translateX(20px); background: var(--spark-500); }
.rocker input:focus-visible + .rocker-track { outline: 2px solid var(--spark-400); outline-offset: 2px; }

/* Zifferblatt-Gauge im Hero */
.gauge-needle {
  transform-origin: 150px 150px;
  animation: gauge-sweep 1.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
@keyframes gauge-sweep {
  from { transform: rotate(240deg); }
  to { transform: rotate(105deg); }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-needle { animation: none; transform: rotate(105deg); }
}

/* Fuellstand-Balken fuer Credit-Pakete (statt identischer Preiskarten) */
.fuel-bar { height: 8px; background: var(--graphite-700); position: relative; overflow: hidden; }
.fuel-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--spark-600), var(--spark-400)); }
