/* OptiCheck – Styles. Farbwelt aus dem Original-Logo (opticheck.ch) extrahiert. */

:root {
  --navy: #004a80;
  --navy-dark: #00355c;
  --navy-light: #e8f0f7;
  --grey: #666666;
  --grey-light: #f4f5f6;
  --grey-border: #dfe3e7;
  --ink: #1c2b36;
  --white: #ffffff;
  --green: #1c8a4b;
  --green-bg: #e7f6ed;
  --yellow: #b8860b;
  --yellow-bg: #fbf1dc;
  --orange: #c15c1f;
  --orange-bg: #fbe8db;
  --red: #c0392b;
  --red-bg: #fbe4e1;
  --blue: #2266aa;
  --blue-bg: #e5f0fa;
  --gray-badge: #6b7480;
  --gray-badge-bg: #eceef1;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 20px;
  --shadow: 0 2px 10px rgba(0, 30, 60, 0.06), 0 1px 2px rgba(0, 30, 60, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 30, 60, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--grey-light);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: 1rem; }

h1, h2, h3 { margin: 0 0 0.4em; color: var(--navy-dark); }

/* ---------- Buttons ---------- */

.btn-primary, .btn-secondary, .link-btn {
  border: none; cursor: pointer; border-radius: var(--radius-s);
  font-weight: 600; transition: transform .06s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: var(--navy); color: #fff; padding: 0.85rem 1.6rem; font-size: 1rem;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--navy-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary {
  background: #fff; color: var(--navy); padding: 0.85rem 1.6rem; border: 1.5px solid var(--grey-border);
}
.btn-secondary:hover { border-color: var(--navy); }
.btn-secondary:disabled { opacity: .4; cursor: default; }
.btn-xl { padding: 1.1rem 2.2rem; font-size: 1.1rem; border-radius: var(--radius-m); }
.link-btn { background: none; color: var(--grey); text-decoration: underline; padding: .3rem; font-weight: 500; }
.link-btn:hover { color: var(--navy); }

/* ---------- Startseite ---------- */

.start-screen {
  max-width: 640px; margin: 0 auto; padding: 4rem 1.5rem 3rem; text-align: center;
}
.start-logo { height: 46px; margin-bottom: 2.5rem; }
.start-title { font-size: 2.1rem; line-height: 1.25; margin-bottom: .8rem; }
.start-subtitle { color: var(--grey); font-size: 1.05rem; line-height: 1.55; margin-bottom: 2.2rem; }
.start-actions { display: flex; flex-direction: column; gap: .9rem; align-items: center; }
.start-checks { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; color: var(--navy); font-weight: 600; font-size: .92rem; }
.start-footer { margin-top: 3rem; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.agent-mode-badge { background: var(--navy-light); color: var(--navy); padding: .35rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 700; letter-spacing: .03em; }

/* ---------- Wizard-Rahmen ---------- */

.wizard-shell { min-height: 100vh; }
.wizard-header {
  display: flex; align-items: center; gap: 2rem; padding: .9rem 1.8rem;
  background: #fff; border-bottom: 1px solid var(--grey-border); position: sticky; top: 0; z-index: 20;
}
.header-logo { height: 30px; }
.progress-bar { display: flex; gap: .3rem; flex: 1; overflow-x: auto; }
.progress-step { display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem; border-radius: var(--radius-s); cursor: pointer; white-space: nowrap; }
.progress-step:hover { background: var(--grey-light); }
.progress-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--grey-border); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; }
.progress-step.active .progress-dot { background: var(--navy); }
.progress-step.done .progress-dot { background: var(--green); }
.progress-label { font-size: .82rem; color: var(--grey); }
.progress-step.active .progress-label { color: var(--navy-dark); font-weight: 700; }

.wizard-body { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; max-width: 1180px; margin: 0 auto; padding: 1.8rem; }
.wizard-body-wide { grid-template-columns: 1fr; max-width: 760px; }
.wizard-main { background: #fff; border-radius: var(--radius-l); padding: 2rem 2.2rem; box-shadow: var(--shadow); }
.step-title { font-size: 1.4rem; margin-bottom: 1.4rem; }
.wizard-nav { display: flex; justify-content: space-between; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--grey-border); }

.wizard-sidebar { position: sticky; top: 5.4rem; align-self: start; }
.sidebar-card { background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 1.5rem; }
.sidebar-title { font-weight: 800; color: var(--navy); letter-spacing: .04em; margin-bottom: 1rem; font-size: .95rem; }
.sidebar-row { display: flex; justify-content: space-between; padding: .4rem 0; font-size: .88rem; border-bottom: 1px dashed var(--grey-border); color: var(--grey); }
.sidebar-row b { color: var(--ink); font-weight: 600; }
.sidebar-divider { height: 1px; background: var(--grey-border); margin: 1rem 0; }
.sidebar-potential-label { font-size: .78rem; font-weight: 800; color: var(--navy); letter-spacing: .05em; margin-bottom: .3rem; }
.sidebar-potential-value { font-size: 1.5rem; font-weight: 800; color: var(--navy-dark); }
.sidebar-potential-value .unit { font-size: .85rem; font-weight: 500; color: var(--grey); }
.sidebar-potential-sub { color: var(--grey); font-size: .85rem; margin-top: .2rem; }

/* ---------- Formfelder ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.4rem; }
.field-wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field-label { font-size: .85rem; font-weight: 600; color: var(--grey); }
.field-input {
  border: 1.5px solid var(--grey-border); border-radius: var(--radius-s); padding: .7rem .85rem;
  background: #fff; color: var(--ink); width: 100%;
}
.field-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--navy-light); }
textarea.field-input { resize: vertical; font-family: inherit; }
.hint-text { color: var(--grey); font-size: .88rem; line-height: 1.5; }
.details-toggle { background: none; border: none; color: var(--navy); font-size: .84rem; font-weight: 700; cursor: pointer; padding: .3rem 0 .7rem; text-decoration: underline; }
.averages-note { text-align: center; color: var(--grey); font-size: .8rem; margin: .6rem auto 1.6rem; max-width: 480px; line-height: 1.5; }
.pdf-hint { text-align: center; margin-top: .6rem; }
.computed-hint { font-size: .82rem; color: var(--navy); margin-top: -.6rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--grey); margin-top: .3rem; }
.checkbox-label.wide { grid-column: 1/-1; margin: 1rem 0; }

.btn-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.opt-btn {
  border: 1.5px solid var(--grey-border); background: #fff; color: var(--ink);
  padding: .65rem 1.1rem; border-radius: var(--radius-s); cursor: pointer; font-weight: 600; font-size: .92rem;
}
.opt-btn:hover { border-color: var(--navy); }
.opt-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.stepper { display: flex; align-items: center; gap: .9rem; }
.stepper-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--grey-border); background: #fff;
  font-size: 1.2rem; cursor: pointer; color: var(--navy); font-weight: 700;
}
.stepper-btn:hover { background: var(--navy-light); border-color: var(--navy); }
.stepper-val { font-size: 1.2rem; font-weight: 800; min-width: 1.6rem; text-align: center; }

.counters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.4rem 0; }
.counter-box { background: var(--grey-light); border-radius: var(--radius-m); padding: 1rem; text-align: center; }
.counter-label { font-size: .8rem; color: var(--grey); margin-bottom: .6rem; font-weight: 600; }

.person-card { background: var(--grey-light); border-radius: var(--radius-m); padding: 1.2rem; margin-bottom: 1rem; }
.person-card.wide { padding: 1.4rem 1.5rem; }
.person-title { font-weight: 700; color: var(--navy-dark); margin-bottom: .9rem; }
.person-cat { font-weight: 500; color: var(--grey); font-size: .85rem; margin-left: .4rem; }

.plz-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.plz-suggestion { border: 1px solid var(--grey-border); background: #fff; border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; cursor: pointer; }
.plz-suggestion:hover { border-color: var(--navy); color: var(--navy); }

.section-divider { font-weight: 700; color: var(--navy); margin: 1.6rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--grey-border); font-size: .95rem; }
.section-block { margin-bottom: 2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--grey-border); }
.section-block:last-child { border-bottom: none; }
.section-heading { font-weight: 800; color: var(--navy-dark); margin-bottom: .9rem; font-size: 1.02rem; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.chip { border: 1.5px solid var(--grey-border); background: #fff; border-radius: 999px; padding: .45rem 1rem; font-size: .85rem; cursor: pointer; color: var(--grey); }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Ergebnis / Agentenansicht ---------- */

.agent-only-banner { background: var(--navy-dark); color: #fff; padding: .5rem 1rem; border-radius: var(--radius-s); font-size: .8rem; font-weight: 700; letter-spacing: .04em; margin-bottom: 1.5rem; display: inline-block; }
.result-block { margin-bottom: 1.8rem; }
.big-cost { font-size: 2rem; font-weight: 800; color: var(--navy-dark); }
.big-cost .unit { font-size: 1rem; font-weight: 500; color: var(--grey); }
.big-cost-sub { color: var(--grey); }
.status-row { display: flex; justify-content: space-between; align-items: center; padding: .55rem 0; border-bottom: 1px dashed var(--grey-border); }
.internal-tag { font-size: .7rem; background: var(--gray-badge-bg); color: var(--gray-badge); padding: .15rem .5rem; border-radius: 999px; margin-left: .5rem; font-weight: 700; }

.badge { display: inline-block; padding: .18rem .55rem; border-radius: 999px; font-size: .7rem; font-weight: 800; letter-spacing: .03em; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-gray { background: var(--gray-badge-bg); color: var(--gray-badge); }

.kvg-row { display: flex; flex-direction: column; gap: .15rem; padding: .6rem 0; border-bottom: 1px dashed var(--grey-border); }
.kvg-row span:first-child { font-weight: 700; }
.kvg-row.muted { color: var(--grey); }
.kvg-sub { font-size: .82rem; color: var(--grey); }

.overlap-list { margin: 0; padding-left: 1.2rem; color: var(--ink); }
.overlap-list li { margin-bottom: .4rem; }

.lead-score-box { display: flex; align-items: center; gap: 1rem; background: var(--navy-light); border-radius: var(--radius-m); padding: 1.1rem 1.4rem; }
.lead-score-value { font-size: 2rem; font-weight: 800; color: var(--navy-dark); }
.lead-score-band { padding: .4rem .9rem; border-radius: 999px; font-weight: 800; font-size: .95rem; background: #fff; }
.lead-score-band.band-Aplus { background: var(--green-bg); color: var(--green); }
.lead-score-band.band-A { background: var(--blue-bg); color: var(--blue); }
.lead-score-band.band-B { background: var(--yellow-bg); color: var(--yellow); }
.lead-score-band.band-C { background: var(--gray-badge-bg); color: var(--gray-badge); }

.top3-list { list-style: none; padding: 0; margin: 0; counter-reset: t3; }
.top3-list li { counter-increment: t3; display: flex; justify-content: space-between; align-items: center; padding: .8rem 0; border-bottom: 1px dashed var(--grey-border); }
.top3-list li::before { content: counter(t3); background: var(--navy); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 800; margin-right: .8rem; }
.top3-label { font-weight: 700; flex: 1; }

/* ---------- Ergebnisseite (Kunde) ---------- */

.result-page { max-width: 700px; margin: 0 auto; }
.print-logo { height: 34px; margin-bottom: 1.2rem; display: none; }
.result-title { font-size: 1.6rem; text-align: center; margin-bottom: 1.6rem; }

.ampel-box { display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.6rem; border-radius: var(--radius-l); margin-bottom: .6rem; }
.ampel-dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; }
.ampel-title { font-size: 1.15rem; font-weight: 800; }
.ampel-sub { color: var(--grey); font-size: .9rem; }
.ampel-green { background: var(--green-bg); } .ampel-green .ampel-dot { background: var(--green); }
.ampel-yellow { background: var(--yellow-bg); } .ampel-yellow .ampel-dot { background: var(--yellow); }
.ampel-red { background: var(--red-bg); } .ampel-red .ampel-dot { background: var(--red); }
.ampel-blue { background: var(--blue-bg); } .ampel-blue .ampel-dot { background: var(--blue); }
.ipv-disclaimer { font-size: .78rem; color: var(--grey); margin: .5rem 0 1.8rem; line-height: 1.5; }

.big-number { font-size: 2.6rem; font-weight: 800; color: var(--navy-dark); text-align: center; }
.big-number-label { text-align: center; color: var(--grey); margin-bottom: .3rem; }
.big-number-sub { text-align: center; color: var(--navy); font-weight: 700; margin-bottom: 1.6rem; }

.breakdown-block { background: var(--grey-light); border-radius: var(--radius-m); padding: 1.1rem 1.4rem; margin-bottom: 1.8rem; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; padding: .5rem 0; border-bottom: 1px dashed var(--grey-border); font-size: .93rem; }
.breakdown-row:last-child { border-bottom: none; }

.tip-box, .talk-box { background: var(--navy-light); border-radius: var(--radius-m); padding: 1.2rem 1.4rem; margin-top: 1.8rem; }
.talk-box { background: var(--grey-light); }
.tip-label { font-weight: 800; color: var(--navy); font-size: .78rem; letter-spacing: .04em; margin-bottom: .4rem; }
.tip-box p, .talk-box p { margin: 0; line-height: 1.55; }

.ipv-amount { display: flex; gap: 1.6rem; justify-content: center; margin: .8rem 0 .4rem; font-size: 1.15rem; font-weight: 800; color: var(--navy-dark); }
.used-inputs-box { background: var(--grey-light); border-radius: var(--radius-m); padding: 1.1rem 1.4rem; margin-top: 1.8rem; }

.result-actions { text-align: center; margin: 1.6rem 0; }
.copy-sub-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: .9rem; }
.rubix-fallback { margin-top: 1.2rem; text-align: left; }
.rubix-fallback summary { cursor: pointer; color: var(--navy); font-weight: 600; font-size: .88rem; }
.rubix-textarea { width: 100%; min-height: 220px; margin-top: .7rem; border: 1.5px solid var(--grey-border); border-radius: var(--radius-s); padding: .9rem; font-family: "SFMono-Regular", Consolas, monospace; font-size: .82rem; white-space: pre; }
.appointment-block { margin-top: 2.4rem; padding-top: 1.8rem; border-top: 1px solid var(--grey-border); }
.success-msg { color: var(--green); font-weight: 700; margin: .8rem 0; }
.error-msg { color: var(--red); font-weight: 700; margin: .8rem 0; }

/* ---------- Admin ---------- */

.admin-screen { max-width: 760px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .wizard-body { grid-template-columns: 1fr; }
  .wizard-sidebar { position: static; order: -1; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .wizard-main { padding: 1.4rem; }
  .start-title { font-size: 1.6rem; }
}

/* ---------- Druckansicht ---------- */

@media print {
  body { background: #fff; }
  .wizard-header, .wizard-sidebar, .wizard-nav, .progress-bar, .no-print, .step-title { display: none !important; }
  .wizard-body { display: block; max-width: 100%; padding: 0; }
  .wizard-main { box-shadow: none; padding: 0; }
  .print-logo { display: block; }
  .agent-only-banner, #printable-result ~ .no-print { display: none !important; }
}
