/* Guest Operations Console — SeaDream Connect design language.
   ONE file, same-origin. Fonts are self-hosted from /static/portal/fonts/
   (shared with the crew portal); light + dark schemes driven by CSS
   variables — dark applies via the system preference or a forced
   data-theme set by the toggle in the topbar (localStorage 'sd-theme'). */

@font-face { font-family: "Marcellus"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/portal/fonts/marcellus-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/portal/fonts/plexsans-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(/static/portal/fonts/plexsans-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F2F5F7;
  --card: #FFFFFF;
  --border: #DEE5EA;
  --ink: #0D1B26;
  --muted: #52616E;
  --accent: #2F6291;
  --accent-dark: #24507A;
  --accent-fg: #FFFFFF;
  --accent-soft: rgba(47, 98, 145, 0.09);
  --danger: #C2402A;
  --danger-dark: #A63524;
  --input-bg: #FFFFFF;
  --hover: #EAF0F4;
  --focus: rgba(47, 98, 145, 0.35);
  --btn-bg: #16283C;
  --btn-fg: #F2EFE7;
  --btn-hover: #23364E;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(13, 27, 38, 0.08), 0 1px 2px rgba(13, 27, 38, 0.04);

  /* Brand chrome — the navy sidebar is navy in BOTH schemes. */
  --navy: #16283C;
  --navy-ink: #F2EFE7;
  --gold: #C9A45C;
  --sb-line: #2A3B52;
  --sb-muted: #AEB7C4;
  --sb-dim: #8C97A8;

  /* Status families (text / tint / line) */
  --ok: #0E7A52;       --ok-bg: #DDF3E8;    --ok-line: #B9E2CE;
  --warn: #8F5A00;     --warn-bg: #F8EDD3;  --warn-line: #EAD7A6;
  --err: #A8352F;      --err-bg: #FBE4E2;   --err-line: #F2C2BE;
  --info: #2C5E8E;     --info-bg: #E7EEF6;  --info-line: #C6D7E8;
  --comp: #7C5E1E;     --comp-bg: #F6EED9;
  --neutral: #52616E;  --neutral-bg: #EDF1F5; --neutral-line: #DEE5EA;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F171E;
    --card: #16212B;
    --border: #263440;
    --ink: #E7EDF2;
    --muted: #93A3B0;
    --accent: #8FB4DA;
    --accent-dark: #A9C6E4;
    --accent-fg: #0F171E;
    --accent-soft: rgba(143, 180, 218, 0.14);
    --danger: #E06450;
    --danger-dark: #C94F3F;
    --btn-bg: #C9A45C;
    --btn-fg: #14100A;
    --btn-hover: #DDBA74;
    --input-bg: #121C24;
    --hover: #1B2836;
    --focus: rgba(143, 180, 218, 0.45);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --ok: #2FBE8A;       --ok-bg: rgba(47, 190, 138, 0.14);   --ok-line: rgba(47, 190, 138, 0.38);
    --warn: #E5A83C;     --warn-bg: rgba(229, 168, 60, 0.14); --warn-line: rgba(229, 168, 60, 0.38);
    --err: #E06450;      --err-bg: rgba(224, 100, 80, 0.15);  --err-line: rgba(224, 100, 80, 0.4);
    --info: #A9C6E4;     --info-bg: rgba(143, 180, 218, 0.14); --info-line: rgba(143, 180, 218, 0.38);
    --comp: #C9A45C;     --comp-bg: rgba(201, 164, 92, 0.16);
    --neutral: #93A3B0;  --neutral-bg: #1B2836;               --neutral-line: #263440;
  }
}
:root[data-theme="dark"] {
  --bg: #0F171E;
  --card: #16212B;
  --border: #263440;
  --ink: #E7EDF2;
  --muted: #93A3B0;
  --accent: #8FB4DA;
  --accent-dark: #A9C6E4;
  --accent-fg: #0F171E;
  --accent-soft: rgba(143, 180, 218, 0.14);
  --danger: #E06450;
  --danger-dark: #C94F3F;
  --btn-bg: #C9A45C;
  --btn-fg: #14100A;
  --btn-hover: #DDBA74;
  --input-bg: #121C24;
  --hover: #1B2836;
  --focus: rgba(143, 180, 218, 0.45);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --ok: #2FBE8A;       --ok-bg: rgba(47, 190, 138, 0.14);   --ok-line: rgba(47, 190, 138, 0.38);
  --warn: #E5A83C;     --warn-bg: rgba(229, 168, 60, 0.14); --warn-line: rgba(229, 168, 60, 0.38);
  --err: #E06450;      --err-bg: rgba(224, 100, 80, 0.15);  --err-line: rgba(224, 100, 80, 0.4);
  --info: #A9C6E4;     --info-bg: rgba(143, 180, 218, 0.14); --info-line: rgba(143, 180, 218, 0.38);
  --comp: #C9A45C;     --comp-bg: rgba(201, 164, 92, 0.16);
  --neutral: #93A3B0;  --neutral-bg: #1B2836;               --neutral-line: #263440;
}

html { height: 100%; }
body {
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  min-height: 100%;
  /* Must match the crew admin exactly — different smoothing makes the same
     navy wordmark render visibly thicker/thinner between the two consoles. */
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars — same treatment as the crew admin */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── layout ─────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--navy);
  border-right: 1px solid rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--sb-line); }
.brand-name { font-family: Marcellus, Georgia, serif; font-weight: 400; font-size: 17px; color: var(--navy-ink); }
.brand-gold { color: var(--gold); }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sb-dim); }

.sidebar nav { padding: 12px 8px; flex: 1; overflow-y: auto; }
.nav-group {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--sb-dim); padding: 14px 10px 6px;
}
.sidebar nav a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px; margin: 1px 0;
  border-radius: 6px; color: var(--sb-muted); font-weight: 500;
}
.sidebar nav a:hover { background: rgba(242, 239, 231, 0.07); color: var(--navy-ink); text-decoration: none; }
.sidebar nav a.active { background: rgba(242, 239, 231, 0.12); color: var(--navy-ink); font-weight: 600; }
.sidebar nav a svg { flex: 0 0 16px; height: 16px; color: var(--sb-dim); }
.sidebar nav a:hover svg { color: var(--sb-muted); }
.sidebar nav a.active svg { color: var(--gold); }
.sidebar-foot { padding: 12px 16px 14px; border-top: 1px solid var(--sb-line); font-size: 12px; }

/* Super-admin footer tools: 'view as support' preview. Same visual language
   as the nav above so the footer reads as part of the sidebar. */
.viewas-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--sb-dim); margin-bottom: 6px;
}
.viewas-ships { display: flex; gap: 6px; }
.viewas-ships form { flex: 1; display: flex; }
.viewas-btn {
  flex: 1; font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  padding: 5px 0; border: 1px solid var(--sb-line); border-radius: 6px;
  background: transparent; color: var(--sb-muted);
}
.viewas-btn:hover { background: rgba(242, 239, 231, 0.08); color: var(--navy-ink); border-color: #3C506B; }
.viewas-btn:active { background: rgba(242, 239, 231, 0.14); }

/* The preview banner's Exit control (flash-warning, above the content). */
.viewas-exit {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 3px 10px; border-radius: 6px; border: 1px solid currentColor;
  background: transparent; color: inherit;
}
.viewas-exit:hover { background: rgba(13, 27, 38, 0.06); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 10px 24px; position: sticky; top: 0; z-index: 5;
  /* Locked height — must equal the crew admin topbar to the pixel. */
  height: 57px; box-sizing: border-box;
}
.global-search { flex: 1; max-width: 480px; }
.global-search input {
  width: 100%; padding: 7px 12px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg);
  color: var(--ink);
}
.global-search input:focus { outline: 2px solid var(--focus); background: var(--input-bg); }
.topbar-user {
  color: var(--muted); font-size: 13px; white-space: nowrap;
  margin-left: auto; display: flex; align-items: center; gap: 12px;
}
.topbar-user .logout-btn {
  background: none; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted); font-size: 12.5px; padding: 4px 10px; cursor: pointer;
  font-family: inherit; line-height: 1.2;
}
.topbar-user .logout-btn:hover { color: var(--ink); background: var(--bg); }

/* Light / Dark / System switch (topbar) */
.theme-toggle {
  display: flex; align-items: center; gap: 1px; padding: 2px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
}
.theme-toggle button {
  width: 28px; height: 24px; border-radius: 999px; border: none; background: none;
  color: var(--muted); cursor: pointer; display: flex; align-items: center;
  justify-content: center; padding: 0;
}
.theme-toggle button.is-active { background: var(--navy); color: var(--navy-ink); }
.theme-toggle svg { width: 13px; height: 13px; }

.content { padding: 24px; max-width: 1200px; width: 100%; }

/* ── headings, cards ────────────────────────────────── */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
h1 { font-size: 20px; font-weight: 600; }
h2 { font-size: 15px; font-weight: 600; margin: 26px 0 10px; }
h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 8px; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 16px;
}
.card + .card { margin-top: 0; }

.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.grid-metrics { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.metric { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.metric .num { font-size: 28px; font-weight: 600; line-height: 1.2; }
.metric .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-top: 2px; }
/* A metric that is also a link (Match failures → Signup issues) must read as
   a card, not as link text — the accent colour on a 28px number looks broken. */
a.metric { display: block; color: inherit; }
a.metric:hover { text-decoration: none; border-color: var(--accent); }

/* ── health card ────────────────────────────────────── */
.health { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 22px 24px; margin-bottom: 18px; }
.health .status { font-size: 30px; font-weight: 700; letter-spacing: 0.01em; }
.health .sub { margin-top: 4px; font-size: 13px; }
.health ul { margin: 8px 0 0 18px; font-size: 13px; }
.health-green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.health-amber { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.health-red { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.health-offline { background: var(--neutral-bg); color: var(--neutral); border-color: var(--neutral-line); }

/* ── tables ─────────────────────────────────────────── */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); font-weight: 600; padding: 8px 10px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.tbl tbody tr:hover { background: var(--bg); }
.tbl .num-col { text-align: right; }
.tbl .num-col, .metric .num { font-variant-numeric: tabular-nums; }
.tbl a.row-link { font-weight: 600; }

/* sortable headers (tables opting in via data-sortable; console.js wraps
   each th's content in a .th-sort button and stamps aria-sort) */
.tbl th .th-sort {
  font: inherit; color: inherit; text-transform: inherit;
  letter-spacing: inherit; background: none; border: 0; padding: 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.tbl th .th-sort::after { content: "↕"; font-size: 10px; opacity: 0.35; }
.tbl th:hover .th-sort { color: var(--ink); }
.tbl th[aria-sort] .th-sort { color: var(--ink); }
.tbl th[aria-sort="ascending"] .th-sort::after { content: "▲"; font-size: 9px; opacity: 1; }
.tbl th[aria-sort="descending"] .th-sort::after { content: "▼"; font-size: 9px; opacity: 1; }

/* ── prose (reference pages: the Assisted Access support guide) ──────
   Long-form reading, not dashboard scanning: a bounded measure, numbers
   that sit inside the card, and air between steps. */
.prose { max-width: 78ch; }
.prose h3 { font-size: 14px; margin-bottom: 12px; }
.prose p { margin-bottom: 10px; }
.prose p:last-child { margin-bottom: 0; }
.prose ol, .prose ul { padding-left: 22px; margin: 0; }
.prose li { margin-bottom: 10px; padding-left: 4px; line-height: 1.6; }
.prose li:last-child { margin-bottom: 0; }
.prose li::marker { color: var(--muted); font-weight: 600; }
/* Nested detail under a step (per-device instructions) and the sentences
   that follow it — each needs its own breathing room, or the step reads as
   one wall. */
.prose li > ul, .prose li > ol { margin: 8px 0 10px; }
.prose li > ul > li { margin-bottom: 8px; }
.prose li p { margin: 9px 0 0; }
.prose code {
  font-size: 12.5px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}
.prose .tbl th, .prose .tbl td { padding: 11px 12px; line-height: 1.55; }
.prose .tbl td:first-child { width: 30%; font-weight: 500; }
.prose .tbl tbody tr:last-child td { border-bottom: 0; }
/* Intro paragraph under a page title: readable measure, not full width. */
.page-intro { max-width: 78ch; color: var(--muted); margin-top: 4px; }

/* ── pills ──────────────────────────────────────────── */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill-active { background: var(--ok-bg); color: var(--ok); }
.pill-pending { background: var(--warn-bg); color: var(--warn); }
.pill-failed { background: var(--err-bg); color: var(--err); }
.pill-voided { background: var(--neutral-bg); color: var(--neutral); }
.pill-comp { background: var(--comp-bg); color: var(--comp); }
.pill-muted { background: var(--neutral-bg); color: var(--neutral); }
.struck { text-decoration: line-through; color: var(--muted); }

/* ── buttons & forms ────────────────────────────────── */
.btn {
  display: inline-block; padding: 7px 14px; font-size: 13.5px; font-weight: 600;
  border-radius: 6px; border: 1px solid transparent; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--border); box-shadow: var(--shadow); }
.btn-secondary:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 10px 0 4px; }
input[type="text"], input[type="search"], input[type="email"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="file"], select, textarea {
  width: 100%; padding: 7px 10px; font-size: 13.5px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); }
a:focus-visible, button:focus-visible, .chip:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
textarea { min-height: 90px; resize: vertical; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 140px; }
.form-actions { margin-top: 14px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
/* Consecutive explanatory paragraphs need air, or they read as one block. */
.hint + .hint { margin-top: 9px; }

/* ── filter chips ───────────────────────────────────── */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 14px; }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  font-size: 12.5px; font-weight: 500;
}
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ── action confirm forms (details/summary — no JS) ─── */
details.action { display: inline-block; margin: 0 6px 8px 0; vertical-align: top; }
details.action summary { list-style: none; cursor: pointer; }
details.action summary::-webkit-details-marker { display: none; }
details.action[open] > .action-form {
  position: relative; margin-top: 8px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  min-width: 280px;
}

/* ── activity feed / timeline ───────────────────────── */
.feed { list-style: none; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; gap: 10px; }
.feed li:last-child { border-bottom: 0; }
.feed .when { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 118px; }
.feed .what .reason { color: var(--muted); }
.timeline-kind {
  display: inline-block; min-width: 66px; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); font-weight: 600;
}

/* ── misc ───────────────────────────────────────────── */
.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-weight: 500; border: 1px solid transparent; }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash-error { background: var(--err-bg); color: var(--err); border-color: var(--err-line); }
.flash-warning { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.flash-info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }

.kv { display: grid; grid-template-columns: 170px 1fr; row-gap: 6px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.pager { display: flex; gap: 10px; align-items: center; margin-top: 14px; color: var(--muted); font-size: 13px; }

.muted { color: var(--muted); }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.mt { margin-top: 16px; }
.big-total { font-size: 18px; font-weight: 700; }

/* ── upload dropzones (console.js) ─────────────────── */
.dz-enabled { border: 1.5px dashed var(--border); border-radius: 6px; padding: 8px; background: var(--input-bg); }
.dz-enabled.dz-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-over > * { pointer-events: none; }
.dz-file:not(:empty) { color: var(--ink); }

@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: none; height: auto; position: static; }
  .content { padding: 16px; }
}

/* ── Assisted Access support guide (support_guide.html) ──────────────
   A desk reference staff scan MID-TICKET, guest waiting. Color carries
   meaning throughout: red = never / escalate, green = do this,
   amber = caution. Big numbered chips are the landmarks; body text keeps
   a reading measure even where the card runs wide. @media print at the
   bottom of this file turns the same page into the paper desk copy. */

.guide { max-width: 1060px; }
.guide .page-intro { margin-top: 6px; }
.guide code {
  font-size: 12.5px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}
.guide .card { padding: 18px 20px; }

/* jump nav — reuses .chips/.chip look via its own class so chips stay links */
.g-jump { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.g-jump a {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--muted);
  font-size: 12.5px; font-weight: 500;
}
.g-jump a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* fastest-safe-pattern strip — the one line to remember, navy brand band
   (fixed navy in both schemes). */
.g-flow {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  background: var(--navy); color: var(--navy-ink); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 13px 18px; margin-bottom: 8px;
}
.g-flow-title {
  flex-basis: 100%; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; color: #93A8BD;
}
.g-flow-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.g-flow-step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16); font-size: 11.5px; font-weight: 700;
}
.g-flow-sep { color: #5C7590; font-weight: 600; }

/* section heads — numbered like the printed guide, rule underneath */
.g-sechead {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 1px solid var(--border);
  margin: 30px 0 14px; padding-bottom: 9px;
  scroll-margin-top: 70px; /* land clear of the sticky topbar on jump links */
}
.g-sechead h2 { font-size: 17px; font-weight: 650; margin: 0; }
.g-secnum { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); font-variant-numeric: tabular-nums; }
.g-secsub { margin-left: auto; color: var(--muted); font-size: 12.5px; }

/* golden-rule cards */
.g-rules { display: grid; gap: 10px; }
.g-rule {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px 15px 15px;
}
.g-rule-num {
  flex: 0 0 32px; height: 32px; border-radius: 7px; margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; color: var(--navy-ink); background: var(--navy);
}
.g-rule-body { flex: 1; min-width: 0; }
.g-rule-kicker {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 1px;
}
.g-rule-body h4 { font-size: 14px; font-weight: 650; margin: 0 0 2px; }
.g-rule-body > p { margin: 6px 0 0; max-width: 78ch; line-height: 1.6; }
.g-rule-never { border-left-color: var(--danger); }
.g-rule-never .g-rule-num { background: var(--danger); color: #fff; }
.g-rule-never .g-rule-kicker { color: var(--danger); }
.g-rule-do { border-left-color: var(--ok); }
.g-rule-do .g-rule-num { background: var(--ok); color: #fff; }
.g-rule-do .g-rule-kicker { color: var(--ok); }

/* per-platform matrix inside rule 2 */
.g-platforms {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 10px; margin: 12px 0 0;
}
.g-platform { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 11px 13px; }
.g-platform h5 {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); margin: 0 0 7px;
}
.g-platform .g-path { font-size: 13px; font-weight: 600; margin: 0; line-height: 1.5; }
.g-platform p { font-size: 12.5px; margin: 6px 0 0; line-height: 1.55; }

/* tinted inline callouts */
.g-note {
  border: 1px solid; border-radius: 7px; padding: 10px 13px;
  font-size: 13px; line-height: 1.55; margin: 10px 0 0; max-width: 78ch;
}
.g-note-green { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.g-note-amber { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.g-note-red   { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.g-note-plain { background: var(--bg); border-color: var(--border); color: var(--ink); }

/* numbered procedure steps (troubleshooting order) */
ol.g-steps { list-style: none; counter-reset: g; margin: 0; padding: 0; }
.g-steps > li {
  counter-increment: g; position: relative;
  padding: 13px 0 13px 46px; border-bottom: 1px solid var(--border);
  max-width: 86ch; line-height: 1.6;
}
.g-steps > li::before {
  content: counter(g);
  position: absolute; left: 0; top: 13px; width: 30px; height: 30px;
  border-radius: 7px; background: var(--navy); color: var(--navy-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.g-steps > li:first-child::before { background: var(--ok); color: #fff; }
.g-steps > li:last-child { border-bottom: 0; padding-bottom: 3px; }
.g-steps h4 { font-size: 13.5px; font-weight: 650; margin: 0; padding-top: 5px; }
.g-steps p { margin: 5px 0 0; }

/* guide tables — navy header band, zebra rows (brand navy both schemes) */
.g-tbl th {
  background: var(--navy); color: var(--navy-ink); font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  padding: 9px 12px; border-bottom: 0;
}
.g-tbl th:first-child { border-radius: 6px 0 0 6px; }
.g-tbl th:last-child { border-radius: 0 6px 6px 0; }
.g-tbl td { padding: 11px 12px; line-height: 1.55; }
.g-tbl td:first-child { width: 28%; font-weight: 600; }
.g-tbl tbody tr:nth-child(even) { background: var(--bg); }
.g-tbl tbody tr:last-child td { border-bottom: 0; }
/* old-habit → new-habit table: red column vs green column */
.g-tbl-swap th:first-child { background: var(--danger); color: #fff; }
.g-tbl-swap th:last-child { background: var(--ok); color: #fff; }
.g-tbl-swap td:first-child { width: 40%; font-weight: 500; color: var(--muted); }
.g-tbl-swap td:last-child { font-weight: 500; }

/* two-up tinted panels (Assisted Access, access levels) */
.g-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 12px; margin-top: 12px; }
.g-panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; background: var(--card); }
.g-panel h4 {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; margin: 0 0 8px; color: var(--muted);
}
.g-panel p, .g-panel li { font-size: 13px; line-height: 1.6; }
.g-panel p { margin: 0 0 8px; }
.g-panel p:last-child { margin-bottom: 0; }
.g-panel ul { padding-left: 18px; margin: 0; }
.g-panel li { margin-bottom: 6px; }
.g-panel li:last-child { margin-bottom: 0; }
.g-panel-green { background: var(--ok-bg); border-color: var(--ok-line); }
.g-panel-green h4 { color: var(--ok); }
.g-panel-amber { background: var(--warn-bg); border-color: var(--warn-line); }
.g-panel-amber h4 { color: var(--warn); }
.g-panel-red { background: var(--err-bg); border-color: var(--err-line); }
.g-panel-red h4 { color: var(--err); }

/* grant CTA — the one interactive step on the page */
.g-cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 18px; margin-top: 12px;
}
.g-cta p { flex: 1; min-width: 240px; margin: 0; font-size: 13px; line-height: 1.55; }
.g-cta .btn { white-space: nowrap; }

/* escalation box */
.g-escalate .g-rule-num { font-size: 17px; }

@media (max-width: 700px) {
  .g-flow { gap: 6px 10px; }
  .g-flow-sep { display: none; }
  .g-flow-step { flex-basis: 100%; }
  .g-secsub { display: none; }
}

/* ── MAC-address finder (Assisted Access grant page) ─────────────────
   The read-the-MAC guide staff follow with the guest's device in hand.
   One row per device type — open the one that matches (the `name`
   attribute keeps a single row open) and follow the numbered steps.
   The skeleton is the same on every platform (randomization off →
   rejoin → read the address); the rows carry the exact per-OS labels. */
details.macfind > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink);
}
details.macfind > summary::-webkit-details-marker { display: none; }
details.macfind > summary:hover { background: var(--hover); }
details.macfind[open] > summary { border-radius: 7px 7px 0 0; }
details.macfind > summary > svg:first-child { flex: 0 0 16px; color: var(--muted); }
.mf-chev { flex: 0 0 14px; color: var(--muted); transition: transform 0.12s ease; }
details.macfind > summary .mf-chev { margin-left: auto; }
details[open] > summary .mf-chev { transform: rotate(90deg); }

.mf-body {
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 7px 7px; background: var(--card);
}
.mf-lead {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
}
.mf-lead-step { display: inline-flex; align-items: center; font-weight: 600; color: var(--ink); white-space: nowrap; }
.mf-lead-step b {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 50%; margin-right: 5px;
  background: var(--navy); color: var(--navy-ink); font-size: 10px; font-weight: 700;
}

.mf-device + .mf-device { border-top: 1px solid var(--border); }
.mf-device > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; font-size: 13.5px; font-weight: 600;
}
.mf-device > summary::-webkit-details-marker { display: none; }
.mf-device > summary:hover { background: var(--bg); }
.mf-device[open] > summary { padding-bottom: 4px; }
.mf-device > summary > svg:first-child { flex: 0 0 16px; color: var(--muted); }
.mf-look { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); }

ol.mf-steps { list-style: none; counter-reset: mf; margin: 0; padding: 2px 14px 13px; }
.mf-steps > li {
  counter-increment: mf; position: relative;
  padding: 5px 0 5px 30px; font-size: 13px; line-height: 1.55;
}
.mf-steps > li::before {
  content: counter(mf);
  position: absolute; left: 0; top: 7px; width: 20px; height: 20px;
  border-radius: 6px; background: var(--navy); color: var(--navy-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.mf-steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 9.5px; top: 29px; bottom: -3px;
  width: 1px; background: var(--border);
}
.mf-steps > li.mf-goal::before { background: var(--ok); color: #fff; }
.mf-plain { margin: 0; padding: 2px 14px 13px; font-size: 13px; line-height: 1.6; }

.mf-path { font-weight: 600; }
.mf-path .seg { white-space: nowrap; }
.mf-sep { color: var(--muted); font-weight: 400; }
.mf-ui {
  display: inline-block; padding: 0 5px; border-radius: 4px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.mf-note { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mf-warn { background: var(--warn-bg); color: var(--warn); border-radius: 4px; padding: 0 4px; font-weight: 600; }

@media (max-width: 560px) {
  .mf-look { display: none; }
  .mf-device > summary .mf-chev { margin-left: auto; }
}

/* ── Wi-Fi rate card (rates.html) ────────────────────────────────────
   A price list read MID-CONVERSATION with a guest at the desk, so the two
   headline prices are unmissable and the by-length card is a scan, not a
   21-row table to read down. Nothing here carries a hard-coded figure —
   every number is rendered from guests.pricing / the Voyage row. */

.r-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 4px 0 0; }
.r-price {
  background: var(--card); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 18px;
}
.r-price-kicker {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent);
}
.r-price-amount {
  margin: 3px 0 0; font-size: 32px; font-weight: 700; line-height: 1.1;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.r-price-unit { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 7px; }
.r-price > p:last-child { margin: 8px 0 0; font-size: 13px; line-height: 1.55; max-width: 48ch; }

/* by-length card: one tile per voyage length, scannable in a glance */
.r-lengths { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-top: 12px; }
.r-len {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 9px 6px 8px;
}
.r-len-nights { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.r-len-price { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-len-tag {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
}
/* voyage table: dates, ship names and cut-off times are quoted aloud, so
   none of them may wrap mid-value. The guide tables' wide first column is
   right for a question column and wrong for a voyage number. */
.r-voyages th, .r-voyages td { white-space: nowrap; }
.r-voyages td:first-child { width: auto; }

/* a length the ships are actually sailing — the row the desk needs */
.r-len-sailing { background: var(--ok-bg); border-color: var(--ok); border-width: 1.5px; }
.r-len-sailing .r-len-nights, .r-len-sailing .r-len-tag { color: var(--ok); }
.r-len-base:not(.r-len-sailing) { border-color: var(--accent); }
.r-len-base:not(.r-len-sailing) .r-len-tag { color: var(--accent); }

/* ── print — the paper copy at the desk ──────────────────────────────
   Browsers default to skipping background colors, so every white-on-color
   chip gets an outlined fallback and the navy band flips to bordered text.
   Print always uses the light palette regardless of screen scheme. */
@media print {
  :root, :root[data-theme="dark"] {
    --bg: #fff; --card: #fff; --border: #DEE5EA; --ink: #0D1B26;
    --muted: #52616E; --input-bg: #fff;
  }
  body { background: #fff; font-size: 11.5px; }
  .sidebar, .topbar, .flash, .g-jump, .g-cta, [data-print] { display: none !important; }
  .content { padding: 0; max-width: none; }
  .card, .g-rule, .g-panel, .g-note, .g-platform { box-shadow: none; break-inside: avoid; }
  .g-steps > li, .g-tbl tr { break-inside: avoid; }
  .g-sechead { break-after: avoid; }
  a { color: inherit; text-decoration: none; }
  .g-flow { background: none; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
  .g-flow-title { color: var(--ink); }
  .g-flow-sep { color: var(--ink); }
  .g-flow-step b { background: none; border: 1.5px solid var(--ink); color: var(--ink); }
  .g-rule-num, .g-steps > li::before {
    background: none !important; color: var(--ink); border: 1.5px solid var(--ink);
  }
  .g-tbl th { background: none !important; color: var(--ink); border-bottom: 2px solid var(--ink); }
  /* rate card: keep every tile and both headline prices on the paper copy,
     and keep a length card from breaking across pages mid-row. */
  .r-price, .r-len { box-shadow: none; break-inside: avoid; }
  .r-lengths { break-inside: avoid; }
  .r-len-sailing { border-width: 2px; }
}

/* ── Module switcher (Guest | Crew) — console consolidation ── */
.module-switch {
  display: flex; gap: 3px; margin: 10px 12px 2px;
  border: 1px solid var(--sb-line); border-radius: 8px; padding: 3px;
  background: rgba(11, 19, 34, 0.35);
}
.module-tab {
  flex: 1; text-align: center; padding: 5px 0; border-radius: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--sb-dim);
  text-decoration: none;
}
.module-tab:hover { color: var(--navy-ink); text-decoration: none; }
.module-tab.is-active { background: var(--navy-ink); color: var(--navy); }

/* ── Overview: quiet operational strip, revenue hero, mini metrics ── */
.health-slim {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 14px;
}
.health-slim .status { font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; }
.health-slim .sub { margin: 0; font-size: 12.5px; opacity: 0.85; }
.hs-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

.flag-link { display: block; text-decoration: none; }
.flag-link:hover { text-decoration: none; filter: brightness(0.97); }

.grid-rev { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
@media (max-width: 900px) { .grid-rev { grid-template-columns: 1fr; } }
.rev-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.rev-kicker {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--muted);
}
.rev-amount {
  font-size: 34px; font-weight: 700; line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.rev-amount-sm { font-size: 22px; }
.rev-today { text-align: right; }
.rev-sub { font-size: 12px; color: var(--muted); }
.rev-chart {
  display: flex; align-items: flex-end; gap: 4px; height: 96px;
  margin-top: 16px; border-bottom: 1px solid var(--border); padding-bottom: 1px;
}
.rev-col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.rev-bar { width: 100%; background: var(--accent); opacity: 0.4; border-radius: 3px 3px 0 0; min-height: 2px; }
.rev-bar-today { opacity: 1; }
.rev-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }

.mini-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-metric { background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; }
.mini-metric .num { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-metric .label { font-size: 11.5px; color: var(--muted); }
.p95-note {
  margin-top: 10px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 8px;
}
