/* =========================================
   VARIABLEN & RESET
========================================= */
:root {
    --color-primary: #0A2A43; /* Seriöses Dunkelblau */
    --color-accent: #E3000F;  /* Schweizer Rot */
    --color-accent-hover: #C2000D;
    --color-bg: #F4F7F9;
    --color-surface: #FFFFFF;
    --color-text: #2D3748;
    --color-text-muted: #718096;
    --color-border: #E2E8F0;
    --color-success: #38A169;
    --radius: 8px;
    --transition: 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* =========================================
   HEADER & FOOTER (Branding)
========================================= */
.header { background: var(--color-surface); padding: 20px 0; border-bottom: 4px solid var(--color-accent); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.header-inner { display: flex; flex-direction: column; }
.logo { font-size: 2rem; font-weight: 800; color: var(--color-primary); line-height: 1; letter-spacing: -0.5px;}
.logo span { color: var(--color-accent); }
.branding { font-size: 0.9rem; color: var(--color-text-muted); margin-top: 5px; }
.branding strong { color: var(--color-primary); font-weight: 700; }

.footer { margin-top: auto; padding: 40px 20px; text-align: center; color: var(--color-text-muted); }
.footer-brand { margin-top: 8px; font-size: 0.95rem; }
.footer-brand strong { color: var(--color-primary); }

/* =========================================
   WIZARD & STEPPER
========================================= */
main { flex: 1; padding: 40px 0; }
.wizard-card { background: var(--color-surface); border-radius: var(--radius); padding: 30px 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); }
@media (min-width: 600px) { .wizard-card { padding: 40px; } }

.stepper { display: flex; justify-content: space-between; margin-bottom: 35px; position: relative; overflow: hidden; }
.stepper::before { content: ''; position: absolute; top: 15px; left: 0; width: 100%; height: 2px; background: var(--color-border); z-index: 1; }
.stepper .step { position: relative; z-index: 2; background: var(--color-surface); padding: 0 10px; font-size: 0.8rem; font-weight: 600; color: var(--color-text-muted); text-align: center; }
.stepper .step::before { content: attr(data-step); display: flex; justify-content: center; align-items: center; width: 32px; height: 32px; background: var(--color-surface); border: 2px solid var(--color-border); border-radius: 50%; margin: 0 auto 6px; color: var(--color-text-muted); transition: var(--transition); }
.stepper .step.active::before { border-color: var(--color-accent); background: var(--color-accent); color: white; }
.stepper .step.active { color: var(--color-primary); }
.stepper .step.completed::before { border-color: var(--color-primary); background: var(--color-primary); color: white; }
@media (max-width: 500px) { .stepper .step { font-size: 0; } .stepper .step::before { font-size: 0.9rem; margin-bottom: 0; } }

.step-content { display: none; animation: fadeIn 0.4s ease; }
.step-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

h2 { color: var(--color-primary); margin-bottom: 5px; font-size: 1.6rem; }
h3 { color: var(--color-primary); margin-bottom: 10px; font-size: 1.2rem; }
.subtitle { color: var(--color-text-muted); margin-bottom: 25px; }

/* =========================================
   FORMULARE & KOMPONENTEN
========================================= */
.form-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95rem; color: var(--color-primary); }
input[type="text"], input[type="number"], input[type="date"], select { width: 100%; padding: 14px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 1rem; font-family: inherit; transition: var(--transition); background-color: #FAFCFD; }
input:focus, select:focus { outline: none; border-color: var(--color-accent); background-color: #FFF; box-shadow: 0 0 0 3px rgba(227, 0, 15, 0.1); }

/* Radio Cards (Moderne Auswahl) */
.radio-group { display: flex; gap: 15px; flex-direction: column; }
@media (min-width: 600px) { .radio-group { flex-direction: row; } }
.flex-col { flex-direction: column; }
.radio-card { flex: 1; border: 2px solid var(--color-border); border-radius: var(--radius); padding: 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: var(--transition); font-weight: 500; }
.radio-card:hover { border-color: #CBD5E0; }
.radio-card input[type="radio"] { accent-color: var(--color-accent); width: 20px; height: 20px; }
.radio-card:has(input[type="radio"]:checked) { border-color: var(--color-accent); background-color: #FEF2F2; color: var(--color-accent); }

/* iOS Style Toggle Switch */
.toggle-switch { display: flex; justify-content: space-between; align-items: center; padding: 20px; border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 15px; background: #FAFCFD; }
.toggle-text strong { display: block; font-size: 1rem; color: var(--color-primary); margin-bottom: 4px; }
.toggle-text p { font-size: 0.85rem; color: var(--color-text-muted); margin: 0; }
.switch { position: relative; display: inline-block; width: 50px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #CBD5E0; transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 22px; width: 22px; left: 3px; bottom: 3px; background-color: white; transition: .3s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
input:checked + .slider { background-color: var(--color-success); }
input:checked + .slider:before { transform: translateX(22px); }

/* Zwischenstationen */
.dynamic-stops-wrapper { background: #FAFCFD; border: 1px dashed #CBD5E0; padding: 20px; border-radius: var(--radius); }
.text-sm { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 15px; }
.stop-item { background: var(--color-surface); padding: 15px; border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.stop-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid var(--color-border); }
.btn-remove { background: #FEE2E2; color: #DC2626; border: none; padding: 6px 12px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.btn-remove:hover { background: #FCA5A5; }

/* Buttons & Utils */
.btn { padding: 14px 24px; font-size: 1rem; font-weight: 600; border: none; border-radius: var(--radius); cursor: pointer; transition: var(--transition); text-align: center; width: 100%; display: inline-block; }
@media (min-width: 600px) { .btn { width: auto; min-width: 160px; } }
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: #061A2B; }
.btn-accent { background: var(--color-accent); color: white; }
.btn-accent:hover { background: var(--color-accent-hover); }
.btn-secondary { background: var(--color-border); color: var(--color-primary); }
.btn-secondary:hover { background: #CBD5E0; }
.btn-outline { background: transparent; border: 2px dashed var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-bg); }

.w-100 { width: 100% !important; }
.mt-2 { margin-top: 15px; } .mt-3 { margin-top: 25px; }
.hidden { display: none !important; }

.action-bar { display: flex; flex-direction: column-reverse; gap: 15px; margin-top: 30px; border-top: 1px solid var(--color-border); padding-top: 25px; }
@media (min-width: 600px) { .action-bar { flex-direction: row; justify-content: space-between; } }

/* Loading & Success States */
#loading-spinner { text-align: center; padding: 30px 20px; color: var(--color-text-muted); font-weight: 600; }
.spinner { width: 45px; height: 45px; border: 4px solid var(--color-border); border-top: 4px solid var(--color-accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 15px; }
@keyframes spin { 100% { transform: rotate(360deg); } }
.success-alert { background: #F0FDF4; border-left: 4px solid var(--color-success); color: #166534; padding: 15px 20px; border-radius: 4px; margin: 20px 0; font-weight: 600; }

/* Zusammenfassung Schritt 5 */
.summary-block, .price-breakdown { background: #FAFCFD; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.summary-block h3, .price-breakdown h3 { font-size: 1.1rem; border-bottom: 2px solid var(--color-border); padding-bottom: 10px; margin-bottom: 15px; }
.summary-block p { display: flex; flex-direction: column; margin-bottom: 12px; font-size: 0.95rem; }
.summary-block p strong { color: var(--color-text-muted); }
@media (min-width: 600px) { .summary-block p { flex-direction: row; justify-content: space-between; } }
.price-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.price-row.total { font-size: 1.3rem; font-weight: 800; color: var(--color-primary); border-top: 2px solid var(--color-border); padding-top: 15px; margin-top: 15px; }