/* Hallmark · shape: app screen · genre: modern-minimal · theme: brand · redesign: restyle
 * paper: oklch(99.2% 0.003 220) · accent: oklch(50% 0.115 235) · display: Myriad Pro · body: Myriad Pro
 * nav: kept (top bar, four tabs) · signature: the Needs booking queue, kept · states: loading, empty, error, full
 * axes: light/grotesk-sans/cool · posture: restrained · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P3 H4 E4 S4 R4 V3 · weakest: P, a restyle keeps the layout the travel team knows by request; the argument lives in sea blue meaning act and red meaning act now, as on Hydra Live */
/* Hallmark · finish-review: subagent · 8 findings · 7 resolved (card dropdown height, section head size, 1px flag edge, the phone tab row scrolls with an edge fade, report card padding, send hint spacing, tabular figures only on dates, chips and counts) · 1 to the owner (middle dots in card lines, kept as on Hydra Live) · gap: none */
/* Hallmark · answered F4 · four filled recipes, each its own job: sea blue moves the work on, WhatsApp green opens WhatsApp, red confirms a cancellation in its own dialog, and the sign-in screen is its own page */

/* Hydra Travel. The layout the travel team knows, in the colours of the Hydra
   logo and the same tokens as Hydra Live: sea blue for actions and selection,
   sea green for the brand band and what is settled, red only for what needs
   acting on now. Myriad Pro throughout. */
:root {
  --color-paper: oklch(99.2% 0.003 220);
  --color-paper-2: oklch(97.4% 0.006 215);
  --color-paper-3: oklch(95% 0.008 215);
  --color-ink: oklch(23% 0.015 235);
  --color-ink-2: oklch(38% 0.014 235);
  --color-muted: oklch(49% 0.014 235);
  --color-rule: oklch(91% 0.01 220);
  --color-rule-strong: oklch(80% 0.012 225);
  --color-on-strong: oklch(99% 0.003 220);
  --color-disabled-ink: oklch(52% 0.008 220);
  --color-field-edge: oklch(60% 0.014 230);

  /* Sea blue: the logo's wave, deepened for controls so white text reads on it */
  --color-sea: oklch(50% 0.115 235);
  --color-sea-hover: oklch(45% 0.115 235);
  --color-sea-press: oklch(41% 0.11 235);
  --color-sea-ink: oklch(40% 0.09 235);
  --color-sea-wash: oklch(96.5% 0.022 225);
  --color-sea-rule: oklch(86% 0.05 228);
  --color-sea-bright: oklch(69% 0.15 233);
  --color-link: oklch(42% 0.1 235);
  --color-focus: oklch(55% 0.17 233);

  /* Sea green: the logo's crest; the brand band and what is settled */
  --color-sea-green: oklch(74% 0.125 155);
  --color-ok: oklch(56% 0.12 155);
  --color-green-ink: oklch(41% 0.09 155);
  --color-green-wash: oklch(96.8% 0.028 155);
  --color-green-rule: oklch(85% 0.06 155);

  /* Amber: waiting on someone (details not sent, unpaid, invoice awaited) */
  --color-warn: oklch(70% 0.14 70);
  --color-warn-ink: oklch(45% 0.09 65);
  --color-warn-wash: oklch(96.8% 0.035 80);
  --color-warn-rule: oklch(86% 0.07 80);

  /* Yellow: worth a second look (a likely match, dates that don't quite fit) */
  --color-caution-edge: oklch(77% 0.15 88);
  --color-caution-ink: oklch(44% 0.08 90);
  --color-caution-wash: oklch(97.2% 0.045 98);
  --color-caution-rule: oklch(88% 0.09 96);

  /* Red: act now */
  --color-alert: oklch(53% 0.19 25);
  --color-alert-ink: oklch(45% 0.16 22);
  --color-alert-wash: oklch(96.5% 0.022 20);
  --color-alert-rule: oklch(87% 0.05 20);

  /* WhatsApp's green, deepened so white text reads on it */
  --color-whatsapp: oklch(47% 0.11 152);
  --color-whatsapp-hover: oklch(42% 0.1 152);

  --color-scrim: oklch(23% 0.015 235 / 0.4);
  --shadow-raise: 0 1px 2px oklch(23% 0.015 235 / 0.06);
  --shadow-sheet: 0 12px 40px oklch(23% 0.015 235 / 0.18);
  --band: linear-gradient(90deg, var(--color-sea-green), var(--color-sea-bright));

  --color-accent: var(--color-sea);
  --color-accent-ink: var(--color-on-strong);
  --font-body: "myriad-pro", "Myriad Pro", "Segoe UI", system-ui, sans-serif;
  --font-display: var(--font-body);
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --control-h: 40px;
  --control-h-sm: 36px;
  --radius: 6px;
  --top-h: 65px;                       /* the header's height while it sits on one line */
  --dur-micro: 120ms;
  --dur-short: 200ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--color-rule-strong) var(--color-paper-2); }
html, body { overflow-x: clip; }
::selection { background: var(--color-sea-wash); color: var(--color-ink); }

body {
  margin: 0;
  background: var(--color-paper-2);
  color: var(--color-ink);
  caret-color: var(--color-sea);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
}
.dates, .chip, .count, .sheet-text, .history .when { font-variant-numeric: tabular-nums; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; color: var(--color-ink); text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
p { text-wrap: pretty; }
a { color: var(--color-link); text-underline-offset: 0.16em; }
a:hover { color: var(--color-sea-hover); }
.muted { color: var(--color-muted); }
.small { font-size: 14px; }

:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: -1px; }

/* Buttons: one height, one radius; sea blue only on the action that moves the work on */
button, input, select, textarea { font: inherit; color: inherit; }
button, a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control-h);
  padding: 0 16px;
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  background: var(--color-paper);
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
button:hover, a.button:hover { border-color: var(--color-sea); color: var(--color-sea-ink); }
button:active, a.button:active { background: var(--color-sea-wash); }
button.primary, a.button.primary { background: var(--color-sea); border-color: var(--color-sea); color: var(--color-on-strong); font-weight: 600; }
button.primary:hover, a.button.primary:hover { background: var(--color-sea-hover); border-color: var(--color-sea-hover); color: var(--color-on-strong); }
button.primary:active, a.button.primary:active { background: var(--color-sea-press); border-color: var(--color-sea-press); }
button.danger { color: var(--color-alert-ink); }
button.danger:hover { border-color: var(--color-alert); color: var(--color-alert-ink); }
button.danger:active { background: var(--color-alert-wash); }
button.primary.danger { background: var(--color-alert); border-color: var(--color-alert); color: var(--color-on-strong); }
button.primary.danger:hover { background: var(--color-alert-ink); border-color: var(--color-alert-ink); }
button.link {
  min-height: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}
button.link { white-space: normal; text-align: left; }
button.link:hover { color: var(--color-sea-hover); }
button.link:active { background: none; color: var(--color-sea-press); }
a.button.whatsapp { background: var(--color-whatsapp); border-color: var(--color-whatsapp); color: var(--color-on-strong); font-weight: 600; }
a.button.whatsapp:hover { background: var(--color-whatsapp-hover); border-color: var(--color-whatsapp-hover); color: var(--color-on-strong); }
button:disabled,
button:disabled:hover,
button.primary:disabled { background: var(--color-paper-3); border-color: var(--color-rule); color: var(--color-disabled-ink); cursor: not-allowed; }

/* Fields */
input, select, textarea {
  width: 100%;
  min-height: var(--control-h);
  padding: 8px 12px;
  font-size: 16px;
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-field-edge);
  border-radius: var(--radius);
}
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--color-muted); }
input:disabled, select:disabled, textarea:disabled { background: var(--color-paper-3); color: var(--color-disabled-ink); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--color-muted); }
input:not([type=checkbox]):not([type=radio]),
select:not([size]):not([multiple]) { height: var(--control-h); padding-top: 0; padding-bottom: 0; }
textarea { min-height: 80px; resize: vertical; }
/* Dropdowns: the browser's own arrow is switched off and one is drawn inside the
   box instead, so it sits in the same place in every browser (Safari otherwise
   draws its own, which can end up outside the border). Lists (size=...) keep theirs. */
select:not([size]):not([multiple]) {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-color: var(--color-paper);
  background-image: linear-gradient(45deg, transparent 50%, var(--color-ink-2) 50%),
                    linear-gradient(135deg, var(--color-ink-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
select:not([size]):not([multiple]):disabled { background-color: var(--color-paper-3); }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; margin: 0; accent-color: var(--color-sea); }
label { display: block; font-weight: 600; font-size: 14px; color: var(--color-ink-2); margin: 16px 0 4px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 16px 0 0; font-size: 15px; color: var(--color-ink); }

/* Sign in */
.gate {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--band) top / 100% 4px no-repeat, var(--color-paper-2);
}
.entrance {
  width: 100%;
  max-width: 400px;
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raise);
  padding: 32px 28px;
}
.entrance .logo { width: 160px; height: auto; display: block; mix-blend-mode: multiply; }
.entrance h1 { font-size: 32px; letter-spacing: -0.02em; margin: 20px 0 8px; }
.entrance button.primary { width: 100%; margin-top: 20px; min-height: 44px; }
.entrance .small { margin: 16px 0 0; }
.form-error {
  color: var(--color-alert-ink);
  background: var(--color-alert-wash);
  border: 1px solid var(--color-alert-rule);
  padding: 8px 12px;
  border-radius: var(--radius);
  margin: 16px 0 0;
}

/* Header: the logo band, the wordmark, four tabs, who is signed in */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--band) top / 100% 4px no-repeat, var(--color-paper);
  border-bottom: 1px solid var(--color-rule);
}
.top-inner { max-width: 1180px; margin: 0 auto; padding: 16px 16px 12px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 16px; font-size: 18px; font-weight: 600; }
.brand img { width: 112px; height: auto; display: block; mix-blend-mode: multiply; }
.brand span { padding-left: 16px; border-left: 1px solid var(--color-rule); line-height: 28px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.tabs button {
  min-height: 36px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-ink-2);
}
.tabs button:hover { color: var(--color-ink); background: var(--color-paper-2); border-color: transparent; }
.tabs button:active { background: var(--color-paper-3); }
.tabs button.active { background: var(--color-sea-wash); border-color: var(--color-sea-rule); color: var(--color-sea-ink); font-weight: 600; }
.count {
  display: inline-block;
  min-width: 20px;
  padding: 0 4px;
  border-radius: 10px;
  background: var(--color-sea);
  color: var(--color-on-strong);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.count:empty { display: none; }
.who { display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--color-muted); }

/* Page */
.page { max-width: 1180px; margin: 0 auto; padding: 28px 16px 80px; }
.bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.bar h1 { font-size: 30px; letter-spacing: -0.015em; margin-right: auto; }
.intro { margin: 0 0 20px; color: var(--color-muted); max-width: 72ch; }
.empty {
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--color-muted);
}
.group-title { font-size: 23px; letter-spacing: -0.01em; color: var(--color-ink); margin: 32px 0 12px; }

.selection {
  position: sticky;
  top: var(--top-h);
  z-index: 5;
  background: var(--color-sea-wash);
  border: 1px solid var(--color-sea-rule);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}
.selection strong { margin-right: auto; }

/* Cards */
.list { display: grid; gap: 12px; }
.card {
  background: var(--color-paper);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raise);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
}
.card.no-check { grid-template-columns: minmax(0, 1fr); }
.card.picked { border-color: var(--color-sea); background: var(--color-sea-wash); }
.card.cancelled { background: var(--color-paper-3); box-shadow: none; color: var(--color-ink-2); }
.card .tick { padding-top: 4px; }
.card .tick input { width: 18px; height: 18px; }
.card-main { min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.card-head .who-line { font-weight: 700; font-size: 18px; }
.card-head .dates { margin-left: auto; font-weight: 600; }
.line { margin-top: 4px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.card .grid2:first-child label { margin-top: 0; }    /* a form set straight in a card (Report) starts at the card's padding */
.card .actions button, .card .actions a.button { min-height: var(--control-h-sm); }
.card .actions select { height: var(--control-h-sm); min-height: 0; font-size: 15px; }
.card .actions button, .card .actions a.button { padding: 0 12px; }

/* Flagged cards: the whole edge in the state's colour, the chip says why */
.card.flag-red { border-color: var(--color-alert); }
.card.flag-yellow { border-color: var(--color-caution-edge); }
.card.flag-green { border-color: var(--color-ok); }

/* Chips: state as a word on its own wash, never a dot */
.chip {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  padding: 4px 8px;
  border-radius: var(--radius);
  background: var(--color-paper-3);
  color: var(--color-ink-2);
  white-space: nowrap;
}
.chip.green { background: var(--color-green-wash); color: var(--color-green-ink); }
.chip.blue { background: var(--color-sea-wash); color: var(--color-sea-ink); }
.chip.amber { background: var(--color-warn-wash); color: var(--color-warn-ink); }
.chip.yellow { background: var(--color-caution-wash); color: var(--color-caution-ink); }
.chip.red { background: var(--color-alert-wash); color: var(--color-alert-ink); }
.warn { color: var(--color-warn-ink); }
.bad { color: var(--color-alert-ink); }

/* Dialog: the head stays put and the body scrolls */
dialog {
  width: min(720px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sheet);
}
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog::backdrop { background: var(--color-scrim); }
.dialog-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-rule);
  background: var(--color-paper);
}
.dialog-head h2 { font-size: 21px; letter-spacing: -0.01em; }
#dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.section-title { font-size: 16px; margin: 28px 0 4px; padding-top: 16px; border-top: 1px solid var(--color-rule); }
.section-title .muted { font-weight: 400; }
.hint { font-size: 14px; color: var(--color-muted); margin: 4px 0 0; }
.hint.warn { color: var(--color-warn-ink); }
.hint.bad { color: var(--color-alert-ink); }
#dialog-body > div > .hint:first-child { margin: 12px 0 8px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-rule); }
.form-error.inline { margin-top: 12px; }
.pick-list { border: 1px solid var(--color-rule-strong); border-radius: var(--radius); max-height: 260px; overflow: auto; background: var(--color-paper); }
.pick-list label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--color-ink); margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--color-rule); font-size: 15px; }
.pick-list label:last-child { border-bottom: 0; }
.pick-list label:hover { background: var(--color-paper-2); }
.pick-list input { margin-top: 4px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips-row button { min-height: 32px; padding: 0 12px; font-size: 14px; }
details.paste { background: var(--color-paper-2); border: 1px solid var(--color-rule); border-radius: var(--radius); padding: 12px 16px; margin-top: 16px; }
details.paste summary { cursor: pointer; font-weight: 600; }
.message { font-family: inherit; min-height: 280px; }
.history { list-style: none; margin: 8px 0 0; padding: 0; }
.history li { padding: 12px 0; border-bottom: 1px solid var(--color-rule); }
.history .when { font-size: 14px; color: var(--color-muted); }
.history ul { margin: 4px 0 0; padding-left: 20px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(560px, calc(100% - 32px));
  background: var(--color-ink);
  color: var(--color-on-strong);
  font-size: 15px;
  padding: 16px 20px;
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
  z-index: 1000;
}
#toast.bad { background: var(--color-alert-ink); }

/* Shift checks */
.shift-check { margin-top: 4px; }
.shift-check.red .reason { color: var(--color-alert-ink); font-weight: 600; }
.shift-check.yellow .reason { color: var(--color-caution-ink); }
.shift-check .reason::before { content: "• "; }

/* Report: rows for the cost sheet */
#tab-report h2 { font-size: 21px; letter-spacing: -0.01em; margin: 32px 0 8px; }
.sheet-list { margin: 16px 0 0; padding-left: 20px; font-size: 14px; }
.sheet-steps { padding-left: 20px; margin: 12px 0; }
.sheet-text { width: 100%; margin-top: 8px; font-family: var(--font-mono); font-size: 12px; white-space: pre; overflow-x: auto; }

/* Traveller page (trip.html) */
.stay-name { font-size: 19px; font-weight: 600; margin: 12px 0 4px; }
.arrival { white-space: pre-wrap; margin: 4px 0 8px; }

/* Needs booking: booking emails from book@hydratravel.co */
.inbox { margin: 8px 0 24px; }
.inbox-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.inbox-head .group-title { margin: 0 auto 0 0; }
.from-email { background: var(--color-sea-wash); border: 1px solid var(--color-sea-rule); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; }
.from-email .hint:first-child { margin-top: 0; }
.adder { border: 1px solid var(--color-rule); border-radius: var(--radius); padding: 12px 16px; margin: 8px 0; background: var(--color-paper-2); }

/* Card used */
.pay-new { margin-top: 8px; }
label.pay-inline { margin: 0 8px 0 0; font-weight: 600; font-size: 14px; color: var(--color-ink-2); }
label.pay-inline select { width: auto; min-width: 200px; }
.pay-below { max-width: 520px; }
.pay-below .pay-new { margin-top: 8px; }

/* Below this the header can wrap to a second line, so the selection bar scrolls with the page */
@media (max-width: 960px) {
  .selection { position: static; }
}

@media (max-width: 700px) {
  .brand img { width: 88px; }
  .top-inner { gap: 8px 12px; padding: 12px 16px 8px; }
  /* The tabs scroll sideways; the edge fades so the last one reads as more to scroll to,
     and room at the end lets it scroll clear of the fade */
  .tabs {
    order: 3; width: 100%; flex: none; flex-wrap: nowrap; overflow-x: auto; gap: 0; padding-right: 28px;
    -webkit-mask-image: linear-gradient(90deg, var(--color-ink) calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, var(--color-ink) calc(100% - 28px), transparent);
  }
  .tabs button { padding: 0 8px; font-size: 14px; }
  .who { margin-left: auto; }
  .bar h1 { font-size: 26px; }
  .card { padding: 16px; }
  .card-head .dates { margin-left: 0; width: 100%; }
  .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
