:root {
  --sea: #0E2A47;
  --surface: #F5F8FA;
  --paper: #FFFFFF;
  --ink: #1B2733;
  --muted: #5B6B7A;
  --line: #D6E0E8;
  --action: #0077B6;
  --action-dark: #005F92;
  --free: #2E8B6E;
  --penalty: #C9D3DB;
  --danger: #B3261E;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--surface); line-height: 1.45; font-variant-numeric: tabular-nums; }
a { color: var(--action); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
h1 { font-size: 1.6rem; font-weight: 600; margin: 0 0 .75rem; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 .35rem; }
p { margin: 0 0 .75rem; max-width: 64ch; }
small { color: var(--muted); }
.muted { color: var(--muted); }

/* header */
.top { display: flex; align-items: center; background: var(--sea); color: #fff; padding: 0 1.5rem; height: 52px; }
.brand { color: #fff; font-weight: 600; font-size: 1.05rem; white-space: nowrap; }
.brand span { font-weight: 400; opacity: .7; margin-left: .5rem; }
.top nav { display: flex; margin-left: 2.5rem; }
.top nav a + a { margin-left: 1.25rem; }
.top nav a { color: #fff; opacity: .75; padding: .9rem 0; border-bottom: 2px solid transparent; }
.top nav a[aria-current="page"] { opacity: 1; border-bottom-color: #fff; }
.top nav a:hover { opacity: 1; text-decoration: none; }
.who { margin-left: auto; display: flex; align-items: center; font-size: .9rem; opacity: .9; }
.who form { margin-left: 1rem; }
.who form { margin: 0; }
button.link { background: none; border: 0; color: #fff; opacity: .75; cursor: pointer; font: inherit; padding: 0; }
button.link:hover { opacity: 1; text-decoration: underline; }

main { padding: 1.25rem 1.5rem 3rem; max-width: 1280px; margin: 0 auto; }
.narrow { max-width: 720px; }

/* forms */
label { display: block; font-size: .85rem; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: .2rem; padding: .45rem .55rem; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
input:focus, select:focus, textarea:focus { border-color: var(--action); outline: none; box-shadow: 0 0 0 2px rgba(0,119,182,.2); }
button, .button { font: inherit; font-weight: 500; padding: .5rem .9rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; display: inline-block; }
button.primary { background: var(--action); border-color: var(--action); color: #fff; }
button.primary:hover { background: var(--action-dark); }
button.small { padding: .3rem .7rem; font-size: .9rem; }
button.danger { background: var(--paper); border-color: var(--danger); color: var(--danger); }
button.danger:hover { background: var(--danger); color: #fff; }

/* search desk */
.desk { display: flex; flex-wrap: wrap; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem .6rem; margin-bottom: 1rem; }
.desk > label { flex: 1 1 8rem; margin: 0 .6rem .3rem 0; }
.desk > label:first-child { flex: 2 1 14rem; }
.desk > label:nth-child(3), .desk > label:nth-child(4) { flex: 0 1 10rem; }
.desk > label:nth-child(5), .desk > label:nth-child(7) { flex: 0 1 5.5rem; }
.desk button { height: 38px; white-space: nowrap; margin-bottom: .3rem; }
.summary { color: var(--muted); font-size: .9rem; margin: 0 0 .9rem; }
.summary strong { color: var(--ink); }
.empty { padding: 2rem 0; color: var(--muted); }

/* tables */
table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 500; font-size: .8rem; color: var(--muted); background: #EEF3F7; }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.total { font-weight: 600; }
td form { margin: 0; }
.hotel { margin-bottom: 1.25rem; }
.hotel h2 { padding: .5rem 0 .4rem; }
.tag { font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 .45rem; margin-left: .35rem; }

/* cancellation window — the one thing an agent must see at a glance */
.policy { min-width: 190px; }
.window { position: relative; height: 6px; background: var(--penalty); border-radius: 3px; overflow: hidden; margin-bottom: .25rem; }
.window .free { display: block; height: 100%; background: var(--free); }
.policy small { display: block; white-space: nowrap; }
.policy small.warn { color: var(--danger); }

/* status */
.status { font-size: .8rem; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; font-weight: 500; }
.status.confirmed { color: var(--free); border-color: var(--free); }
.status.on_request { color: #8A6D00; border-color: #D9B93A; }
.status.cancelled { color: var(--muted); text-decoration: line-through; }

/* booking flow */
.recap { display: flex; justify-content: space-between; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: 1rem; }
.recap > div { padding-right: 1rem; }
.recap .total { font-size: 1.25rem; font-weight: 600; text-align: right; padding-right: 0; margin-left: auto; }
.recap .total small { font-weight: 400; font-size: .8rem; }
.policybox, .cancelbox { border-left: 3px solid var(--free); padding: .5rem .9rem; margin: 0 0 1.25rem; background: var(--paper); }
.cancelbox { border-left-color: var(--danger); }
.guests fieldset { border: 0; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; }
.guests fieldset > * + * { margin-left: .5rem; }
.guests fieldset select { width: 5.5rem; flex: 0 0 auto; }
.guests fieldset input[type="text"], .guests fieldset input:not([size]) { flex: 1 1 8rem; }
.guests fieldset input[size] { width: 4rem; flex: 0 0 auto; }
.guests fieldset legend { flex-basis: 100%; }
.guests legend { font-size: .85rem; color: var(--muted); padding: 0; margin-bottom: .25rem; }
.guests input, .guests select { margin-top: 0; }
.guests label { margin: .75rem 0; }
.hold { color: var(--muted); font-size: .9rem; }
.facts { display: grid; grid-template-columns: 11rem 1fr; gap: .4rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; margin: 0 0 1.25rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts dd.total { font-weight: 600; font-size: 1.1rem; }
.guests-list { margin: .25rem 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .9rem; }

/* messages */
.alert { background: #FFF4E5; border-left: 3px solid #E0A100; padding: .5rem .8rem; }
.ok { background: #E8F5EF; border-left: 3px solid var(--free); padding: .5rem .8rem; }

/* login */
.login { max-width: 380px; margin: 4rem auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.login .lede { color: var(--muted); }
.login label { margin-bottom: .75rem; }
.login button { width: 100%; margin-top: .5rem; }

/* filters */
.filters { display: flex; margin-bottom: 1rem; }
.filters > * + * { margin-left: .6rem; }
.filters input { flex: 1; }
.filters select { width: 12rem; }
.filters input, .filters select { margin-top: 0; }

@media (max-width: 900px) {
  .desk > label, .desk > label:first-child, .desk > label:nth-child(n) { flex: 1 1 45%; }
  .desk button { width: 100%; }
  .recap { flex-direction: column; }
  .recap .total { text-align: left; margin-left: 0; }
  .facts { grid-template-columns: 1fr; }
  table { display: block; overflow-x: auto; }
  .top { gap: 1rem; padding: 0 1rem; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
