/* =========================================================================
   vonoesen – Kaffee- & Automatenservice – Konfigurator
   Designsystem abgeleitet von vonoesen.net (Avada-Theme, Stand 09/2026):
     Schriften   Asap (Fließtext/UI), Roboto Slab 300 (Akzent-Zwischentitel)
     Rot         #b70e0c  (CTA, Akzente, Nav-Hover)
     Braun       #40362e  (Sektionsbänder, Button-Hover, dunkle Flächen)
     Navy        #212934  (Footer, Nav-Text)
     Grau        #1c1c1c Überschriften · #707070 Fließtext · #e2e2e2 Linien
   Hinweis: Die Website nutzt leicht andere Werte als das buero68-CI
   (#321E1B / #BF0000). Für ein einheitliches Bild folgen wir der Website.
   ========================================================================= */

@import url('/assets/fonts/fonts.css');

:root {
    --c-bg:            #ffffff;
    --c-surface:       #ffffff;
    --c-surface-alt:   #f1efe9;       /* warmes Off-White (Website color2) */
    --c-border:        #e2e2e2;
    --c-border-strong: #d2d2d2;       /* Formularrahmen der Website */
    --c-text:          #1c1c1c;       /* Überschriften / UI-Text */
    --c-text-muted:    #707070;       /* Fließtext-Grau der Website, AA-tauglich (4.95:1) */
    --c-text-soft:     #767676;       /* kleinste Labels, AA-Grenze (4.54:1) */
    --c-primary:       #40362e;       /* Röstbraun der Website */
    --c-primary-alt:   #53463c;       /* helleres Band-Braun */
    --c-primary-hov:   #2e2721;
    --c-accent:        #b70e0c;       /* Website-Rot */
    --c-accent-dark:   #9c0c0a;
    --c-navy:          #212934;       /* Footer / Nav */
    --c-nav-text:      #333333;
    --c-success:       #2f8f5e;
    --c-error:         #b70e0c;

    --r-card: 3px;
    --r-btn:  5px;
    --r-md:   3px;
    --r-sm:   2px;

    --shadow-card:     0 2px 12px rgba(0, 0, 0, .05);
    --shadow-card-hov: 0 6px 22px rgba(0, 0, 0, .09);
    --shadow-bar:      0 -4px 18px rgba(0, 0, 0, .06);

    --max-w: 1228px;

    --f-sans: 'Asap', Arial, Helvetica, sans-serif;
    --f-slab: 'Roboto Slab', Georgia, 'Times New Roman', serif;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* hidden-Attribut muss auch gegen display-Regeln (.btn, .cookiebanner) gewinnen */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: .24px;
    color: var(--c-text);
    background: var(--c-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
/* dezentes Bogen-Motiv wie auf der Website (sehr hell, nur Konfigurator) */
.page-configurator {
    background:
        radial-gradient(circle at 10% 108%, rgba(0,0,0,0) 0 300px, #f3f1ed 301px 520px, rgba(0,0,0,0) 521px) no-repeat,
        var(--c-bg);
}
img { max-width: 100%; display: block; }
a { color: var(--c-nav-text); text-decoration: none; transition: color .15s; }
a:hover { color: var(--c-accent); }

button { font: inherit; cursor: pointer; letter-spacing: inherit; }
input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }

:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }

.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 30px;
}

/* ---------- Header ---------- */
.site-header {
    background: var(--c-surface);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 30px;
}
.brand { display: flex; align-items: center; }
.brand-logo { height: 60px; width: auto; display: block; }
.step-indicator {
    color: var(--c-navy);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.progress { height: 3px; background: var(--c-border); }
.progress-bar {
    height: 100%;
    background: var(--c-accent);
    width: 0%;
    transition: width .3s ease;
}
@media (max-width: 600px) {
    .header-row { padding: 12px 20px; }
    .brand-logo { height: 42px; }
    .step-indicator { font-size: 13px; }
}

/* ---------- Sektionsband (Website-Stil) ---------- */
.step-band {
    background: var(--c-primary);
    color: #fff;
    text-align: center;
    padding: 34px 20px 36px;
}
.band-title {
    font-family: var(--f-sans);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
    margin: 0 0 8px;
    color: #fff;
}
.band-lead {
    font-size: 19px;
    line-height: 1.5;
    margin: 0;
    color: #fff;
    opacity: .95;
}
.band-lead[hidden] { display: none; }
@media (max-width: 600px) {
    .step-band { padding: 24px 20px 26px; }
    .band-title { font-size: 24px; }
    .band-lead  { font-size: 16px; }
}

/* ---------- Layout ---------- */
.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 36px;
    padding-top: 40px;
    padding-bottom: 120px;
    flex: 1;
}
@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; padding-bottom: 140px; }
}

/* ---------- Wizard / Steps ---------- */
.wizard { min-width: 0; }
.step { display: none; }
.step.is-active { display: block; }
/* Titel/Lead werden im Band angezeigt (JS), im Schritt selbst nicht doppelt */
.step .step-title, .step .step-lead { display: none; }

/* ---------- Option-Grid (Karten-Auswahl) ---------- */
.option-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.option-grid.grid-cols-2 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.option-grid.grid-cols-3 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.option-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    user-select: none;
}
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card:hover { box-shadow: var(--shadow-card-hov); transform: translateY(-1px); }
.option-card:has(input:focus-visible) { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.option-card:has(input:checked),
.option-card.is-checked {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 1px var(--c-accent) inset, var(--shadow-card-hov);
}
.option-card.oc-compact { padding: 13px 16px; }
.oc-title { font-weight: 500; font-size: 16px; line-height: 1.35; color: var(--c-text); }
.oc-sub   { color: var(--c-text-muted); font-size: 13px; line-height: 1.5; }
.oc-check {
    position: absolute;
    top: 10px; right: 12px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    display: none;
    align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.oc-multi:has(input:checked) .oc-check,
.oc-multi.is-checked .oc-check { display: inline-flex; }

/* Zwischentitel: rot, kursiv, Slab – wie die Untertitel der Website */
.subfield { margin-bottom: 32px; }
.subfield-title {
    font-family: var(--f-slab);
    font-style: italic;
    font-weight: 300;
    font-size: 21px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-accent);
    margin: 0 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--c-border-strong);
}

/* ---------- Formular (Website: 50px hoch, 1px #d2d2d2, eckig) ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: span 2; }
.field-label { font-size: 13px; font-weight: 500; color: var(--c-text); letter-spacing: .2px; }
.req { color: var(--c-accent); }

.field input[type=text],
.field input[type=email],
.field input[type=tel],
.field input[type=password],
.field input[type=url],
.field input[type=number],
.field input[type=time],
.field input[type=datetime-local],
.field select,
.field textarea {
    border: 1px solid var(--c-border-strong);
    background: var(--c-surface);
    border-radius: 0;
    padding: 0 14px;
    height: 48px;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; padding: 12px 14px; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(64, 54, 46, .10);
}
.field input.has-error,
.field select.has-error,
.field textarea.has-error { border-color: var(--c-error); }

.field.checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    padding: 12px 14px;
}
.field.checkbox input[type=checkbox] { margin-top: 5px; accent-color: var(--c-accent); }
.field.checkbox span { font-size: 14px; color: var(--c-text-muted); line-height: 1.5; }
.field.checkbox.has-error { border-color: var(--c-error); }

.honeypot { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
    .form-grid { grid-template-columns: 1fr; }
    .field.span-2 { grid-column: span 1; }
}

/* ---------- Zusammenfassung ---------- */
.summary {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 20px 22px;
    align-self: start;
    position: sticky;
    top: 112px;
}
.summary-title {
    font-family: var(--f-slab);
    font-style: italic;
    font-weight: 300;
    font-size: 21px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--c-accent);
    margin: 0 0 6px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--c-border-strong);
}
.summary-list { margin: 0; }
.summary-list > div {
    padding: 9px 0;
    border-bottom: 1px dashed var(--c-border);
}
.summary-list > div:last-child { border-bottom: none; }
.summary-list dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--c-text-soft);
    margin-bottom: 2px;
}
.summary-list dd { margin: 0; font-size: 14px; color: var(--c-text); }
.summary-empty { color: var(--c-text-muted); font-size: 14px; padding-top: 8px; }

@media (max-width: 900px) {
    .summary { position: static; }
}

/* ---------- Buttons (Website: Asap 14/500, 1px Spacing, Rot → Braun) ---------- */
.actions {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    box-shadow: var(--shadow-bar);
    z-index: 5;
}
.actions-row {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px 30px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--c-accent);
    color: #fff;
    border-radius: var(--r-btn);
    padding: 13px 29px;
    font-family: var(--f-sans);
    font-size: 14px;
    font-weight: 500;
    line-height: 17px;
    letter-spacing: 1px;
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--c-primary); color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--c-accent); }
/* Pfeil wie beim Website-CTA („Individuelles Angebot erhalten ›") */
.btn-primary::after {
    content: '›';
    margin-left: 12px;
    font-size: 20px;
    line-height: 0;
    position: relative;
    top: -1px;
}
.btn-ghost {
    background: transparent;
    color: var(--c-primary);
    border: 1px solid var(--c-border-strong);
    padding: 12px 24px;
}
.btn-ghost:hover { background: var(--c-surface-alt); border-color: var(--c-primary); color: var(--c-primary); }
.btn-sm { padding: 9px 20px; font-size: 12px; }
.btn-sm.btn-ghost { padding: 8px 18px; }
@media (max-width: 600px) {
    .actions-row { padding: 12px 20px; }
    .btn { padding: 12px 20px; }
}

/* ---------- Buchung / Kalender ---------- */
.booking { display: grid; gap: 20px; }
.booking-loading { color: var(--c-text-muted); }
.booking-empty {
    background: var(--c-surface-alt);
    border: 1px dashed var(--c-border-strong);
    border-radius: var(--r-card);
    padding: 26px;
    text-align: center;
    color: var(--c-text-muted);
}
.day-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.day-chip {
    flex: 0 0 auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 10px 14px;
    cursor: pointer;
    text-align: center;
    min-width: 78px;
    transition: border-color .15s, background .15s, color .15s;
}
.day-chip:hover { border-color: var(--c-primary); }
.day-chip.is-active {
    border-color: var(--c-primary);
    background: var(--c-primary);
    color: #fff;
}
.day-chip.is-disabled { opacity: .4; pointer-events: none; }
.day-chip-weekday { display: block; font-size: 12px; opacity: .8; }
.day-chip-date { display: block; font-weight: 500; font-size: 16px; }

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.slot-btn {
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: 0;
    padding: 12px;
    font-size: 15px;
    text-align: center;
    transition: border-color .15s, background .15s, color .15s;
}
.slot-btn:hover { border-color: var(--c-primary); }
.slot-btn.is-selected {
    background: var(--c-accent);
    color: #fff;
    border-color: var(--c-accent);
}
.booking-actions { display: flex; justify-content: flex-end; }

/* ---------- Bestätigung ---------- */
.confirmation { text-align: center; padding: 20px 20px 40px; }
.confirmation-icon {
    width: 68px; height: 68px;
    border-radius: 50%;
    background: var(--c-primary);
    color: #fff;
    margin: 0 auto 18px;
    font-size: 32px;
    display: flex; align-items: center; justify-content: center;
}
.confirmation-summary {
    margin: 24px auto 0;
    max-width: 560px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
    text-align: left;
}
.confirmation-summary dl { margin: 0; }
.confirmation-summary dt {
    font-size: 11px; color: var(--c-text-soft);
    text-transform: uppercase; letter-spacing: .06em;
}
.confirmation-summary dd {
    margin: 0 0 10px; padding-bottom: 10px;
    font-size: 15px; font-weight: 500;
    border-bottom: 1px dashed var(--c-border);
}
.confirmation-summary dd:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

/* ---------- Cookiebanner (dunkle Fläche wie Kontaktbereich der Website) ---------- */
.cookiebanner {
    position: fixed;
    left: 16px; right: 16px; bottom: 82px;
    z-index: 50;
}
.cookiebanner-inner {
    max-width: 760px;
    margin: 0 auto;
    background: var(--c-primary);
    color: #fff;
    border-radius: var(--r-card);
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
}
.cookiebanner-inner p { margin: 0; flex: 1 1 320px; font-size: 14px; line-height: 1.55; color: #f1efe9; }
.cookiebanner-inner a { color: #fff; text-decoration: underline; }
.cookiebanner-inner a:hover { color: #fff; }

/* ---------- Page-Footer (Navy wie die Website) ---------- */
.page-footer {
    background: var(--c-navy);
    color: var(--c-border);
    padding: 22px 0 96px;
    margin-top: 32px;
    font-size: 13px;
    line-height: 1.6;
}
.page-footer-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.page-footer a { color: var(--c-border); }
.page-footer a:hover { color: #fff; }
.page-footer nav a { margin-left: 18px; }

/* ---------- Fehler-Box ---------- */
.flash-error {
    background: #fbeceb;
    color: var(--c-error);
    border: 1px solid #f1c3c1;
    border-radius: var(--r-card);
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* ---------- Statische Seiten (Datenschutz, Impressum, Storno) ---------- */
.static-page {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 34px 38px;
    margin: 36px auto;
    max-width: 820px;
}
.static-page h1 { font-size: 32px; font-weight: 400; line-height: 1.25; margin-top: 0; letter-spacing: 0; }
.static-page h2 {
    font-family: var(--f-slab);
    font-weight: 300;
    font-size: 24px;
    letter-spacing: 0;
    margin-top: 32px;
}
.static-page h3 { font-size: 17px; font-weight: 500; }
.static-page p, .static-page li { color: var(--c-text); line-height: 1.7; }
.static-page a { color: var(--c-accent); }
.static-page a:hover { color: var(--c-primary); text-decoration: underline; }
.static-page code { font-size: 90%; background: var(--c-surface-alt); padding: 1px 5px; }
@media (max-width: 600px) {
    .static-page { padding: 24px 20px; margin: 20px 16px; }
}

/* ---------- Admin ---------- */
.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 230px 1fr;
}
.admin-sidebar {
    background: var(--c-navy);
    color: #fff;
    padding: 24px 18px;
}
.admin-sidebar a {
    display: block;
    color: #d8dde3;
    padding: 9px 12px;
    border-radius: var(--r-card);
    margin-bottom: 4px;
    font-size: 14px;
}
.admin-sidebar a:hover, .admin-sidebar a.is-active {
    background: rgba(255,255,255,.08);
    color: #fff;
    text-decoration: none;
}
.admin-sidebar h1 { font-size: 16px; margin-bottom: 16px; color: #fff; }
.admin-logo-chip {
    background: #fff;
    border-radius: var(--r-card);
    padding: 12px 14px;
    margin-bottom: 22px;
    display: block;
}
.admin-logo-chip img { width: 100%; height: auto; display: block; }
.admin-main { padding: 32px 36px; }
.admin-main h1 { font-size: 30px; font-weight: 400; letter-spacing: 0; }
.admin-main h2 { font-family: var(--f-slab); font-weight: 300; font-size: 22px; letter-spacing: 0; }
.admin-main .static-page { box-shadow: none; }
.admin-table {
    width: 100%; border-collapse: collapse;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 10px 14px; text-align: left;
    border-bottom: 1px solid var(--c-border);
    font-size: 14px; vertical-align: top;
}
.admin-table th { background: var(--c-surface-alt); font-weight: 500; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-main select, .admin-main input[type=text], .admin-main input[type=email],
.admin-main input[type=url], .admin-main input[type=number], .admin-main input[type=time],
.admin-main input[type=datetime-local], .admin-main textarea {
    border: 1px solid var(--c-border-strong);
    border-radius: 0;
    padding: 8px 10px;
    background: #fff;
}
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: var(--c-surface-alt);
    color: var(--c-text-muted);
}
.badge-neu        { background: #e6f1fb; color: #1e66a0; }
.badge-kontaktiert{ background: #fff3d6; color: #8b6500; }
.badge-angebot    { background: #e7e0fb; color: #5d3eb1; }
.badge-verhandlung{ background: #fde2c4; color: #a65a07; }
.badge-kunde      { background: #d8efe1; color: #1f6c44; }
.badge-verloren   { background: #fadcd9; color: #9a2a1f; }

@media (max-width: 800px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { padding: 14px 16px; }
    .admin-main { padding: 20px 16px; }
}

/* ---------- Login ---------- */
.login-card {
    max-width: 380px;
    margin: 80px auto;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    padding: 32px 34px;
}
.login-card h1 { margin-top: 0; font-size: 26px; font-weight: 400; letter-spacing: 0; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; }
