/* dieVersicherungsberater – Schadenservice. Bestehendes Design (dunkelblau, hell, sachlich) weitergeführt. */
:root {
  --navy: #173b53; --blue: #146e96; --blue-2: #0f5a7b; --bg: #f1f5f7; --line: #dbe4e9; --muted: #526773; --ink: #172e3b;
  --ok-bg: #e8f5ef; --ok: #185a43; --warn-bg: #fff5da; --warn: #66480d; --err-bg: #fdecec; --err: #ac2929; --info-bg: #eaf5fa; --info: #174e68;
  --radius: 14px; --shadow: 0 6px 24px #173b530d;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
[hidden] { display: none !important; }
a { color: var(--blue); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

header.top { background: var(--navy); color: #fff; padding: 16px max(16px, calc((100vw - 980px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 750; font-size: 21px; letter-spacing: -.5px; }
.brand-sub { font-size: 13px; color: #c4e0ea; }
header.top nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
.testbar { background: var(--warn-bg); border: 1px solid #e8d39b; border-radius: 10px; padding: 9px 13px; font-size: 13px; color: var(--warn); margin-bottom: 14px; }
footer.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 16px 28px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 4vw, 30px); box-shadow: var(--shadow); margin-bottom: 16px; }
h1, h2, h3, p { margin: 0 0 12px; }
h1 { font-size: clamp(23px, 4.4vw, 32px); line-height: 1.2; letter-spacing: -.5px; }
h2 { font-size: 20px; margin-top: 8px; }
h3 { font-size: 16.5px; margin-top: 18px; }
p, .muted { color: var(--muted); }
small, .small:not(button):not(.btn) { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; font-weight: 800; color: var(--blue); margin-bottom: 4px; }

button, .btn { font: inherit; font-weight: 650; cursor: pointer; border: 0; border-radius: 10px; padding: 12px 18px; background: var(--blue); color: #fff; min-height: 46px; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .btn:hover { background: var(--blue-2); }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .chip input:focus-visible + span { outline: 3px solid #56a8cb; outline-offset: 2px; }
button:disabled { opacity: .55; cursor: not-allowed; }
button.alt, .btn.alt { background: #fff; color: var(--navy) !important; border: 1px solid #b9cad3; }
button.alt:hover, .btn.alt:hover { background: #f4f8fa; }
button.danger { background: var(--err); }
button.small, .btn.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
button.link { background: none; color: var(--blue); padding: 4px; min-height: 0; text-decoration: underline; font-weight: 600; }
header.top button.navbtn { background: #ffffff18; color: #fff; border: 1px solid #ffffff50; min-height: 38px; padding: 6px 12px; font-size: 14px; }

.progress { height: 6px; border-radius: 10px; background: #dce7eb; overflow: hidden; margin: 8px 0 22px; }
.progress > div { height: 100%; background: var(--blue); transition: width .25s; }
.stepinfo { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); gap: 10px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; min-width: 0; }
.field.half { grid-column: auto; }
.field > label, .field > .label { font-weight: 650; font-size: 14.5px; }
.req { color: var(--err); margin-left: 2px; }
.help { font-size: 13px; color: var(--muted); margin-top: -2px; }
.field-error { color: var(--err); font-size: 13.5px; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { width: 100%; border: 1px solid #b4c6cf; border-radius: 9px; padding: 11px 12px; font: inherit; color: var(--ink); background: #fff; min-height: 48px; }
textarea { min-height: 110px; resize: vertical; }
[aria-invalid=true] { border-color: var(--err) !important; background: #fffafa !important; }
.section-title { grid-column: 1 / -1; font-size: 15px; font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--line); padding-bottom: 4px; margin-top: 14px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 9px 14px; border: 1px solid #b4c6cf; border-radius: 10px; background: #fff; cursor: pointer; font-size: 15px; user-select: none; }
.chip input:checked + span { background: #e3f2f9; border: 2px solid var(--blue); color: var(--navy); font-weight: 650; padding: 8px 13px; }
.chip input:checked + span::before { content: "✓ "; margin-right: 3px; }

.kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.kind { background: #fff; color: var(--ink); border: 1px solid var(--line); text-align: left; min-height: 92px; padding: 13px; flex-direction: column; align-items: flex-start; justify-content: flex-start; font-size: 15.5px; }
.kind:hover { background: #f6fafc; }
.kind .ic { font-size: 24px; line-height: 1; margin-bottom: 6px; }
.kind small { font-weight: 450; font-size: 12.5px; margin-top: 3px; }
.kind[aria-pressed=true] { border: 2px solid var(--blue); background: #e8f5fb; color: var(--navy); }

.notice { background: var(--info-bg); color: var(--info); padding: 12px 14px; border-radius: 10px; font-size: 14.5px; margin: 12px 0; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.err { background: var(--err-bg); color: var(--err); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.errorbox { background: var(--err-bg); color: var(--err); border-radius: 10px; padding: 12px 14px; font-weight: 600; margin: 12px 0; }
.errorbox ul { margin: 6px 0 0 18px; padding: 0; font-weight: 500; }

.actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.summary { margin: 6px 0 14px; }
.summary h3 { margin: 16px 0 6px; font-size: 15px; color: var(--navy); }
.kv { display: grid; grid-template-columns: minmax(120px, 1fr) 1.6fr; font-size: 14px; border-top: 1px solid var(--line); }
.kv > div { border-bottom: 1px solid var(--line); padding: 7px 6px; overflow-wrap: anywhere; white-space: pre-wrap; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { font-weight: 550; }

.uploads { display: grid; gap: 12px; margin-top: 10px; }
.upcat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.upcat-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.upcat-head b { font-size: 15px; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; background: #e6f1f7; color: #235875; vertical-align: middle; }
.badge.red { background: var(--err-bg); color: var(--err); }
.badge.amber { background: var(--warn-bg); color: var(--warn); }
.badge.green { background: var(--ok-bg); color: var(--ok); }
.filelist { list-style: none; margin: 8px 0 0; padding: 0; }
.filelist li { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }

.sigbox { margin: 10px 0 4px; }
.sigpad { width: 100%; height: 180px; border: 2px dashed #9db1bc; border-radius: 12px; background: #fff; touch-action: none; display: block; }
.sigpad.signed { border-style: solid; border-color: var(--blue); }
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.doc { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin: 10px 0; }
.check input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--blue); }
.decl { background: #f7fafb; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--ink); }
.decl p { color: var(--ink); margin-bottom: 8px; }
.success { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: 18px; margin: 14px 0; font-size: 16px; }
.ref { font-size: 24px; font-weight: 800; letter-spacing: 1px; color: var(--navy); }

/* Manager */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
.metric { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px; text-align: left; color: var(--ink); min-height: 0; display: block; font-weight: 500; }
.metric b { display: block; font-size: 26px; color: var(--navy); }
.metric:hover { background: #f6fafc; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; margin-bottom: 8px; }
.cases { list-style: none; margin: 0; padding: 0; }
.case { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding: 13px 2px; }
.case-main { min-width: 0; }
.case-main b { overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.issues li { margin: 4px 0; }
.sigimg { max-width: 260px; width: 100%; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.audit { font-size: 13px; max-height: 320px; overflow: auto; }
.audit div { border-bottom: 1px solid var(--line); padding: 5px 0; }
.linkbox { background: #f4f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 10px; overflow-wrap: anywhere; font-size: 13.5px; }
details summary { cursor: pointer; font-weight: 650; color: var(--navy); padding: 6px 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button[aria-selected=true] { background: var(--navy); }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px; z-index: 50; box-shadow: var(--shadow); max-width: 92vw; }

@media (max-width: 640px) {
  main { padding: 12px; }
  .fields { grid-template-columns: 1fr; }
  .field.half { grid-column: 1 / -1; }
  .kinds { grid-template-columns: repeat(2, 1fr); }
  .docs, .grid2, .filters { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .kv { grid-template-columns: 1fr 1.3fr; }
  .actions button { flex: 1 1 auto; }
  .case { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
