/* Islas Travel Hub G layer: shell + shared components. Depends on g-tokens.css. Loaded last (inc/g-shell.php).
   Component rules below come from redesign/G/components.css; WordPress-specific shell rules and neutralisers are at the end.
   Element resets (margins, link colour) are scoped to G surfaces so pages that are not redesigned yet keep their spacing:
   wrap redesigned page content in .g-page to get them. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--topbar-h) + 12px); }
html body { zoom: 1 !important; } /* final-visual-rc19.css shrank the app with body{zoom:.8} */
body.g-ui {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 var(--fs-md)/1.45 var(--font-text);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
:is(.sidebar, .topbar, .g-page, .login, .public-bar) :is(h1, h2, h3, h4) { font-family: var(--font-display); margin: 0; color: var(--ink); letter-spacing: -0.01em; text-wrap: balance; }
:is(.sidebar, .topbar, .g-page, .login, .public-bar) p { margin: 0; }
:is(.sidebar, .topbar, .g-page, .login, .public-bar) a { color: inherit; text-decoration: none; }
:is(.sidebar, .topbar, .g-page, .login, .public-bar) :is(button, input, select, textarea) { font: inherit; color: inherit; }
body.g-ui :focus-visible { outline: 2px solid var(--emerald-600); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- App shell ---------- */
/* Sidebar is sticky at 100vh; the column colour continues below it (full-page captures, very tall pages). */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; background: linear-gradient(90deg, var(--forest-950) var(--sidebar-w), transparent 0); }

.sidebar {
  position: sticky; top: 0; height: 100vh; isolation: isolate; overflow: hidden auto; scrollbar-width: none;
  display: flex; flex-direction: column; gap: 26px;
  padding: 22px 14px 18px;
  color: var(--on-forest);
  background:
    radial-gradient(120% 50% at 0% 0%, rgb(255 255 255 / 0.06), transparent 60%),
    linear-gradient(180deg, var(--forest-700) 0%, var(--forest-800) 46%, var(--forest-950) 100%);
}
/* Light ring on the forest sidebar: #CFE8C9 is >= 3:1 against every sidebar shade (WCAG 1.4.11). */
.sidebar :focus-visible { outline-color: #CFE8C9; }
.sidebar .palms {
  position: absolute; z-index: -1; left: -24px; bottom: 116px; width: 400px; aspect-ratio: 540 / 700;
  background: var(--palms, none) left bottom / 100% auto no-repeat;
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand-mark { width: 50px; height: 42px; flex: none; }
.brand-name { font: 700 21px/1.1 var(--font-display); letter-spacing: -0.015em; color: #fff; }
.brand-sub { font-size: 12px; color: var(--on-forest-muted); margin-top: 3px; }

.nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 14px;
  border-radius: var(--r-md); font-size: 16px; font-weight: 500; color: var(--on-forest);
  transition: background-color .15s ease;
}
.nav a .i { width: 21px; height: 21px; color: #d9e8dc; }
.nav a:hover { background: rgb(255 255 255 / 0.07); }
.nav a[aria-current="page"] {
  background: linear-gradient(90deg, #e7f3df, var(--mint-200));
  color: var(--forest-900); font-weight: 650;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.5), 0 2px 8px rgb(0 0 0 / 0.18);
}
.nav a[aria-current="page"] .i { color: var(--forest-800); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.14); }
.nav a[aria-current="page"] .count { background: var(--forest-700); color: #fff; }

.promo {
  margin-top: auto; padding: 18px 18px 16px; border-radius: var(--r-xl);
  border: 1px solid rgb(255 255 255 / 0.24);
  background: linear-gradient(180deg, rgb(24 63 39 / 0.5), rgb(12 37 22 / 0.9) 45%);
  backdrop-filter: blur(1.5px);
}
.promo .i { width: 30px; height: 30px; color: var(--mint-200); }
.promo h3 { color: #fff; font-size: 16.5px; margin: 10px 0 6px; }
.promo p { font-size: 13px; line-height: 1.45; color: #d0dfd4; }

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

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h); display: flex; align-items: center; gap: 22px; min-width: 0;
  padding: 0 28px; border-bottom: 1px solid var(--border);
  background: rgb(250 251 247 / 0.9); backdrop-filter: blur(10px);
}
.page-title { white-space: nowrap; }
.page-title h1 { font-size: var(--fs-xl); font-weight: 700; line-height: 1.15; }
.page-title p { font-size: var(--fs-sm); color: var(--muted); margin-top: 1px; }
.quicklinks { display: flex; gap: 2px; }
.quicklinks a { padding: 8px 10px; border-radius: var(--r-sm); font-weight: 500; color: var(--ink-2); }
.quicklinks a:hover { background: var(--surface-sunk); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.search-field { position: relative; width: 250px; }
.search-field .i { position: absolute; left: 13px; top: 50%; translate: 0 -50%; color: var(--muted); width: 18px; height: 18px; }
.search-field input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong); background: var(--surface); font-size: var(--fs-sm);
}
.search-field input::placeholder { color: var(--muted); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--r-md); border: 0; background: transparent; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-sunk); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--emerald-500); box-shadow: 0 0 0 2px var(--canvas); }
.account { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 4px 6px; border-radius: var(--r-md); cursor: pointer; }
.account:hover { background: var(--surface-sunk); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--forest-700); color: #fff; font: 650 13px/1 var(--font-display); letter-spacing: .02em; flex: none; }
.account-name { white-space: nowrap; font-weight: 650; font-size: var(--fs-md); text-align: left; line-height: 1.2; }
.account-name small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }

.content { width: 100%; max-width: 1560px; margin-inline: 0; padding: 18px 28px 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }

/* ---------- Popover ---------- */
[popover].pop {
  position: fixed; inset: auto; margin: 0; padding: 6px; min-width: 220px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-pop);
}
.pop a, .pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); border: 0; background: none; text-align: left; cursor: pointer; }
.pop a:hover, .pop button:hover { background: var(--surface-sunk); }
.pop.menu { min-width: 190px; }
.pop.menu button .i { width: 16px; height: 16px; color: var(--emerald-700); visibility: hidden; }
.pop.menu button[aria-checked="true"] { font-weight: 650; color: var(--emerald-800); }
.pop.menu button[aria-checked="true"] .i { visibility: visible; }
.pop.notif { width: 330px; max-width: calc(100vw - 16px); }
.notif-head { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px 6px; font-size: var(--fs-sm); }
.pop.notif a { align-items: flex-start; }
.pop.notif a > .i { color: var(--emerald-700); margin-top: 2px; }
.pop.notif a > span { display: grid; gap: 1px; min-width: 0; font-size: var(--fs-sm); }
.pop.notif a > span > span { color: var(--ink-2); }
.pop.notif small { font-size: 12px; color: var(--muted); }
.chip-select[aria-pressed="true"] { background: var(--mint-100); border-color: var(--mint-400); color: var(--emerald-800); }
[hidden] { display: none !important; }

/* ---------- Greeting / hero ---------- */
.greeting { position: relative; min-height: 100px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.greeting h2 { font-size: var(--fs-2xl); font-weight: 700; }
.greeting p { margin-top: 4px; color: var(--ink-2); max-width: 72ch; }
.greeting > :not(.hero-art) { position: relative; z-index: 1; }
/* The art has its fades baked into all four edges, so it is drawn whole (no crop) in a box of the same 4.43:1 ratio.
   Its bottom edge meets the KPI row, which keeps the boats (about 62% down) and the water visible above the cards. */
.hero-art {
  position: absolute; z-index: 0; right: 200px; bottom: -14px; width: min(600px, calc(100% - 500px)); aspect-ratio: 1950 / 440; pointer-events: none;
  background: var(--hero) center / 100% 100% no-repeat; opacity: 1;
}
/* Dashboards: tighter rhythm so the page sits nearer the reference's proportion (about 960px tall at 1440). */
@media (min-width: 821px) {
  .content:has(> .greeting) { gap: 13px; padding-block: 14px 16px; }
  .content:has(> .greeting) .greeting { min-height: 92px; }
  .content:has(> .greeting) .card-pad { padding-block: 14px; }
  .content:has(> .greeting) .card-head { margin-bottom: 8px; }
  .content:has(> .greeting) .chart { padding-top: 28px; }
  .content:has(> .greeting) .trip { padding-block: 2px; }
  .content:has(> .greeting) .qa-btn { min-height: 58px; padding-block: 9px; }
  .content:has(> .greeting) .kpi-in { padding-block: 13px; }
  .content:has(> .greeting) .trip .thumb { width: 66px; }
  .content:has(> .greeting) .card-pad > .table-wrap .table :is(td, tbody th) { padding-block: 5px; }
}
.hero-art.ph { background: radial-gradient(60% 70% at 62% 60%, var(--mint-200), transparent 70%); }

/* ---------- Buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: var(--fs-md); color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--mint-50); border-color: var(--mint-400); }
.btn-primary { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.btn-primary:hover { background: var(--emerald-800); border-color: var(--emerald-800); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--emerald-700); }
.btn-sm { height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
.btn .i { width: 18px; height: 18px; }
.link { color: var(--emerald-700); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link .i { width: 16px; height: 16px; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; }
.field { display: grid; gap: 6px; }
.field > span, .field-label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.input, .select {
  height: 40px; width: 100%; padding: 0 12px; border-radius: var(--r-md);
  border: 1px solid var(--border-input, #8a978d); background: var(--surface); font-size: var(--fs-md);
}
.select { appearance: none; padding-right: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333443a' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat; }
.input:focus, .select:focus { outline: none; border-color: var(--emerald-600); box-shadow: var(--focus); }
.chip-select { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--border-strong); background: var(--surface); font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.chip-select .i { width: 16px; height: 16px; color: var(--ink-2); }
.date-btn { height: 42px; padding: 0 14px; gap: 10px; font-weight: 500; box-shadow: var(--shadow-card); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 18px 22px; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.card-head > div:not(.end) { min-width: 0; }
.card-head.wrap { flex-wrap: wrap; }
.card-head .link { white-space: nowrap; }
.card-head > .i { width: 26px; height: 26px; color: var(--emerald-700); margin-top: 2px; }
.card-head h3 { font-size: var(--fs-lg); font-weight: 700; }
.card-head h3 .i { width: 16px; height: 16px; color: var(--muted); display: inline-block; vertical-align: -2px; margin-left: 4px; }
.card-head p { font-size: var(--fs-sm); color: var(--muted); margin-top: 2px; }
.card-head .end { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.kpi { container-type: inline-size; }
.kpi-in { display: flex; gap: 16px; align-items: flex-start; padding: 16px 20px; }
.kpi-icon { width: 50px; height: 50px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--mint-100); color: var(--emerald-700); flex: none; }
.kpi-icon .i { width: 25px; height: 25px; }
.kpi-label { font-size: var(--fs-md); font-weight: 500; color: var(--ink-2); }
.kpi-value { font: 700 var(--fs-kpi)/1.15 var(--font-display); letter-spacing: -0.02em; margin: 2px 0 4px; }
.kpi-trend { font-size: var(--fs-sm); color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kpi-trend b { color: var(--emerald-700); font-weight: 650; display: inline-flex; align-items: center; gap: 3px; }
.kpi-trend b .i { width: 15px; height: 15px; stroke-width: 2.25; }
.kpi-trend b.down { color: var(--bad-fg); }
@container (width < 230px) { .kpi-in { flex-direction: column; gap: 10px; } }

/* Layout helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; align-content: start; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }

/* ---------- Charts ---------- */
/* Fixed-height plot; labels and tooltip are HTML so they keep their px size at any width. */
/* Top padding is the tooltip lane: the tooltip sits above the top gridline, so it never covers the line. */
.chart { margin: 0; padding: 32px 6px 0 48px; --plot-h: 112px; }
.chart .plot { position: relative; height: var(--plot-h); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .yl { position: absolute; right: calc(100% + 10px); translate: 0 -50%; font-size: 12.5px; line-height: 1; color: var(--muted); white-space: nowrap; }
.chart .xl { position: relative; height: 26px; }
.chart .xl span { position: absolute; top: 9px; translate: -50% 0; font-size: 12.5px; line-height: 1; color: var(--muted); white-space: nowrap; }
.chart .dot { position: absolute; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: #fff; border: 1.6px solid var(--chart-line); }
.chart .dot.hi { width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; background: var(--chart-line); border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--chart-line); }
/* The dashed guide runs from the tooltip down through the point to the axis (it is the leader line). */
.chart .guide { position: absolute; top: -4px; bottom: 0; border-left: 1px dashed rgb(30 127 67 / 0.45); }
.chart .tip {
  position: absolute; bottom: calc(100% + 4px); right: max(-10px, calc(100% - var(--x) - 10px)); display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--border); box-shadow: 0 4px 12px rgb(21 38 27 / 0.12);
  font-size: 12.5px; line-height: 1.3; color: var(--ink-2); white-space: nowrap;
}
.chart .tip b { font-weight: 650; color: var(--ink); font-size: 13px; }
.chart .tip span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart .tip span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--chart-line); }
.chart .bars, .chart .bars-xl { display: flex; }
.chart .bars { position: absolute; inset: 0; align-items: flex-end; }
.chart .bars > span { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart .bars i { width: 62%; border-radius: 4px 4px 0 0; }
.chart .bars-xl span { position: static; flex: 1; translate: none; text-align: center; padding-top: 9px; }
.chart .bars-xl .cur { color: var(--ink); font-weight: 650; }
.bars-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; align-items: stretch; }
.total-panel { background: linear-gradient(180deg, var(--mint-50), var(--mint-100)); border-radius: var(--r-lg); padding: 14px 16px; display: flex; flex-direction: column; justify-content: center; }
.total-panel .i { width: 30px; height: 30px; color: var(--emerald-700); }
.total-panel .big { font: 700 22px/1.15 var(--font-display); margin-top: 8px; letter-spacing: -0.02em; }
.total-panel .lbl { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.total-panel hr { border: 0; border-top: 1px solid var(--mint-300); margin: 10px 0; width: 100%; }
.total-panel .delta { color: var(--emerald-700); font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 4px; }
.total-panel .delta .i { width: 17px; height: 17px; stroke-width: 2.25; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.nodot::before { display: none; }
.pill-ok { background: var(--ok-bg); color: var(--ok-fg); }
.pill-open { background: var(--open-bg); color: var(--open-fg); box-shadow: inset 0 0 0 1px var(--mint-300); }
.pill-warn { background: var(--warn-bg); color: var(--warn-fg); }
.pill-bad { background: var(--bad-bg); color: var(--bad-fg); }
.pill-info { background: var(--info-bg); color: var(--info-fg); }
.pill-neutral { background: var(--neutral-bg); color: var(--neutral-fg); }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 500; background: var(--neutral-bg); color: var(--neutral-fg); border: 1px solid #dfe3db; white-space: nowrap; }
.tag-info { background: var(--info-bg); color: var(--info-fg); border-color: #cbdbeb; }
.tag-ok { background: var(--mint-100); color: var(--emerald-800); border-color: var(--mint-300); }

/* ---------- Trip list ---------- */
.trips { list-style: none; margin: 0; padding: 0; }
.trip { display: grid; grid-template-columns: 72px minmax(0, 1fr) 76px 64px 96px; grid-template-areas: "th nm dt px st" "th sb dt px st"; align-items: center; column-gap: 10px; row-gap: 1px; padding: 4px; border-radius: var(--r-md); }
.trip .thumb { grid-area: th; } .trip-name { grid-area: nm; align-self: end; } .trip .sub { grid-area: sb; align-self: start; min-width: 0; }
.t-date { grid-area: dt; } .t-pax { grid-area: px; } .t-st { grid-area: st; }
.trip .sub span { overflow: hidden; text-overflow: ellipsis; }
.trip + .trip { border-top: 1px solid var(--border); border-radius: 0; }
/* --img may hold two layers: the photo, then the old PNG thumb as fallback. --pos is the photo's focal point. */
.thumb { display: block; border-radius: 8px; background-color: var(--mint-200); background-image: var(--img, none); background-position: var(--pos, 50% 50%), center; background-size: cover; background-repeat: no-repeat; aspect-ratio: 8 / 5; box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), inset 0 0 0 1px rgb(0 0 0 / 0.04); }
.trip .thumb { width: 72px; }
.trip > .t-st { justify-self: end; }
.trip-name { font-weight: 650; font-size: var(--fs-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); color: var(--ink-2); white-space: nowrap; }
.meta .i { width: 16px; height: 16px; color: var(--ink-2); }
.trip .sub { font-size: 12.5px; color: var(--muted); }
.trip .sub .i { color: var(--muted); width: 14px; height: 14px; }

/* ---------- Tables ---------- */
.table-wrap { container-type: inline-size; overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table caption { text-align: left; }
.table thead th { background: var(--surface-sunk); font-weight: 650; color: var(--ink); text-align: left; padding: 10px 10px; white-space: nowrap; }
.table thead th:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.table thead th:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.table td, .table tbody th { padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: left; white-space: nowrap; }
.table tbody th { font-weight: 650; white-space: normal; min-width: 120px; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover > * { background: #fafcf8; }
.table .r { text-align: right; }
.table .c { text-align: center; }
.cell-sub { display: block; font-weight: 400; font-size: 12px; color: var(--muted); white-space: nowrap; }
.card-pad > .table-wrap .table td, .card-pad > .table-wrap .table tbody th { padding-block: 6px; }
.doc-btns { display: inline-flex; gap: 4px; }
.doc-btn { width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--emerald-700); cursor: pointer; }
.doc-btn:hover { background: var(--mint-50); border-color: var(--mint-400); }
.doc-btn[disabled] { color: #a9b3ab; background: var(--canvas); cursor: not-allowed; }
.doc-btn .i { width: 17px; height: 17px; }
.svc { display: inline-flex; align-items: center; gap: 8px; }
.svc .ic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: var(--mint-100); color: var(--emerald-700); flex: none; }
.svc .ic .i { width: 16px; height: 16px; }

/* ---------- Quick actions ---------- */
.qa { display: grid; grid-template-columns: 300px repeat(var(--n, 5), minmax(0, 1fr)); gap: 14px; }
.qa-intro { display: flex; align-items: center; gap: 16px; padding: 10px 20px; border-radius: var(--r-lg); background: linear-gradient(120deg, var(--mint-100), var(--mint-50)); border: 1px solid var(--mint-200); }
.qa-intro .i { width: 36px; height: 36px; color: var(--emerald-700); fill: none; }
.qa-intro h3 { font-size: 18px; }
.qa-intro p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; }
.qa-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 64px; padding: 12px; border-radius: var(--r-lg); border: 1px solid var(--border-strong); background: var(--surface); font-weight: 550; color: var(--ink); cursor: pointer; text-align: center; transition: background-color .15s ease, border-color .15s ease; }
.qa-btn .i { width: 27px; height: 27px; color: var(--emerald-700); }
.qa-btn:hover { background: var(--mint-50); border-color: var(--mint-400); }

/* ---------- Tabs, stepper, toolbar ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-sunk); border-radius: var(--r-md); width: fit-content; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r-sm); font-weight: 550; color: var(--ink-2); }
.tabs a .i { width: 18px; height: 18px; }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(21 38 27 / 0.12); }
.tabs .count { font-size: 12px; color: var(--muted); font-weight: 500; }
.utabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; min-width: 0; }
.utabs a { white-space: nowrap; flex: none; }
.tabs-bar { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); }
.tabs-bar .utabs { border-bottom: 0; flex: 1; }
.tabs-bar .btn { flex: none; }
.utabs a { padding: 12px 0; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; align-items: center; }
.utabs a[aria-current="page"] { color: var(--ink); border-color: var(--emerald-600); }
.utabs .count { font-size: 12px; padding: 0 7px; border-radius: var(--r-pill); background: var(--neutral-bg); color: var(--neutral-fg); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar > * { min-width: 0; }
.toolbar .search-field { width: 280px; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a { flex: none; white-space: nowrap; }

.stepper { display: grid; grid-template-columns: repeat(5, 1fr); list-style: none; margin: 0; padding: 18px 22px; counter-reset: step; }
.step { display: flex; align-items: center; gap: 12px; position: relative; }
.step:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: var(--border-strong); margin-right: 14px; border-radius: 2px; }
.step.done:not(:last-child)::after { background: var(--emerald-600); }
.step-dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--border-strong); background: var(--surface); font: 650 13px/1 var(--font-display); color: var(--muted); }
.step.done .step-dot { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.step.current .step-dot { border-color: var(--emerald-600); color: var(--emerald-700); box-shadow: 0 0 0 4px var(--mint-100); }
.step-text { font-size: var(--fs-sm); line-height: 1.25; white-space: nowrap; }
.step-text b { display: block; font-weight: 650; color: var(--ink); }
.step-text span { color: var(--muted); font-size: 12px; }

/* ---------- Rate cards ---------- */
.catalog { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.search-form { display: grid; grid-template-columns: 1.4fr 1fr .7fr .9fr auto; gap: 12px; align-items: end; }
.search-form .btn { height: 40px; }
.filters { padding: 18px 18px 20px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.filters summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.filters summary::-webkit-details-marker { display: none; }
.filters h3 { font-size: 15px; }
.f-count { font-size: 12.5px; color: var(--muted); }
.f-chev { color: var(--ink-2); transition: rotate .15s ease; }
.filters[open] .f-chev { rotate: 180deg; }
.filters-body { display: grid; gap: 18px; margin-top: 12px; }
.filter-group { display: grid; gap: 9px; }
.filter-group + .filter-group { border-top: 1px solid var(--border); padding-top: 16px; }
.check { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: var(--ink-2); }
.check input { width: 17px; height: 17px; accent-color: var(--emerald-700); margin: 0; }
.check .count { margin-left: auto; color: var(--muted); font-size: 12px; }
.range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.results { min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rate-card { overflow: hidden; } /* no container-type: containment would stop the subgrid below */
.empty-view { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 48px 24px; }
.empty-view > .i { width: 36px; height: 36px; color: var(--emerald-700); }
.empty-view p { max-width: 46ch; }
.more-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 18px 24px; align-items: start; padding: 16px 20px; }
.more-filters .filter-group + .filter-group { border: 0; padding: 0; }
.mf-acts { display: flex; gap: 8px; align-self: end; }
.pw-field { grid-template-columns: 1fr auto; }
.pw-field label { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.pw-field .input { grid-column: 1 / -1; grid-row: 2; }
.pw-field .link { grid-column: 2; grid-row: 1; }
.rate-card .thumb { border-radius: 0; aspect-ratio: 16 / 9; position: relative; }
.rate-card .thumb .pill { position: absolute; top: 10px; left: 10px; box-shadow: 0 1px 4px rgb(0 0 0 / 0.12); }
/* Each card is 4 rows of the results grid (subgrid): photo, title + location, tags, price. Rows share heights across
   a row of cards, so tags and prices line up without reserving a second title line in every card. */
.rate-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
.rate-body { display: contents; }
.rate-body > * { margin-inline: 16px; }
.rate-body > :first-child { padding-top: 14px; }
.rate-body > .rate-tags { padding-top: 8px; align-content: start; }
.rate-body > .rate-foot { margin-block: 12px 16px; align-self: end; }
section:has([data-toggle][aria-pressed="true"]) .results .thumb { display: none; }
.rate-body h3 { font-size: 15.5px; font-weight: 650; }
.rate-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.rate-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.price { font: 700 20px/1.1 var(--font-display); letter-spacing: -0.01em; }
.price small { display: block; font: 400 12px var(--font-text); color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.avail { font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.avail.ok { color: var(--emerald-700); } .avail.low { color: var(--warn-fg); } .avail.req { color: var(--info-fg); }
.avail .i { width: 15px; height: 15px; }

/* ---------- Quote builder ---------- */
.day { display: grid; gap: 10px; }
.day-head { display: flex; align-items: baseline; gap: 10px; }
.day-head h4 { font-size: 14.5px; }
.line { display: grid; grid-template-columns: 40px minmax(0, 1fr) 72px 88px 88px 72px; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.line .ic { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--mint-100); color: var(--emerald-700); display: grid; place-items: center; }
.line-name { font-weight: 650; }
.line-sub { font-size: 12.5px; color: var(--muted); }
.line .amt { text-align: right; font-weight: 650; }
.line .amt small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.line .acts { display: flex; justify-content: flex-end; gap: 2px; }
.line .acts .icon-btn { width: 34px; height: 34px; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); align-items: center; }
.summary { position: sticky; top: calc(var(--topbar-h) + 16px); }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: var(--fs-md); padding: 7px 0; }
.sum-row span:first-child { color: var(--ink-2); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }
.sum-total b { font: 700 26px/1 var(--font-display); letter-spacing: -0.02em; }
.earn { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-md); background: var(--mint-50); border: 1px solid var(--mint-200); display: flex; gap: 12px; align-items: center; font-size: var(--fs-sm); }
.earn .i { color: var(--emerald-700); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 12px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; color: var(--ink); }

/* ---------- Markup ---------- */
.markup-row { display: grid; grid-template-columns: 190px 160px 96px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--border); }
.markup-row:last-child { border-bottom: 0; }
.markup-head { padding-top: 4px; padding-bottom: 8px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-sm); background: var(--surface-sunk); }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(21 38 27 / 0.14); }
.input-affix { position: relative; }
.input-affix .input { padding-right: 34px; text-align: right; font-weight: 600; }
.input-affix span { position: absolute; right: 12px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: var(--fs-sm); }
.preview { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); }
.preview .base { color: var(--muted); }
.preview .sell { font-weight: 700; color: var(--ink); }
.preview .i { width: 16px; height: 16px; color: var(--muted); }
.profile-head { display: flex; gap: 20px; align-items: center; }
.profile-head .thumb { width: 132px; flex: none; border-radius: var(--r-md); }
.profile-head .grow { flex: 1 1 0; min-width: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.breadcrumb a { color: var(--emerald-700); font-weight: 600; }
.breadcrumb .i { width: 14px; height: 14px; }

.pager { display: flex; align-items: center; justify-content: space-between; padding: 14px 4px 0; font-size: var(--fs-sm); color: var(--muted); }
.pager .btns { display: flex; gap: 4px; }
.pager .btns a { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-weight: 600; }
.pager .btns a[aria-current="page"] { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; }
.login-art { position: relative; overflow: hidden; isolation: isolate; color: var(--on-forest); padding: 44px 52px; display: flex; flex-direction: column;
  background: radial-gradient(90% 60% at 10% 0%, rgb(255 255 255 / 0.07), transparent 60%), linear-gradient(165deg, var(--forest-700), var(--forest-800) 50%, var(--forest-950)); }
.login-art .palms { position: absolute; z-index: -1; left: -30px; bottom: 0; width: 470px; height: 610px; background: var(--palms, none) left bottom / contain no-repeat; opacity: .55; }
.login-art .land { position: absolute; z-index: -1; right: 0; bottom: 0; width: 100%; height: 260px; background: var(--hero, none) right bottom / auto 100% no-repeat; mask-image: linear-gradient(90deg, transparent 12%, #000 55%), linear-gradient(180deg, #000 75%, transparent); mask-composite: intersect; opacity: .95; }
/* Dusk photo panel: dark scrim keeps the white copy readable; forest gradient shows if the photo is missing. */
.login-art.photo { background: linear-gradient(180deg, rgb(8 26 16 / 0.62) 0%, rgb(8 26 16 / 0.30) 50%, rgb(8 26 16 / 0.55) 100%), var(--photo) center / cover no-repeat, linear-gradient(165deg, var(--forest-700), var(--forest-950)); }
.login-art.photo .login-copy p { color: #dfe9e2; }
.login-art .land.ph { background: radial-gradient(50% 60% at 75% 70%, rgb(214 234 202 / 0.25), transparent 70%); }
.login-copy { margin-top: 112px; max-width: 30rem; }
.login-copy h1 { color: #fff; font-size: 38px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; }
.login-copy p { margin-top: 16px; font-size: 16px; color: var(--on-forest-muted); line-height: 1.55; }
.login-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 12px; }
.login-points li { display: flex; gap: 12px; align-items: center; font-size: 15px; }
.login-points .i { color: var(--mint-300); }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-form { width: 100%; max-width: 456px; display: grid; gap: 18px; padding: 36px 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-card); }
.login-form h2 { font-size: 28px; font-weight: 700; }
.login-form .help { font-size: var(--fs-sm); color: var(--muted); text-align: center; }

@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-split { grid-template-columns: 1fr; }
  .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qa-intro { grid-column: 1 / -1; }
  .qa-btn:last-child:nth-child(even) { grid-column: 1 / -1; } /* odd number of actions: the last one spans, no lone tile */
  .more-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mf-acts { grid-column: 1 / -1; justify-content: flex-end; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quicklinks { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; background: none; }
  .sidebar { position: relative; height: auto; overflow: hidden; gap: 12px; padding: 14px; }
  .sidebar .palms, .promo { display: none; }
  .nav ul { display: flex; overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; height: 40px; font-size: 15px; }
  .topbar { position: static; height: auto; flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .topbar-end { width: 100%; margin: 0; }
  .search-field { flex: 1; width: auto; }
  .account-name { display: none; }
  .content { padding: 16px; }
  .results { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .greeting { flex-direction: column; min-height: 0; gap: 12px; }
  .bars-wrap, .login { grid-template-columns: 1fr; }
  .card-head { flex-wrap: wrap; }
  .card-head > div:not(.end) { flex: 1 1 180px; }
  /* KPI 2x2 */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-in { flex-direction: column; gap: 8px; padding: 14px; }
  .kpi-icon { width: 40px; height: 40px; }
  .kpi-icon .i { width: 21px; height: 21px; }
  .kpi-value { font-size: 22px; }
  .kpi-label, .kpi-trend { font-size: 13px; }
  /* Trips: line 1 name + status, line 2 date · pax · client */
  .trip { grid-template-columns: 64px auto auto minmax(0, 1fr) auto; grid-template-areas: "th nm nm nm st" "th dt px sb sb"; column-gap: 8px; row-gap: 3px; padding: 8px 2px; }
  .trip .thumb { width: 64px; }
  .trip-name { white-space: normal; }
  .trip .meta .i { display: none; }
  .t-pax::before, .trip .sub::before { content: "·"; margin-right: 2px; color: var(--muted); }
  .trip .sub { font-size: 13px; }
  .t-st { align-self: start; }
  /* Quote builder */
  .line { grid-template-columns: 40px repeat(2, minmax(0, 1fr)) auto; gap: 10px; padding: 12px; }
  .line > :nth-child(2) { grid-column: 2 / -1; }
  .stepper { grid-template-columns: 1fr; gap: 10px; }
  .step::after { display: none; }
  .step-text { white-space: normal; }
  /* Catalog */
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .search-form { grid-template-columns: 1fr 1fr; }
  .search-form .f-dest, .search-form .btn { grid-column: 1 / -1; }
  /* Bookings */
  .toolbar .search-field { width: 100%; flex: 1 1 100%; }
  /* Supplier + markup */
  .profile-head { flex-wrap: wrap; }
  .profile-head > * { min-width: 0; }
  .row { flex-wrap: wrap; min-width: 0; }
  .markup-head { display: none; }
  .profile-head .meta { white-space: normal; }
  .profile-head .grow { flex-basis: 100%; }
  .markup-row { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; }
  .markup-row .svc, .markup-row .preview { grid-column: 1 / -1; }
  .markup-row .preview { flex-wrap: wrap; }
  /* Login: sign-in form above the fold */
  .login-art { min-height: 0; padding: 20px 20px 24px; }
  .login-copy { margin-top: 20px; }
  .login-copy h1 { font-size: 28px; }
  .login-copy p, .login-points { display: none; }
  .login-form-wrap { padding: 16px; place-items: start center; }
  .login-form { padding: 24px 20px; gap: 16px; }
  .login-form h2 { font-size: 23px; }
}
.m-only { display: none; }
/* Phones: wide tables become card rows, so key columns and actions stay on screen without sideways scrolling. */
@media (max-width: 720px) {
  .hide-m { display: none; }
  .tabs-bar { flex-wrap: wrap; gap: 12px; border-bottom: 0; }
  .tabs-bar .utabs { flex: 1 1 100%; border-bottom: 1px solid var(--border); padding-right: 40px; mask-image: linear-gradient(90deg, #000 calc(100% - 56px), transparent); }
  .pager { flex-direction: column; align-items: flex-start; gap: 10px; }
  :is(.bk-table, .nb-table, .po-table, .ml-table), :is(.bk-table, .nb-table, .po-table, .ml-table) tbody { display: block; }
  :is(.bk-table, .nb-table, .po-table, .ml-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  :is(.bk-table, .nb-table, .po-table, .ml-table) tbody tr { display: grid; gap: 6px 10px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); }
  :is(.bk-table, .nb-table, .po-table, .ml-table) tbody tr + tr { margin-top: 10px; }
  :is(.bk-table, .nb-table, .po-table, .ml-table) tbody tr > * { padding: 0 !important; border: 0; white-space: normal; min-width: 0; text-align: left; }
  .m-only { display: block; }
  /* Bookings: ref + status / guest · agency + amount / service / date · pax + documents */
  .bk-table tbody tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ref ref st" "gu gu amt" "sv sv sv" "dt px docs"; }
  .bk-table .c-ref { grid-area: ref; } .bk-table .c-st { grid-area: st; justify-self: end; } .bk-table .c-guest { grid-area: gu; }
  .bk-table .c-amt { grid-area: amt; text-align: right; } .bk-table .c-svc { grid-area: sv; } .bk-table .c-date { grid-area: dt; }
  .bk-table .c-pax { grid-area: px; color: var(--ink-2); } .bk-table .c-pax::before { content: "· "; } .bk-table .c-pax::after { content: " pax"; }
  .bk-table .c-docs { grid-area: docs; justify-self: end; }
  /* Supplier new bookings: guest + pax / room · dates / Confirm + decline */
  .nb-table tbody tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "gu gu px" "rm dt dt" "act act act"; }
  .nb-table .c-guest { grid-area: gu; } .nb-table .c-pax { grid-area: px; text-align: right; } .nb-table .c-pax::after { content: " pax"; }
  .nb-table .c-room { grid-area: rm; } .nb-table .c-date { grid-area: dt; color: var(--ink-2); } .nb-table .c-date::before { content: "· "; }
  .nb-table .c-act { grid-area: act; margin-top: 4px; } .nb-table .c-act .row { flex-wrap: nowrap; } .nb-table .c-act .btn-primary { flex: 1; height: 40px; }
  .nb-table .c-act .icon-btn { width: 40px !important; height: 40px !important; border: 1px solid var(--border-strong); }
  /* Payouts: id + status / period + net payout */
  .po-table tbody tr { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "po st" "per net"; }
  .po-table .c-po { grid-area: po; } .po-table .c-st { grid-area: st; justify-self: end; } .po-table .c-per { grid-area: per; }
  .po-table .c-net { grid-area: net; text-align: right; }
  .po-table :is(.c-bk, .c-gross, .c-comm, .c-to) { display: none; }
  .bk-table .c-pax { text-align: left; }
  /* My Listings: name + status / net rate · allotment */
  .ml-table tbody tr { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "nm nm st" "rt al al"; }
  .ml-table .c-name { grid-area: nm; } .ml-table .c-st { grid-area: st; justify-self: end; }
  .ml-table .c-rate { grid-area: rt; padding-left: 36px !important; } .ml-table .c-rate::before { content: "Net "; color: var(--muted); font-weight: 400; }
  .ml-table .c-allot { grid-area: al; color: var(--ink-2); } .ml-table .c-allot::before { content: "· "; }
  /* Open Quotes: status moves under the client name */
  .q-st { margin-top: 4px; } .q-st .cell-sub { display: inline; }
  .q-table :is(th, td) { padding-inline: 6px; } .q-table tbody th { min-width: 0; } .q-table td:nth-child(2) { white-space: normal; }
  /* Agent Partners: Type is dropped; tighter cells keep Revenue and Status on screen. */
  .partners :is(th, td) { padding-inline: 5px; }
  .partners tbody th { min-width: 0; }
  .partners .pill { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.rate-body .meta { white-space: normal; align-items: flex-start; }
.rate-body .meta .i { margin-top: 2px; }
.rate-foot .avail { white-space: nowrap; }

/* =====================================================================
   WordPress shell (header.php / footer.php). Everything below is theme-specific.
   ===================================================================== */
.brand-sub { display: block; }
.dtt-skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); }
.dtt-skip-link:focus { top: 12px; }

/* Sidebar groups: <details> with sub-links; the current page gets the mint pill. */
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.drawer-close, .menu-btn { display: none; }
.nav summary {
  display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 14px; border-radius: var(--r-md);
  font-size: 16px; font-weight: 500; color: var(--on-forest); cursor: pointer; list-style: none; transition: background-color .15s ease;
}
.nav summary::-webkit-details-marker { display: none; }
.nav summary .i { width: 21px; height: 21px; color: #d9e8dc; }
.nav summary .nav-chev { width: 16px; height: 16px; margin-left: auto; color: var(--on-forest-muted); transition: rotate .15s ease; }
.nav details[open] > summary .nav-chev { rotate: 180deg; }
.nav summary:hover { background: rgb(255 255 255 / 0.07); }
.nav-group.is-current > details > summary { color: #fff; font-weight: 650; background: rgb(255 255 255 / 0.06); }
.nav ul.nav-sub { display: grid; gap: 2px; margin: 4px 0 6px; padding: 0 0 0 22px; }
.nav .nav-sub a { height: 38px; gap: 11px; padding: 0 12px; font-size: 14.5px; color: #dcebe0; }
.nav .nav-sub a .i { width: 17px; height: 17px; color: #c8dccd; }
.nav .nav-sub a[aria-current="page"] { color: var(--forest-900); }
.nav .nav-sub a[aria-current="page"] .i { color: var(--forest-800); }

/* Top bar: the page title is a <p> because each page keeps its own <h1>. */
.page-title { min-width: 0; }
.page-title .page-title-h { margin: 0; font: 700 var(--fs-xl)/1.15 var(--font-display); letter-spacing: -0.01em; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.page-title .page-title-sub { overflow: hidden; text-overflow: ellipsis; }
.topbar-end { flex: none; }
.topbar .search-field input { color: var(--ink); }
.topbar .search-field input:focus { outline: none; border-color: var(--emerald-600); box-shadow: var(--focus); }

/* Bell (inc/notifications.php markup, notifications.js toggles [hidden]) and avatar menu (app.js toggles [hidden]). */
.topbar .dtt-notifications, .topbar .dtt-user-menu { position: relative; }
.topbar .dtt-notifications-trigger {
  position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; margin: 0;
  border-radius: var(--r-md); border: 0; background: transparent; color: var(--ink-2); cursor: pointer; box-shadow: none;
}
.topbar .dtt-notifications-trigger:hover { background: var(--surface-sunk); }
.topbar .dtt-notifications-trigger .dtt-ui-icon { width: 21px; height: 21px; }
.topbar .dtt-notification-count {
  position: absolute; top: 2px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: var(--emerald-700); color: #fff; font: 650 12px/1 var(--font-text); box-shadow: 0 0 0 2px var(--canvas);
}
.topbar .dtt-notification-count[hidden] { display: none; }
.topbar .dtt-notifications-panel, .topbar .dtt-user-menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 40; margin: 0; padding: 6px; min-width: 230px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-pop); color: var(--ink);
}
.topbar .dtt-notifications-panel { width: 340px; max-width: calc(100vw - 16px); max-height: min(70vh, 520px); overflow: auto; }
.topbar .dtt-notifications-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px 6px; font-size: var(--fs-sm); }
.topbar .dtt-notifications-markall { border: 0; background: none; padding: 4px 6px; border-radius: 6px; color: var(--emerald-700); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.topbar .dtt-notifications-markall:hover { background: var(--mint-50); }
.topbar .dtt-notifications-list { list-style: none; margin: 0; padding: 0; }
.topbar .dtt-notification-item a { display: grid; gap: 1px; padding: 9px 10px 9px 22px; border-radius: var(--r-sm); position: relative; font-size: var(--fs-sm); color: var(--ink); }
.topbar .dtt-notification-item a, .topbar .dtt-notification-item.is-unread a { background: none; box-shadow: none; border-bottom: 0; min-height: 0; }
.topbar .dtt-notification-item a:is(:hover, :focus-visible) { background: var(--surface-sunk); }
.topbar .dtt-notification-item.is-unread a { font-weight: 500; }
.topbar .dtt-notification-item.is-unread a::before { content: ""; position: absolute; left: 9px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-500); }
.topbar .dtt-notification-item strong { font-weight: 650; }
.topbar .dtt-notification-item span { color: var(--ink-2); }
.topbar .dtt-notification-item time { font-size: 12px; color: var(--muted); }
.topbar .dtt-notifications-empty { padding: 12px 10px; color: var(--muted); font-size: var(--fs-sm); }
.topbar .dtt-user-menu-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm); color: var(--ink); }
.topbar .dtt-user-menu-panel a:hover { background: var(--surface-sunk); }
.topbar .dtt-user-menu-panel a .i { color: var(--emerald-700); }
.pop-who { display: grid; gap: 1px; padding: 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.pop-who span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.account { color: var(--ink); }
.account-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

/* The old staggered entrance (app.js .dtt-motion-item) is switched off: content shows at once. */
html.dtt-motion-capable body.g-ui .dtt-motion-item { opacity: 1; transform: none; animation: none; }

/* Page area: the old page shell becomes the G content column. */
/* Left-aligned (not centred): at 1920 the content then starts under the topbar title, x=280 on every page. */
body.g-ui.logged-in .main > .dtt-page-shell { width: 100%; max-width: 1560px; margin: 0; padding: 20px 28px 32px; min-width: 0; }

/* Public pages (registration, supplier application): slim brand bar on forest. */
.public-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 28px; background: linear-gradient(90deg, var(--forest-700), var(--forest-900)); color: var(--on-forest); }
.public-bar .brand { padding: 0; }
.public-links { display: flex; gap: 8px; flex-wrap: wrap; }
.public-bar .btn:not(.btn-primary) { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.4); }
.public-bar .btn:not(.btn-primary):hover { background: rgb(255 255 255 / 0.1); }
.public-bar .btn-primary { background: var(--mint-200); border-color: var(--mint-200); color: var(--forest-900); }

/* Login: full-bleed split; the old page shell is neutralised. */
body.g-ui .login-app .dtt-page-shell, body.g-ui .login-app .dtt-app-page, body.g-ui .login-app .dtt-entry-content { width: auto; max-width: none; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.login .brand { padding: 0; }
.login-form .muted { margin-top: 6px; }
.login-form .dtt-notice { margin: 0; }
.login-form .btn-lg { height: 46px; font-size: 15px; }
.login-form .help .i { vertical-align: -3px; }

/* Scrim behind the phone drawer (created by g-shell.js). */
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgb(8 26 16 / 0.5); }

@media (max-width: 820px) {
  .app { grid-template-columns: minmax(0, 1fr); background: none; }
  /* The sidebar becomes an off-canvas drawer (g-shell.js manages role, aria-modal, inert and focus). */
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60; width: min(300px, 86vw); height: 100vh; height: 100dvh;
    overflow: hidden auto; gap: 20px; padding: 16px 12px 18px;
    translate: -100% 0; visibility: hidden; transition: translate .22s ease, visibility 0s linear .22s;
  }
  .sidebar.is-open { translate: 0 0; visibility: visible; transition: translate .22s ease; box-shadow: 0 0 40px rgb(0 0 0 / 0.3); }
  .sidebar .palms { display: block; opacity: .6; }
  .nav ul { display: grid; overflow: visible; }
  .nav a, .nav summary { height: 44px; font-size: 15.5px; white-space: nowrap; }
  .nav .nav-sub a { height: 40px; }
  .drawer-close { display: inline-grid; color: var(--on-forest); }
  .drawer-close:hover { background: rgb(255 255 255 / 0.1); }
  .menu-btn { display: inline-grid; flex: none; margin-left: -6px; }
  .topbar { position: sticky; top: 0; height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px 10px; }
  .page-title { flex: 1 1 0; }
  .page-title .page-title-h { font-size: 19px; white-space: nowrap; }
  .page-title .page-title-sub { white-space: nowrap; }
  .topbar-end { width: 100%; margin: 0; gap: 8px; }
  body.g-ui.logged-in .main > .dtt-page-shell { padding: 16px; }
  .public-bar { padding: 12px 16px; flex-wrap: wrap; }
  .topbar .dtt-notifications-panel { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-width: none; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, .sidebar.is-open { transition: none; } }

/* Login form: old .dtt-form control rules are out-ranked here. */
body.g-ui .login-form.dtt-form .input { height: 44px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--border-input); background: var(--surface); color: var(--ink); font-size: 15px; box-shadow: none; }
body.g-ui .login-form.dtt-form .input:focus { outline: none; border-color: var(--emerald-600); box-shadow: var(--focus); }
body.g-ui .login-form.dtt-form .btn-primary { color: #fff; background: var(--emerald-700); border-color: var(--emerald-700); }
body.g-ui .login-form.dtt-form .btn-primary:hover { background: var(--emerald-800); border-color: var(--emerald-800); }
body.g-ui .login-form.dtt-form .field > span { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }

/* fix1: phones without the top-bar search (suppliers): bell + account menu sit right-aligned, not left under the title. */
@media (max-width: 820px) {
  .topbar-end:not(:has(.search-field)) { width: auto; margin-left: auto; justify-content: flex-end; }
}
