@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 500; font-display: swap; src: url(fonts/poppins-500.woff2) format("woff2"); }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/poppins-600.woff2) format("woff2"); }

:root {
  --navy: #1c2548;
  --blue: #2e55e4;
  --blue-2: #7089e6;
  --text: #3a4060;
  --muted: #6b7088;
  --line: #dfe3ee;
  --field: #f6f7fb;
  --bg: #eef1f8;
  --error: #c62f3c;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.55; color: var(--text);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(112,137,230,.25), transparent 60%),
    radial-gradient(900px 400px at -10% 10%, rgba(46,85,228,.10), transparent 60%),
    var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
}
.wrap { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar { padding: 20px 0; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { height: 38px; width: auto; display: block; }
.badge { font-size: 12px; font-weight: 500; color: var(--navy); background: rgba(255,255,255,.75); border: 1px solid var(--line); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }

.intro { padding: 18px 0 18px; }
h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.2; color: var(--navy); font-weight: 600; margin: 0 0 6px; }
.lead { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Stepper */
.stepper { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: thin; }
.stepper button {
  flex: none; display: flex; align-items: center; gap: 8px; font: inherit; font-size: 13px; font-weight: 500;
  color: var(--muted); background: rgba(255,255,255,.6); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px 6px 6px; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.stepper button .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--navy); font-size: 11.5px; font-weight: 600; }
.stepper button.done .n { background: var(--blue-2); color: #fff; }
.stepper button.current { color: var(--navy); background: #fff; border-color: var(--blue); }
.stepper button.current .n { background: linear-gradient(135deg, var(--blue), var(--blue-2)); color: #fff; }
.stepper button.job { border-style: dashed; font-size: 12.5px; }
.stepper button .n.sub { background: transparent; color: var(--blue); font-size: 13px; }
.stepper button.current .n.sub, .stepper button.done .n.sub { background: transparent; color: var(--blue); }
.stepper button.job.current { border-style: solid; }

/* Card */
.card { background: #fff; border-radius: 18px; box-shadow: 0 1px 2px rgba(28,37,72,.06), 0 12px 40px rgba(28,37,72,.08); padding: 28px 32px 24px; margin-bottom: 16px; }
.step-title { font-size: 17px; font-weight: 600; color: var(--navy); margin: 0 0 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.step-title small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.step-title.sep { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.job-badge { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--blue); background: rgba(46,85,228,.09); border-radius: 6px; padding: 2px 8px; margin-bottom: 8px; }
.job-head { margin-bottom: 18px; }
.job-head h2 { font-size: 21px; color: var(--navy); margin: 0; font-weight: 600; }
.job-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }

/* Fields */
.row { display: flex; gap: 14px; }
.grow { flex: 1; min-width: 0; }
.w-120 { width: 130px; flex: none; }
.w-180 { width: 180px; flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.field { margin-bottom: 16px; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--navy); margin-bottom: 6px; }
.req { color: var(--blue); font-weight: 500; }
.opt { color: var(--muted); font-weight: 400; }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--navy); background: var(--field);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 64px; }
select { appearance: none; cursor: pointer; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c2548' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input::placeholder, textarea::placeholder { color: #a5aac0; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); background-color: #fff; box-shadow: 0 0 0 4px rgba(46,85,228,.12); }
input:disabled { opacity: .45; cursor: not-allowed; }
.mono { font-weight: 600; letter-spacing: .1em; }
.hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.hint.top { margin: -6px 0 16px; }
.error-msg { display: none; font-size: 12.5px; color: var(--error); margin: 5px 0 0; font-weight: 500; }
.field.invalid input, .field.invalid select { border-color: var(--error); background-color: #fff8f8; }
.field.invalid .error-msg, .error-msg.block.show { display: block; }
[hidden] { display: none !important; }

/* Pills (Ja/Nein) */
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { margin: 0; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 8px 22px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--field); font-size: 14px; color: var(--navy); transition: all .15s; }
.pill input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(46,85,228,.18); }

/* Checkboxes */
.check.later { margin: -6px 0 14px; font-weight: 500; color: var(--navy); }
.check.later.inline { margin: 8px 0 0; font-size: 13px; }
.bn-auto { color: #1f9d6b !important; }
.gehalt-calc { margin: -6px 0 12px; font-weight: 500; color: var(--navy); }
.add-more { margin: 4px 0 6px; font-weight: 500; color: var(--navy); }
.standort-block { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--line); }
.standort-block h3 { font-size: 14px; font-weight: 600; color: var(--navy); margin: 0 0 12px; }
.bn-progress { position: sticky; top: var(--nav-h, 70px); z-index: 5; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); margin: -4px -8px 10px; padding: 10px 8px 8px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 22px; }
.bn-progress:has(#bar-bt[hidden]) { grid-template-columns: 1fr; }
.bn-bar-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
.bn-bar-label small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.bn-bar-label strong { font-size: 13px; color: var(--blue); }
.bn-bar-track { height: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.bn-bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--blue-2)); border-radius: 999px; transition: width .3s ease, background .3s; }
.bn-bar.done .bn-bar-fill { background: #1f9d6b; }
.bn-bar.done .bn-bar-label strong { color: #1f9d6b; }
.bn-progress-note { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); margin: 0; }
.bn-head, .bn-row { display: grid; grid-template-columns: minmax(0, 1.35fr) 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.bn-head { font-size: 12px; font-weight: 600; color: var(--navy); background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; }
.bn-row { padding: 14px; border-bottom: 1px solid var(--line); }
.bn-row:last-child { border-bottom: 0; }
.bn-row.ans-ja { background: rgba(31,157,107,.05); }
.bn-row.ans-nein { background: rgba(198,47,60,.05); }
.bn-row.ans-vielleicht { background: rgba(230,160,40,.07); }
.bn-title { font-weight: 600; color: var(--navy); font-size: 14.5px; margin: 0 0 3px; }
.bn-title { display: flex; }
.bn-num { flex: none; width: 26px; color: var(--blue); font-weight: 600; }
.bn-text, .bn-hint { padding-left: 26px; }
.bn-text { font-size: 13.5px; margin: 0; }
.bn-hint { font-size: 12px; color: var(--blue); margin: 6px 0 0; }
.bn-row .choice { gap: 6px; }
.bn-row .pill span { padding: 6px 12px; font-size: 13px; }
.pill.p-ja input:checked + span { background: #1f9d6b; border-color: #1f9d6b; }
.pill.p-nein input:checked + span { background: var(--error); border-color: var(--error); }
.pill.p-vielleicht input:checked + span { background: #e0a028; border-color: #e0a028; }
.bn-row textarea { min-height: 54px; font-size: 13.5px; padding: 8px 11px; }
.bn-more[hidden] { display: none; }
.bn-more { display: block; width: 100%; font: inherit; font-size: 13px; font-weight: 500; color: var(--blue); background: rgba(46,85,228,.06); border: 1px dashed rgba(46,85,228,.35); border-radius: 10px; padding: 9px; margin: 6px 0 4px; cursor: pointer; }
.bn-more:hover { background: rgba(46,85,228,.12); }
.bn-group { font-size: 14px; font-weight: 600; color: var(--blue); margin: 22px 0 6px; padding-top: 14px; border-top: 2px solid var(--line); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-bottom: 14px; }
.check { display: inline-flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer; margin: 0; }
input[type=checkbox] {
  appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid #b8bed3; border-radius: 6px;
  background: #fff; cursor: pointer; display: inline-grid; place-items: center; transition: background .15s, border-color .15s; vertical-align: middle;
}
input[type=checkbox]::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); opacity: 0; }
input[type=checkbox]:checked { background: var(--blue); border-color: var(--blue); }
input[type=checkbox]:checked::after { opacity: 1; }
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 4px rgba(46,85,228,.18); outline: none; }
input[type=checkbox]:disabled { opacity: .35; cursor: not-allowed; }

/* Jobs-Tabellen */
.tbl-title { font-size: 14px; font-weight: 600; color: var(--navy); margin: 18px 0 8px; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.jobs { width: 100%; border-collapse: collapse; font-size: 14px; }
table.jobs th { background: var(--field); text-align: left; font-size: 12px; font-weight: 600; color: var(--navy); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.jobs td { padding: 7px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.jobs tr:last-child td { border-bottom: 0; }
table.jobs .c { text-align: center; width: 92px; }
table.jobs tr.on { background: rgba(46,85,228,.05); }
table.jobs td.beruf { color: var(--navy); }
table.jobs input.anzahl { width: 64px; text-align: center; padding: 6px 4px; }
table.jobs input.beruf-frei { padding: 6px 10px; font-size: 14px; }
table.jobs input.beruf-frei.bad { border-color: var(--error); background-color: #fff8f8; }

/* Zahlen-Paare */
.pair { display: flex; align-items: center; gap: 10px; }
.pair input { flex: 1; }
.pair span { color: var(--muted); font-size: 13px; }
.unit { position: relative; }
.unit input { padding-right: 46px; }
.unit::after { content: attr(data-unit); position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }

/* Navigation */
.nav-row {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px;
  margin: -28px -32px 22px; padding: 14px 32px; background: rgba(255,255,255,.97); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line); border-radius: 18px 18px 0 0;
}
.nav-row.stuck { border-radius: 0; box-shadow: 0 6px 16px rgba(28,37,72,.08); }
.step-count { font-size: 13px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; border-radius: 11px; padding: 11px 22px; border: 0; transition: transform .1s, box-shadow .15s, background .15s; }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%); box-shadow: 0 6px 18px rgba(46,85,228,.28); min-width: 140px; }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(46,85,228,.38); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { color: var(--navy); background: #fff; border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost[disabled] { visibility: hidden; }
.spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.loading .spinner { display: inline-block; }
.loading { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-error { flex-basis: 100%; color: var(--error); font-weight: 500; font-size: 13.5px; margin: 0; text-align: right; }
.form-error:empty { display: none; }

.draft-row { text-align: center; margin: 0 0 30px; }
.link-btn { font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--error); }

/* Success */
.success { text-align: center; padding: 44px 32px 36px; }
.success h2 { color: var(--navy); font-size: 22px; font-weight: 600; margin: 16px 0 8px; }
.success p { margin: 0 auto 22px; max-width: 520px; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.success-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.success-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.note-warn { background: #fff7e8; border: 1px solid #f2d9a6; color: #7a5410; border-radius: 10px; padding: 12px 16px; font-size: 14px; }

.footer { margin-top: auto; padding: 18px 0 24px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 760px) {
  .bn-head { display: none; }
  .bn-row { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 640px) {
  .card { padding: 20px 16px 18px; border-radius: 14px; }
  .nav-row { margin: -20px -16px 18px; padding: 10px 16px; border-radius: 14px 14px 0 0; }
  .nav-row .btn { padding: 9px 16px; }
  .btn-primary { min-width: 110px; }
  .row { flex-direction: column; gap: 0; }
  .w-120, .w-180 { width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .badge { display: none; }
  .logo { height: 30px; }
  table.jobs .c { width: 70px; }
  table.jobs th, table.jobs td { padding: 7px 8px; }
}
