/* ============================================================
   Rentenplaner – Muellmann & Bußmann
   Design angelehnt an die "Ich mach Rente"-Kampagne: schwarz,
   gold, rot. Eigenständig umgesetzt, ohne fremde Markenzeichen.
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --panel: #141414;
  --panel-2: #1c1c1c;
  --panel-3: #232323;
  --border: #2c2c2c;
  --border-light: #3a3a3a;
  --gold: #d6ad3f;
  --gold-light: #e9cc7a;
  --gold-dark: #a9801f;
  --red: #c23b32;
  --red-light: #e2564a;
  --text: #f4f3ef;
  --text-dim: #b7b4ab;
  --text-dimmer: #7c7a73;
  --ok: #4caf87;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --radius: 10px;
  --max-width: 1360px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100vh; }
a { color: var(--gold-light); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- Wortmarke ---------------- */
.wortmarke {
  display: inline-block;
  line-height: 1;
}
.wortmarke .zeile1 {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--text);
}
.wortmarke .zeile2 {
  display: block;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.01em;
  color: var(--gold);
}
.wortmarke .balken {
  display: block;
  width: 56px;
  height: 4px;
  background: var(--red);
  margin-top: 4px;
}
.wortmarke.klein .zeile1 { font-size: 9px; }
.wortmarke.klein .zeile2 { font-size: 19px; }
.wortmarke.klein .balken { width: 36px; height: 3px; margin-top: 2px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-gold {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #1a1304;
}
.btn-outline {
  background: transparent;
  border-color: var(--border-light);
  color: var(--text);
}
.btn-outline:hover { background: var(--panel-2); }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--border);
  font-weight: 600;
  padding: 10px 16px;
  font-size: 13px;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------------- Landing / Hero ---------------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 20px;
}
.hero .wortmarke { margin-bottom: 36px; }
.hero .wortmarke .zeile1 { font-size: 15px; }
.hero .wortmarke .zeile2 { font-size: 46px; }
.hero .wortmarke .balken { width: 70px; height: 5px; margin: 8px auto 0; }
.hero h1 {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  max-width: 820px;
  margin-bottom: 18px;
}
.hero h1 .accent { color: var(--gold); }
.hero .sub {
  color: var(--text-dim);
  max-width: 560px;
  font-size: 16px;
  margin-bottom: 36px;
}
.hero .schritte {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 260px));
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 760px) {
  .hero .schritte { grid-template-columns: 1fr; }
}
.schritt-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: left;
}
.schritt-card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a1304;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 10px;
}
.schritt-card h3 { font-size: 15px; margin-bottom: 6px; }
.schritt-card p { font-size: 13px; color: var(--text-dim); line-height: 1.4; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.hero .hinweis { font-size: 13px; color: var(--text-dimmer); max-width: 460px; }
.hero footer { margin-top: 56px; }
.marke-footer {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 8px 18px;
  display: inline-block;
}
.footer-links { margin-top: 16px; font-size: 13px; color: var(--text-dimmer); }
.footer-links a { color: var(--text-dim); }

/* ---------------- App-Shell (Planer) ---------------- */
.appbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: var(--panel);
  border-bottom: 3px solid var(--gold);
  flex-wrap: wrap;
}
.appbar .spacer { flex: 1; }
.appbar nav { display: flex; gap: 8px; flex-wrap: wrap; }
.appbar .user { font-size: 13px; color: var(--text-dim); margin-right: 6px; }

.planer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  min-height: calc(100vh - 57px);
}
@media (max-width: 980px) {
  .planer-layout { grid-template-columns: 1fr; }
}
.planer-left {
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.planer-right {
  padding: 24px 20px;
  background: #0d0d0d;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--panel-3);
  border-bottom: 3px solid var(--gold);
  flex-wrap: wrap;
}
.card-head h2 { font-size: 17px; font-weight: 800; }
.card-head .meta { font-size: 13px; color: var(--text-dim); }
.card-body { padding: 18px; }
.card-note { font-size: 13px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 20px;
}
@media (max-width: 760px) { .field-grid { grid-template-columns: repeat(2, 1fr); } }
.field-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.field-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.field label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 7px;
}
.field .hint { font-size: 12.5px; color: var(--text-dimmer); margin-top: 6px; line-height: 1.35; }
.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="password"],
.field select {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 600;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(214, 173, 63, 0.18);
}
.info-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--border-light);
  color: var(--text-dim);
  font-size: 10px;
  font-weight: 800;
  cursor: help;
}

.result-box {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-top: 6px;
}
.result-box .label { font-size: 11.5px; font-weight: 800; letter-spacing: 0.04em; color: var(--text-dim); text-transform: uppercase; margin-bottom: 6px; }
.result-box .value { font-size: 24px; font-weight: 900; color: var(--gold-light); }
.result-box .value.small { font-size: 18px; color: var(--text); }
.result-box .sub { font-size: 12px; color: var(--text-dimmer); margin-top: 6px; }

/* ---------------- Asset-Zeilen (Schritt 2) ---------------- */
.asset-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 140px 1fr 32px;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.asset-row:last-child { border-bottom: none; }
@media (max-width: 760px) { .asset-row { grid-template-columns: 1fr; } }
.asset-row .titel { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.asset-row .beschreibung { font-size: 12.5px; color: var(--text-dimmer); line-height: 1.4; }
.asset-row input[type="number"] {
  background: var(--panel-2);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: 7px;
  padding: 11px 12px;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  width: 100%;
}
.asset-row select {
  background: var(--panel-2);
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: 7px;
  padding: 11px 10px;
  font-size: 13px;
  width: 100%;
}
.asset-plus {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}

/* ---------------- Tabellen (Schritt 3/4) ---------------- */
table.rp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.rp-table th {
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-dimmer);
  text-transform: uppercase;
  font-weight: 800;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border-light);
}
table.rp-table th:first-child, table.rp-table td:first-child { text-align: left; }
table.rp-table td { padding: 11px 0; border-bottom: 1px solid var(--border); text-align: right; }
table.rp-table tr.total td { font-weight: 800; border-bottom: none; }
table.rp-table tr.lücke td { font-weight: 900; font-size: 16px; color: var(--gold-light); border-top: 2px solid var(--gold); padding-top: 14px; }
table.rp-table td.neg { color: var(--red-light); }
table.rp-table td.label-cell { color: var(--text); }

/* ---------------- Chart-Panel ---------------- */
.chart-headline { text-align: center; margin-bottom: 18px; }
.chart-headline .kicker { font-size: 12.5px; color: var(--text-dim); margin-bottom: 4px; }
.chart-headline .big { font-size: 42px; font-weight: 900; color: var(--gold); line-height: 1; }
.chart-headline .detail { font-size: 12.5px; color: var(--text-dimmer); margin-top: 6px; }
.chart-detail-dash { color: var(--red-light); }

.toggle-row { display: flex; gap: 6px; justify-content: flex-start; margin-bottom: 14px; }
.toggle-row button {
  background: var(--panel-2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
}
.toggle-row button.active { background: var(--text); color: #0a0a0a; border-color: var(--text); }

.chart-legend { font-size: 12.5px; color: var(--text-dim); margin-top: 16px; }
.chart-legend .legend-title { font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-dimmer); font-weight: 800; margin-bottom: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 4px 0; }
.legend-row .swatch { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.legend-row .name { flex: 1; display: flex; align-items: center; gap: 8px; }
.chart-note { font-size: 12.5px; color: var(--text-dimmer); margin-top: 14px; line-height: 1.5; }

/* ---------------- Wizard-Navigation ---------------- */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
}
.wizard-steps { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.wizard-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border-light);
  color: var(--text-dim);
  padding: 7px 14px 7px 7px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
}
.wizard-step-btn .circle {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--panel-3); color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.wizard-step-btn.active { background: var(--gold); color: #1a1304; border-color: var(--gold); }
.wizard-step-btn.active .circle { background: #1a1304; color: var(--gold); }

/* ---------------- Login / Setup ---------------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(214,173,63,0.08), transparent 45%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--border-light);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 34px 30px;
}
.auth-card .kicker { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 800; margin-bottom: 8px; }
.auth-card h1 { font-size: 24px; margin-bottom: 10px; }
.auth-card .sub { font-size: 14px; color: var(--text-dim); margin-bottom: 24px; line-height: 1.5; }
.auth-card .field { margin-bottom: 16px; }
.auth-error { background: rgba(194,59,50,0.12); border: 1px solid var(--red); color: var(--red-light); font-size: 13.5px; padding: 10px 12px; border-radius: 7px; margin-bottom: 16px; display: none; }
.auth-error.show { display: block; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-dimmer); }
.auth-foot a { color: var(--text-dim); margin: 0 6px; }

/* ---------------- Beratungen-Liste ---------------- */
.page-wrap { max-width: 920px; margin: 0 auto; padding: 32px 20px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.beratung-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px; flex-wrap: wrap;
}
.beratung-row .name { font-weight: 800; font-size: 15px; }
.beratung-row .datum { font-size: 12.5px; color: var(--text-dimmer); }
.beratung-row .actions { display: flex; gap: 8px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dimmer); }

/* ---------------- Impressum / Datenschutz ---------------- */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; line-height: 1.7; font-size: 15px; color: var(--text-dim); }
.legal-wrap h1 { color: var(--text); font-size: 28px; margin-bottom: 24px; }
.legal-wrap h2 { color: var(--text); font-size: 18px; margin: 32px 0 10px; }
.legal-wrap .placeholder { color: var(--red-light); background: rgba(194,59,50,0.1); padding: 1px 6px; border-radius: 4px; }
.legal-wrap a { color: var(--gold-light); }
.legal-back { display: inline-block; margin-bottom: 24px; }

/* ---------------- Druckansichten ---------------- */
.druck-wrap { max-width: 820px; margin: 0 auto; padding: 40px 28px; background: #fff; color: #111; min-height: 100vh; }
.druck-toolbar { max-width: 820px; margin: 0 auto; padding: 14px 28px 0; display: flex; justify-content: space-between; }
.druck-wrap h1 { font-size: 24px; margin-bottom: 4px; }
.druck-wrap .kunde { color: #555; margin-bottom: 28px; font-size: 14px; }
.druck-wrap h2 { font-size: 16px; border-bottom: 2px solid #d6ad3f; padding-bottom: 6px; margin: 28px 0 12px; }
.druck-wrap table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 10px; }
.druck-wrap td, .druck-wrap th { padding: 7px 4px; border-bottom: 1px solid #ddd; text-align: right; }
.druck-wrap td:first-child, .druck-wrap th:first-child { text-align: left; }
.druck-wrap .page-break { page-break-before: always; }
.druck-wrap .fineprint { font-size: 10.5px; color: #777; margin-top: 30px; line-height: 1.5; }
@media print {
  .no-print { display: none !important; }
  .druck-wrap { padding: 0; }
  body { background: #fff; }
}

/* ---------------- Utility ---------------- */
.text-dim { color: var(--text-dim); }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.spinner-hint { font-size: 13px; color: var(--text-dimmer); }
