/* =====================================================================
   Finance Suite – Design-System (Fundament)
   Dunkles Glas-Design mit leuchtenden Akzenten, im Stil des Command Center.
   HINWEIS: Diese Design-Tokens sind eine originalgetreue Rekonstruktion.
   Für 100 % Deckungsgleichheit die :root-Variablen aus der echten
   Command-Center static/app.css übernehmen (siehe README / CLAUDE.md).
   ===================================================================== */

:root {
  /* --- Hintergrund & Flächen --- */
  --bg-deep:        #05060d;
  --bg-mid:         #0a0f1f;
  --bg-glow-1:      rgba(64, 120, 255, 0.14);
  --bg-glow-2:      rgba(150, 90, 255, 0.12);

  /* --- Glas-Kacheln --- */
  --tile-bg:        rgba(20, 27, 48, 0.55);
  --tile-bg-hover:  rgba(28, 37, 64, 0.68);
  --tile-border:    rgba(255, 255, 255, 0.08);
  --tile-border-hi: rgba(120, 160, 255, 0.35);
  --tile-radius:    22px;
  --tile-shadow:    0 8px 30px rgba(0, 0, 0, 0.45);
  --blur:           18px;

  /* --- Text --- */
  --text-strong:    #f4f7ff;
  --text:           #c7cfe2;
  --text-dim:       #8a93ad;

  /* --- Leuchtende Akzentfarben --- */
  --accent:         #5b8cff;   /* Blau  */
  --accent-2:       #a06bff;   /* Violett */
  --accent-3:       #35e0c8;   /* Türkis */
  --accent-4:       #ffb454;   /* Gold  */
  --accent-glow:    0 0 22px rgba(91, 140, 255, 0.55);

  /* --- Semantik --- */
  --pos:            #3ddc84;
  --neg:            #ff5d6c;

  /* --- Maße --- */
  --gap:            18px;
  --shell-max:      1180px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, sans-serif;
}

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

html, body { height: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 82% -8%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 620px at 8% 108%, var(--bg-glow-2), transparent 60%),
    linear-gradient(160deg, var(--bg-mid) 0%, var(--bg-deep) 60%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Sternenhimmel ------------------------------------------------------- */
.starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.starfield::before,
.starfield::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: repeat;
}
.starfield::before {
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, rgba(255,255,255,.9), transparent),
    radial-gradient(1.2px 1.2px at 130px 80px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 220px 160px, rgba(255,255,255,.6), transparent),
    radial-gradient(1.6px 1.6px at 310px 40px, rgba(180,200,255,.8), transparent),
    radial-gradient(1px 1px at 380px 220px, rgba(255,255,255,.5), transparent);
  background-size: 420px 300px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.starfield::after {
  background-image:
    radial-gradient(1px 1px at 60px 120px, rgba(255,255,255,.5), transparent),
    radial-gradient(1.3px 1.3px at 190px 200px, rgba(200,180,255,.7), transparent),
    radial-gradient(1px 1px at 300px 260px, rgba(255,255,255,.45), transparent),
    radial-gradient(1.1px 1.1px at 90px 40px, rgba(255,255,255,.6), transparent);
  background-size: 380px 320px;
  opacity: .7;
  animation: twinkle 8s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .35; } to { opacity: .85; } }

/* --- Shell --------------------------------------------------------------- */
.shell {
  position: relative;
  z-index: 1;
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 28px 24px 60px;
}

/* --- Kopfzeile ----------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.greeting { display: flex; flex-direction: column; gap: 4px; }
.greeting h1 {
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: .2px;
}
.greeting .clock {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  text-shadow: var(--accent-glow);
}
.greeting .date { font-size: .9rem; color: var(--text-dim); }

/* Sprach-Umschalter */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.lang-switch button {
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1;
  padding: 7px 11px;
  border-radius: 999px;
  transition: background .18s, transform .18s;
}
.lang-switch button:hover { transform: translateY(-1px); }
.lang-switch button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--accent-glow);
}


/* --- Kachel-Raster ------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.tile {
  position: relative;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border);
  border-radius: var(--tile-radius);
  box-shadow: var(--tile-shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 22px;
  min-height: 172px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.tile::before {  /* dezenter Licht-Rand oben */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--tile-border-hi);
  background: var(--tile-bg-hover);
}

.tile.tile-wide { grid-column: span 2; }
@media (max-width: 680px) { .tile.tile-wide { grid-column: span 1; } }

.tile-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.tile-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 1.05rem;
  background: rgba(91,140,255,.14);
  border: 1px solid rgba(120,160,255,.25);
}
.tile-title {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Platzhalter-Zustand */
.tile-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  text-align: center;
  border: 1px dashed rgba(255,255,255,.12);
  border-radius: 14px;
  font-size: .9rem;
  gap: 8px;
}
.tile-placeholder .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity:.4; } 50% { opacity:1; } }

/* =====================================================================
   Krypto-Terminal
   Ergänzt das Fundament. Nutzt ausschließlich die oben definierten
   Farb-Tokens – keine neuen Farbwerte, keine Änderung an :root.
   ===================================================================== */

/* --- Einblend-Animation --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise .6s cubic-bezier(.2,.7,.3,1) forwards;
}
.reveal:nth-child(2) { animation-delay: .07s; }
.reveal:nth-child(3) { animation-delay: .14s; }
.reveal:nth-child(4) { animation-delay: .21s; }
.reveal:nth-child(5) { animation-delay: .28s; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
}

/* --- Laufband ------------------------------------------------------------- */
.tickertape {
  margin-bottom: var(--gap);
  border: 1px solid var(--tile-border);
  border-radius: 14px;
  background: var(--tile-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--tile-shadow);
  overflow: hidden;
  min-height: 46px;
}

/* --- Kommandozeile -------------------------------------------------------- */
.cmdbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--gap);
  padding: 12px 16px;
  border: 1px solid var(--tile-border);
  border-radius: 14px;
  background: var(--tile-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: var(--tile-shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cmdbar:focus-within {
  border-color: var(--tile-border-hi);
  box-shadow: var(--tile-shadow), var(--accent-glow);
}
.cmd-prompt {
  color: var(--accent-3);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1;
}
.cmdbar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-strong);
  font-family: var(--font);
  font-size: .95rem;
  letter-spacing: .4px;
}
.cmdbar input::placeholder { color: var(--text-dim); }
.cmd-key {
  font-family: var(--font);
  font-size: .72rem;
  color: var(--text-dim);
  border: 1px solid var(--tile-border);
  border-radius: 6px;
  padding: 3px 8px;
  background: rgba(255,255,255,.04);
}

/* --- Raster des Terminals ------------------------------------------------- */
#dashboard { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-hero { grid-column: span 2; }
.tile-full { grid-column: 1 / -1; }

@media (max-width: 1000px) {
  #dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  #dashboard { grid-template-columns: 1fr; }
  .tile-hero { grid-column: span 1; }
}

/* --- Kachel-Kopf: Zusätze ------------------------------------------------- */
.tile-head .live-dot {
  margin-left: auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--pos);
  box-shadow: 0 0 10px var(--pos);
  animation: pulse 1.8s ease-in-out infinite;
}
.tile-badge {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .8px;
  color: var(--text-dim);
  border: 1px solid var(--tile-border);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(255,255,255,.04);
  white-space: nowrap;
}

/* --- Kennzahlen (Hero) ---------------------------------------------------- */
.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
@media (max-width: 480px) { .hero-grid { grid-template-columns: 1fr; } }

.stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.stat-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.stat-value {
  font-size: 1.72rem;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.5px;
  line-height: 1.15;
}
.stat-lead .stat-value { text-shadow: var(--accent-glow); }
.stat-change {
  font-size: .88rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.stat-change.up { color: var(--pos); }
.stat-change.down { color: var(--neg); }

.spark { height: 62px; margin-top: 4px; overflow: hidden; border-radius: 8px; }

.dom-bar {
  margin-top: 8px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.dom-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: var(--accent-glow);
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}

/* --- Fear-&-Greed-Anzeige ------------------------------------------------- */
.gauge-wrap {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}
.gauge { width: 100%; max-width: 230px; overflow: visible; }
.gauge-track {
  fill: none;
  stroke: rgba(255,255,255,.08);
  stroke-width: 13;
  stroke-linecap: round;
}
.gauge-fill {
  fill: none;
  stroke: url(#gaugeGrad);
  stroke-width: 13;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray 1.2s cubic-bezier(.2,.7,.3,1);
}
.g-lo  { stop-color: var(--neg); }
.g-mid { stop-color: var(--accent-4); }
.g-hi  { stop-color: var(--pos); }

.gauge-needle {
  stroke: var(--text-strong);
  stroke-width: 4;
  stroke-linecap: round;
  transform-origin: 100px 100px;
  transform: rotate(-90deg);
  transition: transform 1.2s cubic-bezier(.2,.7,.3,1);
}

.gauge-value {
  margin-top: -34px;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.gauge-label {
  margin-top: 4px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* --- Top-Mover ------------------------------------------------------------ */
.movers {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.movers-head {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.movers-head.pos { color: var(--pos); }
.movers-head.neg { color: var(--neg); }

.mover-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.mover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,.03);
  overflow: hidden;
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
.mover::before {           /* farbiger Balken nach Ausschlag */
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--bar, 0%);
  opacity: .18;
  transition: width .9s cubic-bezier(.2,.7,.3,1);
}
.mover.up::before   { background: var(--pos); }
.mover.down::before { background: var(--neg); }
.mover-sym {
  position: relative;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: .5px;
  white-space: nowrap;
  flex: 0 0 auto;
}
.mover-val { position: relative; font-weight: 600; white-space: nowrap; }
.mover.up .mover-val   { color: var(--pos); }
.mover.down .mover-val { color: var(--neg); }

/* --- Eingebettete Widgets ------------------------------------------------- */
.embed { border-radius: 14px; overflow: hidden; }
.embed-chart   { height: 460px; }
.embed-heatmap { height: 400px; }
@media (max-width: 680px) {
  .embed-chart   { height: 340px; }
  .embed-heatmap { height: 300px; }
}

/* --- Lade- und Fehlerzustand ---------------------------------------------- */
.is-loading .stat-value,
.is-loading .stat-change,
.is-loading .gauge-value,
.is-loading .gauge-label {
  color: var(--text-dim);
  animation: pulse 1.6s ease-in-out infinite;
}
.skeleton {
  height: 26px;
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  animation: pulse 1.6s ease-in-out infinite;
}
.tile-error {
  margin-top: 12px;
  font-size: .82rem;
  color: var(--neg);
  border: 1px dashed rgba(255,93,108,.35);
  border-radius: 10px;
  padding: 9px 12px;
}

/* =====================================================================
   Block A – Sidebar, Icons, Settings, Hell/Dunkel
   Rein additiv. :root und alle bestehenden Regeln bleiben unverändert.
   ===================================================================== */

/* --- Scrollen über Kacheln nicht blockieren ------------------------------ */
/* overflow:hidden auf Kachel und Raster verhinderte das Weiterreichen der
   Mausrad-Ereignisse an den Scroll-Container. */
.grid { overflow: visible; }
.tile { overflow: visible; }
/* Das TradingView-Laufband fängt Mausrad-Ereignisse ab. Ohne Zeigerereignisse
   landen sie beim Elternelement und die Seite scrollt weiter. */
.tickertape iframe { pointer-events: none; }

/* Scrollleisten ausblenden – gescrollt wird weiterhin normal. */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

/* Das hidden-Attribut muss gegen Regeln wie .tabs { display: flex } gewinnen,
   sonst bleibt die Tab-Leiste in der Settings-Ansicht stehen. */
[hidden] { display: none !important; }

/* --- Lucide-Icons --------------------------------------------------------- */
.tile-icon svg,
.tile-icon i {
  width: 18px;
  height: 18px;
  color: var(--accent);      /* Lucide zeichnet mit stroke: currentColor */
}
.tile-icon { font-size: 0; }  /* verhindert Textbaseline-Versatz um das SVG */

/* --- Grundlayout: Sidebar + Shell nebeneinander --------------------------- */
body { display: flex; align-items: flex-start; }

/* Eigener Scroll-Container: sonst greift das Mausrad über den Kacheln nicht. */
.shell {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow-x: auto;      /* horizontales Scrollen zulassen (Fix 2) */
  overflow-y: auto;
  /* Ohne oberen Innenabstand: sonst scrollt über der klebenden Tab-Leiste
     ein Streifen Inhalt durch. Den Abstand übernimmt .tabs. */
  padding-top: 0;
  /* Volle Breite, damit das Mausrad auch links und rechts neben dem Inhalt
     im Scroll-Container landet. Die Breitenbegrenzung übernehmen die Kinder. */
  max-width: none;
}
.shell > * {
  max-width: var(--shell-max);
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================================
   Statisches App-Layout
   Die Topbar liegt ausserhalb jedes scrollbaren Containers und kann
   deshalb gar nicht mitscrollen – kein position:sticky nötig.
   ===================================================================== */
body { display: block; }

.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.content-area {
  display: flex;
  flex: 1;
  overflow: hidden;      /* nur die Kinder scrollen */
  min-height: 0;
}

/* Kopfzeile: fest oben, scrollt nie mit. */
.topbar {
  position: static;
  flex-shrink: 0;
  z-index: 100;
  /* Sehr zurückhaltend, damit die Topbar Teil der Seite bleibt und nicht
     wie eine abgesetzte Werkzeugleiste wirkt. Keine harte Unterkante. */
  background: rgba(5, 6, 13, .3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none;
  /* Keine Maske mehr: die Topbar schwebt nicht mehr über dem Inhalt. */
  -webkit-mask-image: none;
  mask-image: none;
  /* Eigene Innenabstände, da sie nicht mehr in .shell liegt. */
  padding: 22px 26px 16px;
  margin: 0;
}
body.light-mode .topbar { background: rgba(240, 244, 255, .3); }


/* --- Sidebar -------------------------------------------------------------- */
.sidebar {
  position: static;
  z-index: 2;
  flex: 0 0 220px;
  width: 220px;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 0 22px;
  background: var(--tile-bg);
  border-right: 1px solid var(--tile-border);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: width .25s ease, flex-basis .25s ease;
  overflow: hidden;
}
.sidebar.collapsed { flex-basis: 64px; width: 64px; }

.sidebar-toggle {
  align-self: flex-end;
  margin: 0 16px 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  transition: background .18s, color .18s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.06); color: var(--text-strong); }
.sidebar-toggle svg { width: 18px; height: 18px; }
.sidebar.collapsed .sidebar-toggle { align-self: center; margin: 0 0 6px; }

.icon-closed { display: none; }
.sidebar.collapsed .icon-open   { display: none; }
.sidebar.collapsed .icon-closed { display: block; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 20px 16px;
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.sidebar-brand svg {
  width: 20px; height: 20px;
  color: var(--accent);
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px var(--accent));
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;   /* hält die Breite beim Aktivwerden */
  border-radius: 0 10px 10px 0;
  padding: 10px 16px;
  margin-right: 12px;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  white-space: nowrap;
  transition: background .18s ease, transform .18s ease, color .18s ease;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; }

.nav-item:hover {
  background: rgba(255,255,255,.05);
  transform: translateX(2px);
}
.nav-item.active {
  background: rgba(91,140,255,.12);
  border-left-color: var(--accent);
  color: var(--text-strong);
}
.nav-item.active svg { color: var(--accent); }

.nav-bottom { margin-top: auto; }

/* Eingeklappt: nur noch Icons */
.nav-label { transition: opacity .2s ease, width .25s ease; }
.sidebar.collapsed .nav-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  display: inline-block;
}
.sidebar.collapsed .nav-item,
.sidebar.collapsed .sidebar-brand { justify-content: center; padding-left: 0; padding-right: 0; }
.sidebar.collapsed .nav-item { margin-right: 0; border-radius: 0; }

/* --- Kopfzeilen-Werkzeuge (Theme + Sprache) ------------------------------- */
.topbar-tools { display: flex; align-items: center; gap: 10px; }
.theme-switch button { display: grid; place-items: center; }
.theme-switch svg { width: 16px; height: 16px; }

/* --- Settings-Ansicht ------------------------------------------------------ */
.view-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 18px;
  letter-spacing: .2px;
}

/* --- Heller Modus --------------------------------------------------------- */
/* Überschreibt die Tokens nur auf <body>; :root bleibt unangetastet. */
body.light-mode {
  --bg-deep:     #f0f4ff;
  --bg-mid:      #e8eeff;
  --tile-bg:     rgba(255,255,255,.75);
  --tile-border: rgba(0,0,0,.08);
  --text-strong: #0a0f1f;
  --text:        #2a3350;
  --text-dim:    #6b7494;
  --tile-shadow: 0 8px 30px rgba(0,0,0,.12);
}
/* Weiße Sterne wären auf hellem Grund nur Rauschen. */
body.light-mode .starfield { display: none; }
body.light-mode .tile-placeholder { border-color: rgba(0,0,0,.14); }
body.light-mode .nav-item:hover { background: rgba(0,0,0,.05); }
body.light-mode .sidebar-toggle:hover { background: rgba(0,0,0,.06); }

/* =====================================================================
   Block B – Ambient-Glow, Hero-Schimmer, Mono-Zahlen, Handelssessions
   Rein additiv. :root und bestehende Regeln bleiben unverändert.
   ===================================================================== */

/* --- Punkt 1: Eckschimmer -------------------------------------------------- */
#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 600px at 98% 2%,  rgba(91, 140, 255, .07), transparent),
    radial-gradient(500px 500px at 2%  98%, rgba(160, 107, 255, .06), transparent);
}

/* --- Punkt 2: Hero-Kachel mit Akzent-Gradient und Schimmer ---------------- */
.tile-hero {
  background: linear-gradient(
    135deg,
    rgba(91, 140, 255, .18) 0%,
    rgba(160, 107, 255, .12) 50%,
    rgba(20, 27, 48, .55) 100%
  );
  border-color: rgba(91, 140, 255, .35);
}
/* Schimmer-Overlay entfernt – der Gradient der Kachel selbst bleibt. */
.tile-hero::after { display: none; }

/* --- Punkt 3: technische Mono-Zahlen -------------------------------------- */
.num {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

/* =====================================================================
   Handelssessions + Wirtschaftstermine
   Portiert aus dem Command Center. Struktur und Maße unverändert;
   sämtliche Farben laufen über die Tokens der Finance Suite.
   ===================================================================== */

/* --- Kopfzeile ------------------------------------------------------------ */
.sessionHeaderTime {
  margin-left: auto;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-strong);
}
.sessionActiveRow {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--pos);
  margin-bottom: 4px;
}
.sessionActiveRow.none { color: var(--text-dim); }
.sessionActiveDot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: var(--pos); box-shadow: 0 0 8px var(--pos);
  animation: pulse 1.8s ease-in-out infinite;
}
.sessionActiveRow.none .sessionActiveDot {
  background: var(--text-dim); box-shadow: none; animation: none;
}
.sessionActiveNames { color: var(--text-strong); }

.sessionPanelBody {
  position: relative; flex: 1; min-height: 270px; margin-top: 10px;
  border-radius: 10px; overflow: visible;
}

/* Ebene 1: stilisierte Punktraster-Weltkarte, ganz im Hintergrund.
   Rundung wird hier direkt geklippt, damit das Uhrzeit-Label der Now-Linie
   oberhalb des Panels sichtbar sein kann. */
.sessionMapLayer {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%;
  border-radius: 10px; overflow: hidden;
  pointer-events: none;
}
.sessionMapLayer .sessionMapDots rect { fill: rgba(255, 255, 255, .24); }
body.light-mode .sessionMapLayer .sessionMapDots rect { fill: rgba(0, 0, 0, .20); }

/* Ebene 2: Stundenraster, über der Karte */
.sessionGridLayer {
  position: absolute; inset: 0; z-index: 1; border-radius: 10px;
  background-image:
    repeating-linear-gradient(to right, rgba(255,255,255,.13) 0, rgba(255,255,255,.13) 1.5px, transparent 1.5px, transparent calc(100%/6)),
    repeating-linear-gradient(to right, rgba(255,255,255,.055) 0, rgba(255,255,255,.055) 1px, transparent 1px, transparent calc(100%/24));
}

/* Ebene 3: Finanzstandort-Marker */
.sessionMarkersLayer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.sessionMarker {
  position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column;
  align-items: center; gap: 2px; pointer-events: auto;
}
.sessionMarker.labelPos-above { flex-direction: column-reverse; }
.sessionMarkerDot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-strong);
  box-shadow: 0 0 6px var(--accent), 0 0 2px var(--text-strong);
}
.sessionMarkerLabel {
  font-size: 8px; font-weight: 700; color: var(--text-dim); white-space: nowrap;
  letter-spacing: .01em; background: rgba(5, 6, 13, .68); padding: 1px 5px; border-radius: 4px;
  line-height: 1.4;
}
body.light-mode .sessionMarkerLabel { background: rgba(255, 255, 255, .72); }
@media (max-width: 640px) {
  .sessionMarkerLabel { display: none; }
  .sessionMarkerDot { width: 4px; height: 4px; }
}

/* Ebene 4: Session-Balken */
.sessionRows {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 4px 0;
}
.sessionTrackRow { position: relative; height: 22%; min-height: 26px; }
.sessionBarSeg {
  position: absolute; top: 2px; bottom: 2px; border-radius: 8px;
  display: flex; align-items: center; padding: 0 10px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1px solid transparent; transition: all .3s ease;
}
/* Beschriftung darf über den Balkenrand hinausragen, wird aber NIE abgeschnitten. */
.sessionBarSeg .segLabel {
  position: relative; z-index: 1; white-space: nowrap;
  text-shadow: 0 1px 5px rgba(0,0,0,.7), 0 0 10px rgba(0,0,0,.4);
}
@media (max-width: 720px) { .segLabelSuffix { display: none; } }

/* Farben: Sydney türkis, Tokyo gold, London blau, New York violett */
.sessionBarSeg.pacific { background: rgba(53,224,200,.14); color: rgba(53,224,200,.65); border-color: rgba(53,224,200,.22); }
.sessionBarSeg.pacific.active { background: linear-gradient(90deg, rgba(53,224,200,.32), rgba(53,224,200,.14)); color: var(--accent-3); border-color: rgba(53,224,200,.5); box-shadow: 0 0 16px rgba(53,224,200,.28); }

.sessionBarSeg.asia { background: rgba(255,180,84,.14); color: rgba(255,180,84,.65); border-color: rgba(255,180,84,.22); }
.sessionBarSeg.asia.active { background: linear-gradient(90deg, rgba(255,180,84,.32), rgba(255,180,84,.14)); color: var(--accent-4); border-color: rgba(255,180,84,.5); box-shadow: 0 0 16px rgba(255,180,84,.28); }

.sessionBarSeg.europe { background: rgba(91,140,255,.14); color: rgba(91,140,255,.65); border-color: rgba(91,140,255,.22); }
.sessionBarSeg.europe.active { background: linear-gradient(90deg, rgba(91,140,255,.32), rgba(91,140,255,.14)); color: var(--accent); border-color: rgba(91,140,255,.5); box-shadow: 0 0 16px rgba(91,140,255,.28); }

.sessionBarSeg.america { background: rgba(160,107,255,.14); color: rgba(160,107,255,.65); border-color: rgba(160,107,255,.22); }
.sessionBarSeg.america.active { background: linear-gradient(90deg, rgba(160,107,255,.32), rgba(160,107,255,.14)); color: var(--accent-2); border-color: rgba(160,107,255,.5); box-shadow: 0 0 16px rgba(160,107,255,.28); }

.sessionNowLine {
  position: absolute; top: 0; bottom: 0; width: 2px; background: var(--text-strong);
  box-shadow: 0 0 8px rgba(244,247,255,.5), 0 0 16px rgba(91,140,255,.55), 0 0 26px rgba(91,140,255,.3);
  z-index: 4; pointer-events: none; animation: sessionNowGlow 3.2s ease-in-out infinite;
}
@keyframes sessionNowGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(244,247,255,.5), 0 0 16px rgba(91,140,255,.55), 0 0 26px rgba(91,140,255,.3); }
  50%      { box-shadow: 0 0 8px rgba(244,247,255,.55), 0 0 20px rgba(91,140,255,.75), 0 0 34px rgba(91,140,255,.42); }
}
.sessionNowLabel {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: var(--text-strong); background: var(--tile-bg);
  border: 1px solid var(--tile-border); padding: 2px 6px; border-radius: 5px; white-space: nowrap;
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
}
.sessionHourAxis {
  display: flex; justify-content: space-between; margin-top: 8px; padding: 0 2px;
  font-size: 10px; color: var(--text-dim);
}

.dashEmpty {
  padding: 14px; text-align: center; font-size: .84rem; color: var(--text-dim);
  border: 1px dashed rgba(255,255,255,.12); border-radius: 10px;
}

/* --- Wirtschaftstermine --------------------------------------------------- */
.econPanel { display: flex; flex-direction: column; }
.econPanel .econEventsList { flex: 1; min-height: 0; overflow-y: auto; }

.econRow { display: flex; align-items: center; gap: 11px; font-size: 14.5px; padding: 3px 0; }
/* Bereits gelaufene Termine treten zurück. Der Durchstrich liegt bewusst nur
   auf dem Namen und ist deutlich dünner/blasser als die Schrift selbst. */
.econRow.past { opacity: .5; }
.econRow.past .econTitle {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--text-dim);
}
.econImpact { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.econImpact-high   { background: var(--neg);      box-shadow: 0 0 6px rgba(255,93,108,.6); }
.econImpact-medium { background: var(--accent-4); box-shadow: 0 0 6px rgba(255,180,84,.5); }
.econImpact-low    { background: var(--text-dim); box-shadow: 0 0 6px rgba(138,147,173,.4); }
.econTime {
  font-weight: 700; color: var(--neg);
  background: rgba(255,93,108,.12); border: 1px solid rgba(255,93,108,.3);
  padding: 3px 9px; border-radius: 6px; font-size: 13px; flex-shrink: 0;
}
.econTitle { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.econFcPv {
  margin-left: auto; flex-shrink: 0; color: var(--text-dim); font-size: 12.5px;
  white-space: nowrap; padding-left: 8px;
}

/* Währungs-Badge direkt hinter dem Namen – bewusst klein und blass,
   damit der Terminname die Zeile führt. */
.econCur {
  display: inline-block; margin-left: 7px; padding: 1px 6px; border-radius: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .06em; vertical-align: 1px;
  text-decoration: none; white-space: nowrap;
  background: rgba(255,255,255,.08); color: var(--text-dim);
  border: 1px solid rgba(255,255,255,.14);
}
.econCur-USD { background: rgba(61,220,132,.13);  color: var(--pos);      border-color: rgba(61,220,132,.32); }
.econCur-EUR { background: rgba(91,140,255,.16);  color: var(--accent);   border-color: rgba(91,140,255,.38); }
.econCur-GBP { background: rgba(160,107,255,.14); color: var(--accent-2); border-color: rgba(160,107,255,.34); }
.econCur-JPY { background: rgba(255,93,108,.13);  color: var(--neg);      border-color: rgba(255,93,108,.32); }
.econCur-CHF { background: rgba(255,180,84,.13);  color: var(--accent-4); border-color: rgba(255,180,84,.32); }
.econCur-AUD { background: rgba(53,224,200,.14);  color: var(--accent-3); border-color: rgba(53,224,200,.34); }

/* Zeitstrahl: heute 00:00-24:00, bewusst ruhiger als der Session-Zeitstrahl. */
.econTimeline { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--tile-border); }
.econTlTrack {
  position: relative; height: 34px; border-radius: 8px 8px 0 0;
  background-image:
    repeating-linear-gradient(to right,
      rgba(255,255,255,.05) 0, rgba(255,255,255,.05) 1px, transparent 1px, transparent calc(100%/4)),
    linear-gradient(180deg, rgba(255,93,108,.10), rgba(255,93,108,.02) 70%, transparent);
  border-bottom: 1px solid rgba(255,93,108,.18);
}
.econTlNow {
  position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--text-strong);
  box-shadow: 0 0 6px rgba(91,140,255,.55); z-index: 3; pointer-events: none;
}
.econTlDot {
  position: absolute; bottom: -4.5px; width: 9px; height: 9px; border-radius: 50%;
  transform: translateX(-50%); z-index: 2;
  border: 1.5px solid rgba(5,6,13,.85);
}
.econTlDot.past { background: rgba(255,255,255,.22); box-shadow: none; }
.econTlDot.future.high   { background: var(--neg);      box-shadow: 0 0 7px rgba(255,93,108,.65); }
.econTlDot.future.medium { background: var(--accent-4); box-shadow: 0 0 7px rgba(255,180,84,.55); }
.econTlDot.future.low    { background: var(--accent-3); box-shadow: 0 0 7px rgba(53,224,200,.45); }
.econTlTime {
  position: absolute; top: 2px; transform: translateX(-50%);
  font-size: 11px; white-space: nowrap; color: var(--text-dim);
}
.econTlTime.past { opacity: .5; }
.econTlAxis {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11px; color: var(--text-dim);
}

/* =====================================================================
   Tab-Struktur und Widget-System
   Rein additiv. :root und bestehende Regeln bleiben unverändert.
   ===================================================================== */

/* --- "+ Widget"-Knopf in der Tab-Leiste ---------------------------------- */
/* Werkzeugzeile über dem Raster (ersetzt die frühere Tab-Leiste) */
.content-bar {
  display: flex;
  justify-content: flex-end;
  padding-top: 22px;
  margin-bottom: var(--gap);
}

.btn-widget {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  padding: 7px 13px;
  margin-bottom: 6px;
  border-radius: 999px;
  border: 1px solid var(--tile-border);
  background: var(--tile-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: border-color .18s, color .18s, transform .18s;
}
.btn-widget:hover {
  border-color: var(--tile-border-hi);
  color: var(--text-strong);
  transform: translateY(-1px);
}
.btn-widget svg { width: 15px; height: 15px; }

/* --- Modal ---------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 5, 12, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  width: min(620px, calc(100vw - 40px));
  max-height: min(78vh, 640px);
  overflow-y: auto;
  padding: 22px;
  border-radius: var(--tile-radius);
  background: var(--tile-bg);
  border: 1px solid var(--tile-border-hi);
  box-shadow: var(--tile-shadow);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  animation: modal-in .22s cubic-bezier(.2,.7,.3,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}
body.light-mode .modal-backdrop { background: rgba(120, 132, 160, .45); }
body.light-mode .modal-box { background: rgba(255, 255, 255, .92); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.modal-head h2 { font-size: 1.05rem; font-weight: 600; color: var(--text-strong); }
.modal-close {
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  transition: background .18s, color .18s;
}
.modal-close:hover { background: rgba(255,255,255,.07); color: var(--text-strong); }
.modal-close svg { width: 17px; height: 17px; }

/* --- Gruppen-Reiter im Picker -------------------------------------------- */
.picker-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.picker-tab {
  cursor: pointer;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.04);
  transition: color .18s, background .18s, border-color .18s;
}
.picker-tab:hover { color: var(--text); }
.picker-tab.active {
  color: var(--text-strong);
  background: rgba(91,140,255,.14);
  border-color: rgba(120,160,255,.35);
}

/* --- Widget-Auswahlkacheln ------------------------------------------------ */
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: .84rem;
  font-weight: 500;
  color: var(--text);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--tile-border);
  background: rgba(255,255,255,.03);
  transition: border-color .18s, background .18s, transform .18s;
}
.picker-item:hover {
  border-color: var(--tile-border-hi);
  transform: translateY(-2px);
}
.picker-item svg { width: 17px; height: 17px; color: var(--accent); flex: 0 0 auto; }
.picker-item .picker-check { margin-left: auto; color: var(--accent-3); display: none; }
.picker-item.is-active {
  background: rgba(91,140,255,.10);
  border-color: rgba(120,160,255,.35);
  color: var(--text-dim);
}
.picker-item.is-active .picker-check { display: block; }

/* --- Drag & Drop im Dashboard --------------------------------------------- */
.tile[draggable="true"] { cursor: grab; }
.tile.dragging { opacity: .45; cursor: grabbing; }

/* Einfügemarke – 2px-Linie an der Kante der Zielkachel */
.tile.drop-before::after,
.tile.drop-after::after {
  content: "";
  /* Muss .tile-hero::after { display: none } überstimmen */
  display: block;
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: var(--accent);
  background-size: auto;
  box-shadow: var(--accent-glow);
  z-index: 5;
  /* .tile-hero::after trägt den Shimmer – hier gezielt überschreiben */
  animation: none;
}
.tile.drop-before::after { left: 0; right: auto; }
.tile.drop-after::after  { right: 0; left: auto; }

/* =====================================================================
   ETF-Zuflüsse, Liquidations, Krypto-Nachrichten
   ===================================================================== */

.ext-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 7px 13px; border-radius: 999px;
  font-size: .8rem; font-weight: 600; text-decoration: none;
  color: var(--accent);
  background: rgba(91,140,255,.12);
  border: 1px solid rgba(120,160,255,.3);
  transition: border-color .18s, transform .18s;
}
.ext-link:hover { border-color: var(--tile-border-hi); transform: translateY(-1px); }
.ext-link svg { width: 14px; height: 14px; }

/* --- ETF-Zuflüsse --------------------------------------------------------- */
#etfBody { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.etf-block { display: flex; flex-direction: column; gap: 3px; }
.etf-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-dim);
}
.etf-total { font-size: 1.5rem; font-weight: 700; line-height: 1.15; color: var(--text-strong); }
.etf-total.up   { color: var(--pos); }
.etf-total.down { color: var(--neg); }

.etf-issuers { list-style: none; display: flex; flex-direction: column; gap: 3px; margin-top: 5px; }
.etf-issuers li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: .76rem; color: var(--text-dim);
}
.etf-issuers .up   { color: var(--pos); }
.etf-issuers .down { color: var(--neg); }

/* --- Liquidations --------------------------------------------------------- */
.embed-liq { height: 400px; }
.embed-liq iframe { display: block; width: 100%; height: 100%; }
.embed-liq .dashEmpty { display: flex; flex-direction: column; align-items: center; }

/* --- Krypto-Nachrichten --------------------------------------------------- */
.news-list { list-style: none; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.news-item {
  display: flex; align-items: center; gap: 11px;
  padding: 7px 0; font-size: .86rem;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.news-item:last-child { border-bottom: none; }
.news-src {
  flex: 0 0 auto; min-width: 84px; text-align: center;
  padding: 3px 8px; border-radius: 6px;
  font-size: .62rem; font-weight: 700; letter-spacing: .06em;
}
.news-src.src-coindesk      { color: var(--accent);   background: rgba(91,140,255,.13);  border: 1px solid rgba(91,140,255,.3); }
.news-src.src-cointelegraph { color: var(--accent-3); background: rgba(53,224,200,.13);  border: 1px solid rgba(53,224,200,.3); }
.news-src.src-decrypt       { color: var(--accent-2); background: rgba(160,107,255,.14); border: 1px solid rgba(160,107,255,.32); }

.news-title {
  flex: 1; min-width: 0;
  color: var(--text); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .18s;
}
.news-title:hover { color: var(--text-strong); text-decoration: underline; }
.news-time { flex: 0 0 auto; font-size: .72rem; color: var(--text-dim); }

/* =====================================================================
   My Portfolio
   ===================================================================== */
.pf-summary { margin-bottom: 26px; }

.pf-big { font-size: 1.9rem; font-weight: 700; color: var(--text-strong); line-height: 1.15; }
.pf-sub { font-size: .84rem; color: var(--text-dim); margin-top: 3px; }
.pf-pnl { margin-top: 8px; font-size: .95rem; font-weight: 600; color: var(--text-dim); }
.pf-pnl.up, .pf-rows .up { color: var(--pos); }
.pf-pnl.down, .pf-rows .down { color: var(--neg); }

.pf-rows { display: flex; flex-direction: column; gap: 9px; flex: 1; justify-content: center; }
.pf-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: .86rem; color: var(--text-dim);
}
.pf-row span:last-child { font-weight: 700; color: var(--text-strong); }

/* Donut */
.pf-donut-wrap { display: flex; align-items: center; gap: 16px; flex: 1; }
.pf-donut { width: 96px; height: 96px; flex: 0 0 auto; transform: rotate(-90deg); }
.pf-slice { fill: none; stroke-width: 4.4; transition: stroke-dasharray .5s ease; }
.pf-donut-empty { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4.4; }

.pf-legend { list-style: none; display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.pf-legend li { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text-dim); }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.pf-legend-sym { flex: 1; color: var(--text); font-weight: 600; }

/* Tabellenkopf mit Aktion */
.pf-table-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.pf-table-head .view-title { margin-bottom: 0; }

.pf-table-tile { padding: 0; overflow: hidden; }
.pf-table-scroll { overflow-x: auto; }
.pf-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.pf-table th {
  text-align: left; white-space: nowrap;
  padding: 14px 16px;
  font-size: .68rem; font-weight: 700; letter-spacing: .7px; text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--tile-border);
}
.pf-table td {
  padding: 12px 16px; white-space: nowrap;
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.pf-table tbody tr { transition: background .18s; }
.pf-table tbody tr:hover { background: rgba(255,255,255,.04); }
.pf-table tbody tr:last-child td { border-bottom: none; }
.pf-table td.up { color: var(--pos); }
.pf-table td.down { color: var(--neg); }

.pf-coin { display: flex; flex-direction: column; gap: 1px; }
.pf-coin-name { font-weight: 600; color: var(--text-strong); }
.pf-coin-sym { font-size: .7rem; font-weight: 700; letter-spacing: .5px; color: var(--text-dim); }

.pf-actions { display: flex; gap: 6px; }
.pf-icon-btn {
  cursor: pointer; border: none; background: transparent; color: var(--text-dim);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  transition: background .18s, color .18s;
}
.pf-icon-btn:hover { background: rgba(255,255,255,.07); color: var(--text-strong); }
.pf-icon-btn.danger:hover { color: var(--neg); }
.pf-icon-btn svg { width: 15px; height: 15px; }

/* Modal-Ergänzungen */
.pf-search-field { position: relative; }
.pf-suggest {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  margin-top: 5px; max-height: 230px; overflow-y: auto;
  border-radius: 12px;
  background: var(--tile-bg);
  border: 1px solid var(--tile-border-hi);
  box-shadow: var(--tile-shadow);
  backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
}
body.light-mode .pf-suggest { background: rgba(255,255,255,.95); }
.pf-suggest-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  cursor: pointer; border: none; background: transparent; text-align: left;
  padding: 9px 12px; font-family: var(--font); font-size: .85rem; color: var(--text);
}
.pf-suggest-item:hover { background: rgba(91,140,255,.12); color: var(--text-strong); }
.pf-suggest-item img { width: 20px; height: 20px; border-radius: 50%; }
.pf-suggest-item span:nth-of-type(1) { flex: 1; }

#posForm textarea {
  width: 100%; padding: 12px 14px; border-radius: 11px;
  border: 1px solid var(--tile-border); background: rgba(255,255,255,.04);
  color: var(--text-strong); font-family: var(--font); font-size: .95rem;
  outline: none; resize: vertical;
}
#posForm textarea:focus { border-color: var(--tile-border-hi); }

.pf-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.pf-modal-actions .pf-save { width: auto; padding: 12px 26px; margin-top: 0; }
.btn-ghost {
  cursor: pointer; padding: 12px 22px; border-radius: 999px;
  font-family: var(--font); font-size: .92rem; font-weight: 600;
  color: var(--text-dim); background: transparent;
  border: 1px solid var(--tile-border);
  transition: color .18s, border-color .18s;
}
.btn-ghost:hover { color: var(--text-strong); border-color: var(--tile-border-hi); }

/* Das Positions-Modal nutzt die Feld-Optik der Anmeldeseite. auth.css wird
   auf index.html nicht geladen, deshalb hier die nötigen Regeln gespiegelt. */
#posForm .auth-field { display: block; margin-bottom: 14px; }
#posForm .auth-field > span {
  display: block; margin-bottom: 7px;
  font-size: .72rem; font-weight: 600; letter-spacing: .6px;
  text-transform: uppercase; color: var(--text-dim);
}
#posForm .auth-field input {
  width: 100%; padding: 11px 14px; border-radius: 11px;
  border: 1px solid var(--tile-border); background: rgba(255,255,255,.04);
  color: var(--text-strong); font-family: var(--font); font-size: .92rem; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
#posForm .auth-field input::placeholder { color: var(--text-dim); }
#posForm .auth-field input:focus {
  border-color: var(--tile-border-hi); box-shadow: 0 0 0 3px rgba(91,140,255,.14);
}
#posForm .auth-msg {
  margin-top: 12px; padding: 10px 13px; border-radius: 10px;
  font-size: .84rem; color: var(--neg);
  border: 1px solid rgba(255,93,108,.35); background: rgba(255,93,108,.07);
}
#posForm .auth-submit {
  cursor: pointer; border: none; border-radius: 999px;
  font-family: var(--font); font-size: .92rem; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--accent-glow);
  transition: transform .18s, filter .18s;
}
#posForm .auth-submit:hover { transform: translateY(-1px); filter: brightness(1.08); }
body.light-mode #posForm .auth-field input { background: rgba(0,0,0,.03); }

/* --- Kompakte Kursleiste in der Topbar ------------------------------------ */
.top-prices { display: flex; align-items: center; gap: 16px; margin-right: 6px; }
@media (max-width: 900px) { .top-prices { display: none; } }
.tp { display: flex; align-items: baseline; gap: 5px; font-size: .8rem; white-space: nowrap; }
.tp-sym { font-size: .66rem; font-weight: 700; letter-spacing: .5px; color: var(--text-dim); }
.tp-price { font-weight: 600; color: var(--text-strong); }
.tp-chg { font-size: .72rem; font-weight: 600; }
.tp-chg.up { color: var(--pos); }
.tp-chg.down { color: var(--neg); }

/* --- Liquidations: Direktlink statt Einbettung ---------------------------- */
.liq-cta {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 34px 20px; text-align: center;
  border: 1px dashed rgba(255,255,255,.12); border-radius: 14px;
}
.liq-icon { width: 40px; height: 40px; color: var(--accent); }
.liq-icon svg { width: 40px; height: 40px; }
.liq-title { font-size: 1.02rem; font-weight: 600; color: var(--text-strong); }
.liq-btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-size: .92rem; font-weight: 600; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--accent-glow);
  transition: transform .18s, filter .18s;
}
.liq-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.liq-note { font-size: .76rem; color: var(--text-dim); }
.embed-liq { height: auto; display: flex; }

/* --- System-Status (Einstellungen, nur Administratoren) ------------------- */
.sys-list { list-style: none; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.sys-item {
  display: flex; align-items: center; gap: 9px;
  font-size: .84rem; color: var(--text);
}
.sys-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto;
}
.sys-item.ok  .sys-dot { background: var(--pos); box-shadow: 0 0 8px var(--pos); }
.sys-item.bad .sys-dot { background: var(--neg); box-shadow: 0 0 8px var(--neg); }
.sys-item.bad { color: var(--text-dim); }

/* --- Kurzmeldung nach der E-Mail-Bestätigung ------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 10001;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  background: var(--tile-bg);
  border: 1px solid rgba(61, 220, 132, .4);
  box-shadow: var(--tile-shadow), 0 0 24px rgba(61, 220, 132, .25);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  animation: toast-in .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
.toast.out { opacity: 0; transition: opacity .4s ease; }

/* --- Kurzmeldung nach der E-Mail-Bestätigung ------------------------------ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  z-index: 10001;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-strong);
  background: var(--tile-bg);
  border: 1px solid rgba(61, 220, 132, .4);
  box-shadow: var(--tile-shadow), 0 0 24px rgba(61, 220, 132, .25);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  animation: toast-in .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
}
.toast.out { opacity: 0; transition: opacity .4s ease; }

/* --- Fußnote ------------------------------------------------------------- */
.foot {
  margin-top: 34px;
  text-align: center;
  color: var(--text-dim);
  font-size: .78rem;
}
