/* ============================================================
   ClaimsAssist – app.css
   Koller & Baur OHG | AXA Deep Blue #00008F
   ============================================================ */

:root {
  --primary:        #00008F;
  --primary-light:  #0000b8;
  --primary-dark:   #00006a;
  --accent:         #D4982A;
  --accent-light:   #f0b84a;
  --bg:             #F2F5FB;
  --card:           #ffffff;
  --text:           #1A1A3E;
  --text-muted:     #6B7396;
  --border:         #C8D3E8;
  --border-light:   #E4EAF6;
  --success:        #1E8449;
  --success-bg:     #EAFAF1;
  --warning:        #B7770D;
  --warning-bg:     #FEF9EE;
  --error:          #C0392B;
  --error-bg:       #FEF2F2;
  --info:           #1565C0;
  --info-bg:        #EEF4FF;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow:         0 2px 16px rgba(0,0,143,.08);
  --shadow-lg:      0 8px 40px rgba(0,0,143,.15);
  --transition:     .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
}
.header-logo-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.15);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.header-logo-text { font-size: 18px; font-weight: 700; line-height: 1.2; }
.header-logo-sub  { font-size: 11px; opacity: .7; }
.header-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
}

/* ── PROGRESS BAR ── */
.progress-bar-wrap {
  background: var(--primary-dark);
  padding: 0 24px;
}
.progress-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.progress-steps {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.progress-steps::-webkit-scrollbar { display: none; }
.progress-step {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.progress-step-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: default;
  padding: 4px 0;
  color: rgba(255,255,255,.45);
  font-size: 12px;
  white-space: nowrap;
  transition: color var(--transition);
}
.progress-step.done   .progress-step-btn { color: rgba(255,255,255,.75); cursor: pointer; }
.progress-step.active .progress-step-btn { color: #fff; }
.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition);
}
.progress-step.done   .step-num { background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.6); }
.progress-step.active .step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.step-label { overflow: hidden; text-overflow: ellipsis; }
.progress-connector {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,.15);
  margin: 0 6px;
  min-width: 12px;
}
.progress-pct {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── MAIN LAYOUT ── */
.main-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
@media (max-width: 860px) {
  .main-layout { grid-template-columns: 1fr; }
  .assistant-col { order: -1; }
}
/* ── Mobile: hide sidebar assistant (FAB replaces it) ── */
@media (max-width: 640px) {
  .assistant-col { display: none; }
}

/* ── PROGRESS BAR – Mobile ── */
@media (max-width: 640px) {
  .step-label { display: none; }
  .progress-connector { min-width: 6px; margin: 0 2px; }
  .step-num { width: 20px; height: 20px; font-size: 10px; }
  .progress-bar-inner { gap: 8px; }
}

/* ── FRANZI FAB (Floating Action Button – mobile only) ── */
#franzi-fab {
  display: none;
}
#franzi-popup {
  display: none;
}

@keyframes fabPopIn {
  from { opacity: 0; transform: translateY(10px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 640px) {
  #franzi-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 22px;
    right: 18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary);
    border: 2.5px solid var(--accent);
    box-shadow: 0 4px 22px rgba(0,0,143,.38);
    cursor: pointer;
    z-index: 9000;
    transition: transform .15s ease, box-shadow .15s ease;
    user-select: none;
  }
  #franzi-fab:active { transform: scale(.91); }
  #franzi-fab svg { width: 36px; height: 36px; }
  #franzi-fab-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #E53535;
    border: 2px solid #fff;
  }
  #franzi-popup {
    display: block;
    position: fixed;
    bottom: 92px;
    right: 14px;
    width: calc(100vw - 28px);
    max-width: 330px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1.5px solid var(--border);
    z-index: 8999;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px) scale(.97);
    transition: opacity .2s ease, transform .2s ease;
  }
  #franzi-popup.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    animation: fabPopIn .2s ease forwards;
  }
  #franzi-popup-header {
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
  }
  #franzi-popup-close {
    background: none;
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
  }
  #franzi-popup-body {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--text);
    line-height: 1.55;
    min-height: 52px;
  }
}

/* ── FORM CARD ── */
.form-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.step-pane { display: none; }
.step-pane.active { display: block; }

.step-header {
  padding: 26px 32px 20px;
  border-bottom: 1px solid var(--border-light);
}
.step-number {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 6px;
}
.step-number span {
  background: var(--primary);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.step-title   { font-size: 22px; font-weight: 700; color: var(--text); }
.step-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.step-body { padding: 28px 32px; }

/* ── FORM ELEMENTS ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-grid.col-1  { grid-template-columns: 1fr; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

@media (max-width: 600px) {
  .step-body  { padding: 20px; }
  .step-header { padding: 20px 20px 16px; }
  .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}
.form-group label .req { color: var(--error); margin-left: 2px; }
.form-group small { font-size: 11.5px; color: var(--text-muted); }

.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
  appearance: none;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,0,143,.1);
}
.form-control.error { border-color: var(--error); }
.form-control.success { border-color: var(--success); }
textarea.form-control { resize: vertical; min-height: 110px; line-height: 1.6; }
select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%236B7396' d='M5.23 7.21l4.77 4.77 4.77-4.77 1.42 1.41-6.19 6.19-6.19-6.19z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 38px; }

.field-error { font-size: 12px; color: var(--error); display: none; }
.field-error.visible { display: block; }

/* ── OPTION CARDS (Schadenart etc.) ── */
.option-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
}
.option-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #fff;
  user-select: none;
}
.option-card:hover { border-color: var(--primary-light); background: var(--info-bg); }
.option-card.selected { border-color: var(--primary); background: #eff0ff; box-shadow: 0 0 0 3px rgba(0,0,143,.12); }
.option-card-icon { font-size: 28px; margin-bottom: 8px; }
.option-card-label { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── CHECKBOXES ── */
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.check-item:hover { border-color: var(--primary-light); background: var(--info-bg); }
.check-item.selected { border-color: var(--primary); background: #eff0ff; }
.check-item input[type=checkbox] { display: none; }
.check-box {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  background: #fff;
}
.check-item.selected .check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.check-label { font-size: 14px; color: var(--text); }

/* ── RADIO CARDS (Fahrbereitschaft etc.) ── */
.radio-cards { display: flex; flex-direction: column; gap: 10px; }
.radio-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}
.radio-card:hover { border-color: var(--primary-light); background: #fafbff; }
.radio-card.selected { border-color: var(--primary); background: #eff0ff; }
.radio-card input[type=radio] { display: none; }
.radio-dot {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.radio-card.selected .radio-dot { border-color: var(--primary); background: var(--primary); }
.radio-card.selected .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
}
.radio-card-icon { font-size: 22px; }
.radio-card-text strong { display: block; font-size: 15px; color: var(--text); }
.radio-card-text small  { font-size: 12.5px; color: var(--text-muted); }

/* ── CAR DIAGRAM ── */
.car-diagram-wrap {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--border-light);
  margin-bottom: 20px;
}
.car-diagram-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-align: center; }
.car-svg-container { max-width: 280px; margin: 0 auto; }
.car-svg-container svg { width: 100%; height: auto; cursor: default; }
.car-zone {
  cursor: pointer;
  transition: opacity .15s;
}
.car-zone:hover > * { opacity: .8; }
.car-zone.selected > .zone-fill { fill: #00008F !important; opacity: 1 !important; }
.car-zone.selected > .zone-label { fill: #ffffff !important; }

.parts-section { margin-top: 16px; }
.parts-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }

/* ── TOGGLE ── */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { flex: 1; font-size: 15px; color: var(--text); }
.toggle-label small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.toggle {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 13px;
  transition: background var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }

/* ── CONDITIONAL FIELDS ── */
.conditional-block {
  background: var(--info-bg);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 20px;
  margin-top: 14px;
  display: none;
}
.conditional-block.visible { display: block; }

/* ── IMAGE UPLOAD ── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: #fafbff;
  position: relative;
}
.upload-area:hover, .upload-area.drag-over {
  border-color: var(--primary);
  background: #eff0ff;
}
.upload-icon { font-size: 36px; margin-bottom: 12px; }
.upload-title { font-size: 16px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.upload-sub   { font-size: 13px; color: var(--text-muted); }
.upload-input { display: none; }
.upload-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background var(--transition);
}
.upload-btn:hover { background: var(--primary-light); }

.upload-btn-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 4px;
}
.upload-btn-row .upload-btn { margin-top: 10px; }
.upload-btn-camera {
  background: var(--accent, #1a7f5e);
}
.upload-btn-camera:hover { background: var(--accent-light, #228b6e); }
@media (max-width: 480px) {
  .upload-btn-row { flex-direction: column; align-items: stretch; }
  .upload-btn-row .upload-btn { text-align: center; }
}

/* ── Foto-Analyse ── */
.btn-analyse-photos {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #1565C0 100%);
  color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 11px 22px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s;
}
.btn-analyse-photos:hover { opacity: .88; }
.btn-analyse-photos:disabled { opacity: .5; cursor: default; }
.analyse-icon { font-size: 1.1rem; }

.photo-analyse-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 16px; background: var(--card);
}
.photo-analyse-card h4 { font-size: .92rem; font-weight: 700; margin: 0 0 10px; color: var(--text); }
.analyse-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.badge-ok {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--success-bg); color: var(--success);
  border: 1px solid #b2dfdb; border-radius: 20px; padding: 3px 11px; font-size: .82rem; font-weight: 600;
}
.badge-missing {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--warning-bg); color: var(--warning);
  border: 1px solid #ffe0b2; border-radius: 20px; padding: 3px 11px; font-size: .82rem; font-weight: 600;
}
.analyse-hints { list-style: none; padding: 0; margin: 0; }
.analyse-hints li { display: flex; align-items: flex-start; gap: 7px; font-size: .88rem; color: var(--text); margin-bottom: 5px; }
.analyse-hints li::before { content: '→'; color: var(--primary); font-weight: 700; flex-shrink: 0; }

.analyse-block { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.analyse-sub   { font-size: .84rem; color: var(--text-muted); margin: 5px 0 0; line-height: 1.4; }

.schaetz-row    { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.schaetz-betrag { font-size: 1.35rem; font-weight: 800; }
.schaetz-konfidenz {
  font-size: .78rem; background: #f5f5f5; border: 1px solid #ddd;
  border-radius: 12px; padding: 2px 10px; color: #666;
}

.vs-badge {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 8px; padding: 7px 16px; font-weight: 700; font-size: .95rem; margin: 4px 0;
}
.vs-ok     { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.vs-warn   { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.vs-err    { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.vs-unklar { background: #f3f3f3; color: #555;    border: 1px solid #ccc; }

.analyse-disclaimer      { font-size: .75rem; color: #999; vertical-align: super; }
.analyse-disclaimer-text { font-size: .75rem; color: #999; margin: 12px 0 0; line-height: 1.4; border-top: 1px solid var(--border); padding-top: 8px; }

.weiter-hint-note {
  margin-top: 14px; padding: 10px 14px;
  background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius-sm);
  font-size: .88rem; color: #6d4c00; line-height: 1.4;
}

.analyse-required-hint {
  margin-top: 14px; padding: 10px 14px;
  background: #e8f0fe; border: 1px solid #aac4f7; border-radius: var(--radius-sm);
  font-size: .88rem; color: #1a3a6b; line-height: 1.4;
}

.upload-hints {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
}
@media (max-width: 500px) { .upload-hints { grid-template-columns: 1fr; } }
.upload-hint {
  background: var(--warning-bg);
  border: 1px solid #f9e4a8;
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}
.upload-hint-icon { font-size: 22px; margin-bottom: 6px; }
.upload-hint-text { font-size: 12px; color: #7a5c00; font-weight: 500; }

.image-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.image-preview {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--border-light);
  aspect-ratio: 1;
  background: #f3f4f6;
}
.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.image-preview-status {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.upload-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}
.upload-counter strong { color: var(--text); }
.upload-counter .min-req { color: var(--error); font-size: 12px; }
.upload-counter .min-ok  { color: var(--success); font-size: 12px; }

/* ── NAVIGATION BUTTONS ── */
.step-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (max-width: 500px) { .step-footer { padding: 16px 20px; } }

.btn-back {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 20px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-back:hover { border-color: var(--primary); color: var(--primary); }
.btn-back[disabled] { opacity: .4; cursor: not-allowed; }

.btn-next {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  margin-left: auto;
}
.btn-next:hover { background: var(--primary-light); }
.btn-next:disabled { opacity: .6; cursor: not-allowed; }

.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: var(--success);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  margin-left: auto;
}
.btn-submit:hover { background: #145a32; }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ── SUMMARY ── */
.summary-section { margin-bottom: 24px; }
.summary-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-light);
}
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table td {
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.summary-table td:first-child { width: 40%; color: var(--text-muted); font-weight: 500; padding-right: 12px; }
.summary-table td:last-child  { color: var(--text); font-weight: 500; }

/* ── SUCCESS SCREEN ── */
.success-screen { text-align: center; padding: 48px 32px; }
.success-icon-big { font-size: 64px; margin-bottom: 20px; }
.success-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.success-sub   { font-size: 15px; color: var(--text-muted); max-width: 420px; margin: 0 auto 28px; line-height: 1.7; }
.success-ref {
  display: inline-block;
  background: var(--info-bg);
  border: 1px solid #bdd7ff;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 1px;
  margin-bottom: 28px;
}
.success-info {
  max-width: 440px;
  margin: 0 auto 28px;
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 13px;
  color: #065f46;
  text-align: left;
}
.btn-new {
  padding: 13px 32px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-new:hover { background: var(--primary-light); }

/* ── ASSISTANT COLUMN ── */
.assistant-col { position: sticky; top: 90px; }
.assistant-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.assistant-figure {
  background: linear-gradient(180deg, #eff0ff 0%, #e0e3ff 100%);
  padding: 24px 20px 0;
  text-align: center;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.assistant-figure svg, .assistant-figure img {
  max-width: 160px;
  width: 100%;
  display: block;
  margin: 0 auto;
  animation: franziIdle 4s ease-in-out infinite;
  transform-origin: bottom center;
}
.assistant-figure img.franzi-nod,
.assistant-figure svg.franzi-nod {
  animation: franziNod 0.7s ease-in-out, franziIdle 4s ease-in-out 0.7s infinite;
}
.assistant-figure svg.franzi-happy-bounce {
  animation: franziHappy 0.9s ease-in-out, franziIdle 4s ease-in-out 0.9s infinite;
}
@keyframes franziIdle {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
@keyframes franziNod {
  0%   { transform: rotate(0deg) translateY(0); }
  20%  { transform: rotate(-5deg) translateY(-4px); }
  50%  { transform: rotate(4deg) translateY(-3px); }
  80%  { transform: rotate(-2deg) translateY(-1px); }
  100% { transform: rotate(0deg) translateY(0); }
}
@keyframes franziHappy {
  0%   { transform: translateY(0) scale(1); }
  25%  { transform: translateY(-10px) scale(1.04); }
  55%  { transform: translateY(-5px) scale(1.02); }
  80%  { transform: translateY(-8px) scale(1.03); }
  100% { transform: translateY(0) scale(1); }
}
/* Expression switching via SVG class */
#franzi-svg .expr-happy,
#franzi-svg .expr-concerned { display: none; }
#franzi-svg.mood-happy .expr-default  { display: none; }
#franzi-svg.mood-happy .expr-happy    { display: block; }
#franzi-svg.mood-concerned .expr-default  { display: none; }
#franzi-svg.mood-concerned .expr-concerned { display: block; }
.assistant-chat { padding: 18px 20px; }
.bubble {
  position: relative;
  background: var(--info-bg);
  border: 1px solid #bdd7ff;
  border-radius: 0 12px 12px 12px;
  padding: 13px 16px;
  font-size: 14px;
  color: #1e3a6e;
  line-height: 1.6;
  margin-bottom: 12px;
  transition: all .3s ease;
  animation: bubbleIn .3s ease;
}
.bubble::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -10px;
  border: 6px solid transparent;
  border-top: 6px solid #bdd7ff;
  border-right: 6px solid #bdd7ff;
}
.bubble.warning { background: var(--warning-bg); border-color: #f9e4a8; border-radius: 12px; color: #7a5c00; }
.bubble.error   { background: var(--error-bg);   border-color: #fecaca; border-radius: 12px; color: #991b1b; }
.bubble.success { background: var(--success-bg); border-color: #a7f3d0; border-radius: 12px; color: #065f46; }
@keyframes bubbleIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.assistant-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}
.ai-questions { margin-top: 10px; }
.ai-question {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.ai-question::before { content: '?'; color: var(--primary); font-weight: 700; flex-shrink: 0; font-size: 14px; }

.ai-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-top: 10px;
}
.ai-status-badge.vollstaendig      { background: var(--success-bg); color: var(--success); }
.ai-status-badge.teilweise         { background: var(--warning-bg); color: var(--warning); }
.ai-status-badge.rueckfrage        { background: var(--error-bg);   color: var(--error); }
.ai-status-badge.ungenuegend       { background: #f3f4f6; color: #6b7280; }

/* ── AI ANALYZING OVERLAY ── */
.ai-analyzing {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--info-bg);
  border-radius: var(--radius-sm);
  border: 1px solid #bdd7ff;
  font-size: 13px;
  color: var(--info);
  margin-bottom: 12px;
}
.ai-analyzing.visible { display: flex; }
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid #bdd7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SECTION DIVIDER ── */
.section-divider {
  margin: 24px 0 20px;
  border: none;
  border-top: 2px solid var(--border-light);
  position: relative;
}
.section-divider-label {
  position: absolute;
  top: -10px;
  left: 0;
  background: #fff;
  padding-right: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* ── DATENSCHUTZ ── */
.datenschutz-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}
.datenschutz-box:hover { border-color: var(--primary); }
.datenschutz-box input[type=checkbox] { display: none; }
.ds-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: #fff;
}
.datenschutz-box.checked .ds-checkbox {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.datenschutz-box.checked .ds-checkbox::after { content: '✓'; font-size: 13px; }
.datenschutz-label { font-size: 13px; color: var(--text); line-height: 1.5; }
.datenschutz-label a { color: var(--primary); }

/* ── LOADING OVERLAY ── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,143,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}
.loading-overlay.visible { display: flex; }
.loading-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.loading-spinner-big {
  width: 52px;
  height: 52px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 18px;
}
.loading-text { font-size: 16px; font-weight: 600; color: var(--text); }
.loading-sub  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.success { background: var(--success-bg); color: #065f46; border: 1px solid #a7f3d0; }
.toast.error   { background: var(--error-bg);   color: #991b1b;  border: 1px solid #fecaca; }
.toast.info    { background: var(--info-bg);     color: #1e3a6e;  border: 1px solid #bdd7ff; }
@keyframes slideIn { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }

/* ── RESPONSIVE FINAL ── */
@media (max-width: 400px) {
  body { font-size: 15px; }
  .option-cards { grid-template-columns: 1fr 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .btn-next, .btn-submit { padding: 11px 20px; font-size: 14px; }
}

/* ── FIELD HINT (soft non-blocking warning) ── */
.field-hint-msg {
  display: none;
  font-size: 12.5px;
  color: #92600A;
  background: #FFFBEA;
  border: 1px solid #F6D860;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 5px;
  line-height: 1.5;
}
.field-hint-msg.visible { display: block; }
.form-control.hint { border-color: #F6C000; }
.form-control.hint:focus { box-shadow: 0 0 0 3px rgba(246,192,0,.15); }

/* ── HERGANG HINWEIS-BOX ── */
.theft-optional-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFF8E1;
  border: 1.5px solid #F9A825;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #5D4037;
  font-weight: 500;
}

.hergang-hints {
  display: flex;
  gap: 12px;
  background: #F0F4FF;
  border: 1.5px solid #C0CAFF;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.hints-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.hints-content { flex: 1; min-width: 0; }
.hints-intro {
  font-size: 13.5px;
  font-weight: 600;
  color: #00008F;
  margin-bottom: 8px;
  line-height: 1.4;
}
.hints-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hints-list li {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.hints-list li strong { color: #00008F; }

/* ── AI IN-FORM RESULT BOXES ── */
.ai-form-result { margin-top: 14px; }

.ai-form-blocked {
  display: flex;
  gap: 12px;
  background: #FFF0F0;
  border: 1.5px solid #E53535;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.afb-icon { font-size: 22px; flex-shrink: 0; line-height: 1; }
.afb-body { flex: 1; font-size: 13.5px; color: #7A0000; line-height: 1.55; }
.afb-body strong { color: #C00; }
.afb-fragen {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.afb-fragen li { font-size: 13px; color: #7A0000; line-height: 1.5; }

.ai-form-ok {
  background: #F0FDF4;
  border: 1.5px solid #22C55E;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  color: #155724;
  font-weight: 600;
}
.ai-form-ok span { margin-right: 6px; }

.ai-form-warn {
  background: #FFFBEA;
  border: 1.5px solid #F6D860;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.afw-intro {
  font-size: 13.5px;
  font-weight: 600;
  color: #92600A;
  margin-bottom: 8px;
}
.ai-form-warn .afb-fragen li { color: #7A5A00; }

/* ── bubble error state ── */
.bubble.error {
  background: #FFF0F0;
  border-left: 4px solid #E53535;
  color: #7A0000;
}

/* ── MAP (Leaflet / OpenStreetMap) ── */
.schaden-map-group { padding-top: 6px; }
.map-section-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 13.5px;
  color: var(--text);
}
.map-section-label strong { font-size: 14px; }
.map-label-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}
#schaden-map {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  z-index: 1;
  background: #e8eef4;
}
@media (max-width: 640px) {
  #schaden-map { height: 220px; }
}

/* ── GPS BUTTON ── */
.btn-gps {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 10px;
  transition: background var(--transition), opacity var(--transition);
}
.btn-gps:hover { background: var(--primary-light); }
.btn-gps:disabled { opacity: .6; cursor: default; }
.btn-gps svg { flex-shrink: 0; }

/* ── AUTOCOMPLETE DROPDOWN ── */
.ac-dropdown {
  position: absolute;
  z-index: 800;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  margin-top: 2px;
  min-width: 200px;
  max-width: 100%;
  overflow: hidden;
}
.ac-item {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--bg); color: var(--primary); }
.form-group { position: relative; }

/* ── Spracheingabe ─────────────────────────────────────────────────── */
.speech-input-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.mic-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  background: #fff;
  border: 1.5px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.mic-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,143,.18);
}
.mic-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.mic-btn.recording {
  background: #fff0f0;
  border-color: #dc2626;
  color: #dc2626;
  animation: mic-pulse 1.3s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.3); }
  50%       { box-shadow: 0 0 0 7px rgba(220,38,38,0); }
}
.mic-btn svg { flex-shrink: 0; }
.mic-status {
  font-size: .82rem;
  color: #5a6380;
  font-style: italic;
}

/* ── Site Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  margin-top: 48px;
  border-top: 3px solid var(--accent);
}
.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-footer-brand {
  color: #fff;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .01em;
}
.site-footer-version {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.75);
  font-size: .7rem;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: .03em;
}
.site-footer-center {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
}
.site-footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-footer-links a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: color var(--transition);
}
.site-footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer-sep { color: rgba(255,255,255,.25); margin: 0 2px; }

@media (max-width: 600px) {
  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 14px 16px;
  }
}

