/* === money (Modul 10) — Stil ===
   Look: dunkles Trading-Terminal — tief, ruhig, seriös — mit warmem
   Gold-Akzent und der Wärme der Flug-App. Deutsch + Fachbegriffe englisch. */

:root {
  --bg:        #07080b;
  --bg-2:      #0d0f14;
  --panel:     #12151c;
  --panel-2:   #171b24;
  --linie:     #232936;
  --linie-gold:rgba(232,181,77,.35);
  --text:      #ece8df;
  --muted:     #8f96a3;
  --gold:      #e8b54d;
  --gold-weich:#f6cf7a;
  --gold-tief: #b8862f;
  --gruen:     #57c98a;
  --rot:       #e07070;
  --radius:    16px;
  --schatten:  0 14px 40px rgba(0,0,0,.5);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* hidden gewinnt auch gegen display:flex */
::selection { background: rgba(232,181,77,.28); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 560px at 85% -12%, rgba(232,181,77,.09), transparent 62%),
    radial-gradient(800px 480px at -8% 112%, rgba(232,181,77,.05), transparent 55%),
    repeating-linear-gradient(0deg, transparent 0 47px, rgba(255,255,255,.014) 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, rgba(255,255,255,.014) 47px 48px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* ── Marke ── */
.marke {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 700; letter-spacing: .4px; font-size: 1.55rem;
}
.marke .punkt { color: var(--gold); text-shadow: 0 0 12px rgba(232,181,77,.65); }
.marke small {
  color: var(--muted); font-weight: 600; font-size: .68rem;
  letter-spacing: 2.5px; text-transform: uppercase;
}
.marke.klein { font-size: 1.15rem; gap: .55rem; }
.marke.klein small { font-size: .6rem; letter-spacing: 2px; }

/* ── Einstieg (Landing / Login) ── */
.einstieg { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }

.karte {
  width: 100%; max-width: 410px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--linie);
  border-top-color: var(--linie-gold);
  border-radius: var(--radius);
  box-shadow: var(--schatten), inset 0 1px 0 rgba(255,255,255,.03);
  padding: 2.1rem 1.9rem;
  animation: auftauchen .45s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes auftauchen {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.karte .marke { justify-content: center; margin-bottom: .5rem; flex-direction: column; text-align: center; gap: .3rem; }
.claim { text-align: center; color: var(--muted); font-size: .9rem; margin: 0 0 1.7rem; }
.claim.links { text-align: left; margin-bottom: 1.3rem; }

.reiter {
  display: flex; gap: .35rem; background: var(--bg-2);
  padding: .3rem; border-radius: 11px; margin-bottom: 1.5rem;
  border: 1px solid var(--linie);
}
.reiter button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: .62rem; border-radius: 8px; font-weight: 600; cursor: pointer;
  transition: color .15s, background .15s;
}
.reiter button.aktiv {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--gold); box-shadow: inset 0 0 0 1px var(--linie), 0 2px 8px rgba(0,0,0,.35);
}

label { display: block; font-size: .78rem; color: var(--muted); margin: 0 0 .4rem; letter-spacing: .3px; }
label .opt { opacity: .6; font-weight: 400; }
input {
  width: 100%; background: var(--bg-2); border: 1px solid var(--linie);
  color: var(--text); padding: .8rem .9rem; border-radius: 11px;
  margin-bottom: 1.05rem; transition: border-color .16s, box-shadow .16s;
}
input::placeholder { color: #58606d; }
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,181,77,.14); }

.knopf {
  width: 100%; border: 0; cursor: pointer; font-weight: 700;
  padding: .85rem 1.1rem; border-radius: 11px;
  color: #221805; letter-spacing: .2px;
  background: linear-gradient(180deg, var(--gold-weich), var(--gold) 55%, var(--gold-tief));
  box-shadow: 0 8px 22px rgba(232,181,77,.22), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .08s, filter .16s, box-shadow .16s;
}
.knopf:hover:not(:disabled) { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(232,181,77,.3), inset 0 1px 0 rgba(255,255,255,.35); }
.knopf:active:not(:disabled) { transform: translateY(1px); }
.knopf:disabled { cursor: default; filter: grayscale(.55) brightness(.75); box-shadow: none; }
.knopf.klein { width: auto; padding: .55rem 1.05rem; font-size: .88rem; }

.leise-knopf {
  background: transparent; border: 1px solid var(--linie); color: var(--muted);
  padding: .6rem 1rem; border-radius: 10px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.leise-knopf:hover { color: var(--gold); border-color: var(--linie-gold); }

.knopf-reihe { display: flex; gap: .7rem; align-items: stretch; }
.knopf-reihe .knopf { flex: 1; width: auto; }

.hinweis { min-height: 1.2rem; text-align: center; font-size: .85rem; margin-top: .95rem; transition: color .15s; }
.hinweis.fehler { color: var(--rot); }
.hinweis.ok { color: var(--gruen); }

/* ── Dashboard: Kopfleiste ── */
.kopfleiste {
  display: flex; align-items: center; justify-content: space-between;
  padding: .95rem 1.7rem;
  border-bottom: 1px solid var(--linie);
  background:
    linear-gradient(90deg, rgba(232,181,77,.5), rgba(232,181,77,0) 40%) top/100% 1px no-repeat,
    rgba(13,15,20,.78);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.kopf-rechts { display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: .88rem; }
.wer-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--bg-2); border: 1px solid var(--linie);
  padding: .4rem .8rem; border-radius: 999px; font-size: .82rem;
}
.wer-chip strong { color: var(--text); }
.abmelden {
  background: transparent; border: 1px solid var(--linie); color: var(--muted);
  padding: .45rem .85rem; border-radius: 9px; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.abmelden:hover { color: var(--text); border-color: var(--linie-gold); }

.inhalt { max-width: 1020px; margin: 0 auto; padding: 2.2rem 1.6rem; }

/* ── Hinweis-Banner: kein Key hinterlegt ── */
.key-hinweis {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  background: linear-gradient(180deg, rgba(232,181,77,.11), rgba(232,181,77,.04));
  border: 1px solid var(--linie-gold); border-radius: var(--radius);
  padding: 1.15rem 1.35rem; margin-bottom: 2rem;
  animation: auftauchen .4s ease both;
}
.key-hinweis .txt { flex: 1; min-width: 230px; }
.key-hinweis h3 { margin: 0 0 .25rem; font-size: 1rem; }
.key-hinweis p { margin: 0; color: var(--muted); font-size: .9rem; }
.key-hinweis .knopf { width: auto; padding: .72rem 1.25rem; }

/* ── Key-Leiste (verbundene Keys) ── */
.key-leiste {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  margin-bottom: 2rem; padding: .8rem 1.05rem;
  background: var(--bg-2); border: 1px solid var(--linie); border-radius: var(--radius);
}
.key-titel { font-size: .72rem; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.key-chips { display: flex; gap: .5rem; flex-wrap: wrap; flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  background: var(--panel-2); border: 1px solid var(--linie);
  border-radius: 999px; padding: .32rem .4rem .32rem .75rem; font-size: .82rem;
}
.chip b { color: var(--gold); font-weight: 700; }
.chip button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  border-radius: 999px; width: 1.35rem; height: 1.35rem; line-height: 1;
  transition: color .15s, background .15s;
}
.chip button:hover { color: var(--rot); background: rgba(224,112,112,.12); }
.leise-knopf#key-plus { padding: .4rem .85rem; border-radius: 999px; font-size: .85rem; }

/* ── Kachel-Raster: jede Funktion = eine Kachel (atomar) ── */
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.25rem; }
.kachel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1.35rem; box-shadow: var(--schatten);
  transition: transform .18s ease, border-color .18s, box-shadow .18s;
}
.kachel:not(.gesperrt):hover {
  transform: translateY(-3px);
  border-color: var(--linie-gold);
  box-shadow: 0 18px 44px rgba(0,0,0,.55), 0 0 0 1px rgba(232,181,77,.12);
}
.kachel.gesperrt { opacity: .5; filter: saturate(.6); }
.kachel .titel { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-bottom: .3rem; }
.tag {
  font-size: .62rem; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--gold); border: 1px solid var(--linie-gold);
  padding: .12rem .45rem; border-radius: 6px; font-weight: 700;
}
.kachel .wert {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 1.8rem; margin: .65rem 0 .2rem; color: var(--muted);
}
.kachel .wert em { font-style: normal; font-size: .85rem; letter-spacing: 1px; opacity: .7; }
.kachel .fuss { font-size: .8rem; color: var(--muted); min-height: 1.1rem; }
.kachel .knopf { margin-top: 1rem; }

.demn { text-align: center; color: var(--muted); font-size: .82rem; margin-top: 2.6rem; opacity: .8; }
a.leise { color: var(--gold); text-decoration: none; }
a.leise:hover { text-decoration: underline; }

/* ── Landing: Glut + Abzeichen ── */
.einstieg { position: relative; overflow: hidden; }
.glut {
  position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232,181,77,.13), transparent 62%);
  filter: blur(10px); pointer-events: none;
  animation: atmen 7s ease-in-out infinite alternate;
}
@keyframes atmen {
  from { transform: scale(.94); opacity: .75; }
  to   { transform: scale(1.06); opacity: 1; }
}
.karte { position: relative; z-index: 1; }
.abzeichen {
  display: flex; justify-content: center; gap: .45rem; flex-wrap: wrap;
  margin: -0.9rem 0 1.6rem;
}
.abzeichen span {
  font-size: .72rem; color: var(--muted);
  border: 1px solid var(--linie); border-radius: 999px;
  padding: .28rem .7rem; background: var(--bg-2); letter-spacing: .4px;
}

/* ── Kachel-Kopf mit Symbol + geladener Wert ── */
.kachel-kopf { display: flex; align-items: center; gap: .65rem; }
.symbol {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem;
  border-radius: 10px; color: var(--gold); font-size: .95rem;
  background: linear-gradient(180deg, rgba(232,181,77,.16), rgba(232,181,77,.05));
  border: 1px solid var(--linie-gold);
}
.kachel .wert em { margin-left: .4rem; }
.kachel .wert.geladen {
  color: var(--text);
  background: linear-gradient(180deg, var(--gold-weich), var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: aufblitzen .5s ease;
}
.kachel .wert.geladen em { -webkit-text-fill-color: var(--muted); }
@keyframes aufblitzen {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: none; }
}
.fuss.fehler { color: var(--rot); }

/* ── Coin-Übersicht: kleine Bestandsliste ── */
.coin-liste {
  margin: .3rem 0 .5rem; max-height: 220px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--linie) transparent;   /* Firefox */
}
.coin-liste::-webkit-scrollbar { width: 7px; }                        /* Chrome/Safari */
.coin-liste::-webkit-scrollbar-track { background: transparent; }
.coin-liste::-webkit-scrollbar-thumb { background: var(--linie); border-radius: 99px; }
.coin-liste::-webkit-scrollbar-thumb:hover { background: var(--linie-gold); }
.coin-zeile {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .38rem .1rem; font-size: .88rem;
  border-bottom: 1px dashed rgba(255,255,255,.06);
}
.coin-zeile:last-child { border-bottom: 0; }
.coin-zeile b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 600; }
.coin-zeile.leer { color: var(--muted); border: 0; }

/* ── Futures-Paare: Kachel-in-Kachel — die Paare-Kachel wächst über
      die volle Breite und zeigt die Positionen als Mini-Kacheln in sich ── */
.kachel.gross { grid-column: 1 / -1; }
.kachel.gross:not(.gesperrt):hover { transform: none; }   /* große Kachel hüpft nicht */
.paare-bereich {
  margin-top: 1.5rem; padding-top: 1.3rem;
  border-top: 1px solid var(--linie);
  animation: auftauchen .45s cubic-bezier(.2,.9,.3,1) both;
}
.bereich-kopf {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: .5rem;
}
.bereich-titel {
  display: flex; align-items: center; gap: .6rem;
  font-size: 1.05rem; font-weight: 600; margin: 0;
}
.bereich-hinweis { margin: 0 0 1.1rem; color: var(--muted); font-size: .78rem; }
.bereich-werkzeuge { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.bereich-werkzeuge input {
  width: 180px; margin: 0; padding: .5rem .75rem; border-radius: 9px; font-size: .85rem;
}
.filter-gruppe {
  display: flex; gap: .25rem; background: var(--bg-2);
  padding: .22rem; border-radius: 9px; border: 1px solid var(--linie);
}
.filter-gruppe button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: .32rem .7rem; border-radius: 7px; font-size: .8rem; font-weight: 600;
  transition: color .15s, background .15s;
}
.filter-gruppe button.aktiv {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  color: var(--gold); box-shadow: inset 0 0 0 1px var(--linie);
}
#futures-einklappen { padding: .42rem .8rem; font-size: .8rem; border-radius: 9px; }
.paar-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .9rem; }
.paar-kachel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--linie); border-radius: 13px;
  padding: .95rem 1.05rem;
  transition: transform .16s ease, border-color .16s;
}
.paar-kachel:hover { transform: translateY(-2px); border-color: var(--linie-gold); }
.paar-kopf { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.paar-name { font-weight: 700; font-family: var(--mono); font-size: .95rem; }
.tag.long  { color: var(--gruen); border-color: rgba(87,201,138,.4); }
.tag.short { color: var(--rot);   border-color: rgba(224,112,112,.4); }
.paar-menge {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 1.15rem; margin: .55rem 0 .2rem;
}
.paar-menge em { font-style: normal; font-size: .72rem; color: var(--muted); letter-spacing: .5px; }
.paar-unter { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
#k-keys .key-chips { margin: .35rem 0 .55rem; display: flex; gap: .45rem; flex-wrap: wrap; }

/* ── Haupt-Tabs (Futures / Spot / Verwaltung) ── */
.reiter.tabs { max-width: 460px; margin: 0 0 1.7rem; }
.tab-inhalt[hidden] { display: none; }
.leise-text { color: var(--muted); font-size: .72rem; }

/* Orders in den Positions-Details */
.detail-trenner {
  margin-top: .55rem; padding-top: .5rem;
  border-top: 1px dashed rgba(255,255,255,.08);
  font-size: .68rem; letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
}
.orders-mini .detail-zeile b { font-size: .78rem; }
.paar-details { margin: .55rem 0 .2rem; border-top: 1px dashed rgba(255,255,255,.08); padding-top: .5rem; }
.detail-zeile {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .82rem; padding: .22rem 0; color: var(--muted);
}
.detail-zeile b { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.details-knopf { margin-top: .6rem; padding: .38rem .8rem; font-size: .8rem; border-radius: 8px; }

/* ── Schleier + Formular (API-Key hinterlegen) ── */
.schleier {
  position: fixed; inset: 0; z-index: 20;
  display: none; place-items: center; padding: 1.2rem;
  background: rgba(4,5,7,.72); backdrop-filter: blur(5px);
}
.schleier.offen { display: grid; }
.karte.schmal { max-width: 440px; }
.karte-titel { display: flex; align-items: center; gap: .6rem; margin: 0 0 .4rem; font-size: 1.05rem; }
