:root {
  color-scheme: light;
  --wine: #a51f20;
  --wine-dark: #7d1116;
  --navy: #18334b;
  --gold: #d5a66d;
  --ink: #17202a;
  --muted: #66717c;
  --line: #dedbd6;
  --paper: #f6f4f1;
  --surface: #ffffff;
  --success: #19725c;
  --danger: #a22f3d;
  --shadow: 0 18px 55px rgba(35, 26, 28, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(24, 51, 75, .24); outline-offset: 2px; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; padding-bottom: 88px; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: max(14px, env(safe-area-inset-top)) 20px 14px; color: var(--wine); background: rgba(255, 255, 255, .96); border-bottom: 1px solid rgba(165, 31, 32, .14); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; flex: 0 0 auto; border: 0; border-radius: 50%; background: white; }
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }
.brand-copy { min-width: 0; }
.brand-copy strong, .brand-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 15px; letter-spacing: .05em; }
.brand-copy span { margin-top: 2px; font-size: 12px; color: var(--muted); }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 13px; color: inherit; background: #f7ecec; }
.icon-btn svg { width: 21px; height: 21px; }
.main { width: min(1120px, 100%); margin: 0 auto; padding: 22px 18px 36px; }
.eyebrow { margin: 0 0 5px; color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(29px, 7vw, 48px); line-height: 1.03; letter-spacing: -.025em; }
h2 { margin-bottom: 8px; font-size: 22px; }
h3 { margin-bottom: 5px; font-size: 17px; }
.subtle { color: var(--muted); line-height: 1.55; }
.offline-pill, .secure-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 8px 11px; font-size: 13px; font-weight: 700; }
.offline-pill { color: #0d5d49; background: #def2eb; }
.offline-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #1b8c6d; }
.secure-pill { color: #593b18; background: #f4e7d5; }
.summary-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 20px 0; }
.metric { padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.metric strong { display: block; font-size: 24px; font-family: Georgia, serif; }
.metric span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.search-wrap { position: relative; margin: 16px 0 12px; }
.search-wrap svg { position: absolute; left: 15px; top: 50%; width: 20px; height: 20px; color: #74808b; transform: translateY(-50%); }
.search { width: 100%; height: 54px; padding: 0 16px 0 46px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: white; font-size: 16px; box-shadow: 0 7px 24px rgba(27,33,40,.04); }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 10px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: #4f5964; background: white; font-size: 14px; font-weight: 700; }
.chip.active { border-color: var(--navy); color: white; background: var(--navy); }
.list-label { display: flex; align-items: baseline; justify-content: space-between; margin: 14px 2px 10px; }
.list-label strong { font-size: 15px; }
.list-label span { color: var(--muted); font-size: 13px; }
.passenger-list { display: grid; gap: 10px; }
.passenger-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 13px; width: 100%; padding: 15px; border: 1px solid var(--line); border-radius: 19px; color: var(--ink); text-align: left; background: white; box-shadow: 0 8px 25px rgba(24, 28, 33, .035); }
.avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: white; background: var(--wine); font-family: Georgia, serif; font-weight: 700; }
.passenger-meta strong, .passenger-meta span { display: block; }
.passenger-meta strong { font-size: 16px; }
.passenger-meta span { margin-top: 4px; color: var(--muted); font-size: 13px; }
.chevron { color: #9aa1a7; font-size: 22px; }
.empty { padding: 34px 20px; border: 1px dashed #c9c5bf; border-radius: 20px; color: var(--muted); text-align: center; }
.bottom-nav { position: fixed; z-index: 12; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); width: min(460px, calc(100% - 24px)); padding: 7px; border: 1px solid rgba(100, 27, 46, .12); border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 14px 45px rgba(43, 21, 28, .18); backdrop-filter: blur(14px); transform: translateX(-50%); }
.nav-btn { display: grid; place-items: center; gap: 3px; min-height: 52px; border: 0; border-radius: 16px; color: #79818a; background: transparent; font-size: 11px; font-weight: 700; }
.nav-btn svg { width: 21px; height: 21px; }
.nav-btn.active { color: var(--wine); background: #f6ebee; }
.control-list { display: grid; gap: 10px; margin-top: 18px; }
.check-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.check-row input { width: 24px; height: 24px; accent-color: var(--success); }
.check-row.checked { border-color: #acd3c7; background: #f1faf7; }
.checkpoint-select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: white; font-size: 15px; }
.progress-card { padding: 18px; border-radius: 21px; color: white; background: var(--navy); }
.progress-line { height: 9px; margin-top: 14px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.18); }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--gold); transition: width .25s ease; }
.security-grid { display: grid; gap: 12px; margin-top: 18px; }
.security-card { padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: white; }
.security-card p { margin-bottom: 15px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.primary, .secondary, .danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 17px; border-radius: 14px; font-weight: 800; }
.primary { border: 1px solid var(--wine); color: white; background: var(--wine); }
.secondary { border: 1px solid var(--line); color: var(--ink); background: white; }
.danger-btn { border: 1px solid #e3b8bd; color: var(--danger); background: #fff7f8; }
.wide { width: 100%; }
.lock-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 88% 9%, rgba(213,166,109,.22), transparent 34%), linear-gradient(155deg, #f8f6f3 0%, #eee9e6 100%); }
.lock-card { width: min(470px, 100%); overflow: hidden; border: 1px solid rgba(100,27,46,.12); border-radius: 29px; background: rgba(255,255,255,.93); box-shadow: var(--shadow); }
.lock-banner { min-height: 138px; padding: 28px 26px 24px; color: var(--ink); background: radial-gradient(circle at 92% 8%, rgba(172,35,33,.11), transparent 42%), #fff; border-bottom: 1px solid rgba(165,31,32,.12); }
.lock-logo { display: flex; align-items: center; gap: 12px; }
.lock-wordmark { display: block; width: min(295px, 88%); height: 54px; object-fit: cover; object-position: center; }
.lock-banner p { margin: 16px 0 0; max-width: 330px; color: var(--muted); line-height: 1.5; }
.lock-body { padding: 24px; }
.lock-body h1 { font-size: 30px; }
.field-label { display: block; margin: 18px 0 7px; font-size: 14px; font-weight: 800; }
.password-field { width: 100%; height: 51px; padding: 0 14px; border: 1px solid var(--line); border-radius: 14px; background: white; font-size: 17px; }
.button-stack { display: grid; gap: 10px; margin-top: 16px; }
.tiny-note { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; text-align: center; }
.sheet-dialog, .action-dialog { width: min(680px, calc(100% - 20px)); max-height: calc(100vh - 24px); padding: 0; border: 0; border-radius: 26px; color: var(--ink); background: white; box-shadow: var(--shadow); }
.sheet-dialog::backdrop, .action-dialog::backdrop { background: rgba(19, 20, 24, .58); backdrop-filter: blur(3px); }
.sheet-inner { padding: 22px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.sheet-title { display: flex; align-items: center; gap: 13px; }
.sheet-title .avatar { width: 50px; height: 50px; }
.info-section { padding: 19px 0; border-bottom: 1px solid var(--line); }
.info-section:last-child { border-bottom: 0; }
.info-section h3 { margin-bottom: 12px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.info-item { min-width: 0; padding: 13px; border-radius: 14px; background: #f7f6f4; }
.info-item span, .info-item strong { display: block; overflow-wrap: anywhere; }
.info-item span { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.info-item strong { font-size: 15px; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.doc-btn { min-height: 78px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; text-align: left; color: var(--ink); background: white; }
.doc-btn strong, .doc-btn span { display: block; }
.doc-btn span { margin-top: 5px; color: var(--muted); font-size: 12px; }
.warning-box { padding: 14px; border: 1px solid #e8c99f; border-radius: 15px; color: #6a461d; background: #fff8ed; line-height: 1.5; }
.action-inner { padding: 24px; }
.action-inner h2 { font-family: Georgia, serif; font-size: 25px; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.toast { position: fixed; z-index: 30; left: 50%; bottom: 102px; max-width: calc(100% - 30px); padding: 12px 16px; border-radius: 14px; color: white; background: #202830; box-shadow: 0 9px 28px rgba(0,0,0,.22); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.offline-warning { color: #724625; background: #fae8d6; }
@media (min-width: 760px) {
  .main { padding: 34px 30px 48px; }
  .passenger-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .security-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bottom-nav { top: 90px; bottom: auto; left: max(20px, calc(50% - 550px)); width: 170px; grid-template-columns: 1fr; transform: none; }
  .nav-btn { grid-template-columns: 26px 1fr; justify-items: start; padding: 0 15px; font-size: 13px; }
  .app-shell { padding: 0; }
  .main { padding-left: 225px; }
}
@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric:last-child { grid-column: 1 / -1; }
  .info-grid, .doc-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
