/* TradingPilot Cockpit (Story 1.9): Farben, Schrift und Formen nach docs/plan/DESIGN.md und den Skizzen
   (docs/plan/.working/tp-stil.css). Hell und dunkel folgen der Einstellung des Handys. Keine fremde
   Quelle: Manrope liegt in /fonts (SIL Open Font License, fonts/OFL.txt). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/manrope.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --grund: radial-gradient(90% 40% at 0% 0%, #cfe0f2 0%, transparent 70%),
    radial-gradient(80% 35% at 100% 18%, #efe2b9 0%, transparent 70%),
    linear-gradient(180deg, #e9eff5 0%, #f4f2ec 55%, #f2f0ea 100%);
  --grundfarbe: #f2f0ea;
  --text: #0f1115;
  --leise: #6b7280;
  --karte: rgba(255, 255, 255, 0.72);
  --rand: rgba(255, 255, 255, 0.9);
  --system: #16a34a;
  --kachel: #fff;
  --gut: #15803d;
  --warn: #b45309;
  --stopp: #dc2626;
  --chip: rgba(255, 255, 255, 0.75);
  --chip-an: #0f1115;
  --chip-an-text: #fff;
  --schatten: 0 10px 30px rgba(40, 60, 90, 0.1);
  --trenner: rgba(15, 17, 21, 0.07);
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: radial-gradient(70% 30% at 85% 0%, rgba(212, 245, 60, 0.1) 0%, transparent 70%), #0a0a0b;
    --grundfarbe: #0a0a0b;
    --text: #f4f4f5;
    --leise: #8b8d93;
    --karte: #151517;
    --rand: #1f1f22;
    --system: #d4f53c;
    --gut: #d4f53c;
    --warn: #f2a516;
    --stopp: #ef4444;
    --chip: #1a1a1d;
    --chip-an: #f4f4f5;
    --chip-an-text: #0a0a0b;
    --schatten: none;
    --trenner: rgba(255, 255, 255, 0.07);
  }
}

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

html {
  background: var(--grundfarbe);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--grund);
  background-attachment: fixed;
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.4;
}

[hidden] {
  display: none !important;
}

.inhalt {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
}

.marke {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.status {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--chip);
  white-space: nowrap;
}

.status i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--system);
  margin-right: 6px;
  vertical-align: 1px;
}

.status.warn i {
  background: var(--warn);
}

.status.stopp i {
  background: var(--stopp);
}

h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h2 {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 4px 4px 0;
}

.klein-caps {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--leise);
}

.leise {
  color: var(--leise);
}

.karte {
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 22px;
  padding: 14px 16px;
  box-shadow: var(--schatten);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.karte h3 {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stand {
  font-size: 12px;
  font-weight: 600;
  color: var(--leise);
  padding: 0 4px;
}

.stand.veraltet {
  color: var(--warn);
}

.posten {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--karte);
  border: 1px solid var(--rand);
  border-radius: 20px;
  padding: 12px 14px;
  box-shadow: var(--schatten);
}

.kachel {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--kachel);
  color: #0f1115;
  display: grid;
  place-items: center;
  flex: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.posten .mitte {
  flex: 1;
  min-width: 0;
}

.posten .name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.posten .detail {
  font-size: 12px;
  color: var(--leise);
  margin-top: 2px;
}

.posten .rechts {
  text-align: right;
  white-space: nowrap;
}

.posten .betrag {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.posten .art {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--leise);
  margin-top: 2px;
}

.warnkarte {
  border: 1.5px solid var(--warn);
}

.warnkarte .titel {
  font-size: 15px;
  font-weight: 800;
  color: var(--warn);
}

.warnkarte .zeit {
  font-size: 12px;
  color: var(--leise);
}

.quittung {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--leise);
}

.knopf {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 16px;
  min-height: 52px;
  padding: 0 16px;
  font: 800 15px/1 Manrope, system-ui, sans-serif;
  background: var(--chip-an);
  color: var(--chip-an-text);
  cursor: pointer;
}

.knopf.zwei {
  background: var(--chip);
  color: var(--text);
  border: 1px solid var(--rand);
}

.knopf.warn {
  background: var(--warn);
  color: #fff;
}

.knopf:disabled {
  opacity: 0.45;
  cursor: default;
}

.knopf:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--system);
  outline-offset: 2px;
}

label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--leise);
}

input {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--rand);
  background: var(--chip);
  color: var(--text);
  padding: 0 14px;
  font: 700 20px/1 Manrope, system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.fehler {
  color: var(--stopp);
  font-weight: 700;
}

.hinweis {
  color: var(--leise);
  padding: 0 4px;
}

.karte-innen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
}

.unsichtbar {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#warnungen {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#anmeldung,
#heute {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

details.karte {
  display: block;
}

@media (prefers-color-scheme: dark) {
  /* Weiss auf Bernstein #F2A516 läse sich schlecht (Kontrast unter 3:1): dunkle Schrift. */
  .knopf.warn {
    color: #1a1205;
  }
}
