:root {
  --navy: #0b3b66; --navy2: #0f4c81; --accent: #f59e0b; --accent2: #d97706;
  --bg: #f4f6fa; --card: #fff; --ink: #0f172a; --muted: #64748b; --line: #e2e8f0;
  --ok: #059669; --warn: #b45309; --bad: #dc2626; --win: #ecfdf5;
  --r: 12px; --sh: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { background: var(--navy); }
body { margin: 0; font: 15px/1.5 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--ink); background: var(--bg); min-height: 100vh; }
body.locked { overflow: hidden; }
a { color: var(--navy2); }
h1 { font-size: 28px; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 20px; margin: 24px 0 12px; }
h2 small, h1 small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 6px; }
h3 { font-size: 16px; margin: 20px 0 10px; }
small { display: block; color: var(--muted); font-size: 12.5px; }
.muted { color: var(--muted); } .small { font-size: 13px; }
.ok { color: var(--ok); } .warn { color: var(--warn); }
input, select, button { font: inherit; }
input, select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-height: 42px; }
input[type=radio], input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--navy2); }
input[type=range] { padding: 0; border: 0; accent-color: var(--navy2); }
label { font-size: 13px; font-weight: 600; color: #334155; }
label > input, label > select { margin-top: 4px; font-weight: 400; }

.statusfill { position: fixed; top: 0; left: 0; right: 0; height: env(safe-area-inset-top); background: var(--navy); z-index: 60; }
.top { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; padding-top: env(safe-area-inset-top); }
.top .in { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 12px 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 20px; display: flex; gap: 8px; align-items: center; }
.brand span { background: var(--accent); color: var(--navy); border-radius: 8px; width: 30px; height: 30px; display: grid; place-items: center; font-size: 16px; }
nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
nav a { color: #cfe0f1; text-decoration: none; padding: 7px 12px; border-radius: 999px; font-weight: 600; white-space: nowrap; font-size: 14px; }
nav a.on, nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.acct { display: flex; gap: 10px; align-items: center; }
.acct .me { color: #fff; font-weight: 700; text-decoration: none; background: rgba(255, 255, 255, .12); padding: 7px 12px; border-radius: 999px; }
.acct .role { color: #cfe0f1; font-weight: 500; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.acct .role select { width: auto; min-height: 32px; padding: 4px 8px; margin: 0; }
.demo { background: #fff7e6; color: #92400e; text-align: center; font-size: 12.5px; padding: 6px 16px; border-bottom: 1px solid #fde7b0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700; cursor: pointer; text-decoration: none; min-height: 42px; }
.btn.primary { background: var(--accent); color: #1f1300; }
.btn.primary:hover { background: var(--accent2); }
.btn.ghost { background: #fff; color: var(--navy2); border: 1px solid var(--line); }
.top .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn.danger { background: #fff; color: var(--bad); border: 1px solid #fecaca; }
.btn.small { padding: 7px 12px; min-height: 34px; font-size: 13.5px; }
.btn.big { width: 100%; padding: 15px; font-size: 17px; margin-top: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 8px 16px 48px; }
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.center .row { justify-content: center; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 18px; margin-bottom: 16px; }
.card label { display: block; margin-bottom: 12px; }

.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy2) 70%, #1e6aa8 100%); color: #fff; padding: 36px 16px 40px; }
.hero > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); }
.hero p { color: #cfe0f1; margin: 0 auto 18px; }
.tabs { display: flex; gap: 6px; margin-bottom: 0; }
.tabs a { color: #fff; text-decoration: none; padding: 10px 16px; border-radius: 10px 10px 0 0; font-weight: 700; background: rgba(255, 255, 255, .12); }
.tabs a.on { background: #fff; color: var(--navy); }
.search { background: #fff; color: var(--ink); border-radius: 0 var(--r) var(--r) var(--r); padding: 16px; box-shadow: var(--sh); }
.bar { background: var(--navy); padding: 14px 16px; }
.bar .search { max-width: 1180px; margin: 0 auto; border-radius: var(--r); }
.triptype { display: flex; gap: 16px; margin-bottom: 10px; }
.triptype label { display: flex; gap: 6px; align-items: center; }
.grid { display: grid; gap: 10px; align-items: end; }
.grid.f { grid-template-columns: 1.3fr auto 1.3fr 1fr 1fr .7fr 1fr auto; }
.grid.h { grid-template-columns: 1.6fr 1fr 1fr .7fr .7fr auto; }
.swap { border: 1px solid var(--line); background: #fff; border-radius: 50%; width: 38px; height: 38px; cursor: pointer; margin-bottom: 2px; color: var(--navy2); font-size: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { background: #fff; border-radius: var(--r); padding: 16px; text-decoration: none; color: var(--ink); box-shadow: var(--sh); border-left: 4px solid var(--accent); }
.tile b { display: block; } .tile span { color: var(--muted); font-size: 13.5px; }
.tile:hover { transform: translateY(-1px); }
.why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.why div { background: #fff; border-radius: var(--r); padding: 16px; }
.why b { display: block; margin-bottom: 4px; } .why span { color: var(--muted); font-size: 13.5px; }

.crumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; }
.crumbs span { background: #fff; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; color: var(--muted); }
.crumbs .on { background: var(--navy2); color: #fff; border-color: var(--navy2); }
.crumbs .done { color: var(--ok); }
.picked { background: var(--win); border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }
.dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.dates .d { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 4px; text-align: center; text-decoration: none; color: var(--ink); font-size: 12.5px; }
.dates .d i { display: block; font-style: normal; font-weight: 700; color: var(--navy2); font-size: 13px; }
.dates .d.on { border-color: var(--navy2); box-shadow: inset 0 0 0 1px var(--navy2); background: #eff6ff; }
.dates .d.off { opacity: .45; }
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.filters { background: #fff; border-radius: var(--r); padding: 6px 16px 16px; box-shadow: var(--sh); position: sticky; top: 78px; }
.filters h4 { margin: 14px 0 6px; font-size: 13.5px; display: flex; justify-content: space-between; }
.filters label { display: flex; gap: 8px; align-items: center; font-weight: 500; padding: 3px 0; }
.skel { height: 260px; }
.sorts { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; margin-bottom: 12px; }
.sorts button { border: 0; background: #fff; padding: 10px; cursor: pointer; border-bottom: 3px solid transparent; text-align: left; }
.sorts button b { display: block; } .sorts button span { font-size: 12.5px; color: var(--muted); }
.sorts button.on { border-bottom-color: var(--accent); background: #fffbeb; }
.sortline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; }
.sortline label { display: flex; align-items: center; gap: 8px; } .sortline select { width: auto; margin: 0; }
.loading, .empty { background: #fff; border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted); box-shadow: var(--sh); }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--navy2); border-radius: 50%; animation: s .8s linear infinite; vertical-align: -3px; margin-right: 8px; }
@keyframes s { to { transform: rotate(360deg); } }

.fcard { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 16px; margin-bottom: 10px; display: grid; grid-template-columns: 200px 1fr 150px; gap: 16px; align-items: center; }
.al { display: flex; gap: 10px; align-items: center; }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: #fff; font-weight: 800; font-size: 13px; flex: none; }
.times { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; text-align: center; }
.times b { font-size: 20px; } .times sup { color: var(--bad); font-size: 11px; }
.line { position: relative; } .line i { display: block; height: 2px; background: var(--line); margin: 4px 0; position: relative; }
.line i::after { content: '✈'; position: absolute; right: -4px; top: -9px; font-size: 12px; color: var(--muted); font-style: normal; }
.direct { color: var(--ok) !important; } .stop { color: var(--warn) !important; }
.price { text-align: right; } .price b { font-size: 22px; display: block; }
.price em { display: block; color: var(--bad); font-style: normal; font-size: 12px; }
.price .btn { margin-top: 6px; width: 100%; }
.cmpchk { display: flex; gap: 6px; align-items: center; justify-content: flex-end; font-weight: 500; margin-top: 6px; cursor: pointer; }
.fares { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; border-top: 1px dashed var(--line); padding-top: 14px; }
.fares[hidden] { display: none; }
.fare { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.fare ul { margin: 0; padding: 0; list-style: none; font-size: 13px; color: #334155; flex: 1; }
.fare span { font-weight: 800; font-size: 18px; }
.cmpbar { position: fixed; left: 50%; bottom: -100px; transform: translateX(-50%); background: var(--navy); color: #fff; border-radius: 999px; padding: 8px 8px 8px 20px; display: flex; gap: 10px; align-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); transition: bottom .25s; z-index: 40; max-width: calc(100vw - 32px); }
.cmpbar.show { bottom: calc(18px + env(safe-area-inset-bottom)); }
.cmpbar span { font-size: 14px; }
table.cmp, table.tbl, table.rooms { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cmp th, table.cmp td, table.tbl th, table.tbl td, table.rooms th, table.rooms td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.cmp thead th { vertical-align: middle; } table.cmp tbody th { color: var(--muted); font-weight: 600; width: 180px; }
.win { background: var(--win); color: var(--ok); padding: 2px 6px; border-radius: 6px; }
.tscroll { overflow-x: auto; }
.note { color: var(--muted); font-size: 13px; }
.note.box { background: #eff6ff; border-radius: 10px; padding: 10px 14px; color: #1e3a8a; }

.hcard { background: #fff; border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 12px; display: grid; grid-template-columns: 190px 1fr 170px; text-decoration: none; color: var(--ink); overflow: hidden; }
.hcard:hover { box-shadow: 0 6px 24px rgba(15, 23, 42, .12); }
.ph { background: linear-gradient(135deg, hsl(var(--h) 55% 45%), hsl(calc(var(--h) + 40) 60% 65%)); min-height: 150px; display: grid; place-items: center; color: rgba(255, 255, 255, .9); font-weight: 800; font-size: 28px; letter-spacing: 2px; }
.ph.big { min-height: 220px; border-radius: var(--r); font-size: 22px; letter-spacing: 0; padding: 16px; text-align: center; }
.hcard .info { padding: 14px 16px; } .hcard .info b { font-size: 17px; }
.stars { color: #f59e0b; display: inline; letter-spacing: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chips span { background: #f1f5f9; border-radius: 999px; padding: 3px 9px; font-size: 12px; color: #334155; }
.hcard em { font-style: normal; font-size: 13px; }
.side { padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; text-align: right; border-left: 1px solid var(--line); }
.rating { display: flex; gap: 8px; align-items: center; } .rating span { font-weight: 700; font-size: 14px; }
.rating b, .score { background: var(--navy2); color: #fff; border-radius: 8px 8px 8px 0; padding: 5px 8px; font-size: 14px; }
.side .price b { font-size: 22px; }
.back { display: inline-block; margin: 14px 0; text-decoration: none; font-weight: 600; }
.hhead { display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px; align-items: start; }
table.rooms small { display: block; } table.rooms td b { font-size: 15px; }
table.rooms { background: #fff; border-radius: var(--r); box-shadow: var(--sh); }

.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-top: 20px; }
.timer { background: #eff6ff; color: #1e3a8a; padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.timer.warn { background: #fef2f2; color: var(--bad); }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px 4px; margin: 0 0 12px; background: #fff; }
legend { font-weight: 700; font-size: 13.5px; padding: 0 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid2 label { display: block; margin-bottom: 12px; } .grid2 .full { grid-column: 1 / -1; }
.paybox { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.paytabs { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.paytabs label { display: flex; gap: 6px; align-items: center; }
.agree { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-weight: 500; }
.summary { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 18px; position: sticky; top: 78px; }
.summary h3 { margin-top: 0; text-transform: capitalize; }
.leg { border-bottom: 1px solid var(--line); padding: 10px 0; } .leg b { display: block; }
.tot { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.tot.big { font-weight: 800; font-size: 18px; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }

.okmark { width: 72px; height: 72px; border-radius: 50%; background: var(--win); color: var(--ok); font-size: 38px; display: grid; place-items: center; margin: 30px auto 10px; }
.ref { font-family: ui-monospace, Consolas, monospace; letter-spacing: 2px; font-size: 20px; }
.ticket { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 0 0 18px; margin-top: 20px; overflow: hidden; }
.tk-head { background: var(--navy); color: #fff; display: flex; justify-content: space-between; padding: 16px 20px; }
.tk-row { display: flex; gap: 24px; padding: 14px 20px; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }
.tk-row b { display: block; }
.ticket .row { padding: 0 20px; }

.trip { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 14px 16px; margin-bottom: 10px; display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.trip.x { opacity: .65; }
.trip .ic { font-size: 22px; } .trip .r { text-align: right; } .trip .r b { display: block; }
.trip .r .row { margin-top: 6px; justify-content: flex-end; }
.st { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.st.confirmed { background: var(--win); color: var(--ok); } .st.cancelled { background: #fef2f2; color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 860px; padding-top: 24px; }
.two h2 { margin-top: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpis div { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 14px 16px; }
.kpis b { font-size: 24px; }
.adm { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.adm h3 { margin-top: 0; }
.sup { border-bottom: 1px solid var(--line); padding: 8px 0; } .sup b { margin-right: 6px; }
.tag { background: #fff7e6; color: #92400e; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }

.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.mbox { background: #fff; border-radius: 16px; padding: 22px; max-width: 900px; width: 100%; max-height: 88vh; overflow: auto; position: relative; }
.mbox h3 { margin-top: 0; }
.mclose { position: absolute; top: 10px; right: 12px; border: 0; background: #f1f5f9; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.toast { position: fixed; left: 50%; top: 80px; transform: translate(-50%, -20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s; z-index: 90; font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }

@media (max-width: 1000px) {
  .grid.f { grid-template-columns: 1fr auto 1fr; }
  .grid.f > label:nth-of-type(n+3), .grid.f > .btn { grid-column: span 3; }
  .grid.h { grid-template-columns: 1fr 1fr; }
  .grid.h > label:first-child, .grid.h > .btn { grid-column: 1 / -1; }
  .layout { grid-template-columns: 1fr; }
  .filters { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; }
  .filters h4 { grid-column: 1 / -1; }
  .checkout, .adm, .hhead { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .kpis { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .top .in { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  nav { order: 3; flex-basis: 100%; }
  .acct { margin-left: auto; }
  .acct .role span { display: none; }
  .fcard { grid-template-columns: 1fr; gap: 12px; }
  .price { text-align: left; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
  .price .btn { width: auto; grid-row: 1 / span 2; grid-column: 2; margin: 0; }
  .cmpchk { justify-content: flex-start; }
  .hcard { grid-template-columns: 1fr; }
  .hcard .ph { min-height: 110px; }
  .hcard .side { flex-direction: row; border-left: 0; border-top: 1px solid var(--line); align-items: center; }
  .dates { grid-template-columns: repeat(7, 84px); overflow-x: auto; }
  .grid2, .two { grid-template-columns: 1fr; }
  .trip { grid-template-columns: 32px 1fr; } .trip .r { grid-column: 1 / -1; text-align: left; } .trip .r .row { justify-content: flex-start; }
  .sorts button span { display: none; }
  h1 { font-size: 24px; }
}
@media print {
  .top, .demo, .foot, .noprint, .statusfill { display: none !important; }
  body, html { background: #fff; }
  .ticket { box-shadow: none; }
}

.tbl td:nth-child(1), .tbl td:nth-child(5), .tbl td:nth-child(6), .tbl td:nth-child(7), .tbl td:nth-child(8) { white-space: nowrap; }
