/* =========================================
   SAMMELKARTENWELT — Component Styles (CI 2026)
   Aktiv unter:  body.theme-new
   Lädt nach:    style.css + tokens.css
   Strategie:    Bestehende Bootstrap-Klassen werden
                 nur unter .theme-new überschrieben.
   ========================================= */

/* ---- Base / Body ---------------------------- */
/* body bekommt von Bootstrap meist .bg-body-tertiary mit !important.
   Daher hier auch !important damit unser Theme-Background gewinnt. */
body.theme-new {
  font-family: var(--skw-font);
  background: var(--skw-bg) !important;
  color: var(--skw-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* DM Sans global durchsetzen - alte style.css + Bootstrap setzen oft eigene
   font-family explizit. Bootstrap-Icons (.bi) bleiben in ihrer Glyphen-Font. */
body.theme-new,
body.theme-new h1, body.theme-new h2, body.theme-new h3,
body.theme-new h4, body.theme-new h5, body.theme-new h6,
body.theme-new p, body.theme-new span, body.theme-new div,
body.theme-new a, body.theme-new label, body.theme-new small,
body.theme-new button, body.theme-new input, body.theme-new select,
body.theme-new textarea, body.theme-new td, body.theme-new th,
body.theme-new li, body.theme-new dt, body.theme-new dd,
body.theme-new .btn, body.theme-new .form-control, body.theme-new .form-label,
body.theme-new .nav-link, body.theme-new .dropdown-item,
body.theme-new .badge, body.theme-new .card-title, body.theme-new .card-text {
  font-family: var(--skw-font) !important;
}
body.theme-new i.bi,
body.theme-new .bi,
body.theme-new [class*="bi-"] {
  font-family: 'bootstrap-icons' !important;
}

.theme-new h1, .theme-new h2, .theme-new h3, .theme-new h4 {
  font-family: var(--skw-font);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--skw-ink);
}

.theme-new h1 { font-size: var(--skw-fs-h1); font-weight: 800; }
.theme-new h2 { font-size: var(--skw-fs-h2); }
.theme-new h3 { font-size: var(--skw-fs-h3); font-weight: 600; }

/* Numerals — wichtig für Preise */
.theme-new .num,
.theme-new .price,
.theme-new td.num,
.theme-new [data-num] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Section-Label / Eyebrow */
.theme-new .label-cap {
  font-size: var(--skw-fs-label);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--skw-text-muted);
}

/* ---- Navbar ---------------------------------- */
.theme-new .navbar {
  background: var(--skw-header-bg) !important;
  border-bottom: none !important;
  padding: 14px 0;
  box-shadow: var(--skw-shadow-md);
}

.theme-new .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--skw-font);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: #fff !important;
  margin-left: -8px;  /* Logo etwas naeher an die linke Kante, ohne Rest zu verschieben */
}
@media (max-width: 575.98px) {
  .theme-new .navbar-brand { margin-left: -4px; }
}

.theme-new .navbar-brand .logo-mark {
  width: 28px;
  height: auto;
  color: var(--skw-accent);
  flex-shrink: 0;
}

.theme-new .navbar-brand .brand-accent {
  color: var(--skw-accent);
}

.theme-new .navbar-nav .nav-link {
  font-family: var(--skw-font);
  font-weight: 500;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7) !important;
  padding: 8px 14px !important;
  transition: color var(--skw-dur) var(--skw-ease);
}

.theme-new .navbar-nav .nav-link:hover {
  color: #fff !important;
}

.theme-new .navbar-nav .nav-link.active {
  color: var(--skw-accent) !important;
  font-weight: 600;
}

/* Mobile-Hamburger sichtbar auf dunklem Header */
.theme-new .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.2);
  padding: 4px 8px;
}
.theme-new .navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}
.theme-new .navbar-toggler-icon {
  filter: invert(1) brightness(1.2);
}

/* Wordmark im navbar-brand sichtbar (DM Sans, weiss, Akzent fuer "welt") */
.theme-new .navbar-brand .brand-wordmark {
  font-family: var(--skw-font);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
}

/* Profil-Dropdown im neuen Header: weisse Texte/Icons */
.theme-new .navbar .btn.nav-link {
  color: rgba(255, 255, 255, 0.85) !important;
}
.theme-new .navbar .btn.nav-link:hover {
  color: #fff !important;
}

/* ---- Buttons --------------------------------- */
.theme-new .btn {
  font-family: var(--skw-font);
  font-weight: 600;
  border-radius: var(--skw-radius);
  padding: 9px 18px;
  font-size: var(--skw-fs-small);
  letter-spacing: -0.005em;
  border: 1.5px solid transparent;
  transition: all var(--skw-dur) var(--skw-ease);
  box-shadow: var(--skw-shadow-xs);
}

.theme-new .btn-lg { padding: 12px 24px; font-size: var(--skw-fs-body); }
.theme-new .btn-sm { padding: 6px 12px; font-size: var(--skw-fs-label); }

/* !important nötig weil alte style.css `.btn-primary { background-color: var(--accent-blue) !important }` setzt */
.theme-new .btn-primary {
  background: var(--skw-accent) !important;
  background-color: var(--skw-accent) !important;
  color: #fff !important;
  border-color: var(--skw-accent) !important;
}

.theme-new .btn-primary:hover,
.theme-new .btn-primary:focus {
  background: var(--skw-accent-h) !important;
  background-color: var(--skw-accent-h) !important;
  border-color: var(--skw-accent-h) !important;
  transform: translateY(-1px);
  box-shadow: var(--skw-shadow-sm);
}

.theme-new .btn-outline-primary {
  background: transparent;
  color: var(--skw-accent);
  border-color: var(--skw-accent);
}

.theme-new .btn-outline-primary:hover {
  background: var(--skw-accent);
  color: #fff;
}

.theme-new .btn-success {
  background: var(--skw-success);
  border-color: var(--skw-success);
  color: #fff;
}

.theme-new .btn-danger {
  background: var(--skw-danger);
  border-color: var(--skw-danger);
  color: #fff;
}

.theme-new .btn-link,
.theme-new .btn-ghost {
  background: transparent;
  color: var(--skw-text-muted);
  border-color: var(--skw-border);
  box-shadow: none;
}

.theme-new .btn-ghost:hover {
  color: var(--skw-ink);
  border-color: var(--skw-border-strong);
}

/* ---- Cards ----------------------------------- */
.theme-new .card {
  background: var(--skw-surface);
  border: 1px solid var(--skw-border);
  border-radius: var(--skw-radius-lg);
  box-shadow: var(--skw-shadow-sm);
  transition: box-shadow var(--skw-dur) var(--skw-ease), transform var(--skw-dur) var(--skw-ease);
}

.theme-new .card:hover {
  box-shadow: var(--skw-shadow-md);
}

.theme-new .card-header {
  background: transparent;
  border-bottom: 1px solid var(--skw-border);
  padding: 14px 18px;
  font-weight: 600;
  color: var(--skw-ink);
}

.theme-new .card-body { padding: 18px; }

.theme-new .card-title {
  font-family: var(--skw-font);
  font-weight: 700;
  font-size: var(--skw-fs-h3);
  color: var(--skw-ink);
  margin-bottom: 4px;
}

/* ---- Forms ----------------------------------- */
.theme-new .form-control,
.theme-new .form-select {
  font-family: var(--skw-font);
  font-size: var(--skw-fs-body);
  border: 1.5px solid var(--skw-border-strong);
  border-radius: var(--skw-radius);
  padding: 9px 12px;
  color: var(--skw-text);
  background: var(--skw-surface);
  transition: border-color var(--skw-dur) var(--skw-ease), box-shadow var(--skw-dur) var(--skw-ease);
}

.theme-new .form-control:focus,
.theme-new .form-select:focus {
  border-color: var(--skw-accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  outline: none;
}

.theme-new .form-label {
  font-family: var(--skw-font);
  font-weight: 600;
  font-size: var(--skw-fs-small);
  color: var(--skw-ink);
  margin-bottom: 4px;
}

/* ---- G/V (Gewinn / Verlust) — Brand-konsistent ----
   Saubere Loesung: alte CSS-Variable --accent-success im .theme-new-Scope
   auf Cyan setzen. Alle Inline-Styles `style="color: var(--accent-success)"`
   im HTML uebernehmen das automatisch -> kein !important noetig.
   `.text-success` (Bootstrap) hat eigene !important-Regel, daher dafuer
   gezielt mit !important ueberstimmen. */
.theme-new {
  --accent-success: var(--skw-data);
}
.theme-new .text-success {
  color: var(--skw-data) !important;
}
.theme-new .pnl-pos,
.theme-new .gv-pos,
.theme-new .positive {
  color: var(--skw-data);
}
.theme-new .text-danger {
  color: var(--skw-danger) !important;
}
.theme-new .pnl-neg,
.theme-new .gv-neg,
.theme-new .negative {
  color: var(--skw-danger);
}

/* ---- Badges & Tags --------------------------- */
/* Bootstrap nutzt Custom Properties (--bs-badge-padding-x etc.). Ohne diese
   zu ueberschreiben gewinnen Bootstrap-Defaults. Daher ALLE Vars direkt. */
.theme-new .badge {
  --bs-badge-padding-x: 6px !important;
  --bs-badge-padding-y: 2px !important;
  --bs-badge-font-size: 0.6rem !important;
  --bs-badge-font-weight: 700 !important;
  --bs-badge-border-radius: 999px !important;
  font-family: var(--skw-font) !important;
  font-weight: 700 !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.04em !important;
  border-radius: 999px !important;
  padding: 2px 6px !important;
  border: 0 !important;
  line-height: 1.3 !important;
}

.theme-new .badge.bg-primary,
.theme-new .badge-skw-accent {
  background: rgba(99, 102, 241, 0.12) !important;
  color: var(--skw-accent) !important;
  border-color: rgba(99, 102, 241, 0.25);
}

.theme-new .badge.bg-success,
.theme-new .badge-skw-success {
  background: rgba(16, 185, 129, 0.12) !important;
  color: var(--skw-success) !important;
  border-color: rgba(16, 185, 129, 0.25);
}

.theme-new .badge.bg-danger,
.theme-new .badge-skw-danger {
  background: rgba(244, 63, 94, 0.12) !important;
  color: var(--skw-danger) !important;
  border-color: rgba(244, 63, 94, 0.25);
}

/* ---- Tables ---------------------------------- */
.theme-new .table {
  font-family: var(--skw-font);
}

.theme-new .table thead th {
  font-size: var(--skw-fs-label);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--skw-text-muted);
  border-bottom: 1px solid var(--skw-border);
  background: transparent;
}

.theme-new .table tbody td {
  border-bottom: 1px solid var(--skw-border);
  padding: 12px 14px;
  vertical-align: middle;
  color: var(--skw-text);
}

/* ---- Pixel-Akzent: ENTFERNT ------------------ */
/* Alte .px-num / .pixel-text Klassen werden unter .theme-new
   in DM Sans bold + tabular gerendert, statt Press Start 2P. */
.theme-new .px-num,
.theme-new .pixel-text,
.theme-new .pixel {
  font-family: var(--skw-font) !important;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---- Footer ---------------------------------- */
.theme-new footer,
.theme-new .footer {
  background: #0F0F23;
  color: rgba(255, 255, 255, 0.7);
  padding: var(--skw-sp-7) 0;
  border-top: none;
}

.theme-new .footer a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.theme-new .footer a:hover {
  color: var(--skw-accent);
}
