/* SeinWings web app – design tokens from the SeinWings logo */
:root {
  color-scheme: light;
  --navy: #0A236A;
  --deep: #13469B;
  --blue: #1B72C9;
  --blue-hover: #1866B5;
  --cyan: #2EC9F8;
  --tint: #E8F4FD;
  --tint-2: #D5EAFB;
  --ink: #2B3246;
  --muted: #5E6678;
  --faint: #8D94A3;
  --line: #CDD4DF;
  --line-2: #E7EBF2;
  --bg: #F7F9FC;
  --white: #FFFFFF;
  --amber: #FFBF1B;
  --viber: #665CAC;
  --danger: #B3261E;
  --grad: linear-gradient(135deg, #2EC9F8 0%, #1F7CD5 50%, #13469B 100%);
  --radius: 16px;
  --shadow: 0 12px 32px rgba(10, 35, 106, 0.10);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--deep); }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout: phone column, brand panel on desktop ---------- */
.shell { min-height: 100vh; display: flex; justify-content: center; }
.brand-panel { display: none; }
.app { position: relative; width: 100%; max-width: 480px; min-height: 100vh; background: var(--bg); overflow-x: hidden; }
@media (min-width: 960px) {
  body { background: var(--navy); }
  .shell { align-items: center; gap: 64px; padding: 32px; }
  .brand-panel { display: flex; flex-direction: column; gap: 20px; max-width: 420px; color: var(--white); }
  .brand-logo { width: 320px; height: auto; border-radius: 12px; }
  .brand-panel h2 { margin: 0; font-size: 28px; line-height: 1.3; }
  .brand-panel ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--tint-2); font-size: 16px; }
  .brand-panel a { color: var(--cyan); font-weight: 600; }
  .app { min-height: 0; height: min(860px, calc(100vh - 64px)); border-radius: 28px; overflow-y: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); }
}

/* ---------- shared pieces ---------- */
.screen { min-height: 100%; display: flex; flex-direction: column; }
.hero { position: relative; background: var(--grad); color: var(--white); padding: max(20px, env(safe-area-inset-top)) 20px 92px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; text-align: center; flex: 1; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 22px; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; background: var(--line-2); color: var(--ink); }
.hero .icon-btn, .hero .pill-btn { background: rgba(255, 255, 255, 0.2); color: var(--white); }
.pill-btn { height: 44px; padding: 0 14px; border-radius: 22px; border: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.brand-mini { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--white); }
.brand-mini .mark { width: 32px; height: 32px; border-radius: 16px; background: rgba(255,255,255,0.18); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.plain-head { background: var(--white); border-bottom: 1px solid var(--line-2); padding: max(16px, env(safe-area-inset-top)) 20px 14px; position: sticky; top: 0; z-index: 5; }
.plain-head .sub { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.body { flex: 1; padding: 16px 20px 32px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--white); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.card.flat { box-shadow: none; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 16px; }
.lift { margin-top: -72px; position: relative; z-index: 2; }
.label { font-size: 12px; font-weight: 500; color: var(--muted); }
.value { font-size: 14px; font-weight: 600; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
h2.section { margin: 6px 0 0; font-size: 16px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.field { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; background: var(--white); text-align: left; width: 100%; cursor: pointer; min-height: 60px; justify-content: center; }
.field.static { cursor: default; }
.field input { border: 0; outline: none; padding: 0; font: 600 14px 'Plus Jakarta Sans', sans-serif; color: var(--ink); background: transparent; min-width: 0; width: 100%; }
.field input::placeholder { color: var(--faint); font-weight: 500; }
.field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 114, 201, 0.15); }
.field.invalid { border-color: var(--danger); }
.field .placeholder { color: var(--blue); }
.err { font-size: 12px; font-weight: 500; color: var(--danger); margin-top: -6px; }
.prefix { font-size: 14px; font-weight: 600; color: var(--deep); background: var(--tint); border-radius: 6px; padding: 2px 6px; }

.btn { height: 52px; border-radius: 12px; border: 0; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 600; cursor: pointer; background: var(--blue); color: var(--white); }
.btn:hover { background: var(--blue-hover); color: var(--white); }
.btn[disabled] { background: #DADFE8; color: var(--muted); cursor: not-allowed; }
.btn.outline { background: var(--white); color: var(--blue); border: 1.5px solid var(--blue); }
.btn.viber { background: var(--viber); }
.btn.viber:hover { background: #574EA0; }
.link-btn { background: none; border: 0; padding: 8px 0; color: var(--blue); font-weight: 600; font-size: 14px; cursor: pointer; }

.seg { display: inline-flex; gap: 8px; }
.seg button { height: 36px; padding: 0 16px; border-radius: 18px; border: 0; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--white); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--amber); color: var(--navy); }
.tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; background: #F0F3F8; border-radius: 12px; padding: 4px; }
.tabs button { height: 40px; border: 0; border-radius: 9px; font-size: 14px; font-weight: 600; cursor: pointer; background: transparent; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--white); color: var(--deep); box-shadow: 0 1px 4px rgba(10, 35, 106, 0.12); }

.swap { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; background: var(--tint); color: var(--deep); font-size: 12px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.route-chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; text-align: left; min-width: 140px; flex: 1 1 140px; }
.route-chip b { font-size: 14px; }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; background: var(--tint-2); color: var(--deep); white-space: nowrap; }
.badge.best { background: var(--amber); color: var(--navy); }
.note { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--muted); margin: 0; }
.banner { background: var(--tint); color: var(--deep); border-radius: 12px; padding: 10px 12px; font-size: 12px; font-weight: 600; line-height: 18px; }

/* flight card */
.flight { display: flex; flex-direction: column; gap: 12px; background: var(--white); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; text-align: left; width: 100%; cursor: pointer; box-shadow: 0 4px 16px rgba(10, 35, 106, 0.05); }
.flight:hover { border-color: var(--tint-2); }
.al { width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--tint); color: var(--deep); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.times { display: flex; align-items: center; gap: 10px; }
.times .t { font-size: 18px; font-weight: 600; }
.line { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.line .bar { width: 100%; display: flex; align-items: center; gap: 4px; }
.line .bar i { flex: 1; border-top: 1.5px dashed #A0A6B4; }
.dot { width: 6px; height: 6px; border-radius: 3px; background: var(--blue); }
.dot.o { background: transparent; border: 1.5px solid var(--blue); }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; border-top: 1px solid var(--line-2); padding-top: 10px; }
.price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.price b { font-size: 18px; font-weight: 700; color: var(--blue); }
.price.ask b { font-size: 14px; color: var(--viber); }

/* date strip */
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip button { flex: none; width: 76px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--white); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.strip button[aria-current="date"] { border: 2px solid var(--blue); background: var(--tint); }
.strip .d { font-size: 12px; font-weight: 600; }
.strip .p { font-size: 12px; font-weight: 600; color: var(--blue); }
.strip .p.none { color: var(--faint); font-weight: 500; }

/* fare options */
.fare { display: block; width: 100%; text-align: left; padding: 16px; border-radius: var(--radius); background: var(--white); border: 2px solid var(--line-2); cursor: pointer; }
.fare[aria-pressed="true"] { border-color: var(--blue); box-shadow: 0 6px 20px rgba(27, 114, 201, 0.14); }
.radio { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #A0A6B4; display: flex; align-items: center; justify-content: center; flex: none; }
.fare[aria-pressed="true"] .radio { border-color: var(--blue); }
.fare[aria-pressed="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 5px; background: var(--blue); }
.perks { list-style: none; margin: 12px 0 0; padding: 12px 0 0 32px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; font-size: 12px; font-weight: 500; }
.perks li { display: flex; gap: 8px; align-items: center; }

/* bottom bar */
.bottom { position: sticky; bottom: 0; background: var(--white); border-top: 1px solid var(--line-2); padding: 14px 20px max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 16px; z-index: 4; }

/* sheets (airport / dates / travellers) */
.sheet { position: fixed; inset: 0; z-index: 50; background: var(--white); display: flex; flex-direction: column; animation: up .22s ease-out; }
@media (min-width: 960px) { .sheet { position: absolute; } }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .scroll { flex: 1; overflow-y: auto; padding: 8px 20px 24px; }
.ap { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; border: 0; border-bottom: 1px solid #F0F3F8; background: none; text-align: left; cursor: pointer; padding: 6px 0; }
.ap .code { width: 48px; height: 32px; flex: none; border-radius: 8px; background: #F0F3F8; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--deep); }
.ap .ok { margin-left: auto; }
.search { display: flex; align-items: center; gap: 10px; height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font: 500 14px 'Plus Jakarta Sans', sans-serif; color: var(--ink); background: transparent; }
.kicker { margin: 14px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .5px; color: var(--muted); }

.month { margin-bottom: 18px; }
.month h3 { margin: 6px 0 10px; font-size: 16px; font-weight: 600; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.cal .dow { height: 28px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal .cell { height: 44px; display: flex; align-items: center; justify-content: center; }
.cal .cell.in { background: var(--tint); }
.cal .cell.s { background: linear-gradient(90deg, transparent 50%, var(--tint) 50%); }
.cal .cell.e { background: linear-gradient(90deg, var(--tint) 50%, transparent 50%); }
.cal .cell.s.e { background: none; }
.cal button { width: 40px; height: 40px; border-radius: 20px; border: 0; background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; position: relative; color: var(--ink); }
.cal button[disabled] { color: #C3C8D2; cursor: default; }
.cal button.sel { background: var(--blue); color: var(--white); }
.cal button .fl { position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 2px; background: #1E8E5A; }
.cal button.sel .fl { background: var(--white); }

.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { width: 40px; height: 40px; border-radius: 20px; border: 1.5px solid var(--blue); background: var(--white); color: var(--blue); font-size: 20px; font-weight: 600; cursor: pointer; }
.stepper button[disabled] { border-color: var(--line); color: var(--line); cursor: default; }
.stepper output { min-width: 18px; text-align: center; font-weight: 700; }
.pax-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #F0F3F8; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; font-weight: 500; line-height: 18px; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--blue); }

/* splash */
.splash { position: fixed; inset: 0; z-index: 100; background: var(--navy); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px; cursor: pointer; border: 0; width: 100%; color: var(--tint-2); }
@media (min-width: 960px) { .splash { position: absolute; } }
.splash .glow { position: absolute; width: 300px; height: 300px; border-radius: 150px; background: radial-gradient(circle, rgba(46,201,248,.45) 0%, rgba(31,124,213,.18) 45%, rgba(10,35,106,0) 70%); animation: glow 2.8s ease-in-out .6s infinite both; }
.splash .logo { position: relative; width: 300px; overflow: hidden; animation: pop 1.1s cubic-bezier(.2,.8,.2,1) both; }
.splash .logo img { width: 300px; height: auto; display: block; }
.splash .logo::after { content: ""; position: absolute; top: 0; left: 0; width: 80px; height: 100%; background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.28), rgba(255,255,255,0)); animation: sweep 1.4s ease-in-out 1.1s both; }
.splash .bar { width: 200px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); overflow: hidden; }
.splash .bar i { display: block; height: 4px; background: linear-gradient(90deg, #2EC9F8, #1F7CD5); animation: fill 2.2s cubic-bezier(.4,0,.2,1) .3s both; }
.splash .tap { font-size: 14px; font-weight: 600; letter-spacing: .5px; animation: fade .6s ease-out 2.4s both; }
@keyframes pop { 0% { opacity: 0; transform: scale(.82); } 60% { opacity: 1; transform: scale(1.03); } 100% { opacity: 1; transform: scale(1); } }
@keyframes glow { 0%, 100% { opacity: .35; transform: scale(.9); } 50% { opacity: .7; transform: scale(1.08); } }
@keyframes sweep { from { transform: translateX(-120%) skewX(-20deg); } to { transform: translateX(420%) skewX(-20deg); } }
@keyframes fill { from { width: 0; } to { width: 100%; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .splash *, .sheet { animation: none !important; } .splash .bar i { width: 100%; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: var(--white); padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; z-index: 200; box-shadow: var(--shadow); }
.empty { text-align: center; padding: 24px 8px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty .ic { width: 64px; height: 64px; border-radius: 32px; background: #EFECFB; display: flex; align-items: center; justify-content: center; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.kv span:first-child { color: var(--muted); font-weight: 500; }
.kv span:last-child { font-weight: 600; text-align: right; }
.summary { background: var(--tint); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 9px; }
