:root {
  --ink: #172033;
  --muted: #687287;
  --line: #dce2eb;
  --panel: #ffffff;
  --page: #f4f7fb;
  --blue: #173bb8;
  --blue-dark: #102a88;
  --cyan: #d8fbfb;
  --red: #d92d3a;
  --shadow: 0 12px 32px rgba(23, 32, 51, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--page); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 72px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: white; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; }
.brand small { display: block; color: var(--muted); margin-top: 3px; }
.brand-mark { display: grid; width: 112px; line-height: .8; font-family: Georgia, serif; font-size: 26px; font-weight: 800; transform: skew(-7deg); }
.brand-mark span { color: #c52d2d; text-align: left; }
.brand-mark strong { color: #153bb1; text-align: right; }
.brand-mark.small { width: 64px; font-size: 16px; }
.container { max-width: 1180px; padding: 36px 24px 80px; margin: auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); margin-bottom: 22px; }
h1, h2, h3 { margin: 0 0 10px; }
h1 { font-size: 30px; }
h2 { font-size: 25px; }
h3 { font-size: 19px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.muted { color: var(--muted); margin: 4px 0 16px; }
.source-grid { display: grid; grid-template-columns: 1fr 48px 1fr; gap: 18px; align-items: stretch; margin-top: 24px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #3f4960; }
input, textarea, select { width: 100%; border: 1px solid #cbd3df; border-radius: 9px; padding: 11px 12px; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 59, 184, .12); }
textarea { resize: vertical; min-height: 180px; font-family: Consolas, monospace; font-size: 12px; }
.dropzone { min-height: 220px; border: 2px dashed #aebbd1; border-radius: 13px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #f9fbff; cursor: pointer; text-align: center; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #f0f4ff; }
.dropzone input { display: none; }
.dropzone b { color: var(--blue); font-size: 17px; }
.dropzone span { color: var(--muted); font-weight: 400; margin-top: 8px; }
.or { display: flex; align-items: center; justify-content: center; color: var(--muted); }
.actions { display: flex; gap: 12px; margin-top: 22px; }
.primary, .secondary, .ghost, .small-button { border: 0; border-radius: 9px; padding: 11px 18px; font-weight: 700; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: var(--blue-dark); }
.primary:disabled { opacity: .55; cursor: wait; }
.secondary { background: #eaf0ff; color: var(--blue); }
.ghost { background: transparent; color: var(--muted); }
.small-button { background: #eef2f8; color: var(--blue); padding: 8px 12px; }
.status { min-height: 20px; color: var(--blue); font-weight: 700; }
.hidden { display: none !important; }
.step-heading, .section-title, .generate-panel { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.source-badge { background: var(--cyan); color: var(--blue-dark); padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.form-grid { display: grid; gap: 15px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.warning { background: #fff8df; border: 1px solid #f0d989; padding: 11px 14px; border-radius: 9px; margin-bottom: 9px; color: #644e00; font-size: 13px; }
.passenger-row { display: grid; grid-template-columns: 2fr .65fr 1fr 1.2fr auto; gap: 12px; align-items: end; padding: 14px 0; border-top: 1px solid var(--line); }
.passenger-row:first-child { border-top: 0; }
.remove { border: 0; background: transparent; color: var(--red); padding: 11px 8px; }
.segment-card { border: 1px solid var(--line); border-radius: 12px; padding: 17px; margin-top: 14px; background: #fbfcfe; }
.segment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.segment-head b { color: var(--blue-dark); }
.segment-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.span-2 { grid-column: span 2; }
.baggage-field input { border: 2px solid var(--blue); background: #f8faff; }
.required-note { color: var(--red); font-size: 13px; }
.choice-row { display: flex; gap: 24px; margin: 16px 0; }
.choice { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 9px; font-size: 14px; }
.choice input { width: auto; }
#price-fields { border-top: 1px solid var(--line); padding-top: 17px; }
#shared-price-wrap { max-width: 280px; margin-top: 14px; }
#individual-prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; }
.generate-panel { background: #eaf0ff; border: 1px solid #c8d4fa; border-radius: 16px; padding: 24px 28px; margin-top: 28px; }
.large { padding: 14px 24px; font-size: 16px; }
.error, .error-box { color: var(--red); }
.error-box { background: #fff0f1; border: 1px solid #f2b2b8; padding: 14px; border-radius: 10px; margin-top: 14px; white-space: pre-line; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, #e6efff, #f7f9fc 48%); }
.login-card { width: min(420px, calc(100vw - 32px)); padding: 36px; border-radius: 18px; background: white; box-shadow: 0 24px 70px rgba(20, 37, 86, .16); }
.login-card .brand-mark { margin: 0 auto 26px; }
.login-card h1, .login-card p { text-align: center; }
.login-card form { display: grid; gap: 16px; margin-top: 24px; }
@media (max-width: 820px) {
  .source-grid { grid-template-columns: 1fr; }
  .or { height: 20px; }
  .form-grid.three, .segment-grid { grid-template-columns: repeat(2, 1fr); }
  .passenger-row { grid-template-columns: 1fr 1fr; }
  #individual-prices { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .container { padding: 22px 14px 60px; }
  .card { padding: 18px; }
  .form-grid.three, .segment-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .step-heading, .section-title, .generate-panel { align-items: flex-start; flex-direction: column; }
  .choice-row, .actions { flex-direction: column; }
}

