/* =========================
   DUSBASE – Bestellformular (breit, luftig, konsistent, shop-like)
   ========================= */

:root{
  --brand: #3f4d68;
  --text: #0f172a;
  --muted: #475569;
  --muted2:#64748b;

  --bg: #f6f7fb;
  --card: #ffffff;
  --line: #e6eaf3;

  --focus: rgba(63,77,104,.18);

  /* konsistente Schrift */
  --fs-base: 18px;
  --fs-label: 16px;
  --fs-small: 14px;
  --fs-title: 34px;
  --fs-h2: 26px;

  --pad-card: 20px;
  --gap: 18px;

  --radius: 18px;
  --shadow: 0 14px 36px rgba(16,24,40,.10);
}

#contractForm,
#contractForm *{ box-sizing: border-box; }

#contractForm{
  font-size: var(--fs-base);
  color: var(--text);
}

/* ---- Container ---- */
.db-wrap{
  max-width: 1320px;              /* breiter = weniger gedrungen */
  margin: 26px auto 70px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ---- Header ---- */
.db-header{
  padding: 34px 34px 20px;
  background: #fbfcff;
  border-bottom: 1px solid #eef1f6;
}

.db-kicker{
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  color: var(--brand);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.db-title{
  font-size: var(--fs-title);
  line-height: 1.12;
  margin: 0 0 10px 0;
  font-weight: 950;
  color: var(--text);
}

.db-subtitle{
  font-size: 18px;
  line-height: 1.45;
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.db-progress{
  height: 10px;
  background: #e9edf6;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 14px;
}
.db-progress-bar{
  height: 100%;
  width: 0%;
  background: var(--brand);
  border-radius: 999px;
  transition: width .25s ease;
}

/* ---- Stepper ---- */
.db-stepper{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0 14px;
}

.db-step{
  appearance: none;
  border: 1px solid #dbe2ee;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform .08s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  user-select: none;
}

.db-step:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(16,24,40,.10);
}

.db-step .num{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 950;
  font-size: 16px;
  background: #eef2ff;
  color: var(--brand);
}

.db-step .label{
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
}

.db-step.active{
  border-color: var(--brand);
  background: #f3f6ff;
  box-shadow: 0 12px 24px rgba(63,77,104,.18);
}
.db-step.active .num{
  background: var(--brand);
  color: #fff;
}

.db-step.done{ border-color: #22c55e; }
.db-step.missing{ border-color: #f59e0b; }

/* ---- Navline ---- */
.db-navline{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.db-nav-step{
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
}

.db-nav-hint{
  font-size: 16px;
  font-weight: 750;
  color: var(--muted2);
  margin-top: 4px;
}

.db-badge{
  font-size: 14px;
  font-weight: 950;
  padding: 9px 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

/* ---- Panel ---- */
.db-panel{
  padding: 26px 34px 28px;
  background: #fff;
}

.db-alert{
  border: 1px solid #f59e0b;
  background: #fff7ed;
  color: #7c2d12;
  padding: 14px 14px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 850;
  margin-bottom: 18px;
}

/* ---- Step content ---- */
.form-step{
  border: 1px solid #eef1f6;
  border-radius: 16px;
  padding: 26px 26px;
  background: #fff;
}

.db-step-title{
  font-size: var(--fs-h2);
  font-weight: 950;
  color: var(--text);
  margin: 0 0 6px 0;
}

.db-step-desc{
  font-size: 18px;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 18px 0;
}

.db-section{ margin-top: 10px; }
.db-section-head{
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
  margin: 0 0 12px 0;
}
.db-section-head.small{
  font-size: 16px;
  color: var(--text);
}

.db-divider{
  height: 1px;
  background: #eef1f6;
  margin: 22px 0;
}

/* ---- Grid ---- */
.grid2{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

/* ---- Fields ---- */
.field{ margin-top: 14px; }

.field label{
  display: block;
  font-size: var(--fs-label);
  font-weight: 950;
  color: var(--text);
  margin-bottom: 8px;
}

.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea{
  width: 100%;
  font-size: var(--fs-base);
  font-weight: 750;
  padding: 13px 13px;
  border-radius: 12px;
  border: 1px solid #dbe2ee;
  background: #f8fafc;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  color: var(--text);
}

.field textarea{ min-height: 120px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus{
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--focus);
}

.db-help{
  margin-top: 8px;
  font-size: var(--fs-small);
  font-weight: 750;
  color: var(--muted2);
}

.db-inline-error{
  margin-top: 8px;
  font-size: 15px;
  font-weight: 950;
  color: #b42318;
}

.db-required-note{
  margin-top: 14px;
  font-size: 14px;
  font-weight: 750;
  color: var(--muted2);
}

/* ---- Cards / Choices ---- */
.db-card-grid{
  display: grid;
  gap: var(--gap);
}
.db-card-grid.two{
  grid-template-columns: 1fr 1fr;
}

.db-card{
  border: 2px solid #e5eaf3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.07);
}

.db-choice{
  display: block;
  position: relative;
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.db-choice input{
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.db-card-body{
  padding: var(--pad-card);
  position: relative;
  padding-right: 60px; /* Platz für Haken */
}

.db-card-title{
  font-size: 20px;
  font-weight: 950;
  color: var(--text);
  margin-bottom: 6px;
}

.db-card-desc{
  font-size: 16px;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 10px;
}

.db-card-price{
  font-size: 18px;
  font-weight: 950;
  color: var(--text);
}

.db-card-check{
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 950;
  background: #e2e8f0;
  color: #0f172a;
  opacity: .45;
  transform: scale(.95);
  transition: all .15s ease;
}

.db-choice.is-checked{
  border-color: var(--brand);
  background: #f3f6ff;
  box-shadow: 0 16px 30px rgba(63,77,104,.18);
}
.db-choice.is-checked .db-card-check{
  background: var(--brand);
  color: #fff;
  opacity: 1;
  transform: scale(1);
}

.db-disabled{ opacity: .7; cursor: not-allowed; }
.db-muted{ background: #fbfdff; }

/* ---- Subbox ---- */
.db-subbox{
  border: 1px solid var(--line);
  background: #fbfcff;
  border-radius: 16px;
  padding: 16px;
  margin-top: 16px;
}

/* ---- Checkout (shop-like) ---- */
.db-check-grid{
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 22px;
  align-items: start;
}

.db-cart{
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.db-cart-head{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 6px 6px 12px;
  border-bottom: 1px solid #eef1f6;
}

.db-cart-title{
  font-size: 18px;
  font-weight: 950;
}
.db-cart-sub{
  font-size: 14px;
  font-weight: 750;
  color: var(--muted2);
}

.db-lines{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.db-line{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  background: #fff;
}

.db-line .l{
  font-size: 16px;
  font-weight: 950;
}
.db-line .d{
  font-size: 14px;
  font-weight: 750;
  color: var(--muted2);
  margin-top: 3px;
}
.db-line .r{
  font-size: 16px;
  font-weight: 950;
  white-space: nowrap;
}

.db-summary{
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(16,24,40,.08);
}

.db-summary .db-sum-title{
  font-size: 18px;
  font-weight: 950;
  margin-bottom: 10px;
}

.db-sum-row{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #dbe2ee;
  font-size: 16px;
  font-weight: 900;
}

.db-sum-row strong{
  white-space: nowrap;
}

.db-sum-total{
  margin-top: 14px;
  border-top: 1px solid #e6eaf3;
  padding-top: 14px;
}

.db-sum-total .value{
  font-size: 34px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.02em;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  white-space: nowrap;
}

.db-hero-note{
  margin-top: 10px;
  font-size: 14px;
  font-weight: 750;
  color: var(--muted2);
}

/* ---- Buttons ---- */
.db-nav{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 18px;
}

.db-spacer{ flex: 1; }

.db-btn{
  border: 2px solid #dbe2ee;
  background:#fff;
  color: var(--text);
  font-weight: 950;
  font-size: 18px;
  padding: 12px 16px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .08s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, opacity .15s ease;
}

.db-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(16,24,40,.10);
}

.db-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

.db-btn.primary{
  border-color: var(--brand);
  background: var(--brand);
  color:#fff;
}

/* ---- Invalid styling (erst nach Interaktion) ---- */
#contractForm[data-touched="true"] .form-step input:invalid,
#contractForm[data-touched="true"] .form-step select:invalid,
#contractForm[data-touched="true"] .form-step textarea:invalid{
  border-color:#f59e0b;
  box-shadow: 0 0 0 4px rgba(245,158,11,.14);
  background:#fffbeb;
}

/* ---- Server errors ---- */
.db-error{
  margin-top: 8px;
  font-size: 15px;
  font-weight: 950;
  color:#b42318;
}

/* ---- € nie alleine ---- */
.value,
#sumStartFinal,
#sumMonthlyFinal,
#sumOnetimeFinal{
  white-space: nowrap;
}

/* ---- Mobile ---- */
@media (max-width: 900px){
  .db-check-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 760px){
  :root{
    --fs-title: 28px;
    --fs-h2: 24px;
  }

  .db-header{ padding: 22px 16px 14px; }
  .db-panel{ padding: 18px 16px 22px; }

  .form-step{ padding: 18px 16px; }

  .grid2{ grid-template-columns: 1fr; }
  .db-card-grid.two{ grid-template-columns: 1fr; }

  .db-card-body{ padding-right: 56px; }
}


/* ===== DUSBASE Workflow (minimal & modern) ===== */
:root{
  --dus-blue:#3f4d68;
  --dus-blue-2:#344059;
  --bg:#f4f7fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;
  --shadow: 0 18px 50px rgba(15,23,42,.10);
  --radius:18px;
}

.wf-wrap{ background: var(--bg); padding: 56px 0; color:var(--text); font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial; font-size:17px; line-height:1.45; }
.wf-container{ max-width: 1180px; margin: 0 auto; padding: 0 18px; }

.wf-shell{
  display:grid;
  grid-template-columns: 1fr 360px;
  gap: 22px;
  align-items:start;
}

@media (max-width: 980px){
  .wf-shell{ grid-template-columns: 1fr; }
  .wf-side{ order: 2; position: static; }
}

.wf-progress{
  height: 10px;
  background: rgba(63,77,104,.18);
  border-radius: 999px;
  overflow:hidden;
  margin-bottom: 18px;
}
#wfProgressBar{
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--dus-blue), #2b3a57);
  border-radius: 999px;
  transition: width .25s ease;
}

.wf-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom: 14px; }
.wf-title{ font-size: 34px; font-weight: 750; margin:0; letter-spacing:-.02em; }
.wf-sub{ color:var(--muted); font-size: 14px; }

.wf-card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid rgba(15,23,42,.06);
}

.wf-step-title{ font-size: 26px; font-weight: 750; margin: 0 0 6px; }
.wf-step-desc{ margin: 0 0 12px; color: var(--muted); font-size: 16px; }

.wf-alert{
  background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.25);
  color: #7f1d1d;
  padding: 10px 12px;
  border-radius: 12px;
  margin: 10px 0 14px;
  font-size: 14px;
}

.wf-section{ margin-top: 6px; }
.wf-section-head{
  font-size: 16px;
  font-weight: 750;
  margin: 10px 0 10px;
}
.wf-note{
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.wf-cards{ display:grid; gap:12px; }
.wf-cards.two{ grid-template-columns: 1fr 1fr; }
@media (max-width: 680px){ .wf-cards.two{ grid-template-columns: 1fr; } }

.wf-choice{
  display:block;
  cursor:pointer;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:#fff;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  padding: 0;
}
.wf-choice:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15,23,42,.08);
}
.wf-choice{ position:relative; } /* NEU */
.wf-choice input{ position:absolute; opacity:0; } /* pointer-events raus */

.wf-choice-body{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 14px;
}

.wf-choice-title strong{ display:block; font-size: 18px; }
.wf-choice-title span{ display:block; color: var(--muted); font-size: 14px; margin-top: 2px; }

.wf-choice-right{ text-align:right; min-width: 120px; }
.wf-price{ font-weight: 800; font-size: 18px; }
.wf-price-sub{ color: var(--muted); font-size: 13px; margin-top: 2px; }

.wf-pill, .wf-pill-onetime{
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(15,23,42,.04);
}
.wf-pill-onetime{
  border-color: rgba(63,77,104,.25);
  background: rgba(63,77,104,.10);
  color: var(--dus-blue-2);
}

/* Selected state ohne grüne Haken-Overlay */
.wf-choice.is-selected{
  border-color: rgba(63,77,104,.55);
  box-shadow: 0 14px 34px rgba(63,77,104,.16);
}
.wf-choice.is-selected .wf-pill,
.wf-choice.is-selected .wf-pill-onetime{
  border-color: rgba(63,77,104,.35);
}

/* Fields */
.wf-field label{ display:block; font-weight:700; font-size: 14px; margin-bottom: 6px; }
.wf-field input, .wf-field select, .wf-field textarea{
  width:100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 16px;
  background:#fff;
  outline: none;
}
.wf-field input:focus, .wf-field select:focus, .wf-field textarea:focus{
  border-color: rgba(63,77,104,.55);
  box-shadow: 0 0 0 4px rgba(63,77,104,.12);
}

.wf-grid2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 680px){ .wf-grid2{ grid-template-columns: 1fr; } }

.wf-divider{ height:1px; background: var(--line); margin: 18px 0; }

.wf-required{ margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Upload */
.wf-upload{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 10px 12px;
  align-items:center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.wf-upload-title{ font-weight: 800; }
.wf-upload-sub{ color: var(--muted); font-size: 13px; margin-top: 2px; }
.wf-upload-file{ color: var(--muted); font-size: 13px; }
.wf-upload input[type="file"]{ display:none; }

.wf-upload-btn{
  border: 1px solid rgba(63,77,104,.35);
  background: rgba(63,77,104,.08);
  color: var(--dus-blue-2);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor:pointer;
}
.wf-upload-btn:hover{ background: rgba(63,77,104,.12); }

/* Nav buttons */
.wf-nav{ display:flex; align-items:center; gap: 12px; margin-top: 18px; }
.wf-spacer{ flex:1; }

.wf-btn{
  border: 1px solid var(--line);
  background:#fff;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 800;
  cursor:pointer;
  transition: background .12s ease, border-color .12s ease, transform .12s ease;
}
.wf-btn:hover{ transform: translateY(-1px); background: rgba(15,23,42,.02); }
.wf-btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

/* Primary: Hover darf NICHT weiß werden */
.wf-btn.wf-primary{
  background: var(--dus-blue);
  border-color: var(--dus-blue);
  color:#fff;
}
.wf-btn.wf-primary:hover,
.wf-btn.wf-primary:focus,
.wf-btn.wf-primary:active{
  background: var(--dus-blue-2) !important;
  border-color: var(--dus-blue-2) !important;
  color:#fff !important;
  text-decoration:none !important;
  opacity: 1 !important;
  filter: none !important;
}

/* Submit button in last step */
.wf-submit{ width: 100%; margin-top: 14px; }

/* Side summary */
.wf-side{ position: sticky; top: 18px; }
.wf-summary{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  border: 1px solid rgba(15,23,42,.06);
}
.wf-sum-title{ font-weight: 850; font-size: 20px; margin-bottom: 12px; }

.wf-sum-hero{
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15,23,42,.02);
}
.wf-sum-hero-row{ display:flex; justify-content:space-between; gap: 12px; font-size: 15px; }
.wf-sum-hero-row strong{ font-size: 16px; }
.wf-sum-hero-row.small{ margin-top: 6px; color: var(--muted); }
.wf-sum-hero-note{ margin-top: 8px; font-size: 12px; color: var(--muted); }

.wf-details{ margin-top: 12px; }
.wf-details summary{
  cursor:pointer;
  color: var(--dus-blue-2);
  font-weight: 800;
  padding: 8px 2px;
}
.wf-lines{ border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.wf-line{ display:flex; justify-content:space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.wf-line span{ color: var(--muted); }
.wf-mini-sep{ height:1px; background: var(--line); margin: 8px 0; }

/* Pay */
.wf-pay{ margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.wf-pay-title{ font-weight: 800; font-size: 14px; margin-bottom: 10px; color: var(--muted); }
.wf-pay-logos{ display:flex; gap: 10px; flex-wrap:wrap; }
.wf-iconbadge{
  width: 36px; height: 36px;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--dus-blue-2);
  background: rgba(15,23,42,.02);
}

/* Signature */
.sig-box{
  border: 1px dashed rgba(63,77,104,.35);
  border-radius: 16px;
  background: #fff;
  overflow:hidden;
}
.sig-pad{ width:100%; height: 240px; display:block; }
.sig-actions{ display:flex; gap: 10px; margin-top: 12px; }
.sig-status{ margin-top: 10px; color: var(--muted); font-size: 14px; }
.sig-status.bad{ color:#b91c1c; font-weight:800; }

/* Check cards */
.wf-checkcard{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-top: 12px;
}
.wf-checkcard small{ display:block; color: var(--muted); margin-top: 4px; }
.wf-checkcard input[type="checkbox"]{ width: 20px; height: 20px; }
.wf-disabled{ opacity:.60; }