* { box-sizing: border-box; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #f7f7f8;
  color: #1a1a1a;
  margin: 0;
}
.nav {
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}
.nav a { color: #1a56db; text-decoration: none; }
.nav a:hover { text-decoration: underline; }

/* "Alte Engine"-Dropdown (2026-09-16): buendelt die Seiten des alten, nicht mehr
   validierten Signal-Engines (Marktuebersicht/Watchlist/Empfehlungen/Erfolgskontrolle/
   Lernen) unter einem Punkt statt sie einzeln in der Hauptnavigation zu zeigen. Reines
   HTML <details>/<summary> - kein JS, funktioniert per Klick auch auf Mobilgeraeten. */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  color: #1a56db; cursor: pointer; list-style: none;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: " \25BE"; font-size: 11px; }
.nav-dropdown summary:hover { text-decoration: underline; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: #fff; border: 1px solid #ddd; border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex; flex-direction: column; min-width: 200px; z-index: 10;
}
.nav-dropdown-menu a { padding: 8px 14px; }
.nav-dropdown-menu a:hover { background: #f0f4ff; text-decoration: none; }
.content { padding: 24px; max-width: 1100px; margin: 0 auto; }
h1 { color: #111; }
.hint { color: #777; font-size: 13px; }
.error { color: #a33; background: #fdecea; border: 1px solid #f2c0c0; border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.cards { display: flex; flex-wrap: wrap; gap: 16px; }
.card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px 18px;
  min-width: 220px;
  flex: 1 1 260px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card.risk { border-color: #d9534f; }
.card h3 { margin: 0 0 6px 0; }
.card h3 a { color: #111; text-decoration: none; }
.ticker-tag { color: #888; font-weight: normal; font-size: 12px; }
.dir-long { color: #1a7a3d; font-weight: 600; }
.dir-short { color: #c0392b; font-weight: 600; }
.levels { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; }
.levels li { padding: 2px 0; }
.bucket-explain { color: #555; font-size: 12px; font-style: italic; margin: 4px 0 8px 0; }
.bucket { display: inline-block; background: #e8f0fe; color: #1a56db; padding: 2px 10px; border-radius: 12px; font-size: 12px; margin-bottom: 8px; }
.table { border-collapse: collapse; width: 100%; margin-top: 12px; background: #fff; }
.table th, .table td { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: left; font-size: 13px; }
.table th { background: #f0f0f2; }
.pos { color: #1a7a3d; }
.neg { color: #c0392b; }
.price-header { display: flex; flex-direction: column; gap: 4px; }
.price-value { font-size: 1.8em; font-weight: 700; margin-right: 10px; }
.price-changes { display: flex; gap: 16px; list-style: none; padding: 0; margin: 4px 0; }
.stale-warning { color: #b45309; }
.news-sync-badge { display: inline-block; }
.inactive-row { opacity: 0.55; }
.news-preview-link { color: #1a1a1a; text-decoration: none; border-bottom: 1px dotted #999; }
.watchlist-table th a { color: #1a1a1a; text-decoration: none; }
.watchlist-table th a:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .price-value { font-size: 1.4em; }
  .price-changes { flex-wrap: wrap; gap: 8px; }
  .news-sync-badge { float: none !important; display: block; margin-top: 6px; }
  .watchlist-table { display: block; overflow-x: auto; white-space: nowrap; }
}
.alerts { list-style: none; padding: 0; }
.alerts li { background: #fff; border: 1px solid #e0e0e0; border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; }
.badge { background: #eee; padding: 2px 8px; border-radius: 4px; font-size: 11px; margin-right: 8px; }
.badge.high_relevance_news { background: #fdecd2; }
.badge.assessment_change { background: #d9f0dd; }
button, .small { background: #1a56db; color: #fff; border: none; border-radius: 4px; padding: 6px 12px; cursor: pointer; font-size: 12px; }
button:hover { background: #143fa8; }
.inline-form { display: flex; gap: 8px; margin-bottom: 8px; }
.inline-form input { padding: 6px; background: #fff; color: #1a1a1a; border: 1px solid #ccc; border-radius: 4px; }
.news-list { list-style: none; padding: 0; }
.news-list li { border-bottom: 1px solid #e0e0e0; padding: 8px 0; }
.news-list a { color: #1a56db; text-decoration: none; }
.meta { color: #888; font-size: 12px; margin-top: 2px; }
section { margin-bottom: 32px; }

/* Signal Engine V2 - Shadow Mode (2026-09-16). Bewusst eine eigene, klar erkennbare Faerbung
   (violett statt des blauen V1-".bucket") - visuelle Trennung ist hier eine Sicherheitsanforderung
   (V2 darf nie wie eine operative Empfehlung aussehen), kein Stilexperiment. */
.shadow-panel { border: 2px dashed #8a63d2; border-radius: 10px; padding: 18px 20px; background: #faf8ff; }
.shadow-badge {
  display: inline-block; background: #6c3fc9; color: #fff; font-weight: 700; letter-spacing: 0.5px;
  padding: 3px 12px; border-radius: 12px; font-size: 12px; margin-bottom: 8px;
}
.shadow-disclaimer { color: #5b3a94; font-size: 13px; font-style: italic; margin: 0 0 16px 0; }
.shadow-stale { color: #8a5a00; background: #fff4d9; border: 1px solid #f0d999; border-radius: 6px; padding: 6px 10px; font-size: 12px; margin-bottom: 12px; }
.shadow-panel .card { border-color: #ded4f5; }
.shadow-panel h3, .shadow-panel h4 { margin-top: 0; }
.status-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; margin-left: 6px; }
.status-rejected { background: #fdecea; color: #a33; }
.status-analysis-only { background: #fdecd2; color: #8a5a00; }
.status-production { background: #d9f0dd; color: #1a7a3d; }
.divergence-badge { display: inline-block; background: #eee4ff; color: #5b3a94; border: 1px solid #cbb8f0; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.tooltip-term { border-bottom: 1px dotted #888; cursor: help; }
.shadow-decision { display: inline-block; padding: 4px 14px; border-radius: 12px; font-size: 14px; font-weight: 700; background: #eee; }
.shadow-decision.dir-long { background: #d9f0dd; }
.shadow-decision.dir-short { background: #fdecea; }
.compare-table th, .compare-table td { text-align: left; }
.v2-timestamp { color: #888; font-size: 12px; }

/* Handelsassistent-Hauptseite (2026-09-16): klare, ruhige Unterscheidung Paper vs.
   Shadow, keine "Casino"-Optik - siehe docs/event_strategy_paper_operations.md. */
.paper-badge {
  display: inline-block; background: #0f7a3d; color: #fff; font-weight: 700;
  letter-spacing: 0.5px; padding: 4px 14px; border-radius: 12px; font-size: 12px;
  margin-bottom: 14px;
}
.big-number { font-size: 26px; font-weight: 700; margin: 4px 0; }

/* Derivate-Rechner (2026-09-17, Auftrag Abschnitt 46-51) - Research/Calculator only. */
.risk-banner {
  background: #fdecea; border: 2px solid #d9534f; border-radius: 8px;
  padding: 14px 18px; margin-bottom: 20px; color: #a33; font-weight: 600; font-size: 14px;
}
.section-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.section-nav a { background: #eee; padding: 4px 12px; border-radius: 14px; font-size: 13px; text-decoration: none; color: #1a56db; }
.section-nav a:hover { background: #dde5fc; }
.kv-table td:first-child { color: #555; width: 280px; }
.template-badge {
  display: inline-block; background: #8a5a00; color: #fff; font-weight: 700;
  padding: 3px 10px; border-radius: 10px; font-size: 11px; margin-bottom: 8px;
}

/* Wirtschaftliche Entwicklung / Fundamentaldaten-Historie (ueberarbeitet 2026-10-11,
   Owner-Feedback: "ueberbreite Balken, unlesbare Rohzahlen, kaum erkennbare Skalen").
   Kompakte gruppierte Karten statt einer langen Rohwerttabelle. */
.fh-group-title { margin: 18px 0 8px 0; font-size: 15px; color: #333; }
.fh-cards { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.fh-card {
  background: #fff; border: 1px solid #e0e0e0; border-radius: 8px;
  padding: 10px 12px; flex: 1 1 220px; max-width: 260px; min-width: 200px;
}
.fh-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fh-card-title { font-size: 12px; color: #555; }
.fh-card-value { font-size: 15px; font-weight: 700; white-space: nowrap; }
.fh-card-delta { font-size: 12px; margin: 2px 0 6px 0; }
.fh-chart { height: 90px; }
.fh-tooltip { min-height: 14px; margin-top: 2px; }
.fh-missing { font-size: 12px; margin: 8px 0 0 0; }
.fh-table-toggle { margin-top: 16px; }
@media (max-width: 600px) {
  .fh-card { flex: 1 1 100%; max-width: 100%; }
  .fh-card-value { font-size: 13px; }
}
