:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1d2433; --muted: #6b7385; --line: #e3e6ec;
  --brand: #1f5eff; --brand-ink: #fff; --ok: #138a4b; --warn: #b26b00; --bad: #c62828; --soft: #eef3ff;
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); }
h1, h2, h3 { margin: 0 0 .6rem; line-height: 1.2; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
a { color: var(--brand); }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem 1.2rem; background: #101828; color: #fff; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; } .brand span { font-weight: 400; color: #9aa4b8; font-size: .85rem; margin-left: .4rem; }
nav button { background: transparent; color: #cfd6e4; border: 1px solid transparent; }
nav button.on { background: #fff; color: #101828; }
main { max-width: 1100px; margin: 1.2rem auto; padding: 0 1rem 4rem; }
.sub { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sub button { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.sub button.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.grid { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .2rem; }
input, select, textarea { width: 100%; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 7px; font: inherit; background: #fff; color: var(--ink); }
input[type=checkbox], input[type=radio] { width: auto; }
textarea { min-height: 60px; }
button { cursor: pointer; padding: .5rem .9rem; border-radius: 7px; border: 1px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 600; }
button.ghost { background: #fff; color: var(--brand); }
button.danger { background: var(--bad); border-color: var(--bad); }
button.small { padding: .25rem .55rem; font-size: .85rem; }
button:disabled { opacity: .5; cursor: not-allowed; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.error { color: var(--bad); min-height: 1em; } .ok { color: var(--ok); } .warn { color: var(--warn); }
.price { font-size: 1.2rem; font-weight: 700; }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--brand); }
.badge.confirmed, .badge.succeeded, .badge.paid, .badge.approved { background: #e5f6ec; color: var(--ok); }
.badge.pending, .badge.processing, .badge.awaiting_payment, .badge.requested, .badge.booking, .badge.cancelling { background: #fff4e0; color: var(--warn); }
.badge.failed, .badge.cancelled, .badge.rejected, .badge.expired { background: #fde8e8; color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; }
td.num, th.num { text-align: right; white-space: nowrap; }
.hotel { display: grid; grid-template-columns: 170px 1fr auto; gap: .9rem; align-items: start; }
.hotel img, .ph { width: 170px; height: 115px; object-fit: cover; border-radius: 8px; background: #dde3ee; }
.gallery { display: flex; gap: .5rem; overflow-x: auto; margin: .6rem 0; }
.gallery img { height: 120px; border-radius: 8px; }
.rate { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; margin: .4rem 0; display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; }
.rate.disabled { opacity: .55; }
.notice { background: #fff4e0; border: 1px solid #f3d29c; border-radius: 8px; padding: .6rem .8rem; margin: .6rem 0; }
.notice.good { background: #e5f6ec; border-color: #b6e2c7; }
.notice.bad { background: #fde8e8; border-color: #f2bcbc; }
.banner { background: #fff4e0; border-bottom: 1px solid #f3d29c; padding: .6rem 1.2rem; }
.modal { position: fixed; inset: 0; background: rgba(16, 24, 40, .55); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 1rem; }
.modal-box { background: #fff; border-radius: 12px; padding: 1.2rem; width: min(480px, 100%); max-height: 92vh; overflow: auto; }
#payElement { margin: .8rem 0; min-height: 60px; }
.toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); background: #101828; color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 30; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.steps { display: flex; gap: .4rem; flex-wrap: wrap; margin: .3rem 0 .8rem; font-size: .85rem; }
.steps span { padding: .2rem .6rem; border-radius: 99px; background: #e9ecf2; color: var(--muted); }
.steps span.on { background: var(--brand); color: #fff; }
pre.json { background: #0f172a; color: #d7e0f0; padding: .7rem; border-radius: 8px; overflow: auto; font-size: .78rem; max-height: 320px; }
@media (max-width: 700px) {
  .hotel { grid-template-columns: 1fr; } .hotel img, .ph { width: 100%; height: 170px; }
  .rate { grid-template-columns: auto 1fr; }
}
