/* ==========================================================================
   Flatex Trading Journal – gemeinsames Stylesheet
   Farbwerte folgen der internen Dataviz-Richtlinie (references/palette.md):
   neutrale Chrome-Farben + Status-Palette (good/warning/serious/critical)
   für Gewinn/Verlust-Darstellung. Aktuell nur Light-Mode implementiert.
   ========================================================================== */

:root {
  --surface-1: #fcfcfb;
  --page-plane: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --text-muted: #898781;
  --gridline: #e1e0d9;
  --border-hairline: rgba(11, 11, 11, 0.1);
  --baseline: #c3c2b7;

  --status-good: #0ca30c;
  --status-good-bg: #e7f6e7;
  --status-warning: #fab219;
  --status-warning-bg: #fef3de;
  --status-serious: #ec835a;
  --status-critical: #d03b3b;
  --status-critical-bg: #fbe8e8;

  --series-blue: #2a78d6;
  --series-orange: #eb6834;
  --series-aqua: #1baf7a;
  --series-violet: #4a3aa7;

  --nav-active-bg: #eef3fc;
  --nav-active-text: #184f95;
}

body {
  background: var(--page-plane);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Eigenständig definiert (nicht von der Tailwind-CDN abhängig), da App-Logik
   (Zeigen/Verstecken von Fehlermeldungen, leeren Zuständen etc.) sich hierauf verlässt. */
.hidden {
  display: none !important;
}

#app-nav {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-hairline);
}

.card {
  background: var(--surface-1);
  border: 1px solid var(--border-hairline);
  border-radius: 10px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
}

.pnl-positive {
  color: var(--status-good);
}
.pnl-negative {
  color: var(--status-critical);
}
.pnl-neutral {
  color: var(--text-muted);
}

.tag-pill {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
}

.input {
  border: 1px solid var(--border-hairline);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  background: var(--surface-1);
  color: var(--text-primary);
}
.input:focus {
  outline: 2px solid var(--series-blue);
  outline-offset: -1px;
}

.btn-primary {
  background: var(--series-blue);
  color: white;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
}
.btn-primary:hover {
  opacity: 0.9;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
}
.btn-secondary:hover {
  background: var(--page-plane);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data-table th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  border-bottom: 1px solid var(--gridline);
}
table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gridline);
}
table.data-table tbody tr:hover {
  background: var(--page-plane);
  cursor: pointer;
}

.stat-tile-label {
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}
.stat-tile-value {
  color: var(--text-primary);
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Kalender-Heatmap */
.cal-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: default;
  border: 1px solid var(--border-hairline);
}
.cal-cell-empty {
  border: none;
}
