/* Einsatzbericht – Designsprache angelehnt an feuerwehr-gemuenden.de */

@font-face { font-family: "Outfit"; src: url("../fonts/Outfit-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0c1421;
  --navy-2: #16202f;
  --red: #d71f26;
  --red-hover: #b8181e;
  --red-text: #c41c22;
  --red-soft: #fde3e3;
  --red-tint: #fff6f6;
  --blue: #1d5bd8;
  --blue-soft: #e3ecfd;
  --amber-bg: #fff4de;
  --amber-text: #6b4200;
  --green-bg: #e2f6ea;
  --green-text: #1b6b3a;
  --bg: #eef0f3;
  --card: #ffffff;
  --text: #111827;
  --text-2: #1a2230;
  --muted: #5b6472;
  --line: #d3d8df;
  --line-soft: #e8ebef;
  --radius: 20px;
  --shadow: 0 1px 3px rgba(12, 20, 33, .08);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Outfit", "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 16px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
a { color: var(--red-text); }
a:hover { color: #a8151b; }
h1, h2, h3, .h { font-family: var(--display); }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid rgba(29, 91, 216, .45); outline-offset: 2px; }

/* ---------- Formularelemente ---------- */
.lbl { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--text-2); margin-bottom: 6px; }
.req { color: var(--red-text); }
.hint { font-size: 13px; color: var(--muted); line-height: 1.4; }
.inp {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px;
  border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  font-size: 16px; font-weight: 500; color: var(--text); background: #fff;
}
.inp:focus, .inp:focus-within { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
textarea.inp { padding: 12px 14px; resize: vertical; line-height: 1.45; min-height: 96px; }
select.inp { appearance: auto; }
input[type="date"].inp, input[type="time"].inp { min-width: 0; }
.inp.error { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.field { display: flex; flex-direction: column; }
.field + .field { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--red); margin: 0; flex-shrink: 0; }

.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 0;
  font-family: var(--display); font-weight: 600; font-size: 16px; text-decoration: none; white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-p { background: var(--red); color: #fff; }
.btn-p:hover { background: var(--red-hover); color: #fff; }
.btn-p:disabled { background: #e58d90; cursor: not-allowed; }
.btn-g { background: #fff; color: var(--text-2); border: 1px solid var(--line); }
.btn-g:hover { background: #f5f6f8; color: var(--text-2); }
.btn-d { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-d:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.btn-danger { background: #fff; color: var(--red-text); border: 1px solid #f0b9bb; }
.btn-danger:hover { background: var(--red-tint); color: var(--red-text); }
.btn-s { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--red-text); font-weight: 600; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; min-height: 32px; }

.chip {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 18px;
  border: 1px solid var(--line); background: #fff; font-size: 14px; font-weight: 500; color: var(--text-2);
}
.chip:hover { border-color: #aab2bd; }
.chip.dashed { border-style: dashed; border-color: #b9c0ca; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px;
  font-family: var(--display); font-weight: 700; font-size: 12px; color: #fff; white-space: nowrap; vertical-align: 1px;
}
.cat-brand { background: var(--red); }
.cat-hilfe { background: var(--blue); }
.cat-sonstiges { background: #4b5563; }
.vtag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 4px; }
.st-neu { background: var(--red-soft); color: #a8151b; } .st-neu .dot { background: var(--red); }
.st-gesichtet { background: var(--amber-bg); color: #7a4b00; } .st-gesichtet .dot { background: #e0a100; }
.st-florix { background: var(--green-bg); color: var(--green-text); }
.tag-ft { font-size: 12px; font-weight: 600; color: #7a4b00; background: var(--amber-bg); border-radius: 8px; padding: 1px 8px; white-space: nowrap; }
.strength { background: var(--navy); color: #fff; border-radius: 8px; padding: 3px 9px; font-family: var(--display); font-weight: 700; font-size: 13px; white-space: nowrap; }

.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.4; }
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-warn { background: var(--amber-bg); color: var(--amber-text); }
.alert-err { background: var(--red-soft); color: #8e1217; }
.alert-ok { background: var(--green-bg); color: var(--green-text); }
.alert-info { background: var(--blue-soft); color: #173f94; }

.logo { display: block; background: #fff; flex-shrink: 0; object-fit: contain; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  font-weight: 500; max-width: calc(100% - 32px);
}
.toast.err { background: #8e1217; }

/* =========================================================
   Wizard (Smartphone zuerst)
   ========================================================= */
.wz { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); }
/* Kompakter Kopf: Logo links, rechts drei Zeilen – Titel+Schritt, Einsatzdaten, Fortschritt */
.wz-head { background: var(--navy); padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; position: sticky; top: 0; z-index: 20; }
.wz-head .row { display: flex; align-items: center; gap: 12px; }
.wz-head .logo { width: 48px; height: 48px; border-radius: 10px; }
.wz-head .title { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wz-head .t1 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wz-head .t1 b { font-family: var(--display); color: #fff; font-weight: 700; font-size: 16px; line-height: 1.15; white-space: nowrap; }
.wz-head .t1 small { color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.wz-head .t2 { color: #9aa3b0; font-size: 12.5px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; color: #c9ced6; border-radius: 12px; background: transparent; border: 0; flex-shrink: 0; }
.iconbtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.wz-head .iconbtn { width: 40px; height: 40px; align-self: center; }
.progress { display: flex; gap: 3px; margin-top: 3px; }
.progress span { flex-grow: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.progress span.on { background: #e3262b; }

/* Tastatur offen: Fußleiste ausblenden, Platz zum Hochscrollen schaffen */
body.kb-open .wz-foot { display: none; }
.kb-spacer { height: 70vh; flex-shrink: 0; }

.wz-body { padding: 22px 16px 28px; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
.wz-title { margin: 0 4px; }
.wz-title h2 { font-size: 26px; font-weight: 700; }
.wz-title p { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.wz-foot { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e1e5ea; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); display: flex; gap: 10px; z-index: 15; }
.wz-foot .btn { min-height: 52px; font-size: 17px; }
.wz-foot .back { width: 112px; }
.wz-foot .next { flex-grow: 1; }

/* Start */
.hero { background: var(--navy); padding: calc(24px + env(safe-area-inset-top)) 20px 60px; display: flex; align-items: center; gap: 14px; }
.hero .logo { width: 64px; height: 64px; border-radius: 14px; }
.hero-tx { min-width: 0; flex: 1 1 auto; }
/* Schriftgröße folgt der Bildschirmbreite, damit „EINSATZBERICHT“ auch auf schmalen Handys passt */
.hero h1 { font-size: clamp(19px, 6.2vw, 30px); font-weight: 800; color: #fff; letter-spacing: -0.01em; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.hero p { margin: 4px 0 0; color: #c9ced6; font-size: 13px; line-height: 1.3; }
.hero p:empty { display: none; }
.hero-body { margin: -40px 16px 0; display: flex; flex-direction: column; gap: 12px; padding-bottom: 24px; }
.pin-inp { letter-spacing: .4em; font-size: 22px; }
.draft { display: flex; gap: 14px; align-items: center; padding: 14px 16px; text-decoration: none; color: var(--text); border: 0; width: 100%; text-align: left; }
.draft .ic { width: 40px; height: 40px; border-radius: 12px; background: #fdecec; color: var(--red); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.draft .tx { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.draft .tx b { font-weight: 600; font-size: 16px; }

/* Fahrzeugauswahl */
.veh { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); cursor: pointer; border: 2px solid transparent; }
.veh.on { border-color: var(--red); background: var(--red-tint); }
.veh input { width: 24px; height: 24px; accent-color: var(--red); margin: 0; flex-shrink: 0; }
.veh .tx { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.veh .tx b { font-family: var(--display); font-size: 22px; font-weight: 700; }
.info-line { display: flex; align-items: center; gap: 10px; margin: 4px 4px 0; font-size: 14px; color: var(--text-2); }

/* Fahrzeugschritt */
.veh-head { margin: 0 4px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.veh-head h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.veh-head .sub { font-size: 15px; color: var(--muted); margin-top: 4px; }
.stbox { background: var(--navy); color: #fff; border-radius: 14px; padding: 8px 14px; text-align: right; flex-shrink: 0; }
.stbox small { display: block; font-size: 11px; color: #9aa3b0; text-transform: uppercase; letter-spacing: .08em; }
.stbox b { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; }
.sec-head h3 { font-size: 19px; font-weight: 700; }
.slots { display: flex; flex-direction: column; gap: 14px; }

/* Personenauswahl */
.pp { position: relative; }
.pp-sel { padding: 0 6px 0 8px; gap: 10px; }
.av { width: 32px; height: 32px; border-radius: 16px; background: var(--bg); color: var(--text-2); font-family: var(--display); font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.av.ft { background: var(--amber-bg); color: #7a4b00; }
.pp-sel .nm { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm { width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rm:hover { background: var(--bg); color: var(--text); }
.pp-input { padding-left: 12px; }
.pp-input input { border: 0; outline: none; font-size: 16px; font-weight: 500; flex-grow: 1; min-width: 0; background: transparent; height: 46px; }
.pp-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border-radius: 16px;
  box-shadow: 0 12px 32px rgba(12, 20, 33, .22), 0 0 0 1px rgba(12, 20, 33, .06); padding: 8px;
  display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto;
}
.pp-list .hd { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 12px 4px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; font-size: 16px; font-weight: 500; color: var(--text); text-align: left; }
.opt:hover, .opt.act { background: #f1f3f6; }
.opt:disabled { color: #8a929e; cursor: not-allowed; background: transparent; }
.opt .t { flex-grow: 1; }
.opt .used { font-size: 12px; font-weight: 600; background: var(--bg); color: #4b5563; border-radius: 8px; padding: 2px 8px; }
.opt.free { color: var(--red-text); font-weight: 600; }
.pp-list .sep { height: 1px; background: #e5e8ec; margin: 4px 8px; }
.add-seat { min-height: 48px; border-radius: 12px; border: 1px dashed #b9c0ca; background: #fff; font-size: 15px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Zusammenfassung */
.sum-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.sum-head .l { display: flex; align-items: center; gap: 10px; }
.sum-head h3 { font-size: 18px; font-weight: 700; }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.kv .k { font-size: 13px; color: var(--muted); }
.kv .v { font-size: 15px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }

/* Fertig */
.done { flex-grow: 1; background: var(--navy); padding: 0 24px 28px; display: flex; flex-direction: column; }
.done .c { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; padding: 40px 0; }
.done .ok { width: 96px; height: 96px; border-radius: 48px; background: rgba(74, 222, 128, .14); display: flex; align-items: center; justify-content: center; }
.done h1 { font-size: 34px; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.05; }
.done p { margin: 0; font-size: 16px; color: #c9ced6; line-height: 1.5; }
.done .facts { width: 100%; margin-top: 10px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); padding: 16px 18px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; text-align: left; }
.done .facts small { display: block; font-size: 12px; color: #9aa3b0; }
.done .facts b { font-size: 15px; font-weight: 600; color: #fff; }
.done .acts { display: flex; flex-direction: column; gap: 10px; }

.loading { padding: 60px 20px; text-align: center; color: var(--muted); }

/* =========================================================
   Admin
   ========================================================= */
.adm { display: flex; min-height: 100vh; }
.side { width: 256px; flex-shrink: 0; background: var(--navy); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 20px; }
.side .brand .logo { width: 64px; height: 64px; border-radius: 14px; }
.side .brand b { display: block; color: #fff; font-family: var(--display); font-weight: 700; font-size: 18px; line-height: 1.1; }
.side .brand span { color: #8b93a1; font-size: 13px; }
.nav { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 12px; color: #c9ced6; text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 16px; }
.nav:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav.on { background: var(--red); color: #fff; }
.nav .cnt { margin-left: auto; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; font-family: var(--font); }
.nav.on .cnt { background: #fff; color: var(--red-text); }
.side .sec { font-size: 12px; color: #8b93a1; text-transform: uppercase; letter-spacing: .08em; padding: 20px 14px 6px; }
.side .foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .1); padding: 16px 14px 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #c9ced6; }
.side .foot a, .side .foot button { color: #fff; font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; text-align: left; }
.main { flex-grow: 1; padding: 36px 40px 48px; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.page-head p { font-size: 16px; color: var(--muted); margin: 4px 0 0; }
.page-head .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.acard { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 28px 32px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.acard h2 { font-size: 22px; font-weight: 700; }
.topbar { display: none; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 20px 24px; display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); }
.stat .ic { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat b { display: block; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.stat span { font-size: 14px; color: var(--muted); }

.filters { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.filters .inp { width: 300px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 0; background: transparent; font-size: 15px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.seg button .n { font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--red); color: #fff; }
.seg button.on .n { color: #fff; }
.seg.light button.on { background: #fff; color: var(--text-2); box-shadow: 0 1px 3px rgba(12,20,33,.15); }

.th { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.rtable .row { display: grid; grid-template-columns: 124px minmax(0, 1fr) 170px 56px 140px 124px 20px; gap: 16px; align-items: center; padding: 16px 12px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--text); }
.rtable .row.head { border-top: 0; padding-top: 0; }
.rtable a.row:hover { background: #fafbfc; color: var(--text); }
.rtable .date b { display: block; font-family: var(--display); font-weight: 700; color: var(--red-text); font-size: 16px; }
.rtable .date span { font-size: 13px; color: var(--muted); white-space: nowrap; }
.rtable .tl { display: block; font-weight: 600; font-size: 16px; line-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtable .tl .badge { margin-right: 10px; }
.rtable .sub { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtable .vs { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { padding: 40px 12px; text-align: center; color: var(--muted); }

.two { display: flex; gap: 24px; align-items: flex-start; }
.two > .grow { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.two > .aside { width: 340px; flex-shrink: 0; display: flex; flex-direction: column; gap: 20px; }
.kv4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kvk { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.kvv { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.subh { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.ptext { font-size: 16px; line-height: 1.55; color: var(--text-2); margin: 0; white-space: pre-wrap; }
.crew { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #e3e6ea; border-radius: 14px; overflow: hidden; }
.crew .cc { padding: 12px 16px; border-top: 1px solid #e3e6ea; display: flex; flex-direction: column; gap: 2px; }
.crew .cc:nth-child(-n+2) { border-top: 0; }
.crew .cc:nth-child(odd) { border-right: 1px solid #e3e6ea; }
.vh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vh h2 { font-size: 22px; }
.vh .strength { margin-left: auto; font-size: 14px; padding: 4px 10px; }
.radio-opt { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; font-weight: 500; cursor: pointer; }
.radio-opt.on { border: 2px solid var(--red); background: var(--red-tint); }
.radio-opt input { accent-color: var(--red); margin: 0; }
.timeline { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.timeline .ev { display: flex; gap: 12px; }
.timeline .ev i { width: 10px; height: 10px; border-radius: 5px; background: #8a929e; margin-top: 5px; flex-shrink: 0; }
.timeline .ev:first-child i { background: var(--red); }
.timeline .ev small { display: block; color: var(--muted); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.breadcrumb a { text-decoration: none; font-weight: 600; }

.ptable .row { display: grid; grid-template-columns: minmax(0, 1fr) 84px 76px 100px 44px; gap: 16px; align-items: center; padding: 10px 8px; border-top: 1px solid var(--line-soft); font-size: 15px; }
.ptable .row.head { border-top: 0; }
.ptable .row.inactive { color: #6b7380; }
.nm-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; min-width: 0; }
.nm-cell .nmx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nm-cell .nmx > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-cell .als { display: flex; gap: 4px; flex-wrap: wrap; font-weight: 500; }
.tag { font-size: 12px; font-weight: 600; background: var(--bg); color: var(--text-2); border-radius: 8px; padding: 2px 8px; }
.ic-btn { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.ic-btn:hover { background: var(--bg); color: var(--text); }
.ic-btn:disabled { opacity: .35; cursor: default; background: transparent; }
.ft-item { border: 1px solid #e3e6ea; border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ft-item .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ft-item .top b { font-size: 16px; }
.ft-item .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sugg { font-size: 13px; color: var(--blue); font-weight: 600; }
.editrow { background: #fafbfc; border-radius: 16px; padding: 16px; border: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 14px; }

.vlist { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; }
.vitem { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 12px 12px 16px; border-radius: 16px; border: 1px solid #e3e6ea; background: #fff; text-align: left; }
.vitem.on { border: 2px solid var(--red); background: var(--red-tint); }
.vitem .tx { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.vitem .tx b { font-family: var(--display); font-size: 18px; font-weight: 700; }
.vitem .tx span { font-size: 13px; color: var(--muted); }
.vitem .ord { display: flex; flex-direction: column; }
.vitem .ord .ic-btn { width: 32px; height: 26px; }
.prow { display: grid; grid-template-columns: 64px minmax(0, 1fr) 130px 110px 44px; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.prow.head { border-top: 0; }
.prow .mv { display: flex; }
.prow .mv .ic-btn { width: 32px; }
.cb { width: 20px; height: 20px; accent-color: var(--red); margin: 0; }
.preview { background: var(--navy); color: #fff; border-radius: 16px; padding: 16px 20px; display: flex; align-items: center; gap: 16px; }
.preview small { display: block; font-size: 12px; color: #9aa3b0; text-transform: uppercase; letter-spacing: .08em; }
.preview b { font-family: var(--display); font-size: 24px; font-weight: 700; }
.settings { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.settings > div { display: flex; flex-direction: column; gap: 24px; }
.rc-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 7px 8px; min-height: 50px; background: #fff; }
.rc-box input { border: 0; outline: none; font-size: 15px; flex-grow: 1; min-width: 180px; height: 34px; }
.rc { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 12px; border-radius: 17px; background: var(--bg); font-size: 14px; font-weight: 500; }
.rc button { width: 26px; height: 26px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.kwrow { display: grid; grid-template-columns: 88px minmax(0, 1fr) 128px 32px 32px 32px; gap: 6px; align-items: center; }
.kwrow .ic-btn { width: 32px; }
.kwrow .inp { min-height: 40px; font-size: 14px; padding: 0 10px; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--navy); }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.login-card .brand { display: flex; align-items: center; gap: 14px; }
.login-card .brand .logo { width: 64px; height: 64px; border-radius: 14px; border: 1px solid var(--line-soft); }
.login-card h1 { font-size: 26px; font-weight: 800; }

@media (max-width: 1100px) {
  .rtable .row { grid-template-columns: 120px minmax(0, 1fr) 150px 110px 20px; }
  .rtable .c-crew, .rtable .c-author { display: none; }
  .two { flex-direction: column; }
  .two > .aside { width: 100%; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .kv4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .adm { flex-direction: column; }
  .side { display: none; width: 100%; height: auto; position: static; }
  .side.open { display: flex; }
  .topbar { display: flex; align-items: center; gap: 12px; background: var(--navy); padding: 12px 16px; position: sticky; top: 0; z-index: 20; }
  .topbar .logo { width: 44px; height: 44px; border-radius: 10px; }
  .topbar b { color: #fff; font-family: var(--display); font-size: 18px; flex-grow: 1; }
  .main { padding: 20px 16px 40px; gap: 18px; }
  .page-head h1 { font-size: 30px; }
  .acard { padding: 20px; border-radius: 20px; }
  .stats { grid-template-columns: 1fr; gap: 10px; }
  .stat { padding: 14px 18px; border-radius: 18px; }
  .filters .inp { width: 100%; }
  .rtable .row.head { display: none; }
  .rtable .row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 4px; }
  .rtable .c-veh, .rtable .c-chev { display: none; }
  .rtable .date { grid-column: 1; grid-row: 1; display: flex; gap: 8px; align-items: baseline; }
  .rtable .c-status { grid-column: 2; grid-row: 1; }
  .rtable .c-main { grid-column: 1 / -1; }
  .ptable .row { grid-template-columns: minmax(0, 1fr) 76px 44px; }
  .ptable .c-count, .ptable .c-last { display: none; }
  .vflex { flex-direction: column; }
  .vlist { width: 100%; }
  .prow { grid-template-columns: 30px minmax(0, 1fr) 46px 46px 36px; gap: 6px; }
  .prow .inp { padding: 0 10px; }
  .filters select.inp { margin-left: 0 !important; width: 100% !important; }
  .seg { width: 100%; }
  .prow .mv { flex-direction: column; }
  .prow .mv .ic-btn { height: 22px; }
  .prow .th { font-size: 10px; letter-spacing: 0; }
  .kv4, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .crew { grid-template-columns: minmax(0, 1fr); }
  .crew .cc { border-right: 0 !important; border-top: 1px solid #e3e6ea !important; }
  .crew .cc:first-child { border-top: 0 !important; }
  .kwrow { grid-template-columns: 80px minmax(0, 1fr) 36px; }
  .kwrow .c-cat, .kwrow .c-up, .kwrow .c-down { display: none; }
}
@media print {
  .side, .topbar, .page-head .acts, .aside { display: none !important; }
}
