:root {
  --accent: #1f6feb;
  --accent-soft: #e8f0fe;
  --text: #1d1d1f;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f6f7f9;
  --card: #fff;
  --danger: #b42318;
  --radius: 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
h1 { font-size: 1.5rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 .25rem; }
h3 { font-size: 1rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); margin: .25rem 0 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; color: var(--accent); font-weight: 600; margin: 0 0 .25rem; }

.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.brand img { max-height: 36px; }
main { flex: 1; padding: 32px 16px; display: flex; justify-content: center; align-items: flex-start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; width: 100%; max-width: 760px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card.narrow { max-width: 460px; }
.card.wide { max-width: 980px; }
.footer { text-align: center; padding: 20px; font-size: .85rem; color: var(--muted); }
.footer a { color: inherit; margin: 0 8px; }

label { display: block; font-weight: 500; margin-bottom: 14px; font-size: .95rem; }
input[type=text], input:not([type]), input[type=email], input[type=password], input[type=number], input[type=time], input[type=date], select, textarea {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button { font: inherit; cursor: pointer; border-radius: 8px; padding: 11px 20px; border: 1px solid transparent; }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--accent); color: #fff; font-weight: 600; }
a.primary { display: inline-block; padding: 10px 18px; border-radius: 8px; text-decoration: none; margin-top: 8px; }
.primary:not(:disabled):hover { filter: brightness(.92); }
.secondary { background: #fff; border-color: #d1d5db; color: var(--text); }
.link { background: none; border: none; color: var(--accent); padding: 4px 8px; }
form .primary { width: 100%; margin-top: 4px; }
.error { color: var(--danger); background: #fef3f2; border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.notice { background: #fffaeb; border: 1px solid #fedf89; border-radius: 8px; padding: 14px 16px; margin: 16px 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 20px 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.actions .primary { margin-left: auto; }

/* Angebot */
.positions { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .93rem; }
.positions th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 8px 6px; }
.positions td { border-bottom: 1px solid var(--line); padding: 8px 6px; vertical-align: top; }
.positions tr.headline td { font-weight: 600; background: #fafafa; }
.num, .positions th.num { text-align: right; white-space: nowrap; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; margin: 16px 0 0 auto; max-width: 320px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; text-align: right; font-weight: 600; }

/* Buchung */
.jobhead { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; align-self: center; counter-reset: s; }
.stepper li { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); padding: 6px 10px; border-radius: 999px; }
.stepper li::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); font-size: .75rem; }
.stepper li.active { color: var(--text); background: var(--accent-soft); font-weight: 600; }
.stepper li.active::before { background: var(--accent); color: #fff; border-color: var(--accent); }
.stepper li.done::before { content: "✓"; background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.picker { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 32px; margin-top: 16px; }
.calendar .cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.calendar .cal-head strong { font-size: 1rem; }
.calendar .nav { background: none; border: 1px solid var(--line); width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-grid .wd { font-size: .75rem; color: var(--muted); padding: 6px 0; }
.cal-grid button, .cal-grid span.day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; padding: 0; font-size: .92rem; }
.cal-grid span.day { color: #c4c7cc; }
.cal-grid button { position: relative; background: var(--accent-soft); color: var(--accent); font-weight: 600; border: none; }
.cal-grid button:hover { background: var(--accent); color: #fff; }
.cal-grid button.selected { background: var(--accent); color: #fff; }
.cal-grid button.has-current::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; position: absolute; margin-top: 26px; }
.times h3 { min-height: 1.4em; }
.time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 380px; overflow-y: auto; padding: 2px; }
.time-grid button { background: #fff; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; padding: 10px 0; }
.time-grid button:hover { background: var(--accent-soft); }
.time-grid button.selected { background: var(--accent); color: #fff; }
.time-grid button.current:not(.selected) { border-style: dashed; }
.time-grid small { display: block; font-weight: 400; font-size: .72rem; opacity: .8; }
.empty { color: var(--muted); }

.summary { display: grid; gap: 12px; margin: 16px 0; }
.slot-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 14px 16px; }
.slot-card .label { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.slot-card .value { font-weight: 600; font-size: 1.05rem; margin-top: 2px; }
.slot-card .lock { font-size: .85rem; color: var(--muted); }

.big-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.loading { position: fixed; inset: 0; background: rgba(255,255,255,.6); display: grid; place-items: center; z-index: 10; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .card { padding: 22px 18px; }
  .picker { grid-template-columns: 1fr; gap: 20px; }
  .stepper li span { display: none; }
  .positions .num:nth-child(2) { display: none; }
}
