/* ============================================================================
   BillsIn Brokerage — BROKER PORTAL (portal.css)

   One of three standalone sheets (portal / client / admin). The token block
   below is duplicated verbatim in each of them ON PURPOSE: client.css must
   stay self-contained so a client-facing /o or /b page never loads a single
   portal byte (spec Sec.8 white-label isolation), and a shared "tokens.css"
   would put a portal asset on that surface. Three copies, one source of
   truth in the plan.

   Direction: yacht-hospitality luxury, not SaaS. Deep navy + brass on warm
   paper, serif display headings, hairline rules, generous whitespace, real
   photography given room. Nothing flat, nothing gray-on-gray.
   ========================================================================= */

:root {
  --ink: #101418;
  --ink-soft: #4a5460;
  --paper: #fbfaf7;
  --card: #ffffff;
  --line: #e5e1d8;
  --brand: #0e2a3a;           /* deep navy */
  --brand-deep: #08202d;      /* navy, one shade under --brand (gradients) */
  --brand-tint: #eef2f4;      /* navy at ~6% — row hovers, quiet fills */
  --gold: #b08d4f;            /* brass — rules, large display numerals */
  --gold-soft: #d9c294;       /* brass on dark backgrounds */
  --gold-ink: #8a6a35;        /* brass dark enough for SMALL text on paper */
  --gold-wash: #f7f1e5;       /* brass at ~8% — chips, price panels */
  --ok: #1c7c54;
  --ok-wash: #e8f2ed;
  --warn: #a3452c;
  --warn-wash: #fbeeea;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  /* --tap: minimum height of anything a finger is meant to hit. 44px is the
     floor every control on this surface holds to -- buttons, links styled as
     controls, <summary>, and labels that wrap their own input. Prose links
     inside a sentence, a paragraph, or a table cell are deliberately NOT
     raised: inflating those breaks the line box they live in, and it is the
     one case WCAG 2.5.8 itself excepts. A token, not a magic number, so the
     floor is one edit and a new rule opts in by name. */
  --tap: 44px;
  --shadow: 0 10px 30px rgba(16, 20, 24, .08);
  --shadow-lift: 0 18px 44px rgba(16, 20, 24, .14);
  --shadow-inset-line: inset 0 1px 0 rgba(255, 255, 255, .5);
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--brand);
  line-height: 1.18;
}

a { color: var(--brand); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- header - */

/* --content-w / --gutter keep the header's brand row and nav on the same left
   edge as <main>'s content box at every width -- without them the wordmark
   hugs the window edge on a wide monitor while the page content sits a few
   hundred px inward, and the two read as unrelated bars. max() collapses to
   the plain gutter as soon as the window is narrower than the content column. */
:root { --content-w: 1280px; --gutter: 1.5rem; }

.portal-header {
  position: relative;
  padding: 1.15rem max(var(--gutter), calc((100% - var(--content-w)) / 2 + var(--gutter))) 0;
  background:
    radial-gradient(120% 180% at 12% 0%, rgba(176, 141, 79, .20) 0%, rgba(176, 141, 79, 0) 55%),
    linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 1px 0 rgba(217, 194, 148, .35), 0 12px 28px rgba(8, 32, 45, .16);
}

.brand-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .1rem;
  min-height: 34px;
  padding-right: 3.25rem;   /* clears the hamburger's absolute box on mobile */
}

.brand-row .wordmark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: #fff;
}

.brand-row .divider {
  margin: 0 .7rem;
  color: var(--gold-soft);
  opacity: .7;
  font-weight: 300;
}

.brand-row .company-name {
  font-size: .88rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

/* ------------------------------------------------------------------- nav - */

.nav-toggle { display: none; }

.hamburger {
  display: none;
  position: absolute;
  top: .85rem;
  right: 1.25rem;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--gold-soft);
  border: 1px solid rgba(217, 194, 148, .32);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .04);
}

.hamburger:hover { background: rgba(255, 255, 255, .1); }

.portal-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin: .6rem 0 0;
  padding: 0;
}

.portal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .95rem;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .11em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}

.portal-nav a:hover { color: #fff; border-bottom-color: rgba(217, 194, 148, .55); }
.portal-nav a.is-active { color: #fff; border-bottom-color: var(--gold); }

/* ------------------------------------------------------------------ main - */

main {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 2.25rem var(--gutter) 4rem;
}

/* Page title: display serif with a short brass rule under it — the single
   repeated "this is a BillsIn page" signature across the portal. */
main > h1 {
  font-size: clamp(1.7rem, 1.25rem + 1.7vw, 2.25rem);
  margin: 0 0 1.75rem;
  padding-bottom: .85rem;
  position: relative;
}

main > h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 54px;
  height: 2px;
  background: var(--gold);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: var(--tap);
  /* The link was 32px with a 1rem gap under it; at 44px the extra 12px of its
     own box does that spacing job, so the margin comes down to match. */
  margin-bottom: .6rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.back-link:hover { color: var(--brand); }

/* ----------------------------------------------------------- form atoms - */

.field { margin-bottom: 1.1rem; }

label {
  display: block;
  margin-bottom: .38rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

input, select, textarea {
  width: 100%;
  padding: .7rem .85rem;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}

input::placeholder, textarea::placeholder { color: #9aa3ac; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 79, .18);
}

/* A native <select> was the last piece of default browser furniture left in
   the portal: OS arrow, OS corner radius, OS control metrics, all of it
   sitting inside a themed card next to hand-styled text fields. appearance:
   none strips the chrome; the chevron is redrawn as an inline SVG data URI so
   it is exactly --gold (no icon font, no request) and the right padding keeps
   the longest option label clear of it. Ordered AFTER the shared
   `input, select, textarea` rule so background-image lands on top of that
   rule's `background: var(--card)` shorthand instead of being reset by it. */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23b08d4f' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px 8px;
  cursor: pointer;
}

select:hover { border-color: #d3cec1; }

/* Keyboard focus gets the text fields' brass ring, not the global
   :focus-visible outline -- an outline sits outside the control's radius and
   reads as a second, unrelated focus system on the one control that also
   carries a background image. */
select:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 79, .18);
}

/* The blanket `input` rule above is written for text/email/number fields;
   radios and checkboxes need to opt back out of full-width/bordered styling
   or they render as a giant stretched box instead of a small control. */
input[type="radio"], input[type="checkbox"] {
  width: auto;
  min-height: 0;
  padding: 0;
  border: none;
  margin-right: .45rem;
  accent-color: var(--brand);
  transform: scale(1.15);
}

/* Vertical padding trimmed because the button inside now carries its own 44px
   floor -- at the old .5rem the field would have stood 60px tall. */
input[type="file"] { padding: .3rem .6rem; }

input[type="file"]::file-selector-button {
  margin-right: .8rem;
  min-height: var(--tap);   /* a real button, and the only way into the picker */
  padding: .5rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--brand);
  font: inherit;
  font-size: .84rem;
  font-weight: 600;
  cursor: pointer;
}

input[type="file"]::file-selector-button:hover { background: var(--brand-tint); }

.error {
  margin: .35rem 0 0;
  color: var(--warn);
  font-size: .88rem;
  font-weight: 600;
}

.hint {
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- buttons */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 46px;
  padding: .7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}

button:hover, .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 32, 45, .22);
}

button:active, .btn:active { transform: translateY(0); }

button:disabled {
  background: #c3c8cd;
  color: #f2f4f5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* The two money actions (generate an offer link / a brochure link) are the
   only brass-filled buttons in the portal — brass is the "this makes you
   money" signal, so it stays rare enough to mean something. */
#copy-offer-btn,
#generate-brochure-btn {
  width: 100%;
  min-height: 52px;
  background: linear-gradient(180deg, #c2a06a 0%, var(--gold) 100%);
  color: #17232b;
  box-shadow: var(--shadow-inset-line), 0 6px 16px rgba(176, 141, 79, .3);
  font-size: .88rem;
}

#copy-offer-btn:hover,
#generate-brochure-btn:hover {
  box-shadow: var(--shadow-inset-line), 0 12px 24px rgba(176, 141, 79, .38);
}

#copy-offer-btn:disabled,
#generate-brochure-btn:disabled {
  background: #ded9ce;
  color: #8d8b85;
  box-shadow: none;
}

/* Quiet/secondary buttons */
.brochure-form button,
.copy-btn,
.offer-actions button {
  background: var(--card);
  color: var(--brand);
  border-color: var(--line);
  box-shadow: none;
}

.brochure-form button:hover,
.copy-btn:hover,
.offer-actions button:hover {
  background: var(--brand-tint);
  border-color: #cfd8dd;
  box-shadow: 0 6px 14px rgba(16, 20, 24, .08);
}

/* Destructive: rust outline, never a filled red slab. */
.revoke-btn, .remove-btn {
  background: var(--card);
  color: var(--warn);
  border-color: rgba(163, 69, 44, .4);
  box-shadow: none;
}

.revoke-btn:hover, .remove-btn:hover {
  background: var(--warn-wash);
  border-color: var(--warn);
  box-shadow: none;
}

.footer-help {
  margin-top: 1.75rem;
  font-size: .88rem;
  color: var(--ink-soft);
  text-align: center;
}

.footer-help a { color: var(--gold-ink); font-weight: 600; }

/* ------------------------------------------------------------ login page - */

.login-page {
  max-width: 430px;
  margin: 0 auto;
  padding: 2.5rem 2.25rem 2.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}

/* Brass hairline capping the card — the login screen is the first thing a
   new affiliate ever sees, so it carries the full signature. */
.login-page::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, var(--gold) 100%);
}

body:has(.login-page) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(90% 70% at 50% 0%, rgba(176, 141, 79, .16) 0%, rgba(176, 141, 79, 0) 60%),
    linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
}

/* .login-page IS the <main>, so it inherits `main > h1`'s left-aligned brass
   rule -- which reads as a stray dash under a centered wordmark. Center the
   rule instead of dropping it: wordmark / brass / AFFILIATE PORTAL. */
.login-page h1 {
  margin: 0;
  padding-bottom: .9rem;
  font-size: 1.55rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .14em;
}

.login-page h1::after { left: 50%; transform: translateX(-50%); width: 44px; }

.login-page .tagline {
  margin: .85rem 0 1.9rem;
  padding-bottom: 1.4rem;
  text-align: center;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-ink);
  border-bottom: 1px solid var(--line);
}

.login-page button { width: 100%; min-height: 50px; margin-top: .4rem; }

.login-page .error {
  margin: 0 0 1.1rem;
  padding: .7rem .9rem;
  background: var(--warn-wash);
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* "Or" divider above the /apply cross-link (A2, 2026-08-13 addendum) --
   two hairlines flanking a small-caps label, same --line/--ink-soft tokens
   as every other hairline rule in this sheet. */
.login-page .login-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.6rem 0 1.1rem;
  color: var(--ink-soft);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.login-page .login-divider::before,
.login-page .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* "Continue with Google" (spec addendum B2) -- Google's own brand
   guidelines call for a neutral white/outline button carrying the full-
   color G mark, never a --brand navy fill (a filled brand-color button
   would misrepresent Google's identity as this portal's own action), so
   this deliberately does NOT reuse the `button, .btn` rule above. Fully
   self-contained rather than layered on top of that rule, since client.css
   (which reuses this exact class name for the /apply page's twin of this
   button) has no equivalent `.btn` base to build on -- keeping both
   declarations independent means neither file's variant silently depends on
   cascade order defined in the other. */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  width: 100%;
  min-height: 52px;
  margin-top: .4rem;
  padding: .7rem 1.4rem;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid #dadce0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              box-shadow .16s var(--ease), transform .16s var(--ease);
}

.google-btn:hover {
  background: #f7f8f8;
  border-color: #c9cdd2;
  box-shadow: 0 6px 14px rgba(16, 20, 24, .1);
  transform: translateY(-1px);
}

.google-btn:active { transform: translateY(0); }

.google-g-mark { flex-shrink: 0; }

/* ---------------------------------------------------------- landing page - */

/* Public landing page (A1, 2026-08-13 addendum) -- the one unauthenticated,
   indexable surface in the whole portal (see landing.html: no noindex meta).
   Deliberately its own full-viewport layout, not built on .portal-header/
   .portal-nav (both assume a logged-in session) or .login-page's centered
   card -- closer in shape to client.css's .hero, just kept here so this
   un-authenticated route only ever has to load portal.css and nothing else. */

.landing-hero {
  /* Resets the bare `main` element rule's max-width/margin/padding (this
     wins on specificity regardless of source order -- a class always beats
     an element selector) so the hero is genuinely full-bleed, not boxed
     into the 1280px content column every other portal page uses. */
  max-width: none;
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--brand);
}

.landing-hero-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(8, 32, 45, .58) 0%,
    rgba(8, 32, 45, .38) 45%,
    rgba(8, 32, 45, .86) 100%
  );
  pointer-events: none;
}

/* No fleet photo available (empty fleet, or the lead yacht has none) -- a
   navy/brass gradient field stands in, same fallback shape as client.css's
   .hero-plain, so the page is never a broken <img> or bare white space. */
.landing-hero-plain {
  background:
    radial-gradient(120% 150% at 50% 0%, rgba(176, 141, 79, .22) 0%, rgba(176, 141, 79, 0) 60%),
    linear-gradient(180deg, var(--brand) 0%, var(--brand-deep) 100%);
}

.landing-hero-plain::after { display: none; }

.landing-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
  color: #fff;
}

.landing-eyebrow {
  margin: 0 0 1.1rem;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.landing-wordmark {
  margin: 0 0 1.1rem;
  font-size: clamp(2.1rem, 1.5rem + 3.2vw, 3.5rem);
  letter-spacing: .01em;
  color: #fff;
  text-shadow: 0 2px 22px rgba(8, 32, 45, .5);
}

.landing-tagline {
  margin: 0 auto 2.35rem;
  max-width: 46ch;
  font-size: clamp(1.05rem, .95rem + .5vw, 1.28rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .9);
}

.landing-cta-row {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  max-width: 360px;
  margin: 0 auto;
}

/* >= 52px per the brief (bigger than the sitewide --tap floor) -- these two
   links ARE the page's one job, so they get room to read as unmissable. */
.landing-cta-row .btn {
  min-height: 52px;
  width: 100%;
  font-size: .86rem;
}

.landing-cta-primary {
  background: linear-gradient(180deg, #c2a06a 0%, var(--gold) 100%);
  color: #17232b;
  box-shadow: var(--shadow-inset-line), 0 10px 24px rgba(176, 141, 79, .35);
}

.landing-cta-primary:hover {
  box-shadow: var(--shadow-inset-line), 0 16px 32px rgba(176, 141, 79, .42);
}

/* Secondary/outline: transparent on the photo, never a filled slab -- brass
   stays reserved for the one action that matters most (Partner Login). */
.landing-cta-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, .6);
}

.landing-cta-secondary:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
}

.landing-footer {
  position: relative;
  z-index: 2;
  padding: 1.4rem 1.25rem;
  text-align: center;
  background: var(--brand-deep);
  color: rgba(255, 255, 255, .62);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Mobile (incl. 390px): CTAs stack full-width per the brief, which is
   already the unqualified default above -- this breakpoint is where they
   graduate to sitting side by side once there's room. */
@media (min-width: 560px) {
  .landing-cta-row { flex-direction: row; justify-content: center; max-width: none; }
  .landing-cta-row .btn { width: auto; flex: 0 1 220px; }
}

/* ----------------------------------------------------- fleet search card - */

.fleet-search {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 2rem;
  padding: 1.25rem 1.35rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.fleet-search .field { margin-bottom: 0; flex: 1 1 150px; }
.fleet-search button { flex: 0 0 auto; }

/* -------------------------------------------------------------- fleet grid */

.fleet-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.yacht-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}

.yacht-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
  border-color: var(--gold-soft);
}

.yacht-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.yacht-card-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--brand-tint);
  transition: transform .5s var(--ease);
}

.yacht-card:hover .yacht-card-img { transform: scale(1.045); }

.yacht-card h2 {
  margin: 1.05rem 1.2rem .3rem;
  font-size: 1.22rem;
}

.yacht-facts {
  margin: 0 1.2rem;
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

.yacht-price {
  margin: .95rem 1.2rem 1.2rem;
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}

.yacht-price strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-ink);
}

/* --------------------------------------------------------- empty states -- */

.no-results {
  margin: 0;
  padding: 2.5rem 1.75rem;
  text-align: center;
  background: var(--card);
  border: 1px dashed #d8d2c4;
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 1rem;
}

.no-results a { color: var(--gold-ink); font-weight: 600; }

/* ------------------------------------------------------------ yacht detail */

.yacht-detail {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 0 0 1.75rem;
}

.yacht-detail > *:not(.gallery) { margin-left: 1.75rem; margin-right: 1.75rem; }

.yacht-detail h1 {
  margin-top: 1.6rem;
  margin-bottom: .35rem;
  font-size: clamp(1.65rem, 1.2rem + 1.8vw, 2.2rem);
}

.yacht-detail .facts-row {
  margin-top: 0;
  margin-bottom: 1.4rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.gallery { margin: 0; }

.gallery-main {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--brand-tint);
}

.gallery-thumbs {
  display: flex;
  gap: .55rem;
  padding: .7rem 1.75rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-soft) transparent;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumb {
  flex: 0 0 108px;
  width: 108px;
  height: 76px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  scroll-snap-align: start;
  background: var(--brand-tint);
  cursor: zoom-in;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}

.gallery-thumb:hover { border-color: var(--gold); transform: translateY(-2px); }

.description {
  max-width: 68ch;
  color: #2b333b;
  line-height: 1.7;
}

.amenities {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.4rem 1.75rem;
}

.amenity-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .38rem .9rem;
  background: var(--gold-wash);
  border: 1px solid #ece0cb;
  border-radius: var(--radius-pill);
  font-size: .84rem;
  color: #4b3f2b;
}

.amenity-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.marina {
  color: var(--ink-soft);
  font-size: .92rem;
}

.marina strong {
  color: var(--ink);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-right: .35rem;
}

/* ------------------------------------------------ pricing + markup widget - */

.pricing-section {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.pricing-section h2,
.request-calendar h2 {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.pricing-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0 0 1.25rem;
}

.pricing-table th {
  text-align: left;
  padding: .5rem .75rem;
  /* header sits over the right-aligned price column below it */
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
}

.pricing-table td {
  padding: .1rem .75rem;
  border-bottom: 1px solid #f0ece3;
  vertical-align: middle;
}

.pricing-table th:last-child { text-align: right; }

.pricing-table td:last-child {
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--brand);
  white-space: nowrap;
}

.pricing-table tbody tr { transition: background .16s var(--ease); }
.pricing-table tbody tr:hover { background: var(--brand-tint); }
.pricing-table tbody tr:has(input:checked) { background: var(--gold-wash); }

.pricing-table label {
  display: flex;
  align-items: center;
  min-height: 46px;
  margin: 0;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

/* Badges (offer type, "Popular", "Set by BillsIn"): tinted pill, never a
   solid slab — the portal has enough dark surface already. */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  margin-left: .5rem;
  background: var(--brand-tint);
  border: 1px solid #dbe2e6;
  border-radius: var(--radius-pill);
  color: var(--brand);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  vertical-align: middle;
}

.markup-panel { margin-top: .25rem; }

.markup-widget {
  margin: 0;
  padding: 1.15rem 1.25rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fffefb 0%, var(--paper) 100%);
  box-shadow: var(--shadow);
}

.markup-widget legend {
  padding: 0 .5rem;
  margin-left: -.25rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

/* The yacht page's % / $ flat radio labels: the label IS the tap target (the
   radio dot itself is ~16px), so it carries the floor. */
.markup-widget label {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  margin: 0 1.1rem 0 0;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink);
  cursor: pointer;
}

/* Scoped under .markup-widget on purpose: the sibling rule above styles every
   `label` inside the widget as an inline-flex radio row, and a bare
   `.markup-value-label` (0-1-0) loses to `.markup-widget label` (0-1-1) --
   which left "Markup value" sitting inline beside the % / $ flat radios
   instead of introducing the field below them. */
.markup-widget .markup-value-label,
.markup-widget .markup-type-label,
.markup-widget .duration-select-label {
  display: block;
  /* These are `for=`-labels sitting ABOVE their control, not labels wrapping
     one -- the control below is the tap target, so they must opt back OUT of
     the 44px floor the sibling rule sets for the radio labels. Left inherited,
     each micro-label reserved 44px for ~17px of text, floating the caption in
     dead space that read as belonging to the field above it; the margins here
     are what should do the spacing. Measured: -82px per markup widget. */
  min-height: 0;
  margin: .85rem 0 .35rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

#markup_value,
.markup-widget input[type="number"] { max-width: 170px; }

.markup-inputs { margin-top: .35rem; }

.client-price-box {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 1.1rem 0 0;
  padding-top: .9rem;
  border-top: 2px solid var(--gold);
}

.client-price-box > span {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.client-price-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--brand);
}

.actions { margin-top: 1rem; }

.brochure-form { margin-top: .85rem; }
.brochure-form button { width: 100%; }

/* Desktop: the markup widget becomes a sticky side panel beside the duration
   table, so the live client price stays in view while a broker reads prices. */
@media (min-width: 900px) {
  .pricing-section > form:first-of-type {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 0 2.25rem;
    align-items: start;
  }

  .pricing-section > form:first-of-type .pricing-table { grid-column: 1; grid-row: 1; margin-bottom: 0; }
  .pricing-section > form:first-of-type .markup-panel { grid-column: 2; grid-row: 1; position: sticky; top: 1.5rem; }

  /* "Add to Brochure" is its own <form>, a sibling of the pricing form, so it
     would otherwise stretch the full section width and read louder than the
     primary action above it. Pin it to the same right-hand action column as
     Copy Offer, where it reads as the secondary choice it is. */
  .pricing-section > .brochure-form { width: 330px; margin-left: auto; }
}

/* Mobile: the same panel becomes a bottom sheet pinned inside the pricing
   form, so the live client price + Copy Offer stay reachable while scrolling
   the duration table. The Copy Offer button lives INSIDE the sheet, so the
   sheet can never cover its own action. */
@media (max-width: 899px) {
  .pricing-section > form:first-of-type .markup-panel {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding-top: .5rem;
    background: linear-gradient(180deg, rgba(251, 250, 247, 0) 0%, var(--paper) 22%);
  }

  .pricing-section > form:first-of-type .markup-widget {
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: 0 -10px 28px rgba(16, 20, 24, .13);
  }

  .pricing-section > form:first-of-type .actions {
    margin-top: 0;
    padding: 0 0 .75rem;
    background: var(--paper);
  }

  .pricing-section > form:first-of-type .actions #copy-offer-btn {
    border-radius: 0 0 var(--radius) var(--radius);
  }
}

/* --------------------------------------------------------- request calendar */

.request-calendar {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.whatsapp-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  background: linear-gradient(180deg, #23926a 0%, var(--ok) 100%);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: var(--shadow-inset-line);
  transition: transform .16s var(--ease), box-shadow .16s var(--ease);
}

.whatsapp-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(28, 124, 84, .28);
}

.calendar-fallback {
  margin-top: 1rem;
  font-size: .9rem;
  color: var(--ink-soft);
}

.calendar-fallback summary {
  display: flex;
  align-items: center;
  min-height: var(--tap);   /* a bare <summary> is ~19px */
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.calendar-fallback summary:hover { color: var(--brand); }

.calendar-fallback .copy-text {
  margin: .75rem 0;
  padding: .85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  word-break: break-word;
  color: var(--ink);
}

.no-pricing {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.25rem;
  background: var(--gold-wash);
  border: 1px solid #ece0cb;
  border-radius: var(--radius-sm);
  color: #4b3f2b;
  font-size: .93rem;
}

/* ------------------------------------------------ brochure builder (/brochure) */

.visually-hidden { display: none; }

/* .badge's tinted-navy chip is invisible against the dark header — the nav
   badge flips to a brass chip so the tray count actually reads there. */
.nav-badge {
  margin-left: .45rem;
  padding: .12rem .5rem;
  background: var(--gold);
  border-color: var(--gold);
  color: #17232b;
  font-size: .68rem;
}

.brochure-cards {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.brochure-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.brochure-card-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--brand-tint);
}

.brochure-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.2rem;
}

.brochure-card-body h2 { margin: 0 0 .3rem; font-size: 1.15rem; }

.brochure-card-body .facts-row {
  margin: 0 0 .35rem;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.brochure-widget { margin-top: .9rem; }
.brochure-widget .client-price-value { font-size: 1.6rem; }

.remove-btn {
  margin-top: 1rem;
  align-self: flex-start;
  min-height: var(--tap);
  padding: .45rem 1.15rem;
  font-size: .72rem;
}

.brochure-builder-form .actions {
  position: sticky;
  bottom: 0;
  z-index: 15;
  margin: 0;
  padding: .9rem 0 1.1rem;
  background: linear-gradient(180deg, rgba(251, 250, 247, 0) 0%, var(--paper) 30%);
}

/* --------------------------------------------- offer created confirmation - */

.offer-created {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.85rem;
  position: relative;
  overflow: hidden;
}

.offer-created::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 50%, var(--gold) 100%);
}

.offer-created h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 1.95rem);
}

.offer-summary, .offer-summary-list { color: var(--ink-soft); }

.offer-summary strong, .offer-summary-list strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold-ink);
}

.offer-summary-list { margin: 0; padding-left: 1.15rem; }
.offer-summary-list li { margin-bottom: .4rem; }

.offer-link-box {
  margin-top: 1.5rem;
  padding: 1.2rem 1.3rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.offer-link-label {
  display: block;
  margin-bottom: .5rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.offer-url {
  margin: 0 0 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92rem;
  color: var(--ink);
  word-break: break-all;
}

.offer-actions-row { margin-top: 1.35rem; margin-bottom: .5rem; }

/* "Preview as client" is a standalone action sitting on its own line, not a
   link inside a sentence -- so it takes the tap floor rather than the prose
   exception. */
.offer-actions-row a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.saved-note {
  margin-top: 1.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .88rem;
}

/* -------------------------------------------------------- My Offers table - */

.offers-table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* `separate` (not `collapse`) so the wrapper's border-radius actually clips
   the corner cells, and so sticky <th> keeps its bottom hairline in Chrome —
   collapsed borders are painted by the table, not the cell, and vanish when
   the cell is lifted into a sticky layer. */
.offers-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.offers-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  text-align: left;
  padding: .85rem 1rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

.offers-table td {
  padding: .8rem 1rem;
  border-bottom: 1px solid #f2eee6;
  white-space: nowrap;
  font-size: .92rem;
}

.offers-table tbody tr:last-child td { border-bottom: none; }
.offers-table tbody tr { transition: background .16s var(--ease); }
.offers-table tbody tr:hover { background: var(--paper); }

.offer-row.revoked { opacity: .58; }

.badge-revoked {
  background: var(--warn-wash);
  border-color: #eccfc6;
  color: var(--warn);
  margin-left: 0;
}

.badge-active {
  background: var(--ok-wash);
  border-color: #cfe4da;
  color: var(--ok);
  margin-left: 0;
}

.offer-actions { display: flex; gap: .5rem; align-items: center; }
.offer-actions form.revoke-form { display: inline; margin: 0; }

.offer-actions button,
.offer-actions a {
  min-height: var(--tap);
  padding: .35rem .95rem;
  font-size: .7rem;
}

.offer-actions a {
  display: inline-flex;
  align-items: center;
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.offer-actions a:hover { background: var(--brand-tint); }

/* ---------------------------------------------------------- flash messages */

.flash-messages { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.flash-messages .flash {
  margin-bottom: .6rem;
  padding: .85rem 1.1rem;
  background: var(--warn-wash);
  border: 1px solid #eccfc6;
  border-left: 3px solid var(--warn);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #7d3320;
  font-size: .92rem;
  font-weight: 600;
}

/* ------------------------------------------------------- settings (/settings) */

.settings-card {
  margin-bottom: 1.75rem;
  padding: 1.85rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.settings-card h2 {
  margin: 0 0 1.1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
}

.settings-card form { max-width: 30rem; }
.settings-card button { margin-top: .5rem; }

.badge-editable {
  background: var(--ok-wash);
  border-color: #cfe4da;
  color: var(--ok);
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .55rem 1.5rem;
  margin: 1.1rem 0 1.35rem;
}

dl dt {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-top: .15rem;
}

dl dd { margin: 0; color: var(--ink); }

.logo-preview {
  display: block;
  width: 160px;
  height: 96px;
  object-fit: contain;
  padding: .6rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.forbidden-note {
  padding: 1.25rem 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.02rem;
  box-shadow: var(--shadow);
}

/* ------------------------------------------------------------- breakpoints */

@media (max-width: 820px) {
  .hamburger { display: inline-flex; right: var(--gutter); }

  .portal-nav {
    display: none;
    width: calc(100% + 2 * var(--gutter));
    margin: 0 calc(-1 * var(--gutter));
    border-top: 1px solid rgba(217, 194, 148, .22);
  }

  .nav-toggle:checked ~ .portal-nav { display: block; }

  .portal-nav ul { flex-direction: column; gap: 0; margin: 0; }

  .portal-nav a {
    width: 100%;
    min-height: 52px;
    padding: 0 var(--gutter);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    border-left: 3px solid transparent;
  }

  .portal-nav a:hover,
  .portal-nav a.is-active { border-bottom-color: rgba(255, 255, 255, .07); border-left-color: var(--gold); }

  /* Collapsed nav leaves the header a single brand row -- it needs its own
     bottom padding, which the open nav supplies for itself. */
  .portal-header:has(.nav-toggle:not(:checked)) { padding-bottom: .9rem; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.05rem; }
  main { padding-top: 1.5rem; padding-bottom: 3rem; }
  .fleet-grid, .brochure-cards { grid-template-columns: 1fr; }
  .fleet-search { padding: 1.1rem; }
  .fleet-search .field { flex: 1 1 100%; }
  .fleet-search button { width: 100%; }
  .yacht-detail { padding-bottom: 1.5rem; }
  .yacht-detail > *:not(.gallery) { margin-left: 1.15rem; margin-right: 1.15rem; }
  .gallery-thumbs { padding-left: 1.15rem; padding-right: 1.15rem; }
  .amenities { margin-left: 1.15rem; margin-right: 1.15rem; }
  .login-page { padding: 2rem 1.35rem 1.75rem; }
  .offer-created, .settings-card { padding: 1.5rem 1.15rem; }
  .offer-actions { flex-wrap: wrap; }
  dl { grid-template-columns: 1fr; gap: .15rem; }
  dl dd { margin-bottom: .75rem; }
  .pricing-table td:first-child { min-width: 11rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .yacht-card:hover { transform: none; }
  .yacht-card:hover .yacht-card-img { transform: none; }
}
