:root {
  --bg: #f4f6fb;
  --card: #fff;
  --ink: #14182b;
  --muted: #646b85;
  --line: #e3e7f1;
  --brand: #2350ff;
  --brand-ink: #fff;
  --red: #e0263a;
  --green: #0a8f5a;
  --gold: #b07a00;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.hero { background: linear-gradient(135deg, #0f1c5c, #2350ff 60%, #4a8dff); color: #fff; padding: 28px 0 40px; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: .3px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); line-height: 1.15; margin: 0 0 10px; max-width: 760px; }
.sub { opacity: .85; max-width: 640px; margin: 0 0 24px; }

.origin-box { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); padding: 14px; max-width: 640px; }
.origin-box label { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; opacity: .85; }
.origin-row { display: flex; gap: 8px; margin-top: 6px; }
.ac { position: relative; flex: 1; }
.ac input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 0; font-size: 16px; color: var(--ink); }
.ac-list { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); background: #fff; color: var(--ink); list-style: none; margin: 0; padding: 4px; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.2); max-height: 320px; overflow: auto; }
.ac-list li { padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.ac-list li.active, .ac-list li:hover { background: #eef2ff; }
.ac-list .code { font-weight: 700; color: var(--brand); }
.ac-list small { color: var(--muted); }
.nearby { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; font-size: 13px; }
.nearby button { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 4px 10px; cursor: pointer; font: inherit; }
.nearby button.on { background: #fff; color: var(--brand); font-weight: 600; }

.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: #fff; color: var(--brand); white-space: nowrap; }

.banner { margin: 18px 0 0; padding: 10px 14px; border-radius: 10px; background: #fff7e0; border: 1px solid #f1d58a; color: #6b4e00; font-size: 14px; }
.banner code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0 12px; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font: inherit; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--ink); color: #fff; }
.chk { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; }
select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; }
.toolbar select:first-of-type { margin-left: auto; }

.status { color: var(--muted); margin: 6px 0 14px; min-height: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; transition: transform .12s, box-shadow .12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,24,43,.08); }
.card-top { display: flex; gap: 6px; min-height: 22px; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge:empty { display: none; }
.badge.discount { background: #ffe5e8; color: var(--red); }
.badge.discount.hot { background: var(--red); color: #fff; }
.badge.cabin { background: #eef2ff; color: var(--brand); }
.badge.cabin.business { background: #fff3d1; color: var(--gold); }
.badge.sample { background: #fff3d1; color: #6b4e00; margin-left: auto; }
.card.demo { border-style: dashed; }
.dest { margin: 6px 0 0; font-size: 21px; }
.dest small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.country { color: var(--muted); font-size: 14px; }
.meta { margin: 10px 0; font-size: 13.5px; color: #3b4160; display: grid; gap: 4px; }
.airline { display: flex; align-items: center; gap: 8px; }
.airline img { width: 22px; height: 22px; border-radius: 4px; object-fit: contain; }
.airline img[src=""] { display: none; }
.price-row { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; border-top: 1px dashed var(--line); padding-top: 12px; }
.old { color: var(--red); font-size: 15px; text-decoration-thickness: 2px; }
.old:empty { display: none; }
.new { font-size: 28px; font-weight: 800; line-height: 1.1; color: var(--green); }
.trip { color: var(--muted); font-size: 12px; }
.seen { color: var(--muted); font-size: 11.5px; font-style: italic; }
.actions { display: grid; gap: 4px; justify-items: end; }
.actions .btn { padding: 8px 12px; font-size: 14px; }
.actions .btn[hidden] { display: none; }
.gf { font-size: 12px; color: var(--muted); }

.more-row { text-align: center; margin: 24px 0; }
.foot { color: var(--muted); font-size: 12.5px; padding-bottom: 30px; }
.skeleton { height: 250px; border-radius: var(--radius); background: linear-gradient(90deg, #eceff6 25%, #f6f8fc 50%, #eceff6 75%); background-size: 200% 100%; animation: sh 1.2s infinite; }
@keyframes sh { to { background-position: -200% 0; } }
