:root {
  --darkblue: #00003c;
  --darkblue-400: #333363;
  --darkblue-200: #9999b1;
  --darkblue-100: #ccccd8;
  --darkblue-50: #e6e6ec;
  --darkblue-10: #f2f2f5;
  --blue: #001ed2;
  --blue-900: #00159a;
  --blue-50: #e6e9fb;
  --blue-100: #b3bcf2;
  --okay: #45a744;
  --okay-50: #ecf6ec;
  --failure: #b30505;
  --input-border: #a3a3b8;
  --radius: 4px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
body { font-family: "TNG Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--darkblue); background: #fff; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }

/* Kopf */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 32px; border-bottom: 1px solid var(--darkblue-50); position: sticky; top: 0; background: #fff; z-index: 5; }
.logo { height: 40px; width: auto; display: block; }
.btn-close { display: none; width: 40px; height: 40px; border: none; background: none; border-radius: var(--radius); cursor: pointer; color: var(--darkblue); align-items: center; justify-content: center; }
.btn-close:hover { background: var(--darkblue-10); }
body.embedded .btn-close { display: inline-flex; }

.page { max-width: 1040px; padding: 32px 32px 48px; }
.title { font-size: 34px; line-height: 1.22; font-weight: 400; letter-spacing: -.2px; margin-bottom: 32px; }

/* Schritte */
.stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; font-size: 13.5px; margin-bottom: 36px; }
.stepper .st { display: inline-flex; align-items: center; gap: 10px; border: none; background: none; cursor: default; color: var(--darkblue-200); padding: 2px 0; }
.stepper .num { width: 24px; height: 24px; border-radius: var(--radius); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: var(--darkblue-10); color: var(--darkblue-200); }
.stepper .st.active { color: var(--darkblue); }
.stepper .st.active .num { background: var(--darkblue); color: #fff; }
.stepper .st.done { color: var(--darkblue); cursor: pointer; }
.stepper .st.done .num { background: var(--okay); color: #fff; }
.stepper .st.done:hover { color: var(--blue); }
.stepper .st.done:hover .num { background: var(--blue); }
.stepper .sep { color: var(--darkblue); display: inline-flex; }

.label { font-size: 17px; font-weight: 400; margin-bottom: 18px; }
.slots-label { font-weight: 400; }
.hint { color: var(--darkblue-400); font-size: 15px; }

/* Auswahlkarten */
.options { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.opt { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; padding: 16px 24px; background: #fff; border: 1px solid var(--darkblue-50); border-radius: var(--radius); cursor: pointer; text-align: left; font-size: 16px; transition: border-color .15s, box-shadow .15s, color .15s; }
.opt:hover { border-color: var(--darkblue-100); box-shadow: 0 2px 8px rgba(0,0,60,.06); }
.opt svg.ic { width: 22px; height: 22px; flex-shrink: 0; }
.opt .meta { color: var(--darkblue-200); font-size: 14px; margin-left: 10px; }
.opt:has(.thumb) { min-height: 136px; padding: 22px 32px; gap: 32px; border-width: 2px; border-color: var(--darkblue-50); }
.opt:has(.thumb).on { border-color: #4f63e0; box-shadow: none; }
.opt .thumb { width: 90px; height: 90px; object-fit: cover; flex-shrink: 0; display: block; background: var(--darkblue-10); }
.opt:has(.thumb) .opt-text { display: flex; flex-direction: column; }
.opt:has(.thumb) .opt-name { font-size: 26px; line-height: 1.25; color: var(--darkblue); }
.opt:has(.thumb).on .opt-name { color: var(--darkblue); }
.opt:has(.thumb) .meta { margin-left: 0; margin-top: 2px; font-size: 15px; }
.opt .tick { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); color: #fff; display: none; align-items: center; justify-content: center; flex-shrink: 0; }
.opt.on { border-color: var(--blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.opt.on .tick { display: inline-flex; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 16px; border-radius: var(--radius); font-size: 15px; font-weight: 500; cursor: pointer; text-decoration: none; border: 1px solid var(--blue); transition: background .15s, border-color .15s; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-900); }
.btn.primary:disabled { background: var(--blue-50); border-color: var(--blue-50); color: var(--blue-100); cursor: not-allowed; }
.btn.outline { background: #fff; color: var(--blue); border-color: var(--blue-100); }
.btn.outline:hover { background: var(--blue-50); border-color: var(--blue); }

/* Kalender */
.cal { max-width: 760px; margin-bottom: 36px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--darkblue-50); margin-bottom: 18px; }
.cal-head strong { font-weight: 400; font-size: 15px; }
.cal-nav { width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--darkblue-50); background: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--darkblue); }
.cal-nav:hover:not(:disabled) { border-color: var(--darkblue-100); }
.cal-nav:disabled { background: var(--darkblue-10); border-color: var(--darkblue-10); color: var(--darkblue-100); cursor: default; }
.cal-nav svg { width: 18px; height: 18px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 15px; padding: 0 0 8px; }
.day { height: 58px; border: none; border-radius: var(--radius); background: var(--darkblue-10); color: var(--darkblue-100); font-size: 15px; cursor: default; font-variant-numeric: tabular-nums; }
.day.avail { color: var(--darkblue); cursor: pointer; }
.day.avail:hover { background: var(--blue-50); }
.day.on { background: var(--blue); color: #fff; }

.slots-label { font-size: 17px; margin: 0 0 16px; }
.slots { display: flex; flex-wrap: wrap; gap: 8px; max-width: 760px; margin-bottom: 36px; }
.slot { min-width: 74px; height: 52px; padding: 0 10px; border: 1px solid var(--darkblue-50); border-radius: var(--radius); background: #fff; cursor: pointer; font-size: 15px; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--darkblue-100); }
.slot.on { border-color: var(--blue); color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }

/* Formular */
.form { max-width: 760px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; padding: 12px 14px; font-size: 16px; border: 1px solid var(--input-border); border-radius: var(--radius); background: #fff; color: var(--darkblue); box-shadow: 0 1px 2px rgba(0,0,60,.06); transition: border-color .15s; }
.field input::placeholder, .field textarea::placeholder { color: var(--darkblue-200); }
.field input:hover, .field textarea:hover { border-color: var(--darkblue-400); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--blue-100); border-color: var(--blue); }
.field.err input { border-color: var(--failure); outline: 2px solid #f3c1c1; }
.req { color: var(--failure); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; margin: 6px 0 28px; cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; border: 1px solid var(--input-border); border-radius: var(--radius); flex-shrink: 0; margin-top: 2px; cursor: pointer; display: grid; place-content: center; }
.check input:checked { background: var(--blue); border-color: var(--blue); }
.check input:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check a { color: var(--darkblue); }
.hp { position: absolute; left: -9999px; }

/* Übersicht */
.summary { max-width: 760px; border: 1px solid var(--darkblue-50); border-radius: var(--radius); margin-bottom: 32px; }
.sum-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--darkblue-50); align-items: start; }
.sum-row:last-child { border-bottom: none; }
.sum-row dt { color: var(--darkblue-400); font-size: 14px; padding-top: 2px; }
.sum-row dd { font-size: 16px; }
.sum-row .edit { border: none; background: none; color: var(--blue); cursor: pointer; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

/* Bestätigung */
.done-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 28px; max-width: 760px; }
.done-ic { width: 48px; height: 48px; border-radius: var(--radius); background: var(--okay-50); color: var(--okay); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.done-ic svg { width: 26px; height: 26px; }
.done-head h2 { font-size: 24px; font-weight: 400; line-height: 1.3; }
.done-head p { color: var(--darkblue-400); margin-top: 4px; }
.ticket { max-width: 760px; background: var(--darkblue-10); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.ticket .when { font-size: 22px; line-height: 1.3; }
.ticket .what { margin-top: 4px; }
.ticket .where { margin-top: 14px; font-size: 14px; color: var(--darkblue-400); }
.ticket .where a { color: var(--darkblue-400); }

/* Hilfe-Box */
.help { max-width: 1040px; background: var(--darkblue-10); border-radius: var(--radius); padding: 28px; margin-top: 48px; font-size: 15px; }
.help svg { width: 22px; height: 22px; margin-bottom: 16px; }
.help h3 { font-size: 19px; font-weight: 400; margin-bottom: 10px; }
.help a { color: var(--darkblue); }
.help ul { padding-left: 20px; margin-top: 6px; }

.error-msg { color: var(--failure); font-size: 14px; margin: -16px 0 24px; }

/* Buchungsbestätigung (zweispaltig) */
body.is-done .title, body.is-done .stepper, body.is-done .help { display: none; }
body.is-done .page { max-width: none; padding: 0; }
.confirm { display: grid; grid-template-columns: minmax(260px, 36%) 1fr; min-height: calc(100vh - 69px); }
.confirm-side { border-right: 1px solid var(--darkblue-50); padding: 56px 36px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.confirm-side .cert { width: 132px; height: 132px; margin-bottom: 28px; }
.confirm-side h2 { font-size: 26px; font-weight: 400; color: var(--darkblue); margin-bottom: 14px; }
.confirm-side p { color: var(--darkblue-200); font-size: 17px; line-height: 1.5; }
.confirm-q { margin-top: auto; padding-top: 48px; }
.confirm-q h3 { font-size: 20px; font-weight: 400; margin-bottom: 10px; }
.confirm-q a { color: var(--darkblue-400); }
.confirm-main { min-width: 0; }
.confirm-title { font-size: 26px; font-weight: 400; padding: 24px 40px 22px; border-bottom: 1px solid var(--darkblue-50); }
.confirm-body { padding: 36px 40px 48px; max-width: 760px; }
.kicker { font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--darkblue-200); }
.confirm-lead { font-size: 44px; line-height: 1.15; font-weight: 500; letter-spacing: -.5px; margin: 4px 0 22px; }
.confirm-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
.btn-line { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1.5px solid var(--darkblue); border-radius: 6px; background: #fff; color: var(--darkblue); font-size: 17px; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn-line svg { width: 20px; height: 20px; }
.btn-line:hover { background: var(--darkblue-10); }
.btn-line.accent { border-color: var(--blue); color: var(--blue); }
.btn-line.accent:hover { background: var(--blue-50); }
.cal-menu { position: relative; }
.cal-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 10; background: #fff; border: 1px solid var(--darkblue-50); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,60,.12); min-width: 100%; padding: 6px; }
.cal-pop a { display: block; padding: 10px 12px; border-radius: 4px; color: var(--darkblue); text-decoration: none; white-space: nowrap; }
.cal-pop a:hover { background: var(--blue-50); color: var(--blue); }
.sec { display: flex; align-items: center; gap: 16px; font-size: 13px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--darkblue-200); margin-bottom: 10px; }
.sec::after { content: ""; flex: 1; height: 1px; background: var(--darkblue-50); }
.svc { font-size: 30px; line-height: 1.25; }
.when { font-size: 19px; color: var(--blue); margin-top: 4px; }
.plate { color: var(--darkblue-400); margin-top: 4px; }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 40px 0; }
.person { display: flex; align-items: center; gap: 14px; }
.person strong { display: block; font-size: 19px; font-weight: 500; }
.person small { display: block; color: var(--darkblue-200); font-size: 15px; }
.person small a { color: var(--darkblue-200); }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--darkblue-50); display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; overflow: hidden; }
.logo-av { background: var(--blue); }
.logo-av img { width: 44px; height: auto; }
.bring { padding-left: 20px; color: var(--darkblue-400); margin-bottom: 20px; }
.manage { font-size: 15px; color: var(--darkblue-400); }
.manage a { color: var(--blue); }

@media (max-width: 860px) {
  .confirm { grid-template-columns: 1fr; min-height: 0; }
  .confirm-side { border-right: none; border-bottom: 1px solid var(--darkblue-50); padding: 28px 16px; }
  .confirm-side .cert { width: 96px; height: 96px; margin-bottom: 16px; }
  .confirm-q { display: none; }
  .confirm-title { display: none; }
  .confirm-body { padding: 24px 16px 36px; }
  .confirm-lead { font-size: 32px; }
  .svc { font-size: 24px; }
  .people { grid-template-columns: 1fr; gap: 20px; margin: 28px 0; }
}
@media print {
  .topbar, .confirm-btns, .manage { display: none !important; }
  .confirm { min-height: 0; }
}

@media (max-width: 700px) {
  .topbar { padding: 10px 16px; }
  .logo { height: 32px; }
  .page { padding: 22px 16px 36px; }
  .title { font-size: 25px; margin-bottom: 22px; }
  .stepper { gap: 8px 10px; font-size: 12.5px; margin-bottom: 26px; }
  .stepper .st:not(.active) .txt { display: none; }
  .opt { min-height: 60px; padding: 14px 16px; }
  .opt:has(.thumb) { min-height: 96px; padding: 14px 16px; gap: 18px; }
  .opt .thumb { width: 64px; height: 64px; }
  .opt:has(.thumb) .opt-name { font-size: 19px; }
  .day { height: 44px; font-size: 14px; }
  .slot { min-width: 64px; height: 46px; }
  .row2 { grid-template-columns: 1fr; }
  .sum-row { grid-template-columns: 1fr auto; padding: 14px 16px; gap: 2px 12px; }
  .sum-row dt { grid-column: 1 / -1; }
  .actions .btn { flex: 1 1 100%; }
  .actions .btn.outline { order: 2; }
  .help { padding: 20px; margin-top: 36px; }
}
