:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --ink: #1f2733;
    --muted: #8a96a6;
    --line: #e9eef5;
    --indigo: #6366f1;
    --indigo-d: #4f46e5;
    --orange: #f97316;
    --blue: #2f9bf0;
    --green: #16a34a;
    --red: #dc2f2a;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 22px 18px 64px; }

/* top bar */
.topbar { position: relative; display: flex; align-items: center; justify-content: center; padding: 12px 2px 26px; }
.brand { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.brand a { display: inline-block; text-decoration: none; color: inherit; }
.brand-logo { height: 84px; width: auto; display: block; }
.topbar .logout { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
@media (max-width: 520px) { .brand-logo { height: 64px; } }
.link { color: var(--indigo); text-decoration: none; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }

/* page heading */
.page-head { margin: 2px 2px 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; margin: 0; }
.page-head .booking-id { color: var(--muted); font-size: 14px; white-space: nowrap; }
.page-head .booking-id strong { color: var(--ink); }

/* section labels */
.section { margin-bottom: 22px; }
.section-head {
    text-transform: uppercase; font-size: 12px; font-weight: 700;
    letter-spacing: .7px; color: var(--muted); margin: 0 4px 10px;
}

/* cards */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: var(--shadow);
}

/* stat row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 26px; }
.stat {
    background: var(--card); border: 1px solid var(--line); border-radius: 16px;
    box-shadow: var(--shadow); padding: 20px; text-align: center;
}
.stat-title { text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .7px; color: var(--muted); }
.stat-num { font-size: 34px; font-weight: 800; line-height: 1.1; margin: 8px 0 6px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.c-orange { color: var(--orange); }
.c-blue   { color: var(--blue); }
.c-green  { color: var(--green); }
.c-paid   { color: var(--green); }
.c-unpaid { color: var(--red); }
.c-unset  { color: var(--muted); }

/* fields */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
.field { margin-bottom: 16px; }
label, .field-cap { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: #3a4656; }
.field-cap { text-transform: uppercase; font-size: 11px; letter-spacing: .5px; color: var(--muted); font-weight: 700; }
input, select {
    display: block; width: 100%;
    padding: 11px 13px; font-size: 15px;
    border: 1px solid var(--line); border-radius: 10px;
    background: #fff; color: var(--ink); font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
input.ro { background: #f6f8fb; color: #5b6675; border-style: dashed; }
input[type=checkbox] { width: auto; margin: 0; width: 18px; height: 18px; accent-color: var(--indigo); }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin-top: 8px; cursor: pointer; }
.check-line span { font-size: 15px; }
@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr; }
}

/* guests */
.guest-row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 22px; }
@media (max-width: 560px) { .guest-row { grid-template-columns: 1fr; } }
.guest-total { margin-top: 4px; font-size: 14px; color: var(--muted); }
.guest-total strong { color: var(--ink); }
.guest-confirm { margin-top: 14px; padding: 12px 14px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 10px; }
.guest-confirm a { display: inline-block; font-weight: 700; color: var(--indigo-d); text-decoration: none; }
.guest-confirm a:hover { text-decoration: underline; }
.guest-confirm p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.guest-save { margin-top: 12px; }
.guest-save .btn-small { padding: 9px 18px; font-size: 14px; border-radius: 9px; }

/* countdown */
.countdown { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--indigo); }
.stat-sub .countdown { margin-top: 0; font-size: 12px; }
.countdown.muted { color: var(--muted); font-weight: 400; }
.countdown.warn { color: #b4690e; }
.countdown.passed { color: var(--muted); }

/* map + live tracking */
.map-wrap { margin-top: 8px; }
.map { width: 100%; height: 320px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; display: block; z-index: 0; }
.track-status { margin-top: 8px; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; border: 1px solid; }
.track-idle { background: #f2f5f9; color: #5b6675; border-color: #e1e7ef; }
.track-live { background: #eef0fe; color: var(--indigo-d); border-color: #cdd2fb; }
.track-status strong { color: inherit; }
.track-fresh { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; opacity: .75; }
.dot-parked { background: #9aa5b4; }
.pin-wrap svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.dot { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.35); }
.dot-pickup { background: var(--indigo); }
.dot-vehicle { background: var(--red); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(220,47,42,.55); }
    70%  { box-shadow: 0 0 0 2px #fff, 0 0 0 12px rgba(220,47,42,0); }
    100% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 rgba(220,47,42,0); }
}

/* payment callout */
.pay {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 18px; border-radius: 12px; border: 1px solid;
}
.pay-info { display: flex; flex-direction: column; gap: 3px; }
.pay-label { font-size: 22px; font-weight: 800; color: var(--ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pay-status { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.pay-note { font-size: 13px; color: var(--muted); }
.pay-paid   { background: #e9f9f0; border-color: #b6e6c8; }
.pay-paid   .pay-status { color: var(--green); }
.pay-unpaid { background: #fdeceb; border-color: #f4c4c1; }
.pay-unpaid .pay-status { color: var(--red); }
.pay-unset  { background: #f2f5f9; border-color: #e1e7ef; }
.pay-unset  .pay-status { color: var(--muted); }
.pay-btn {
    border: 0; cursor: pointer; white-space: nowrap;
    background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff;
    font-size: 15px; font-weight: 700; padding: 12px 22px; border-radius: 10px;
}
.pay-btn:hover { filter: brightness(1.06); }
.pay-btn:disabled,
.pay-btn[disabled] {
    cursor: not-allowed; opacity: .5; filter: grayscale(1);
    background: linear-gradient(var(--indigo), var(--indigo-d));
}
.pay-action { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.pay-consent { display: flex; align-items: flex-start; gap: 8px; max-width: 360px; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: left; }
.pay-consent input { flex: none; width: 16px; height: 16px; margin-top: 1px; cursor: pointer; }
.pay-consent a { color: var(--indigo); font-weight: 600; text-decoration: underline; }
.pay-hint { max-width: 360px; font-size: 12.5px; line-height: 1.4; color: var(--muted); text-align: right; }

/* actions / buttons */
.actions { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 8px; flex-wrap: wrap; }
.actions .btn-cancel {
    appearance: none; cursor: pointer;
    background: #f9d2cf; color: #a31c17; border: 1px solid #e49a95;
    font-size: 15px; font-weight: 700; padding: 13px 22px; border-radius: 10px;
}
.actions .btn-cancel:hover { background: #f3b9b4; border-color: #d77f79; filter: none; }
.actions .btn-modify {
    appearance: none; cursor: pointer;
    background: #fff; color: var(--indigo-d); border: 1px solid #c7ccfb;
    font-size: 15px; font-weight: 700; padding: 13px 22px; border-radius: 10px;
}
.actions .btn-modify:hover { background: #eef0fe; }
button[type=submit] {
    appearance: none; border: 0; cursor: pointer;
    background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff;
    font-size: 15px; font-weight: 700; padding: 13px 26px; border-radius: 10px;
}
button[type=submit]:hover { filter: brightness(1.06); }

/* modify popup */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(16,24,40,.5);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 8vh 16px 16px; overflow-y: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
    background: #fff; border-radius: 16px; width: 100%; max-width: 460px;
    padding: 24px; box-shadow: 0 12px 40px rgba(16,24,40,.25);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.modal-head h2 { font-size: 20px; margin: 0; }
.modal-x { appearance: none; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.modal label { font-weight: 600; font-size: 14px; margin-top: 14px; }
.modal .hint { display: block; font-weight: 400; font-size: 12px; color: var(--muted); margin-top: 2px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.btn-secondary {
    appearance: none; cursor: pointer; background: #fff; color: var(--ink);
    border: 1px solid var(--line); font-size: 15px; font-weight: 600; padding: 13px 20px; border-radius: 10px;
}
.btn-secondary:hover { background: #f6f8fb; }

/* login */
.card.login { max-width: 420px; margin: 7vh auto 0; padding: 30px; }
.card.login h1 { font-size: 22px; margin: 0 0 6px; }
.card.login .muted { color: var(--muted); margin: 0 0 18px; }
.card.login label { font-weight: 600; margin-bottom: 14px; }
.card.login button { width: 100%; margin-top: 4px; appearance: none; border: 0; cursor: pointer; background: linear-gradient(var(--indigo), var(--indigo-d)); color: #fff; font-size: 15px; font-weight: 700; padding: 13px; border-radius: 10px; }
.card.login button:hover { filter: brightness(1.06); }

/* alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.alert.ok { background: #e9f9f0; color: #14672f; border: 1px solid #b6e6c8; }
.alert.error { background: #fdeceb; color: #97211c; border: 1px solid #f4c4c1; }

.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 30px; }

/* post-flight review screen */
.review-card { text-align: center; padding: 30px 26px; }
.review-head { margin-bottom: 8px; }
.review-balloon { font-size: 44px; line-height: 1; display: block; }
.review-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; margin: 10px 0 8px; }
.review-lead { color: var(--muted); max-width: 460px; margin: 0 auto; }
.pilot-line { margin: 18px 0 6px; font-size: 16px; }
.pilot-line strong { color: var(--indigo-d); }

.review-form { max-width: 460px; margin: 8px auto 0; text-align: left; }
.rating-field { border: 0; padding: 0; margin: 12px 0 18px; text-align: center; }
.rating-field legend { float: none; font-weight: 600; font-size: 14px; color: #3a4656; margin-bottom: 8px; }
.rating { display: inline-flex; flex-direction: row-reverse; justify-content: center; }
.rating input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating label {
    font-size: 42px; line-height: 1; color: #d7dee8; cursor: pointer;
    padding: 0 4px; margin: 0; transition: color .12s ease;
}
.rating label:hover, .rating label:hover ~ label, .rating input:checked ~ label { color: #f5b301; }
.rating input:focus-visible + label { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 4px; }
.review-form textarea {
    display: block; width: 100%; padding: 11px 13px; font-size: 15px;
    border: 1px solid var(--line); border-radius: 10px; background: #fff;
    color: var(--ink); font-family: inherit; resize: vertical;
}
.review-form textarea:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }

.review-done { margin-top: 14px; }
.stars-static { font-size: 34px; color: #f5b301; letter-spacing: 3px; }
.review-thanks { font-size: 16px; font-weight: 600; margin: 10px 0 0; }

/* flight photos (review screen) */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.photo { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.photo img {
    width: 100%; height: 180px; object-fit: cover; display: block;
    border-radius: 12px; border: 1px solid var(--line); background: #f2f5f9;
}
.photo-dl {
    align-self: center; text-decoration: none; font-size: 13px; font-weight: 700;
    color: var(--indigo-d); background: #eef0fe; border: 1px solid #dfe2fb;
    padding: 7px 14px; border-radius: 999px;
}
.photo-dl:hover { background: #e3e7fd; }

/* picked-up / in-flight screen */
.enjoy-card { text-align: center; padding: 30px 26px; }
.enjoy-icon { font-size: 44px; line-height: 1; display: block; animation: enjoy-float 3s ease-in-out infinite; }
.enjoy-card h2 { font-size: 23px; font-weight: 800; letter-spacing: -.3px; margin: 12px 0 10px; color: var(--indigo-d); }
.enjoy-lead { color: var(--muted); max-width: 480px; margin: 0 auto; }
@keyframes enjoy-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* cancelled booking screen */
.cancelled-card { text-align: center; padding: 32px 26px; }
.cancelled-icon { font-size: 44px; line-height: 1; display: block; filter: grayscale(.35); opacity: .85; }
.cancelled-card h2 { font-size: 23px; font-weight: 800; letter-spacing: -.3px; margin: 12px 0 10px; color: var(--red); }
.cancelled-lead { color: var(--ink); max-width: 480px; margin: 0 auto 12px; }
.cancelled-wish { color: var(--muted); max-width: 480px; margin: 0 auto; font-weight: 600; }
