:root {
  color-scheme: light;
  /* UseKUSA brand: cool navy + gold on a light SaaS background (matches the
     usekusa.com marketing site). --bg doubles as the light text color on the
     navy sidebar/topbar, so it stays near-white. */
  --bg: #f8fafc;
  --bg-2: #eef2f7;
  --panel: rgba(255, 255, 255, 0.94);
  --text: #1f2937;
  --muted: #64748b;
  --accent: #b3833b;
  --accent-2: #1f365c;
  --navy-panel: #24425f;
  --line: rgba(31, 54, 92, 0.12);
  --shadow: 0 18px 44px rgba(31, 54, 92, 0.14);

  /* ------------------------------------------------ the rest of the surface
     Thirteen tokens covered the chrome and 221 colour literals covered
     everything else, so a theme switch had nothing to switch. These name the
     SURFACE -- page, panel, text, rule -- which is 71% of the literals and
     effectively all the visible area of a page.

     Two things this fixes on the way. A second vocabulary (`--ink`, `--gold`,
     `--navy`, `--border`) was in use with fallbacks and NEVER DEFINED, so
     twenty usages silently fell back to a literal and no token could reach
     them. And `#fff` was doing two different jobs -- a card's surface and text
     on a dark one -- which in a dark theme must move in opposite directions. */
  --panel-solid: #fff;      /* an opaque card, where --panel is translucent */
  --panel-2: #f7f9fc;       /* an inset or nested surface */
  --panel-sheer: rgba(255, 255, 255, 0.55);
  --overlay: rgba(10, 16, 10, 0.65);

  --ink: #2a2118;           /* warm near-black, on cream */
  --cream: #fff9f2;         /* warm near-white, on navy */
  --text-invert: #fff;      /* text ON a dark surface, never a surface itself */
  /* White layered on something that is dark in BOTH themes -- a lightbox, the
     navy bottom nav, the page's own texture. It must not flip: a dark theme
     that inverts these turns a scrim black-on-black and a nav rule invisible.
     Distinct from --text-invert, which is type, and from --panel-solid, which
     is a surface that DOES flip. The same literal `#fff` was doing all three
     jobs before anything had a name. */
  --on-dark: #fff;
  --text-2: #334155;

  --line-2: #e2e6ee;        /* an opaque rule, where --line is a navy tint */
  --border: #e2e2e2;

  /* Aliases for the undefined vocabulary. Same values, so nothing moves --
     but now one place changes them. */
  --gold: var(--accent);
  --navy: var(--accent-2);

  /* The brand navy used as TYPE, not as a surface. --accent-2 is a background
     15 times and a colour 17 times, and on a dark page those two want opposite
     things: the surface is already dark and stays, while dark navy text on a
     dark page is simply not there. Links, active tabs, summaries and labels
     read through this one, so a dark theme lightens the type without touching
     the fifteen surfaces. Same value in light, so nothing moves today. */
  --accent-ink: var(--accent-2);

  /* Headings, which are a muted navy rather than the body's near-black. Its
     own token because --navy-panel is also a SURFACE, and on a dark page a
     heading has to come up while the surface stays put. */
  --heading: var(--navy-panel);

  --accent-soft: rgba(179, 131, 59, 0.12);
  --accent-soft-strong: rgba(179, 131, 59, 0.16);
  --navy-soft: rgba(28, 47, 74, 0.12);
  --radius: 10px;
  --topbar-h: 66px;
  --sidebar-w: 260px;
  /* ------------------------------------------------------- state inks
     A badge is a STATE, and a state has one colour. There were nine reds,
     four ambers and five greens here, at intensities nobody chose on
     purpose. More to the point they were HARDCODED DARK text sitting on a
     light tint: flip the theme and the tint composites dark while the text
     stays dark, so eight badges measured between 1.37:1 and 2.85:1 against
     their own background. */
  --ink-danger: #991b1b;
  --ink-warn: #a16207;
  --ink-ok: #15803d;
  --ink-info: #1e40af;
  --ink-neutral: #4a5160;
  --bar-ok: #16a34a;
}

/* ============================================================== dark theme

   One palette, stated twice. Every rule above reads through a token, so this
   block is the whole theme -- there is no second stylesheet and no page that
   has to opt in.

   Three tokens deliberately do NOT flip, and they are the ones a naive invert
   gets wrong:

     --text-invert and --on-dark stay white. A navy table header and a lightbox
     scrim are dark in BOTH themes, so inverting their type and their rules
     turns white-on-navy into navy-on-navy and makes a scrim's edge vanish.

     --cream stays warm-white for the same reason: it is type on navy.

   And --accent-ink exists only for this block. The brand navy is a background
   fifteen times and a colour seventeen times; the surfaces are already dark
   and stay, while the type has to come up to meet them.

   Defaults to the operating system, with [data-theme] overriding it, so a
   machine set to dark gets dark and anybody can say otherwise. */

/* ============================================================== dark theme

   The palette's VALUES live once, here, and are applied by the two selectors
   below. They have to be two -- one for a machine set to dark, one for
   somebody who asked for dark on a light machine -- and CSS has no way to say
   "that block, but on this selector too". Written out twice, the two drifted
   silently: changing the gold in one of them left the other alone, and a
   negative control that should have gone red stayed green. Only the mapping
   repeats now, and a test checks the two mappings match.

   Three tokens deliberately do NOT flip, and they are the ones a naive invert
   gets wrong. --text-invert and --on-dark stay white: a navy table header and
   a lightbox scrim are dark in BOTH themes, so inverting their type turns
   white-on-navy into navy-on-navy. --cream stays warm-white for the same
   reason. And --accent-ink exists only for this: the brand navy is a
   background fifteen times and a colour seventeen times, so the surfaces stay
   and the type comes up to meet them. */

:root {
  --dark-bg: #0e1520;
  --dark-bg-2: #131d2b;
  --dark-panel: rgba(22, 31, 45, 0.94);
  --dark-panel-solid: #161f2d;
  --dark-panel-2: #111a26;
  --dark-panel-sheer: rgba(22, 31, 45, 0.55);
  --dark-overlay: rgba(3, 6, 10, 0.78);
  --dark-text: #e6ebf2;
  --dark-text-2: #c2ccda;
  --dark-muted: #93a1b5;
  --dark-ink: #f2ece3;
  --dark-line: rgba(230, 235, 242, 0.14);
  --dark-line-2: #26313f;
  --dark-border: #26313f;
  --dark-ink-danger: #f3a9a1;
  --dark-ink-warn: #e9bd73;
  --dark-ink-ok: #7fd3a0;
  --dark-ink-info: #9dc2f5;
  --dark-ink-neutral: #c2ccda;
  --dark-bar-ok: #35c777;
  --dark-accent: #b3833b;
  --dark-accent-2: #26405f;
  --dark-navy-panel: #2c4a6b;
  --dark-accent-ink: #9db9dd;
  --dark-heading: #9db9dd;
  --dark-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--dark-bg);
    --bg-2: var(--dark-bg-2);
    --panel: var(--dark-panel);
    --panel-solid: var(--dark-panel-solid);
    --panel-2: var(--dark-panel-2);
    --panel-sheer: var(--dark-panel-sheer);
    --overlay: var(--dark-overlay);
    --text: var(--dark-text);
    --text-2: var(--dark-text-2);
    --muted: var(--dark-muted);
    --ink: var(--dark-ink);
    --line: var(--dark-line);
    --line-2: var(--dark-line-2);
    --border: var(--dark-border);
    --ink-danger: var(--dark-ink-danger);
    --ink-warn: var(--dark-ink-warn);
    --ink-ok: var(--dark-ink-ok);
    --ink-info: var(--dark-ink-info);
    --ink-neutral: var(--dark-ink-neutral);
    --bar-ok: var(--dark-bar-ok);
    --accent: var(--dark-accent);
    --accent-2: var(--dark-accent-2);
    --navy-panel: var(--dark-navy-panel);
    --accent-ink: var(--dark-accent-ink);
    --heading: var(--dark-heading);
    --shadow: var(--dark-shadow);
  }
}

:root[data-theme="dark"] {
  --bg: var(--dark-bg);
  --bg-2: var(--dark-bg-2);
  --panel: var(--dark-panel);
  --panel-solid: var(--dark-panel-solid);
  --panel-2: var(--dark-panel-2);
  --panel-sheer: var(--dark-panel-sheer);
  --overlay: var(--dark-overlay);
  --text: var(--dark-text);
  --text-2: var(--dark-text-2);
  --muted: var(--dark-muted);
  --ink: var(--dark-ink);
  --line: var(--dark-line);
  --line-2: var(--dark-line-2);
  --border: var(--dark-border);
  --ink-danger: var(--dark-ink-danger);
  --ink-warn: var(--dark-ink-warn);
  --ink-ok: var(--dark-ink-ok);
  --ink-info: var(--dark-ink-info);
  --ink-neutral: var(--dark-ink-neutral);
  --bar-ok: var(--dark-bar-ok);
  --accent: var(--dark-accent);
  --accent-2: var(--dark-accent-2);
  --navy-panel: var(--dark-navy-panel);
  --accent-ink: var(--dark-accent-ink);
  --heading: var(--dark-heading);
  --shadow: var(--dark-shadow);
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] {
  color-scheme: dark;
}


* {
  box-sizing: border-box;
}

/* Author-level display rules (e.g. .split-layout { display: grid }) otherwise
   beat the UA's [hidden] { display: none }, since same-specificity author
   rules always win over UA rules regardless of source order -- this made
   hidden sections keep rendering. Force hidden to always win. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 10%, transparent), transparent 30%),
    radial-gradient(circle at top right, color-mix(in srgb, var(--accent-2) 10%, transparent), transparent 30%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(color-mix(in srgb, var(--on-dark) 16%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--on-dark) 16%, transparent) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 78%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: url("assets/logo.webp");
  background-repeat: no-repeat;
  background-position: center 45%;
  background-size: min(45vw, 520px);
  opacity: 0.04;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-shell {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--topbar-h) 1fr;
  align-items: start;
  min-height: 100vh;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

/* ---- Left sidebar: the site's structural anchor (navy, not the page's
   warm cream) on every page, public and staff portal alike. ---- */
.site-sidebar {
  grid-row: 2;
  grid-column: 1;
  background: var(--bg-2);
  color: var(--text);
  border-right: 1px solid var(--line);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  /* dvh tracks the viewport as a mobile browser's toolbars come and go; vh
     above is the fallback for anything that does not know the unit. */
  height: calc(100dvh - var(--topbar-h));
  overflow-y: auto;
  z-index: 30;
}

.site-main {
  grid-row: 2;
  grid-column: 2;
  padding: 32px 32px 72px;
  min-width: 0;
}

.org-banner {
  margin-bottom: 22px;
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--cream);
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 120ms ease;
}

a.brand-lockup:hover {
  opacity: 0.85;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg);
  padding: 4px;
}

.brand-lockup h1,
.brand-lockup .brand-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  color: var(--text);
}

.brand-lockup .eyebrow {
  color: var(--accent);
  margin-bottom: 0;
}

.brand-lockup .brand-subtitle {
  margin: 2px 0 0;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}

.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 1.2rem;
  cursor: pointer;
  flex-shrink: 0;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 60;
}

.sidebar-backdrop {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

h1,
h2,
h3,
h4,
.eyebrow,
.feature-kicker,
.stat strong {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
}

h1,
h2,
h3,
h4 {
  /* Browsers default headings to bold + inherited body color, which here
     meant near-black (--text) at full bold weight -- heavier and starker
     than the rest of the warm navy/gold palette. A muted navy at a lighter
     weight reads as considered rather than just "whatever the browser
     picked". */
  font-weight: 600;
  color: var(--heading);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 3.4rem);
}

h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.4rem);
  line-height: 1.05;
}

.eyebrow {
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  color: var(--accent);
}

.brand-copy,
.hero-copy p,
.intro-card p,
.property-meta,
.review-source,
.feature-card p {
  color: var(--muted);
  line-height: 1.65;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 8px 12px;
}

.nav-link,
.nav-group a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--text-2);
  transition: background 120ms ease, color 120ms ease;
}

.nav-link:hover,
.nav-group a:hover {
  background: color-mix(in srgb, var(--accent-2) 6%, transparent);
}

.nav-link.active,
.nav-group a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-divider {
  height: 1px;
  background: var(--line);
}

.sidebar-footer {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-footer a {
  color: var(--text);
}

.site-sidebar .button {
  width: 100%;
  justify-content: center;
}

.about-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.about-subnav a {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 13px;
  font-size: 0.88rem;
  background: var(--panel-sheer);
}

.about-subnav a.active {
  background: var(--accent);
  border-color: transparent;
  color: var(--cream);
}

.hero {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  padding: 28px;
  margin-bottom: 28px;
  animation: float-in 700ms ease-out both;
}

.hero-copy p {
  max-width: 64ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 18px;
  font-size: 0.92rem;
  font-weight: 600;
  background: var(--panel-sheer);
  cursor: pointer;
}

.button.primary {
  background: var(--accent);
  color: var(--cream);
  border-color: transparent;
}

.button.secondary {
  color: var(--accent-ink);
}

.hero-panel {
  display: grid;
  gap: 16px;
}

.feature-card,
.intro-card,
.review-card,
.property-card {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel-sheer);
  padding: 18px;
}

.feature-card-large {
  min-height: 220px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 16%, transparent), var(--navy-soft));
}

.image-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.image-row .image-block {
  min-height: 110px;
}

.feature-copy-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.logo-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-solid);
  padding: 16px;
}

.logo-showcase img {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.feature-kicker,
.property-badge,
.review-source {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-2) 8%, transparent);
  margin-bottom: 10px;
}

.property-badge-soon {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 600;
}

/* Factual trust statements (About page) -- three short claims side by side,
   separated by hairlines rather than icon cards. */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 16px;
}

.trust-item {
  padding: 4px 18px;
  border-left: 1px solid var(--line);
}

.trust-item:first-child {
  padding-left: 0;
  border-left: none;
}

.trust-item h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.trust-item p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 700px) {
  .trust-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .trust-item {
    padding-left: 0;
    border-left: none;
  }
}

.section {
  margin-top: 30px;
}

.detail-row {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row:last-of-type {
  border-bottom: none;
}

.detail-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.detail-value {
  display: block;
}

.detail-value .property-badge {
  margin-right: 6px;
  margin-bottom: 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 20px;
  margin-bottom: 4px;
}

.detail-grid .detail-cell {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 700px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.booking-status {
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  border-left: 4px solid var(--muted);
}

.booking-status.booking-status-active {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.photos-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.photos-strip .photo-card {
  flex: 0 0 180px;
}

.signup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.signup-card h3 {
  margin-top: 4px;
}

.signup-card form {
  margin-top: 16px;
}

@media (max-width: 860px) {
  .signup-grid {
    grid-template-columns: 1fr;
  }
}

.section-head {
  margin-bottom: 16px;
}

/* Two cards side by side on wide screens, stacked on narrow. It had no
   grid-template-columns at all, so despite the name it always rendered as ONE
   column -- which is why issue.html and cleaner-profile.html read as a long
   scroll. Both pages only have 2-3 sections, so making the split real is a
   better fix than hiding half the page behind a sub-nav. */
.split-layout {
  display: grid;
  gap: 16px;
}

@media (min-width: 1100px) {
  .split-layout {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.stat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  line-height: 1;
}

.stat-icon-blue {
  background: color-mix(in srgb, var(--navy-panel) 12%, transparent);
}
.stat-icon-green {
  background: rgba(46, 125, 90, 0.14);
}
.stat-icon-amber {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
}
.stat-icon-purple {
  background: rgba(120, 82, 168, 0.14);
}

.stat-card .stat-value {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--heading);
  margin: 0;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin: 6px 0 2px;
}

.stat-card .stat-sub {
  font-size: 0.76rem;
  color: var(--muted);
  margin: 0;
}

@media (max-width: 960px) {
  .stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .stat-row {
    grid-template-columns: 1fr;
  }
}

.about-panels .intro-card {
  display: grid;
  gap: 14px;
}

.about-panels {
  display: grid;
  gap: 16px;
}

.image-block {
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, transparent), var(--navy-soft));
  min-height: 210px;
}

.photo-card {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.photo-card .image-block {
  min-height: 160px;
}

.photo-rename-form {
  display: flex;
  gap: 8px;
}

.photo-rename-form input {
  flex: 1;
  min-width: 0;
}

.image-block-tall {
  min-height: 278px;
}

.property-card {
  display: grid;
  gap: 10px;
}

.property-card-highlight {
  animation: property-card-flash 2.6s ease-out;
}

@keyframes property-card-flash {
  0%,
  35% {
    box-shadow: 0 0 0 3px var(--accent);
  }
  100% {
    box-shadow: none;
  }
}

.property-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, transparent), color-mix(in srgb, var(--accent-2) 14%, transparent));
  cursor: pointer;
}

.property-image-hint {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cream);
  background: linear-gradient(0deg, var(--overlay), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

.property-image:hover .property-image-hint,
.property-image:focus-visible .property-image-hint {
  opacity: 1;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(6, 10, 6, 0.88);
}

.lightbox-backdrop[hidden] {
  display: none;
}

.lightbox-content {
  position: relative;
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-image {
  width: 100%;
  max-height: 76vh;
  max-height: 76dvh;
  object-fit: contain;
  border-radius: 14px;
  background: color-mix(in srgb, var(--on-dark) 5%, transparent);
}

.lightbox-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--cream);
  font-size: 0.9rem;
}

.lightbox-counter {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--on-dark) 35%, transparent);
  background: rgba(10, 16, 10, 0.5);
  color: var(--cream);
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close {
  top: -18px;
  right: -18px;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox-nav {
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  font-size: 1.1rem;
}

.lightbox-prev {
  left: -20px;
}

.lightbox-next {
  right: -20px;
}

@media (max-width: 640px) {
  .lightbox-close {
    top: -46px;
    right: 0;
  }

  .lightbox-prev {
    left: 0;
  }

  .lightbox-next {
    right: 0;
  }
}

.property-map {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.property-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-form {
  display: grid;
  gap: 12px;
  max-width: 420px;
}

.contact-status {
  font-size: 0.85rem;
  font-weight: 600;
}

.contact-status.success {
  color: var(--accent);
}

.contact-status.error {
  color: var(--ink-danger);
}

.stack {
  display: grid;
  gap: 14px;
}

.property-card h3,
.review-card h3,
.intro-card h3,
.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.18rem;
}

.property-card p:last-child,
.review-card p:last-child,
.intro-card p:last-child,
.feature-card p:last-child {
  margin-bottom: 0;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px;
  padding: 18px;
  margin-bottom: 20px;
}

.property-form {
  padding: 20px;
  margin-bottom: 20px;
}

.property-picker {
  max-width: 360px;
}

.publish-calendar-row {
  margin-top: 4px;
}

.publish-calendar-input-row {
  display: flex;
  gap: 8px;
}

.publish-calendar-input-row input {
  flex: 1;
  min-width: 0;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--panel-solid) 50%, transparent);
}

.channel-fieldset {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.channel-fieldset legend {
  padding: 0 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.channel-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.channel-checkbox input {
  width: auto;
}

/* SMS opt-in / consent: a longer disclosure next to the box, so top-align the
   checkbox and keep the legal text small and muted. */
.consent-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
  /* When it sits inside a two-column .issue-form-row, span the full width
     below the paired fields rather than squeezing into one grid cell. */
  grid-column: 1 / -1;
}

.consent-check input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.row-actions .role-select {
  width: auto;
  padding: 6px 8px;
}

.member-perms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
  align-items: flex-end;
}

.member-perms .perms-title {
  width: 100%;
  margin: 0;
}

.member-perms label {
  font-size: 0.85rem;
  gap: 4px;
}

.member-perms select {
  padding: 6px 8px;
}

/* Read-only team members: neutralize inline edit controls the API would 403
   on anyway, so the page reads as view-only. */
/* A read-only member sees the list and changes nothing on it. This used to name
   .status-select alone, which was the only inline control there was. Every
   editable cell now carries .cell-input, so the rule follows the class rather
   than being extended one column at a time -- the next editable column is
   covered without anyone remembering to come back here. */
.todo-readonly .status-select,
.todo-readonly .cell-input,
.cleaning-readonly .calendar-chip {
  pointer-events: none;
  opacity: 0.6;
}

/* And it must not LOOK editable either: offering an action that will be
   refused is worse than not offering it. */
.todo-readonly .cell-edit .cell-input:hover {
  border-color: transparent;
}

/* Same rule, applied to bulk tagging. The funder select is a .cell-input and
   so was already covered above, but the tick boxes and the bar are not -- and
   a read-only member who selected 26 rows and pressed Apply would collect 26
   refusals, which is the exact thing the comment above refuses to ship. */
.todo-readonly th.col-pick,
.todo-readonly td.col-pick,
.todo-readonly .bulk-bar {
  display: none;
}

.issue-form {
  display: grid;
  gap: 14px;
}

.issue-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea {
  font: inherit;
  color: var(--text);
  background: color-mix(in srgb, var(--panel-solid) 70%, transparent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
}

textarea {
  resize: vertical;
}

/* The rule above is text-FIELD chrome -- 12px of padding, a rounded border and
   a 70%-opaque panel fill -- and a bare `input` selector hands it to
   checkboxes and radios too. On a checkbox it replaces the native control with
   a translucent rounded box that the page's gradient shows through, so an
   UNCHECKED tick rendered as a filled tan square: it read as a state rather
   than as empty. Bulk tagging puts a column of them on screen, where "is this
   one selected" has to be answerable at a glance.
   Undone HERE rather than by narrowing the selector above: `input:not([type=
   "checkbox"])` raises that rule's specificity over .cell-input, which handed
   every inline table cell its border and padding back and clipped the dates
   again. This is additive, so nothing else moves. color-scheme is already set
   per theme, so the native controls draw themselves correctly in both. */
input[type="checkbox"],
input[type="radio"] {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

.issue-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.issue-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(20, 32, 20, 0.14);
}

.issue-row-name {
  font-weight: 600;
}

.table-wrap {
  max-height: 70vh;
  max-height: 70dvh;
  /* BOTH directions. It already scrolled vertically; horizontally it had
     nothing to scroll, because the table was pinned to width:100% and simply
     squeezed its columns instead. Measured at an 1100px viewport before
     changing it: Due Date got 77px and Severity and Status 62px each, so a
     date and the word "In progress" had nowhere to go. */
  overflow: auto;
  padding: 0;
  /* Momentum scrolling on iOS, and a visible bar on macOS where bars are
     hidden until they move -- a table that scrolls with no hint it can is a
     table whose last three columns do not exist as far as the reader knows. */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.issues-table {
  width: 100%;
  border-collapse: collapse;
}

/* THE FLOOR IS PER COLUMN, not one number for the whole table.
   It was `min-width: 560px` on the table itself -- the same figure whether a
   table has three columns or six, so it only ever fitted one of them. Measured
   with an empty tbody, where the headers alone decide the width:

     cleaning  3 cols   187px per column   generous
     users     4 cols   140px per column   about right
     contacts  6 cols    93px per column   crushed

   A squeezed column does not clip, it WRAPS, which is why this survived a
   suite that checks for truncation. Measured on the contacts book with one
   real row, the phone column was given 47px of room for the 122px of
   `+1 (302) 555-0147` at an 1100px laptop and 86px at 1440px -- so a phone
   number broke over several lines and stood the row at 94px on BOTH. Nothing
   was cut, so nothing reported it.

   The floor is now per column, which is additive: an extra column widens the
   table's own minimum, the wrapper gets something to scroll, and no second
   number has to be re-derived by hand. The issue list is unaffected -- it is
   `table-layout: fixed`, where a cell min-width is inert, and it keeps the
   measured 1340px floor below.

   160px is DERIVED. The widest ATOMIC value in these tables -- one that must
   never break, because half a phone number is not a phone number -- is a
   formatted US number at 122px, plus the 36px of cell padding, so 158. Free
   text may still wrap: the issue list wraps long names on purpose and offers
   the rest on hover. The rule is that atomic values do not break and prose
   may. */
.issues-table th {
  min-width: 160px;
  position: sticky;
  top: 0;
  z-index: 5;
  text-align: left;
  padding: 14px 18px;
  background: var(--accent-2);
  color: var(--text-invert);
  border-bottom: 2px solid var(--line);
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
}

/* An actions column has no header text and holds one button, so the 160px
   floor above would be air at the right-hand edge of every table that has one
   -- measured with the floor applied to it, 160px of column for a 95px button
   -- and would push tables into scrolling sideways earlier than their content
   requires. More specific than the rule above, so their order does not
   matter. */
.issues-table th:empty {
  min-width: 0;
}

.issues-table th.sortable {
  cursor: pointer;
  user-select: none;
  padding-right: 26px;
  /* NO position:relative. It was here so the ::after sort arrow had something
     to position against, and it silently beat the `position: sticky` on
     `.issues-table th` above -- higher specificity, so the header has never
     actually stuck on any table on the platform. Every column in these tables
     is sortable, so it was overridden on all of them.

     `position: sticky` is itself a containing block for absolutely positioned
     descendants, exactly as `relative` is, so the arrow needs nothing here. */
}

.issues-table th.sortable:hover {
  color: #d9a75c;
}

.issues-table th.sortable::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-top-color: color-mix(in srgb, var(--bg) 50%, transparent);
  opacity: 0.6;
}

.issues-table th.sortable.sorted-asc::after,
.issues-table th.sortable.sorted-desc::after {
  opacity: 1;
  border-top-color: #d9a75c;
}

.issues-table th.sortable.sorted-asc::after {
  transform: translateY(-50%) rotate(180deg);
}

.issues-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

/* Issue rows carry long names now -- a rehab budget imported 25 of them, like
   "Unit 1 - Main House - HVAC heat pump condenser". The table was built for
   short ones: every cell a single line of body text, and the name an <input>,
   which cannot wrap at all. Its text scrolled sideways, so a long name showed
   its first few words and gave no sign there were more.

   Three changes, and they only work together. A smaller type size alone just
   makes a clipped name harder to read; a wider column alone takes the room from
   Assigned To and Due Date, which are short and need little. */
.issues-table tbody {
  font-size: 0.875rem;
}

.issues-table td {
  vertical-align: top;
}

/* Column widths, and the fixed layout that makes them stick.
   SCOPED to the issue list. These shares describe seven specific columns, and
   .issues-table is shared by twelve tables across seven pages -- Users has
   four columns, the backoffice has three. Applying a seven-column layout to a
   three-column table silently mis-sized every one of them, which is what the
   first version of this did.

   The browser's automatic layout gives the widest column to whichever row
   happens to hold the longest string, so the table reflowed every time a filter
   changed. Fixed shares keep it still, and give the name the room the short
   columns were not using. */
.issue-list-table {
  table-layout: fixed;
  /* Below this the short columns stop being readable, so the wrapper scrolls
     instead. Derived from the content, not picked: a full ISO date, the word
     "critical", and "In progress" in a select with its arrow. */
  /* Ten columns now: a tick box and "Who is paying" joined the eight.
     MEASURED, not chosen. A <select> truncates rather than scrolls, so
     scrollWidth equals clientWidth even when the label is visibly cut -- which
     is why an earlier floor of 1074px passed every test while rendering
     "Lender hold", "Criti" and "In prog" on screen. The widths the three
     selects actually need for their longest label, plus padding and the native
     arrow, are 149px, 84px and 113px; this floor is what delivers them.

     It is wider than the 1074px content area, so this table now scrolls
     sideways at every window size -- the shell is capped at 1400px, so no
     monitor is wide enough to avoid it. That is the deliberate trade for two
     more columns: scrolling is recoverable, a permanently truncated label is
     not. Narrowing to one property drops the Property column via
     .hide-property below and takes most of the overflow with it. */
  min-width: 1340px;
}

/* The tick column. Narrow and fixed: it holds one checkbox and must not take
   width from the name. */
.issue-list-table th.col-pick,
.issue-list-table td.col-pick {
  width: 34px;
  padding-left: 8px;
  padding-right: 4px;
  text-align: center;
}

.issue-list-table td.col-pick input,
.issue-list-table th.col-pick input {
  cursor: pointer;
  /* The row opens the item on click; the box must be comfortably bigger than
     a 13px default or picking 26 of them is a precision exercise. */
  width: 16px;
  height: 16px;
}

/* 20px of horizontal padding rather than 36. Across eight columns that is
   128px returned to the content, which is most of what the Paid column costs.
   Scoped to this table so the three- and four-column tables keep their
   roomier spacing, where there is no shortage. */
.issue-list-table th,
.issue-list-table td {
  padding-left: 10px;
  padding-right: 10px;
}

.issue-list-table th.sortable {
  padding-right: 22px;   /* the sort arrow still needs its corner */
}

/* Column 1 is the tick, sized in px above, so these shares cover 2-10. */
/* The tick is 34px of the 1340 floor, so these nine share the remaining ~97%.
   The three select columns are sized from the text their longest option needs;
   Issue takes what is left, which is the column that can actually use it. */
/* Sized from measured text, via one rule: a select shows (cell - 50px) of
   label, being 20px of cell padding, 12px of its own, and 18px of arrow. So a
   column needs its longest option's width PLUS 50. At 1340px:
     Who is paying  "Lender holdback"  111px -> needs 161, gets 174
     Status         "In progress"       75px -> needs 125, gets 141
     Severity       "Critical"          46px -> needs  96, gets 107
     Due Date       "2026-12-31"        76px -> needs 128, gets 134
   A date input has a calendar BUTTON in its content box, same as a select's
   arrow -- granting it nothing is why the year rendered as "20".
   An earlier pass put Severity at 7% and left it two pixels short, which is
   how "Critical" renders as "Criti". The margins here are deliberate. */
.issue-list-table th:nth-child(2)  { width: 9%;    }   /* Property      */
/* Issue stays above a quarter of the row: issue-name-wrapping.test.mjs pins
   that share, because widening this table must not just mean a roomier Status
   column. The point comes from Assigned To, whose input holds an email that
   does not fit at ANY of these widths and scrolls regardless. */
.issue-list-table th:nth-child(3)  { width: 25.5%; }   /* Issue         */
.issue-list-table th:nth-child(4)  { width: 8%;    }   /* Assigned      */
.issue-list-table th:nth-child(5)  { width: 10%;   }   /* Due           */
/* A currency input holds "$12,500" and no more. */
.issue-list-table th:nth-child(6)  { width: 6.5%;  }   /* Est. cost     */
.issue-list-table th:nth-child(7)  { width: 6.5%;  }   /* Paid          */
.issue-list-table th:nth-child(8)  { width: 13%;   }   /* Who is paying */
.issue-list-table th:nth-child(9)  { width: 8%;    }   /* Severity      */
.issue-list-table th:nth-child(10) { width: 10.5%; }   /* Status        */

/* Narrowed to one property, so the Property column is the same name repeated
   down every row. display:none rather than dropping the cells, which would
   shift every nth-child above onto the wrong column. */
.issue-list-table.hide-property th:nth-child(2),
.issue-list-table.hide-property td:nth-child(2) {
  display: none;
}

/* The bar that appears when rows are ticked. */
.bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0 0 10px;
  padding: 10px 14px;
}

.bulk-count {
  font-weight: 600;
  color: var(--text);
}

.bulk-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.bulk-bar .form-status {
  width: 100%;
  margin: 0;
}

/* What the rows above add up to. Sits outside the scroll container, so it does
   not scroll away with them. */
.table-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 10px 2px 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.table-totals .totals-group strong {
  color: var(--ink, inherit);
  font-weight: 600;
}

.issue-tr {
  cursor: pointer;
  transition: background 120ms ease;
}

.issue-tr:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.issue-tr-done {
  background: rgba(90, 90, 90, 0.1);
  color: var(--muted);
  opacity: 0.7;
}

.issue-tr-done:hover {
  background: rgba(90, 90, 90, 0.16);
  opacity: 0.9;
}

.issue-tr-name {
  font-weight: 600;
}

.cell-severity {
  text-transform: capitalize;
}

.cell-severity-high {
  color: var(--text-invert);
  background: #b3261e;
  border-radius: 8px;
  font-weight: 700;
  text-align: center;
}

.status-check {
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}

.status-select {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.issue-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.issue-list-foot {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  /* Same trap as the drawer: `inset: 0` is the LAYOUT viewport, which on iOS
     runs behind Safari's toolbar. Centring inside it puts the middle of the
     dialog lower than the middle of the screen, so the buttons along its
     bottom edge -- Save, Submit -- end up under the toolbar. Bounded to the
     visible viewport instead. */
  height: 100vh;
  height: 100dvh;
  background: rgba(10, 16, 10, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  max-height: 85dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  /* The last control in a long form has to be reachable, not merely drawn. */
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 16px;
}

.calendar-head h3 {
  min-width: 180px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  overflow: hidden;
}

.calendar-weekday {
  padding: 10px;
  text-align: center;
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 0.85rem;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-solid) 40%, transparent);
}

.calendar-day {
  min-height: 96px;
  padding: 8px;
  background: var(--panel-sheer);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-day-empty {
  background: transparent;
}

.calendar-day-number {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.calendar-chip {
  font: inherit;
  font-size: 0.75rem;
  text-align: left;
  padding: 4px 6px;
  border-radius: 6px;
  border: none;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
  cursor: pointer;
}

.calendar-chip:hover {
  background: color-mix(in srgb, var(--accent) 28%, transparent);
}

@media (max-width: 640px) {
  .issue-form-row,
  .issue-row {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    min-height: 64px;
  }

  .calendar-weekday {
    font-size: 0.7rem;
    padding: 6px 4px;
  }
}

@media (max-width: 960px) {
  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .image-row,
  .feature-copy-row {
    grid-template-columns: 1fr;
  }
}

/* Below 860px the persistent sidebar becomes an off-canvas drawer, opened by
   the hamburger toggle (fixed top-left) and closed by its own backdrop. */
@media (max-width: 860px) {
  .site-shell {
    display: block;
  }

  /* Header stays full width and sticky at the very top; its own hamburger
     opens the drawer, so hide any page-level standalone toggle + the wordmark
     eyebrow to save room. */
  .topbar {
    position: sticky;
    top: 0;
  }

  .topbar-brand {
    width: auto;
    border-right: none;
    padding: 0 12px;
  }

  .topbar-eyebrow {
    display: none;
  }

  .topbar-menu-toggle {
    display: inline-flex;
  }

  .mobile-menu-toggle {
    display: none;
  }

  /* Org/address name is redundant on a phone header -- the drawer + brand carry
     identity; hiding it keeps the bar to a single compact row. */
  .topbar-org {
    display: none;
  }

  /* No drawer here on purpose.
     
     There USED to be an off-canvas .site-sidebar + .sidebar-backdrop + hamburger
     in this block, and they were dead: a later @media (max-width: 860px) sets
     `.site-sidebar, .mobile-menu-toggle, .topbar-menu-toggle, .sidebar-backdrop
     { display: none !important }` and the phone menu is the bottom tab bar
     instead. Dead rules that look live cost a whole round of "fixed it" /
     "still broken" -- the drawer was tuned twice while the actual menu was a
     slice(0, 5) in portal-chrome.js. The phone nav lives in .portal-bottom-nav
     and .more-sheet, further down. */

}

.site-footer {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin: 4px 0;
}

.site-footer a {
  color: var(--accent-ink);
  font-weight: 600;
}

/* ============================================================
   Admin dashboard: top bar, identity, stat icons, properties panel
   ============================================================ */

/* Full-width top bar spanning the whole shell (its own grid row above the
   sidebar + main). Light surface with a bottom hairline, FF-style: logo left
   (over the sidebar column), org in the middle, account on the right. */
.topbar {
  grid-row: 1;
  grid-column: 1 / -1;
  align-self: stretch;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 0 26px 0 0;
  min-height: var(--topbar-h);
  background: var(--bg-2);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

/* Left zone: aligns to the sidebar column width so the logo sits over it. */
.topbar-brand {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: 100%;
  border-right: 1px solid var(--line);
}

.topbar-logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}

.topbar-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--panel-solid);
  padding: 3px;
  flex-shrink: 0;
}

.topbar-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.topbar-eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.topbar-brandname {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.topbar-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.topbar-org {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-vpn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--bg) 80%, transparent);
}

.vpn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ccf8e;
  box-shadow: 0 0 0 3px rgba(76, 207, 142, 0.2);
}

.topbar-bell {
  position: relative;
  background: transparent;
  border: none;
  color: var(--text-invert);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}

.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #d64545;
  color: var(--text-invert);
  font-size: 0.66rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.topbar-caret {
  font-size: 0.7rem;
  color: color-mix(in srgb, var(--bg) 70%, transparent);
}

/* Circular initials avatar, reused in the top bar and sidebar profile. */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 0.8rem;
}

.nav-icon {
  display: inline-block;
  width: 1.3em;
  margin-right: 4px;
  text-align: center;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 14px;
  margin-bottom: 6px;
  border-top: 1px solid var(--line);
}

.sidebar-profile-text {
  min-width: 0;
}

.sidebar-profile-name {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-profile-email {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Welcome header + date pill */
.dash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-title {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--heading);
  margin: 4px 0 0;
}

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
}

/* Properties panel */
.panel {
  padding: 22px 24px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.panel-title {
  font-family: "Playfair Display", "Georgia", "Times New Roman", serif;
  font-size: 1.3rem;
  margin: 0;
}

.panel-sub {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.panel-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 0.85rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-box input {
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font: inherit;
  font-size: 0.88rem;
  min-width: 220px;
}

.filter-btn {
  padding: 9px 14px;
  font-size: 0.88rem;
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.view-toggle-btn {
  border: none;
  background: var(--panel);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--muted);
}

.view-toggle-btn.active {
  background: var(--accent-2);
  color: var(--text-invert);
}

/* Properties table: a light header (overriding the shared dark issues-table
   header) to match the airier dashboard look. */
.property-table th {
  background: transparent;
  color: var(--muted);
  font-family: "PT Sans", sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--line);
}

.property-table td {
  vertical-align: middle;
}

.prop-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prop-thumb {
  width: 52px;
  height: 52px;
  min-height: 0;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prop-thumb.placeholder {
  font-size: 1.2rem;
  opacity: 0.4;
}

.prop-id {
  display: flex;
  flex-direction: column;
}

.prop-name {
  font-weight: 700;
  color: var(--ink);
}

.prop-area {
  font-size: 0.8rem;
  color: var(--muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status-badge.status-active {
  background: rgba(46, 125, 90, 0.12);
  color: var(--ink-ok);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.by-line {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.col-actions {
  position: relative;
  white-space: nowrap;
}

.row-edit-btn {
  padding: 6px 12px;
  font-size: 0.82rem;
}

.row-kebab {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px 8px;
  color: var(--muted);
  border-radius: 8px;
}

.row-kebab:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.row-menu {
  position: absolute;
  right: 8px;
  top: calc(100% - 4px);
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
}

.row-menu-item {
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
}

.row-menu-item:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

.row-menu-danger {
  color: var(--ink-danger);
}

/* Panel footer + pagination */
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.panel-count {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn,
.page-num {
  min-width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
}

.page-num.active {
  background: var(--accent-2);
  color: var(--text-invert);
  border-color: var(--accent-2);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.page-size {
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar {
    margin: -76px -20px 20px;
    padding: 10px 16px;
  }

  .topbar-menu-toggle {
    display: inline-flex;
  }

  .panel-controls .search-box input {
    min-width: 140px;
  }
}
/* Notifications menu (top-bar bell dropdown) */
.topbar-notify {
  position: relative;
}

.notify-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 40;
  width: 320px;
  max-width: 80vw;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.notify-head {
  padding: 12px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.notify-list {
  max-height: 360px;
  overflow-y: auto;
}

.notify-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notify-item:last-child {
  border-bottom: none;
}

.notify-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.notify-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.notify-sub {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.notify-empty {
  margin: 0;
  padding: 20px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Backoffice portal badges */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-backlog {
  background: color-mix(in srgb, var(--ink-info) 22%, transparent);
  color: var(--ink-info);
}

.badge-in-progress {
  background: color-mix(in srgb, var(--ink-warn) 22%, transparent);
  color: var(--ink-warn);
}

.badge-blocked {
  background: color-mix(in srgb, var(--ink-danger) 22%, transparent);
  color: var(--ink-danger);
}

.badge-shipped {
  background: color-mix(in srgb, var(--ink-ok) 22%, transparent);
  color: var(--ink-ok);
}

.badge-priority-low {
  background: color-mix(in srgb, var(--ink-neutral) 22%, transparent);
  color: var(--ink-neutral);
}

.badge-priority-medium {
  background: color-mix(in srgb, var(--ink-warn) 22%, transparent);
  color: var(--ink-warn);
}

.badge-priority-high {
  background: color-mix(in srgb, var(--ink-danger) 22%, transparent);
  color: var(--ink-danger);
}

.badge-priority-critical {
  background: color-mix(in srgb, var(--ink-danger) 22%, transparent);
  color: var(--ink-danger);
}

/* Filter controls */
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

/* Backoffice health strip */
.health-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text);
}

.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}

.health-dot.health-ok {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.health-dot.health-bad {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

/* Compact, single-line language picker (leading the profile form) */
.lang-lead-slim {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lang-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.lang-inline select {
  min-width: 140px;
}

.lang-info-link {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.lang-info-link:hover {
  text-decoration: underline;
}

.lang-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.lang-note.success {
  color: var(--ink-ok);
}

.lang-info-box {
  flex-basis: 100%;
  margin: 4px 0 0;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.86rem;
  color: var(--text);
}

.service-map {
  height: 260px;
  width: 100%;
  margin-top: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  z-index: 0;
}

.pipeline-stage {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.85rem;
  background: var(--bg-2);
}

.docs-body ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.7;
}

.docs-body code {
  background: var(--bg-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* Sortable table headers */
.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  padding-right: 20px;
}

.sortable:hover {
  background: var(--bg-2);
}

.sortable::after {
  content: '⇅';
  position: absolute;
  right: 4px;
  opacity: 0.3;
  font-size: 0.85rem;
}

.sortable.sorted-asc::after {
  content: '▲';
  opacity: 1;
  color: var(--accent-ink);
}

.sortable.sorted-desc::after {
  content: '▼';
  opacity: 1;
  color: var(--accent-ink);
}

/* ============================================================
   Mobile-first UX refresh (2026-07-15). Appended so it layers over
   the base rules without rewriting them -- reversible. Focus: touch
   targets, a sticky reachable top bar, cleaner cards, and safe-area
   padding for small devices (most traffic is phones).
   ============================================================ */

/* Comfortable, thumb-friendly nav rows + a softer active pill. */
.nav-group a {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 10px;
  transition: background 120ms ease, color 120ms ease;
}
.nav-group a.active {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* All primary/secondary buttons meet the 44px touch-target minimum. */
.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Softer, more modern cards + consistent radius. */
.card {
  border-radius: 14px;
}

@media (max-width: 860px) {
  /* Keep the top bar (hamburger, notifications, avatar) in reach while
     scrolling long pages -- it was scrolling away on phones. */
  .topbar {
    position: sticky;
    top: 0;
    z-index: 45;
  }

  /* Tighter, phone-friendly gutters + safe-area for notched devices. */
  .site-main {
    padding: 68px 16px calc(48px + env(safe-area-inset-bottom));
  }

  /* Cards go edge-to-edge-ish with a little breathing room, less nesting. */
  .panel,
  .section.card,
  .card {
    border-radius: 12px;
  }

  /* Stat rows and form rows stack cleanly instead of cramming. */
  .stat-row,
  .issue-form-row {
    grid-template-columns: 1fr !important;
    flex-direction: column;
  }

  /* Drawer gets a shadow so it reads as an overlay, and a hair wider tap zone. */
  .site-sidebar {
    box-shadow: 12px 0 40px rgba(16, 28, 44, 0.28);
  }

  /* The horizontal-scroll override that used to live here is gone: the base
     `.table-wrap` rule is already `overflow: auto` with
     `-webkit-overflow-scrolling: touch` on it, so this restated it identically
     while reading as though narrow screens were the only ones that scroll
     sideways. They are not -- the contacts book wraps a phone number at 1440px
     too, which is how the flat 560px floor above was found. */
}

/* Very small phones: dial type + spacing down a touch. */
@media (max-width: 420px) {
  .dash-title {
    font-size: 1.35rem;
  }
  .site-main {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ---- Grouped, collapsible staff sidebar (rendered by portal-chrome) ---- */
.nav-section {
  display: flex;
  flex-direction: column;
}

.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 12px 6px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.nav-section-header:hover {
  color: var(--text);
}

.nav-chev {
  font-size: 0.7rem;
  transition: transform 160ms ease;
}

.nav-section.collapsed .nav-chev {
  transform: rotate(-90deg);
}

.nav-section-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: 400px;
  transition: max-height 200ms ease;
}

.nav-section.collapsed .nav-section-items {
  max-height: 0;
}

.nav-text {
  flex: 1;
}

.nav-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text-invert);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- Dashboard "What's next?" status card (reference-style) ---- */
.whatsnext {
  padding: 20px 22px;
  margin-bottom: 20px;
  background: color-mix(in srgb, var(--accent-2) 5%, transparent);
  border: 1px solid var(--line);
}

.whatsnext-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.whatsnext-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  font-size: 1.2rem;
}

.whatsnext-title {
  margin: 0;
  font-size: 1.05rem;
}

.whatsnext-sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.whatsnext-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.whatsnext-actions:empty {
  margin-top: 0;
}

.whatsnext-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  transition: transform 100ms ease, box-shadow 120ms ease;
}

.whatsnext-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent-2) 10%, transparent);
}

.whatsnext-item strong {
  color: var(--accent-ink);
}

/* ---- Housekeeper match-by-area result cards ---- */
.match-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.match-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-2);
}

.match-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.match-body {
  flex: 1;
  min-width: 0;
}

.match-name {
  margin: 0;
  font-size: 1rem;
}

.match-distance {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--accent-ink);
  font-weight: 600;
}

.match-view {
  flex-shrink: 0;
}

/* ---- Admin Messages inbox ---- */
.msg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg-item {
  padding: 14px 16px;
}

.msg-unread {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.msg-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.msg-from {
  font-size: 0.9rem;
}

.msg-time {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.msg-body {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.msg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.msg-prop {
  font-size: 0.84rem;
  color: var(--accent-ink);
  font-weight: 600;
}

.msg-foot .button {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 0.85rem;
}

/* ---- Cleaner portal tabs (short pages, one screen at a time) ---- */
.tabbar {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabbar .tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  min-height: 46px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 120ms ease, border-color 120ms ease;
}

.tabbar .tab:hover {
  color: var(--text);
}

.tabbar .tab.active {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

/* ============================================================
   Responsive nav: LEFT sidebar on web, app-like BOTTOM tab bar on
   mobile (viewport-detected). The sidebar hides on phones; the topbar
   avatar carries the account/sign-out menu.
   ============================================================ */

/* Account menu on the topbar avatar (reachable when the sidebar is hidden). */
.topbar-account { position: relative; }
#topbar-avatar { cursor: pointer; border: none; }
.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 60;
}
.account-email {
  margin: 4px 8px 8px;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}
.account-signout {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
}
.account-signout:hover { background: var(--bg-2); }

/* Bottom tab bar: desktop hidden. */
.portal-bottom-nav { display: none; }

@media (max-width: 860px) {
  /* On phones the sidebar + hamburgers go away; bottom nav + avatar menu replace them. */
  .site-sidebar,
  .mobile-menu-toggle,
  .topbar-menu-toggle,
  .sidebar-backdrop {
    display: none !important;
  }

  .site-main {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  /* Placed after the base .topbar-brand so it actually wins on phones (media
     queries don't raise specificity): shrink the brand zone to its content and
     drop the sidebar-column divider. */
  .topbar-brand {
    width: auto;
    border-right: none;
    padding: 0 12px;
  }

  .portal-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    background: var(--accent-2);
    border-top: 1px solid color-mix(in srgb, var(--on-dark) 8%, transparent);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 58px;
    padding: 8px 4px;
    color: color-mix(in srgb, var(--bg) 60%, transparent);
    text-decoration: none;
    font-size: 0.66rem;
  }
  .bottom-nav-item.active { color: #fff; }
  .bottom-nav-icon { font-size: 1.15rem; }
  .bottom-nav-label { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  /* Cleaner portal: its own tabs become the bottom bar (app-like). */
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 55;
    margin: 0;
    justify-content: space-around;
    background: var(--panel);
    border-top: 1px solid var(--line);
    border-bottom: none;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar .tab {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    display: flex;
    align-items: center;
    border-bottom: none;
    border-top: 2px solid transparent;
    font-size: 0.66rem;
    padding: 8px 2px;
  }
  .tabbar .tab.active {
    border-top-color: var(--accent);
    border-bottom-color: transparent;
  }
}

.tabbar .tab { display: inline-flex; align-items: center; gap: 6px; }

/* ---- Housekeeping calendar ---- */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cal-title {
  font-weight: 600;
  min-width: 150px;
  text-align: center;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 16px;
}
.cal-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
}
.cal-cell {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}
.cal-cell.cal-empty {
  border: none;
  background: none;
  cursor: default;
}
.cal-cell.cal-has {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
}
.cal-cell.cal-today {
  outline: 2px solid var(--accent-2);
}
.cal-cell:hover:not(.cal-empty) {
  border-color: var(--accent-2);
}
.cal-daynum {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.cal-chip {
  font-size: 0.66rem;
  background: var(--accent-soft-strong);
  color: var(--accent-ink);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-more {
  font-size: 0.64rem;
  color: var(--muted);
}
.cal-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  margin-bottom: 8px;
}
.cal-event:hover { border-color: var(--accent-2); }
.cal-event-prop { margin: 0; font-weight: 600; }

@media (max-width: 640px) {
  .cal-grid { gap: 3px; padding: 10px; }
  .cal-cell { min-height: 58px; padding: 3px; }
  .cal-chip { display: none; }
  .cal-more { display: none; }
  .cal-cell.cal-has::after { content: '•'; color: var(--accent); font-size: 1rem; line-height: 0.5; }
}

/* ---- Account menu: name + edit-profile link ---- */
.account-name {
  margin: 4px 8px 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.account-link {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 8px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
}
.account-link:hover { background: var(--bg-2); }

/* ---- Edit-profile modal (shared form bits) ---- */
.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}
.field input:disabled {
  background: var(--bg-2);
  color: var(--muted);
  cursor: not-allowed;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
}
.form-error {
  color: var(--ink-danger);
  font-size: 0.85rem;
  margin: 0;
}
.form-error[hidden] { display: none; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* ============ Dashboard redesign (mockup template) ============ */
.dash-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Stat tiles */
.tile-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 20px 0 24px;
}
.tile {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
/* A tile that is a REQUEST rather than a status -- work reserved for someone
   that sits there until they accept or pass. Gold outline rather than red: it
   needs an answer, it is not a problem. Applied only when the count is above
   zero, so an empty queue reads as calm instead of as an alert showing 0. */
.tile-attention {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.tile-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.tile-icon-blue { background: color-mix(in srgb, var(--accent-2) 10%, transparent); }
.tile-icon-green { background: rgba(22, 163, 74, 0.12); }
.tile-icon-amber { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.tile-icon-rose { background: rgba(225, 29, 72, 0.12); }
.tile-icon-purple { background: rgba(124, 58, 237, 0.12); }
.tile-value {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  margin: 0;
}
.tile-label { margin: 2px 0 0; font-weight: 600; font-size: 0.95rem; }
.tile-sub { margin: 1px 0 10px; color: var(--muted); font-size: 0.8rem; }
.tile-flag { color: var(--ink-danger); font-weight: 600; }
.tile-link {
  margin-top: auto;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
}

/* Two-by-two panel grid */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.panel-body { padding: 6px 20px 18px; }
.panel-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  white-space: nowrap;
}
.panel-empty { color: var(--muted); font-size: 0.9rem; padding: 10px 0; margin: 0; }
.panel-add {
  display: block;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
}
.panel-add:hover { background: var(--bg-2); }

/* Colored status dots (shared) */
.dot-green, .dot-purple, .dot-amber, .dot-rose, .dot-blue,
.dot-high, .dot-medium, .dot-low {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 6px;
}
.dot-green { background: #16a34a; }
.dot-purple { background: #7c3aed; }
.dot-amber { background: var(--accent); }
.dot-rose, .dot-high { background: #e11d48; }
.dot-blue { background: var(--accent-2); }
.dot-medium { background: var(--accent); }
.dot-low { background: #64748b; }

/* Badges (priority / status) */
.badge-high { background: rgba(225, 29, 72, 0.12); color: var(--ink-danger); }
.badge-medium { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink-warn); }
.badge-low { background: rgba(100, 116, 139, 0.14); color: var(--muted); }

/* Attention rows */
.attn-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.attn-row:last-child { border-bottom: none; }
.attn-main { flex: 1; min-width: 0; }
.attn-title { margin: 0; font-weight: 600; }
.attn-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.attn-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.row-when { color: var(--muted); font-size: 0.8rem; }
.row-when.is-overdue { color: var(--ink-danger); font-weight: 600; }

/* Schedule timeline */
.sched-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.sched-row:last-child { border-bottom: none; }
.sched-time { width: 68px; flex: 0 0 auto; color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.sched-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; margin-top: 0; }
.sched-main { flex: 1; min-width: 0; }
.sched-title { margin: 0; font-weight: 600; }
.sched-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; }
.sched-who {
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg-2);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
}

/* Activity + maintenance rows */
.act-row, .maint-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--text);
}
.act-row:last-child, .maint-row:last-child { border-bottom: none; }
.act-icon {
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 9px; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
.act-main { flex: 1; min-width: 0; }
.act-title { margin: 0; font-weight: 600; font-size: 0.92rem; }
.act-meta { margin: 2px 0 0; color: var(--muted); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-when { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }

@media (max-width: 1100px) {
  .tile-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .tile-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tile-value { font-size: 1.6rem; }
  .dash-head { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Reports rows */
.rep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.rep-row:last-child { border-bottom: none; }
.rep-label { color: var(--muted); }
.rep-value { font-weight: 700; font-size: 1.05rem; }
.rep-value.rep-flag { color: var(--ink-danger); }
/* A row that is a REQUEST rather than a status -- work reserved for you that
   sits there until you accept or pass. Marked with the gold rule and weight
   rather than red: it needs an answer, it is not a problem. Only ever applied
   when the count is above zero, so an empty queue reads as calm. */
.rep-row-attention {
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-left: -13px;
}
.rep-row-attention .rep-label { color: var(--text); font-weight: 600; }

/* Cleaner team management (Story 4C) */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 6px 0;
}
.perm-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.member-row {
  padding: 14px 16px;
  margin-top: 12px;
}
.member-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.member-head .button { min-height: 34px; padding: 4px 12px; font-size: 0.82rem; }
@media (max-width: 560px) {
  .perm-grid { grid-template-columns: 1fr; }
}

/* Owner "assign to teammate" control on a job card (Story 4D) */
.assign-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.assign-row select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

/* Cleaner portal: a normal left-sidebar layout on web -- the housekeeper nav
   lives in the sidebar (like the admin portal), and the top tab bar is hidden
   at desktop width. On phones (<=860px) the sidebar hides and that same .tabbar
   becomes the app-style bottom bar. */
@media (min-width: 861px) {
  .site-shell.cleaner-portal .tabbar {
    display: none;
  }
}

/* Match page: default-company banner + card actions (#1) */
.default-company-banner:not(:empty) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 10px;
}
.match-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---- Custom branded sign-in (login.html) ---- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 30px 30px 26px;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.auth-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--panel-solid);
  padding: 4px;
}
.auth-brand-title {
  margin: 2px 0 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-title { margin: 0; font-size: 1.5rem; }
.auth-sub { margin: -6px 0 2px; color: var(--muted); font-size: 0.92rem; }
.auth-form .button.primary { margin-top: 4px; }
.auth-link {
  background: none;
  border: none;
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  align-self: center;
  padding: 4px;
  text-decoration: underline;
}

/* Collapsible "Advanced" section on forms (progressive disclosure) */
.advanced-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 6px 0;
  background: var(--bg-2);
}
.advanced-section > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--accent-ink);
  list-style: revert;
}
.advanced-section[open] > summary { border-bottom: 1px solid var(--border, #e2e2e2); }
.advanced-section > fieldset { margin: 12px 14px; }

/* Optional AI-assist on long text fields (accept-to-fill) */
.ai-assist { margin: -6px 0 4px; }
.ai-assist-btn { padding: 6px 12px; font-size: 0.9rem; }
.ai-assist .field-hint { margin: 6px 0 0; }
.ai-assist-preview {
  margin-top: 10px;
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
}
.ai-assist-suggestion { margin: 0 0 12px; white-space: pre-wrap; line-height: 1.55; }
.ai-assist-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ai-assist-actions .button { padding: 6px 14px; font-size: 0.9rem; }

/* Read-only field (e.g. login email on the profile form) */
.field-readonly {
  background: var(--bg-2);
  color: var(--muted);
  cursor: not-allowed;
}

/* Live password-rules checklist on the set-password steps (login.html) */
.pw-rules {
  list-style: none;
  margin: -4px 0 2px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pw-rule {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.15s ease;
}
.pw-mark {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
  position: relative;
}
.pw-rule.pw-ok { color: var(--accent); }
.pw-rule.pw-ok .pw-mark {
  border-color: var(--accent);
  background: var(--accent);
}
.pw-rule.pw-ok .pw-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Identity-verification card (housekeeping profile tab) */
.idv-card {
  padding: 18px 20px;
  margin-bottom: 18px;
  border-left: 4px solid var(--accent);
}
.idv-head { display: flex; gap: 12px; align-items: flex-start; }
.idv-icon { font-size: 1.5rem; line-height: 1; flex: 0 0 auto; }
.idv-title {
  margin: 0 0 4px;
  font-weight: 700;
  color: var(--text);
}
.idv-body { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.idv-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.idv-status { margin: 0; font-size: 0.88rem; color: var(--accent-2); flex-basis: 100%; }

/* Help / how-to guide page (help.html) */
.doc-shell {
  min-height: 100vh;
  padding: 32px 24px 64px;
  background:
    radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.doc-card {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 34px 34px;
}
.doc-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.doc-brand .auth-link { align-self: center; }
.doc-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--panel-solid);
  padding: 4px;
}
.doc-title {
  margin: 0 0 18px;
  font-size: 1.7rem;
}
.doc-body { color: var(--text); line-height: 1.6; }
.doc-body h3 {
  margin: 26px 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.18rem;
  color: var(--accent);
}
.doc-body p { margin: 0 0 12px; }
.doc-body ul { margin: 0 0 12px 20px; }
.doc-body li { margin: 4px 0; }
.doc-loading { color: var(--muted); }

/* Contractor job board (Phase B). Rides .rep-row, but a job needs its title and
   meta stacked on the left with the pay + action pinned right, and must wrap on
   a phone rather than squashing the button. */
.job-row {
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}
.job-row .rep-label {
  color: var(--ink);
  font-weight: 600;
}
.job-row .field-hint { margin: 2px 0 0; }
.job-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}
@media (max-width: 560px) {
  .job-actions { width: 100%; justify-content: space-between; }
}

/* Turnover checklist on the cleaner's job card. Rides .supply-row for layout,
   but items wrap to two lines on a phone so a long label never squashes the
   "can't do this" escape hatch out of reach. */
.checklist-section {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}
.checklist-section .supply-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.checklist-section textarea {
  width: 100%;
}
.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  cursor: pointer;
  flex-shrink: 0;
}
.link-button:hover {
  filter: brightness(0.9);
}

/* Cleaning Pro reviews */
.pro-stars { color: var(--gold, #b3833b); letter-spacing: 1px; }
.pro-rating { font-size: 1.05rem; margin: 6px 0; }
.review-card {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.review-card:first-child { border-top: none; }
.review-head { margin: 0 0 4px; }
.review-comment { margin: 2px 0; }
.review-response {
  margin: 6px 0 2px;
  padding: 8px 10px;
  background: var(--ghost, #eef1f6);
  border-radius: 8px;
  font-size: 0.92rem;
}
/* Interactive star picker (PM leaves a rating) */
.star-picker { display: inline-flex; gap: 2px; font-size: 1.5rem; cursor: pointer; }
.star-picker span { color: var(--line-strong, #c6cdd9); transition: color .1s; }
.star-picker span.on { color: var(--gold, #b3833b); }
.rating-inline { display: inline-flex; align-items: center; gap: 4px; }
.rating-inline .pro-stars { font-size: 0.95rem; }

/* Contextual sub-tree in the sidebar -- the sections of the ONE record you're
   inside (a property, an issue). Indented under its parent nav item so the
   hierarchy is visible without a full tree widget. */
.nav-context {
  margin: 2px 0 6px 14px;
  padding-left: 10px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.nav-context-title {
  margin: 6px 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  /* A long property name must not widen the sidebar. */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-context .nav-subitem {
  font-size: 0.92rem;
  padding-top: 6px;
  padding-bottom: 6px;
}
.nav-context .nav-context-back {
  margin-top: 4px;
  opacity: 0.75;
}

/* Calendar event kinds. The grid shows turnovers, check-ins, maintenance and
   to-dos together, so colour carries the distinction that a chip too small for
   a label can't. Kept to the brand palette rather than a rainbow. */
.cal-chip-checkout    { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-ink); }
.cal-chip-checkin     { background: color-mix(in srgb, var(--accent-2) 12%, transparent);  color: var(--brand); }
.cal-chip-maintenance { background: rgba(176, 58, 46, 0.13); color: var(--ink-danger); }
.cal-chip-task        { background: rgba(90, 98, 112, 0.14); color: var(--ink-neutral); }
/* Finished work still belongs on the calendar (it says the day was handled),
   but it shouldn't compete with what's outstanding. */
.cal-chip-done, .cal-event-done { opacity: 0.5; }
.cal-event-done .cal-event-prop { text-decoration: line-through; }

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--muted);
}
.cal-legend span { white-space: nowrap; }

/* Calendar: channel colours + occupancy. A PM answering "can this guest check
   out late?" needs to see which platform each booking is on and whether the
   next guest arrives the same day -- neither channel's own calendar shows the
   other's bookings, so the combined view is the only place that answer exists. */
.cal-src-airbnb { border-left: 3px solid #ff5a5f; }
.cal-src-vrbo   { border-left: 3px solid #1668e3; }
.cal-src-other  { border-left: 3px solid var(--muted); }

/* Same-day turnover: the clean has a hard deadline, not a window. Deliberately
   the loudest thing on the grid. */
.cal-chip-turnover {
  background: rgba(176, 58, 46, 0.16);
  color: var(--ink-danger);
  font-weight: 700;
}

/* A guest is in residence this night. Kept as a thin band rather than a fill so
   it never competes with the chips that need action. */
.cal-occupied {
  display: block;
  height: 3px;
  border-radius: 2px;
  margin: 2px 0 3px;
  background: color-mix(in srgb, var(--accent-2) 25%, transparent);
  border-left: none;
}
.cal-occupied.cal-src-airbnb { background: rgba(255, 90, 95, 0.45); }
.cal-occupied.cal-src-vrbo   { background: rgba(22, 104, 227, 0.45); }
.cal-cell-occupied .cal-daynum { font-weight: 600; }

.cal-legend .cal-legend-src {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}

/* Cleaning Pro "My jobs": compact rows grouped by day. A card each is unreadable
   once calendar sync fills the queue -- one job per checkout, across bookings
   taken up to 24 months out. Detail opens on demand. */
/* My Jobs renders a date-grouped LIST, not tiles. This container used to carry
   .grid (3 fixed columns), which laid the day headings out as grid cells -- so
   "Tomorrow" sat top-left and the next date top-right, and the reading order
   scrambled. Caught only by looking at a screenshot; every DOM assertion passed. */
.job-list,
.card-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Cards laid out as horizontal ROWS (avatar | body | actions) need the full
   width. Dropping them in .grid -- 3 fixed columns -- squeezes each into a third
   and every line wraps to one word, with the action buttons landing on top of the
   text. That has now happened twice: My Jobs, and the Match-by-area results. */
.card-list > .match-card {
  gap: 14px;
}
.job-day-heading {
  margin: 14px 0 4px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.job-row {
  background: var(--panel-solid);
  border: 1px solid color-mix(in srgb, var(--accent-2) 10%, transparent);
  border-radius: 6px;
  margin-bottom: 6px;
}
.job-row-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.job-row-summary::-webkit-details-marker { display: none; }
.job-row-summary::after {
  content: '›';
  color: var(--muted);
  transform: rotate(90deg);
}
.job-row[open] .job-row-summary::after { transform: rotate(-90deg); }
.job-row-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-row-meta { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.job-row-body { padding: 0 12px 12px; }

/* Channel, so a Pro can see which platform's guest they're turning over --
   same-day turnovers are often cross-channel. */
.job-src {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}
.job-src-airbnb { background: rgba(255, 90, 95, 0.15); color: var(--ink-danger); }
.job-src-vrbo   { background: rgba(22, 104, 227, 0.13); color: var(--ink-info); }

.job-later { margin-top: 16px; }
.job-later > summary { cursor: pointer; color: var(--muted); font-size: 0.85rem; }

/* Handle picker (handle-picker.js) -- one component over both cross-tenant
   directories. Used for a property's default Cleaning Pro on the add-property and
   property-detail forms, and for assigning a contractor on the issue detail page.
   The cp- prefix is "crew picker"; it predates the contractor half. */
.cp-wrap {
  position: relative;
  margin: 8px 0 4px;
}
.cp-search-label {
  display: block;
}
.cp-search {
  width: 100%;
}
.cp-results {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-solid);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent-2) 12%, transparent);
  max-height: 300px;
  overflow-y: auto;
  position: absolute;
  z-index: 20;
  width: 100%;
}
.cp-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.cp-result:hover,
.cp-result:focus {
  background: var(--panel-2);
}
.cp-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.cp-avatar-blank {
  background: #e6ebf4;
  display: inline-block;
}
.cp-result-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.cp-business {
  font-weight: 600;
  color: var(--accent-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-handle {
  font-size: 0.78rem;
  color: var(--muted);
}
.cp-verified {
  color: var(--ink-ok);
  font-weight: 700;
}
.cp-result-meta {
  font-size: 0.76rem;
  color: var(--muted);
  flex: none;
  text-align: right;
}
/* A contractor can offer several trades, and this column is `flex: none` --
   without a cap, "plumbing, hvac, electrical, roofing" pushes the business name
   and handle out of the row it is meant to help you read. */
.cp-trades {
  display: inline-block;
  max-width: 14ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.cp-empty {
  padding: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}
.cp-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.cp-selected-text {
  min-width: 0;
}

/* Street address on a Pro's own job row. Only present when the server decided the
   Pro has earned it (accepted / reserved / authorized on the property), so this
   styles a field that is simply absent otherwise. */
.job-address {
  margin: 2px 0 8px;
  font-size: 0.84rem;
}
.job-address a {
  color: var(--accent-ink);
}

/* Inline property view inside a Pro's job card/row (cleaning-pros.js).
   Replaces a link to properties.html -- the PM page -- which asked a cleaner to
   sign in as a property manager. */
.property-view {
  margin: 8px 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.property-view-name {
  margin: 0 0 4px;
  font-size: 0.98rem;
}
.property-view-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 8px;
}
.property-view-photo {
  width: 128px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}

/* In-product assistant, mounted in the shared topbar by portal-chrome.js.
   Reuses .notify-head so it reads as a sibling of the notifications menu. */
.topbar-assist {
  position: relative;
}
.assist-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 32px));
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent-2) 16%, transparent);
  padding: 12px;
  z-index: 200;
}
.assist-form textarea {
  width: 100%;
  resize: vertical;
}
.assist-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 4px;
}
.assist-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.assist-help-link {
  font-size: 0.8rem;
}
.assist-answer {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 0.88rem;
  white-space: pre-wrap;
}
.assist-foot {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* "Report a problem" inside the assistant panel. User-initiated and previewed --
   the payload is shown before it is sent, because a filed report lands in the
   shared platform backlog that every operator can read. */
.assist-report {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.assist-report-lead {
  margin: 0 0 6px;
  font-size: 0.82rem;
}
.assist-report textarea {
  width: 100%;
  resize: vertical;
}
.assist-preview {
  margin-top: 8px;
  font-size: 0.76rem;
  color: var(--muted);
}
.assist-preview ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.assist-report-open {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 4px;
  font: inherit;
  color: var(--accent-ink);
  text-decoration: underline;
  cursor: pointer;
}

/* "Ask AI" launcher. Labelled rather than a bare glyph: an unlabelled icon sitting
   next to the notifications bell reads as a second notifications tray, so nobody
   finds it. The label collapses on narrow screens where the topbar has no room. */
.topbar-assist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.topbar-assist-btn:hover {
  background: var(--accent-soft-strong);
}
@media (max-width: 640px) {
  .topbar-assist-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .topbar-assist-btn {
    padding: 6px 10px;
  }
}

/* Photo dropzone (property-detail). Click and Enter/Space both open the file
   picker -- a dropzone that only works with a mouse is unusable for anyone who
   does not use one. */
.dropzone {
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  cursor: pointer;
  background: var(--panel-2);
  margin: 8px 0 12px;
}
.dropzone:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.dropzone-active {
  border-color: var(--gold);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.dropzone p {
  margin: 0;
}

/* --- Home owner vs property manager surfaces -------------------------------
   portal-chrome sets body[data-org-type] from /me/permissions. A homeowner is
   an admin of their own hidden org, so role flags cannot distinguish them --
   org type is the only signal.

   PRESENTATION ONLY. Nothing marked here is an org boundary: a homeowner
   hiding their own channel fields is tidiness, not authorisation. Anything
   that must actually be refused is refused by the API.

   Default (no data-org-type yet, or "pm"): show pm-only, hide homeowner-only.
   That way a slow or failed /me/permissions leaves a property manager's page
   intact rather than briefly rendering it as a homeowner's. */
[data-homeowner-only] {
  display: none;
}

body[data-org-type='homeowner'] [data-pm-only] {
  display: none;
}

body[data-org-type='homeowner'] [data-homeowner-only] {
  display: revert;
}

/* ---- Printing a help guide ----

   These guides are the thing we hand someone who has not signed in yet, and the
   ask was for "a simple PDF we can link or send". Rather than author a second
   copy that drifts from docs.py -- which is also what the AI assistant answers
   from -- the page prints. Browser "Save as PDF" produces the file, so it is
   always the current guide and it stays in the reader's own language.

   Only the guide prints: no shell background, no Back button, no card
   chrome. */
@media print {
  body {
    background: var(--panel-solid);
    color: #000;
  }

  .doc-shell {
    padding: 0;
    margin: 0;
    max-width: none;
  }

  .doc-card {
    box-shadow: none;
    border: 0;
    padding: 0;
    margin: 0;
    max-width: none;
    background: var(--panel-solid);
  }

  /* On screen this is the way back into the app. On paper it is a dead
     control, and it sits directly under the logo. */
  #doc-back,
  .doc-loading {
    display: none !important;
  }

  .doc-logo {
    max-height: 40px;
  }

  /* A heading stranded at the foot of a page, or one line of a paragraph
     carried over, is what makes a printed guide look thrown together. */
  .doc-body h2 {
    break-after: avoid;
    page-break-after: avoid;
  }

  .doc-body p,
  .doc-body li {
    break-inside: avoid;
    page-break-inside: avoid;
    orphans: 3;
    widows: 3;
  }

  /* Printed, a link's text is all the reader gets -- so spell the target out.
     Scoped to the guide body: the brand logo link would otherwise print its
     own URL beside it. */
  .doc-body a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    word-break: break-all;
  }
}

/* Property sections, rendered into the page for phones. The sidebar that
   normally holds them is off-canvas under the mobile breakpoint, so a PM deep
   inside a property had Photos / Supplies / Turnover checklist / Cleaner access
   behind a hamburger. Hidden on desktop, where the sidebar already shows them
   and a second copy would be noise. */
.context-tabs { display: none; }

@media (max-width: 900px) {
  .context-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 0 12px;
    margin: 0 0 4px;
    /* Stays put while the property page scrolls -- the sections are the thing
       you switch between, so they should not scroll away. */
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bg);
  }
  .context-tabs::-webkit-scrollbar { display: none; }
  .context-tab {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    white-space: nowrap;
  }
  .context-tab.active {
    background: var(--accent-2);
    border-color: var(--accent-2);
    color: var(--text-invert);
  }
  .context-tab-back { padding: 8px 12px; color: var(--muted); }
}

/* "Start here" — the answer to "I'm signed in, now what?". Sits above the
   dashboard's own panels because a new account has nothing for those to show,
   and disappears entirely once every step is done. */
.setup-panel { margin-bottom: 18px; border-left: 3px solid var(--accent); }
.setup-remaining { font-size: 0.8rem; color: var(--muted); }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.setup-step:last-child { border-bottom: none; }
.setup-tick { color: var(--accent); font-weight: 700; line-height: 1.4; }
.setup-tick-todo { color: var(--muted); font-weight: 400; }
/* A finished step steps back rather than disappearing: seeing what you have
   already done is most of what makes the remaining count believable. */
.setup-step.is-done .setup-label { color: var(--muted); text-decoration: line-through; }
.setup-why { display: block; font-size: 0.82rem; color: var(--muted); margin-top: 2px; }

/* A property that is somebody's own home rather than a let. The org is still a
   PM org -- this is per-PROPERTY, so it cannot use the body[data-org-type]
   switch the homeowner product uses. */
.is-home [data-rental-only] { display: none; }
/* The home half of the per-property switch. Hidden until the form is marked a
   home, which is the opposite default to [data-rental-only] -- a property is a
   rental unless somebody says otherwise, so the rental wording is what shows
   with no class applied at all. `revert` rather than `inline`, so this stays
   correct if it is ever used on something that is not a span. */
[data-home-only] { display: none; }
.is-home [data-home-only] { display: revert; }

/* Where a turnover has got to. Only the two that want an answer carry colour --
   a page of coloured badges is a page with no emphasis in it. */
.badge-status-price_proposed { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink-warn); }
.badge-status-cancelled { background: rgba(100, 116, 139, 0.16); color: var(--muted); text-decoration: line-through; }
.badge-status-done { background: rgba(22, 163, 74, 0.14); color: var(--ink-ok); }

/* Inline editing in a table.
   The controls have to read as part of the row, not as a form dropped into it:
   no border until you touch them, and the same type size as the text they
   replace. A table of visibly boxed inputs is heavier to read than the static
   table was, which would trade one complaint for another. */
.cell-edit .cell-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  border-radius: 6px;
  font: inherit;
  color: inherit;
}

.cell-edit .cell-input:hover {
  border-color: color-mix(in srgb, var(--accent-2) 18%, transparent);
}

.cell-edit .cell-input:focus {
  border-color: var(--navy);
  background: var(--panel-solid);
  outline: none;
}

/* AFTER the rules above on purpose. `font: inherit` is a shorthand and resets
   line-height to `normal`, and these selectors have equal specificity, so
   whichever comes last wins. Placed before them, line-height here was silently
   dropped and the name did not wrap -- which no source-level test could see. */
/* The name itself. A textarea wraps where an input could not, and stays
   editable in place, which is the thing that must not be lost. */
.cell-edit .cell-input-name {
  resize: none;
  overflow: hidden;
  line-height: 1.35;
  min-height: 2.7em;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
}

/* Focus is the one time it should grow: you are editing, so the whole name
   matters more than the row keeping its height. */
.cell-edit .cell-input-name:focus {
  overflow: auto;
  min-height: 4.05em;
}

/* A save is one request and usually invisible. Dimming the cell while it is in
   flight is the only signal that anything happened, and it disappears on its
   own when the table redraws. */
.cell-edit.cell-saving {
  opacity: 0.5;
}

/* One checklist item per line.
   Each item used to be an .issue-form-row -- a two-column grid with its own
   "Item" / "Linked supply" / "Required to complete" captions repeated, so a
   ten-item checklist was thirty-odd lines of mostly repeated words. The
   captions now sit once in a header row above the list. */
.checklist-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.checklist-line > .checklist-label {
  flex: 1 1 auto;
  min-width: 0;
}

.checklist-line > .checklist-supply {
  flex: 0 0 190px;
}

.checklist-line > .checklist-required-wrap {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.checklist-head {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.checklist-head > :first-child { flex: 1 1 auto; }
.checklist-head > :nth-child(2) { flex: 0 0 190px; }
.checklist-head > :nth-child(3) { flex: 0 0 auto; }

/* Narrow screens: the row would otherwise squeeze the item name to nothing.
   Wrapping is better than a name you cannot read. */
@media (max-width: 620px) {
  .checklist-line { flex-wrap: wrap; }
  .checklist-line > .checklist-supply { flex: 1 1 auto; }
  .checklist-head { display: none; }
}

/* Invite state on the Users page. Amber for outstanding, red for dead: the two
   need different actions -- one is "wait or nudge", the other is "reissue" --
   and a single neutral badge is what let four invites expire unnoticed. */
.status-badge.status-pending {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--ink-warn);
}

.status-badge.status-expired {
  background: rgba(190, 63, 63, 0.12);
  color: var(--ink-danger);
}

/* The "More" sheet behind the fifth tab.
   The bottom bar holds four destinations; everything else lives here, together
   with the current page's own tabs when it has any. Before this the bar was a
   flat slice(0, 5) and the rest of the app was simply not rendered on a phone. */
.more-sheet-backdrop {
  display: none;
}

.more-sheet {
  display: none;
}

@media (max-width: 860px) {
  .more-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(16, 28, 44, 0.55);
    z-index: 120;
  }

  .more-sheet-backdrop[hidden] {
    display: none;
  }

  .more-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    background: var(--bg-2);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(16, 28, 44, 0.28);
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
    /* Long lists happen -- a property page adds its own tabs on top of the
       overflow. Bounded to the visible viewport and scrolled, so the last row
       is always reachable. */
    max-height: 72vh;
    max-height: 72dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .more-sheet[hidden] {
    display: none;
  }

  .more-sheet-title {
    margin: 8px 6px 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
  }

  .more-sheet-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    font-size: 1rem;
  }

  .more-sheet-item.active {
    background: var(--accent-soft);
  }

  .more-sheet-icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
  }

  .bottom-nav-more {
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
  }
}

/* A counter-offer that is a message rather than a number. The field is free
   text and a Pro used it for an entire rate card, so it has to wrap and be
   readable rather than sit inline where a price was expected. */
.counter-note {
  display: block;
  margin-top: 6px;
  white-space: pre-wrap;
  font-weight: 400;
  font-size: 0.92rem;
  line-height: 1.5;
  max-height: 40vh;
  overflow-y: auto;
}

/* Cost by property, on Reports. A plain table rather than the stat rows the
   other panels use: those are one label and one number, and this is four
   numbers that only mean anything side by side. */
.rep-cost-table {
  min-width: 0;          /* overrides the shared 560px floor; this one is narrow */
  font-size: 0.875rem;
}

.rep-cost-table th,
.rep-cost-table td {
  padding: 8px 10px;
}

.rep-cost-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rep-cost-table th:not(:first-child) {
  text-align: right;
}

.rep-cost-total td {
  font-weight: 600;
  border-top: 2px solid var(--line);
}

.panel-wide {
  grid-column: 1 / -1;
}

/* Fix-up totals strip, under the filter bar on the To-Do and Maintenance
   boards. A row of figures that wraps rather than a table: there are five or
   six of them, they are all short, and on a phone a six-column table of money
   either scrolls sideways or squeezes each number to one character per line. */
.fixup-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}

.fixup-figure {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}

.fixup-figure-label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.fixup-figure strong {
  font-size: 1.05rem;
}

/* The notes under a figure strip explain the figures, so they need to read as
   a separate block rather than as a caption on whichever figure happens to
   wrap last. The lender's draw now carries up to five of them. */
.fixup-figures + .page-sub {
  margin-top: 14px;
}

.loan-cards + .loan-progress,
.fixup-figures + .loan-chips {
  margin-top: 12px;
}

/* ---------------------------------------------------- a loan's headline

   The four figures a lender reconciles against, given their own weight. The
   rest of the draw stays in the flat .fixup-figures strip underneath: eleven
   figures of equal size is a wall, and the one that matters most -- how much
   of their holdback has been drawn -- was indistinguishable from the rest. */
.loan-cards {
  display: grid;
  /* 160px, not 190: at 390px wide the page has ~358px of content box, so 190
     forces one card per row and the four of them cost 333px before a lender
     reaches anything. 160 fits two across and halves that. */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.loan-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--panel);
  /* The values sit on one line across all four cards even when a label wraps
     -- "Drawn from your holdback" takes two lines at most widths, and a figure
     half a line lower than its neighbours reads as a different kind of thing. */
  display: flex;
  flex-direction: column;
}

.loan-card-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.loan-card strong {
  font-size: 1.15rem;
  line-height: 1.2;
}

/* ONE line, under the figure it corrects. Not an explanation -- the expander
   and the help guide carry those -- but the sentence that stops the figure
   being read as the opposite of what it is. */
.loan-card-hint {
  display: block;
  /* Pushed to the bottom so the hint does not shove its own figure down the
     card: with the label flexing instead, a card WITHOUT a hint put its value
     at the bottom and a card with one put it in the middle, so four figures
     sat at three different heights. */
  margin-top: auto;
  padding-top: 4px;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
}

/* ------------------------------------------------- findings, not paragraphs

   "No photos on any item" is a status. As prose it was three lines; the page
   carried five such paragraphs and they took more room than every figure put
   together. */
.loan-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.loan-chip {
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--text);
}

/* Tone carries meaning here, so it is never the ONLY carrier: each chip says
   in words what it is about, which is what a reader who cannot separate the
   two colours gets. */
.loan-chip.is-ok {
  border-color: rgba(21, 128, 61, 0.35);
  color: var(--ink-ok);
}

.loan-chip.is-warn {
  border-color: rgba(161, 98, 7, 0.35);
  color: var(--ink-warn);
}

.loan-explain {
  margin-top: 12px;
}

.loan-explain > summary {
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-ink);
}

.loan-explain > summary::marker {
  color: var(--muted);
}

.loan-explain .page-sub {
  margin-top: 8px;
}

/* An absence carries the label's weight, not the figure's: "Nothing recorded"
   set at 1.3rem reads as a number, and this one is the ABSENCE of a number. */
.loan-card strong.is-absent {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

/* ------------------------------------------------- spent against planned */

.loan-progress {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 16px;
}

.loan-progress h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.loan-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

.loan-progress-row strong {
  font-size: 1.05rem;
  color: var(--text);
}

.loan-progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
  margin: 10px 0;
}

.loan-progress-fill {
  height: 100%;
  border-radius: 999px;
  /* Green, not navy. Money spent against work planned is progress, and a bar
     in the same navy as every heading and table header read as decoration.
     Its own token because it is a FILL, not type: it never has text on it, so
     it is tuned to stand off the track rather than to carry a contrast ratio. */
  background: var(--bar-ok);
}

/* ------------------------------------------------------ a loan as a card */

.loan-list {
  display: grid;
  gap: 12px;
}

.loan-row-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--panel);
}

.loan-row-card h3 {
  margin: 0 0 2px;
  font-size: 1.05rem;
}

.loan-row-meta {
  margin: 0 0 10px;
  font-size: 0.85rem;
  color: var(--muted);
}

.loan-row-facts {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.loan-row-fact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.loan-row-fact:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.loan-row-fact strong {
  text-align: right;
}

/* `checkbox-row` had no rule at all -- it is used on three pages and relied on
   whatever inline layout the browser chose, which put the box on its own line
   above its label. A label and its control are one thing and should sit on one
   line, with the box vertically centred against the text. */
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input[type="checkbox"] {
  margin: 0;
  flex: 0 0 auto;
}

.loan-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--line);
  color: var(--text);
}

/* ---------------------------------------------------------- direct bookings
   The PM's booking page. Every colour here is an --ink-* token on a
   color-mix tint of itself, which is the pattern the issue badges already
   use: the tokens are redefined for dark, so the pair moves together and
   neither half can be picked independently. `#fff` doing two jobs is what
   made the dark port expensive the first time. */

.booking-picker {
  display: block;
  max-width: 520px;
  margin-top: 12px;
}

/* A <select> CUTS its label rather than scrolling it, and scrollWidth equals
   clientWidth while it does, so the usual clipping check sees nothing. Measured
   against the real data this had 3px of headroom -- "Taramino Beach Home --
   Rehoboth Beach" is 295px in 298px of room -- which the next property name
   would have eaten silently. Filling the label buys it the whole 520px. */
.booking-picker select {
  width: 100%;
}

.regime-options {
  display: grid;
  gap: 12px;
  margin: 12px 0 16px;
}

.regime-options .checkbox-row {
  align-items: flex-start;
}

.regime-options .field-hint {
  display: block;
}

.terms-facts {
  margin-bottom: 12px;
}

.fee-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.stay-nights {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 700;
  padding: 6px 0;
}

/* The clash. Decision 10 says this is a report, not a refusal, so it reads as
   information the PM acts on -- warn, not danger. It is also the one thing on
   the page that must survive being skimmed, hence its own panel rather than a
   line of hint text under a field. */
.clash-note {
  border: 1px solid color-mix(in srgb, var(--ink-warn) 45%, transparent);
  /* Mixed into --bg rather than into `transparent`. A translucent tint borrows
     whatever happens to be behind it, and on this page that is nothing: body
     carries no background, so the colour comes from `html` and the panel's real
     contrast depends on an ancestor it does not own. Mixing into the page token
     makes it OPAQUE and identical to look at, and it stays right if this panel
     is ever moved onto a card. */
  background: color-mix(in srgb, var(--ink-warn) 12%, var(--bg));
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
}

/* MEASURED, not eyeballed. --ink-warn on its own 12% tint is 4.04:1 in light
   mode -- under AA for text this size -- and no tint fixes it, because
   #a16207 on near-white tops out around 4.6:1. So the hue stays in the panel's
   background and border, where it is a signal, and the words are --text, which
   measures 12.05:1 light and 12.17:1 dark. */
.clash-title {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text);
}

.clash-list {
  margin: 0 0 6px;
  padding-left: 20px;
}

.clash-body {
  margin: 0;
  color: var(--text-2);
}

/* Somebody outside is waiting on the PM. Built on the clash note's shape, in
   --accent-ink rather than --ink-warn: a request is news, not a warning, and a
   second amber panel on the same screen teaches people to read neither.

   The hue stays in the border and the tint for the same MEASURED reason the
   clash note gives -- the words are --text, which is 14.68:1 light and 13.82:1
   dark, and no tint would carry a coloured sentence at this size. The tint is
   mixed into --bg rather than into `transparent` so it is opaque: body carries
   a gradient here, so a translucent panel borrows whatever is behind it. */
.waiting-note {
  border: 1px solid color-mix(in srgb, var(--accent-ink) 45%, transparent);
  background: color-mix(in srgb, var(--accent-ink) 10%, var(--bg));
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 12px 0;
  color: var(--text);
}
.waiting-note strong { font-weight: 700; }

/* A stay somebody asked for, inside its own card. A rule down the left rather
   than a second box: a card inside a card reads as a separate stay. */
.stay-request {
  border-left: 3px solid var(--accent-ink);
  padding: 2px 0 2px 12px;
  margin: 12px 0;
}
.stay-request-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
/* What a stranger typed. `pre-wrap` so their own line breaks survive without
   this page building <br> tags by parsing prose -- and `overflow-wrap` so a
   pasted URL with no spaces in it cannot widen the card off the screen. */
.stay-request-message {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.stay-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.stay-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.stay-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stay-card-head h3 {
  margin: 0;
}

.stay-card-meta {
  color: var(--muted);
  margin: 4px 0 10px;
}

/* Each action carries a line saying what it does to the nights. "Mark
   requested" blocks eight nights across every channel, and the word alone does
   not say so -- so the note sits with the button rather than in a legend. */
.stay-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 12px;
  align-items: center;
  margin-top: 12px;
}

.stay-actions .action-note {
  margin: 0;
}

/* The PM's own view of their payment link. Shown in FULL and monospaced: a
   truncated payment link cannot be checked, and this is the only place the PM
   ever sees what their guests see. */
.payment-url-line { margin: 0 0 8px; }
.payment-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  overflow-wrap: anywhere;
  color: var(--text);
}

/* The PM's own view of the words their guests accept. Shown in full and with
   its line breaks intact: these are the words that would be read out in a
   dispute, and a truncated preview of a clause is unverifiable. */
.damage-terms-preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0 0 10px;
  padding: 10px 12px;
  max-height: 220px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Marking a stay paid. Visually quieter than the status buttons on purpose --
   this writes a note about what the PM says happened, and it must not read as
   another step in the stay's progress. */
.stay-paid-block {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stay-paid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.paid-amount {
  width: 160px;
  max-width: 100%;
}
.stay-paid-line {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}
/* A payment that arrived and did not cover the stay. Warn, not danger: nothing
   has gone wrong, money is simply still owed -- and a PM scanning a list of
   stays has to be able to pick this row out of the ones that settled.
   MEASURED, not eyeballed: #a16207 on #fff is 4.92:1 and #e9bd73 on #161f2d is
   9.46:1, both clear of AA for body text. */
.stay-paid-short { color: var(--ink-warn); }
.stay-paid-error { margin: 8px 0 0; }

.stay-card-error {
  margin-top: 10px;
}

/* The turnover clean and the claim deadline. Its own block above the payment
   one, because "somebody is going to look at the property" and "you say you
   were paid" are unrelated facts and a reader who skims will take two lines in
   one box as one subject. */
.stay-turnover-block {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.stay-turnover-line {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.92rem;
}
/* A missing clean is the one state a PM must not skim past: it means nobody
   is booked to look at the property, so there will be no photos and no dated
   record if this guest breaks something. Carried in --text on a tinted ground
   rather than in a hue, for the reason measured on the badges above: coloured
   ink on its own tint lands around 3.7:1, and this is body-size prose where
   "large text" buys nothing. */
.stay-turnover-missing {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--ink-warn) 55%, transparent);
  background: color-mix(in srgb, var(--ink-warn) 14%, transparent);
  color: var(--text);
}
.stay-turnover-block .field-hint { margin: 0; }

/* Same measurement, same conclusion. The existing badge classes put the ink on
   its own tint, which is 3.65:1 for warn and 3.70:1 for ok in light mode --
   and these are 12px uppercase, so "large text" does not apply to them. These
   carry the hue in the fill and the border, and the label in --text: 10.8:1
   light, 8.4:1 dark. The border matters on its own: a hue that is the only
   difference between two states is no difference to a reader who cannot
   separate them. */
.badge-booking-draft,
.badge-booking-requested,
.badge-booking-confirmed,
.badge-booking-declined,
.badge-booking-cancelled {
  color: var(--text);
  border: 1px solid;
}

.badge-booking-draft {
  background: color-mix(in srgb, var(--ink-neutral) 22%, transparent);
  border-color: color-mix(in srgb, var(--ink-neutral) 55%, transparent);
}

.badge-booking-requested {
  background: color-mix(in srgb, var(--ink-warn) 22%, transparent);
  border-color: color-mix(in srgb, var(--ink-warn) 55%, transparent);
}

.badge-booking-confirmed {
  background: color-mix(in srgb, var(--ink-ok) 22%, transparent);
  border-color: color-mix(in srgb, var(--ink-ok) 55%, transparent);
}

.badge-booking-declined,
.badge-booking-cancelled {
  background: color-mix(in srgb, var(--ink-danger) 22%, transparent);
  border-color: color-mix(in srgb, var(--ink-danger) 55%, transparent);
}

@media (max-width: 640px) {
  .fee-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .stay-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---- The guest's stay page (stay.html) ----
   A standalone page with no sidebar and no chrome, read almost entirely on a
   phone from a text message. It reuses .card and the brand lockup from the
   sign-in page and nothing else: the portal's layout assumes a shell this page
   deliberately does not have. */
.stay-shell {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  background:
    radial-gradient(1200px 600px at 70% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
}
.stay-card-page {
  width: 100%;
  max-width: 520px;
  padding: 28px 26px 24px;
}
.stay-loading { color: var(--muted); margin: 8px 0; }

.stay-where {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  margin: 4px 0 6px;
  color: var(--text);
}
.stay-dates { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--text); }
.stay-nights-line { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }

/* The state panel. Hue lives in the fill and the border; the words stay at
   --text. A tinted label on a tinted ground is the contrast failure the gold
   button taught us -- #a16207 on its own 12% tint measures 3.65:1, under AA,
   and no amount of tinting fixes it. */
.stay-state {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.stay-state-title { margin: 0 0 4px; font-weight: 700; color: var(--text); }
.stay-state-body { margin: 0; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.stay-state-offer {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}
.stay-state-waiting {
  border-color: color-mix(in srgb, var(--ink-warn) 45%, var(--line));
  background: color-mix(in srgb, var(--ink-warn) 12%, var(--bg));
}
.stay-state-good {
  border-color: color-mix(in srgb, var(--ink-ok) 45%, var(--line));
  background: color-mix(in srgb, var(--ink-ok) 12%, var(--bg));
}
.stay-state-over {
  border-color: color-mix(in srgb, var(--ink-neutral) 40%, var(--line));
  background: color-mix(in srgb, var(--ink-neutral) 10%, var(--bg));
}

.stay-section { margin: 20px 0 0; }
.stay-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 8px;
  font-weight: 700;
}

.price-lines { list-style: none; margin: 0; padding: 0; }
.price-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}
.price-line strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-unset { color: var(--muted); font-weight: 500; }
.price-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0 6px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}
.price-total strong { font-variant-numeric: tabular-nums; }

.stay-rule { margin: 0 0 6px; color: var(--text); font-size: 0.95rem; line-height: 1.5; }

/* Scan to pay.
   The code itself stays DARK ON WHITE in both themes, which is the one place
   on this page a token is not allowed to decide the colours: scanners expect a
   light quiet zone around dark modules, and an inverted code is a code many
   phones will not read. So the white panel is literal rather than a surface
   token, and the caption below it is ordinary page text that themes normally. */
.stay-qr {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
}
.stay-qr[hidden] { display: none; }
.stay-qr-canvas {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  /* The canvas carries its own pixel dimensions, so this only stops it
     outgrowing a narrow card -- it never stretches a small code up, which
     would blur the modules. */
  max-width: 100%;
  height: auto;
}
.stay-qr-note { margin: 0; max-width: 42ch; }

/* The request form. Its fields are the portal's `.field`, which only ever had
   an input in it -- a textarea inherited none of the box and sat in the
   browser's default serif at a different width from every control above it. */
.field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
/* Arrive and leave, side by side on anything wide enough to hold two date
   controls and collapsing to one column below that. A date input carries its
   own picker glyph and does not shrink gracefully: squeezed, it stops showing
   the year. `auto-fit` with a floor is the portal's own answer to that. */
.request-dates {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
/* The form's own sections sit inside a single card, so they get a rule between
   them rather than a box each -- a card inside a card reads as a second page. */
#request-form .stay-section { padding-top: 0; }
#request-form .field { margin-bottom: 14px; }

/* Paying for a stay. The link is the HOST'S page, not ours, which is why there
   is no reassuring padlock language anywhere in here -- we are not in the
   payment and must not dress the section up as though we were. */
.stay-pay-body { margin: 0 0 12px; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.stay-pay-link { width: 100%; }
/* The address the guest is about to open. Monospaced because a hostname is a
   string to READ character by character -- that is the whole point of showing
   it -- and a proportional font is where rn becomes m. */
.stay-pay-where {
  margin: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.stay-pay-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}
/* The host's claim that they were paid. Green, because to the guest it is good
   news -- but it is a sentence about what the host SAID, and the copy carries
   that weight rather than this colour. */
.stay-paid {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--ink-ok) 45%, var(--line));
  background: color-mix(in srgb, var(--ink-ok) 12%, var(--bg));
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* The host's damage agreement.
   `pre-wrap` is the load-bearing line in here. The text arrives as prose and is
   written with textContent, never innerHTML -- it is a paragraph a PM typed,
   shown on a page with no authenticator in front of it, and there is no
   validator for prose the way _safe_external_url guards the two links. So the
   blank lines between the host's paragraphs have to survive as WHITESPACE
   rather than as <br> tags we would have to build by parsing their words. */
.stay-terms-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 12px 14px;
  /* Tall agreements scroll rather than push the accept button off the page.
     The whole text stays in the DOM -- this caps what is on screen, never what
     the guest can read. */
  max-height: 320px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
}
.stay-terms-whose { margin: 0 0 10px; }
.stay-terms-tick { margin: 12px 0 0; }
.stay-terms-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
}
.stay-terms-label input {
  /* Sized for a thumb, not a mouse. This is the one control on the page that
     carries a liability, and a 13px default checkbox beside it is a mis-tap
     waiting to happen. */
  width: 20px;
  height: 20px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--brand);
}
/* Their copy, after signing. Not green and not a badge: what happened is that
   this guest accepted this host's words on a day, which is a fact to state
   plainly rather than news to celebrate. */
.stay-terms-signed {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Cover the guest may buy for themselves. Visually quieter than the pay link:
   it is optional, we do not sell it, and a primary button here would read as a
   step in the booking. */
.stay-insurance-body { margin: 0 0 12px; color: var(--text); font-size: 0.92rem; line-height: 1.5; }
.stay-insurance-link { width: 100%; }
.stay-insurance-where {
  margin: 8px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}
.stay-insurance-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}
.stay-insurance-limit { margin: 10px 0 0; }

.stay-accept { width: 100%; margin: 22px 0 0; }
.stay-accept-note { margin: 8px 0 0; }
.stay-foot {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.stay-problem { padding: 6px 0 4px; }
.stay-problem-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  margin: 4px 0 8px;
  color: var(--text);
}
.stay-problem-body { margin: 0; color: var(--text); line-height: 1.55; }

@media (max-width: 420px) {
  .stay-card-page { padding: 22px 18px 20px; }
  .stay-where { font-size: 1.3rem; }
}

/* ---- The guest link, on the PM's stay card (bookings.html) ---- */
.stay-link {
  margin: 14px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}
.stay-link-title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}
.stay-link-field { margin: 8px 0 4px; }
/* A link is long and a squeezed field does not scroll it into view -- it hides
   the end, which for a token is the part that matters. Full width, and a size
   small enough that the whole address is readable rather than elegant. */
.stay-link-url {
  width: 100%;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}
.link-accepted {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--ink-ok) 45%, var(--line));
  background: color-mix(in srgb, var(--ink-ok) 12%, var(--bg));
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.stay-link-note { margin: 8px 0 0; }
/* Withdraw sits next to Copy and does something a PM cannot undo -- the link is
   dead for a guest who has it open. Identical chrome on both is how somebody
   presses it expecting a clipboard. Hue in the border and the label, which both
   measure against the card rather than against a tint of themselves. */
.button.link-danger {
  color: var(--ink-danger);
  border-color: color-mix(in srgb, var(--ink-danger) 45%, var(--line));
}

/* ---- The before-cleaning walkthrough (cleaner's job card + PM's panel) ----
   The hue goes in the fill and the border and the LABEL stays --text, which is
   the pattern the rest of this file uses for a reason: coloured ink on its own
   tint measures around 3.7:1, and this is a warning a cleaner reads on a phone
   in a hallway. --text on the same tint measures 10.8:1 light / 8.4:1 dark. */
.walkthrough-block {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--text);
}
.walkthrough-block.walkthrough-unsettled {
  border-color: color-mix(in srgb, var(--ink-warn) 55%, transparent);
  background: color-mix(in srgb, var(--ink-warn) 14%, transparent);
}
.walkthrough-title { margin: 0 0 4px; }
.walkthrough-why { margin: 0 0 8px; font-size: 0.92rem; }
.walkthrough-declared { margin: 4px 0 0; }
.walkthrough-block input[type="file"],
.walkthrough-block input[type="text"] { display: block; margin: 6px 0; max-width: 100%; }

/* A grid rather than a flex row: a cleaner who photographs eight things should
   get eight thumbnails that wrap, not eight that shrink until none is legible.
   auto-fill with a minimum is what keeps the floor at a thumbnail you can
   actually read at 390px. */
.walkthrough-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  margin: 8px 0;
}
.walkthrough-shot { margin: 0; }
.walkthrough-shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.walkthrough-shot figcaption { margin-top: 2px; }

/* The PM's note to the cleaner. It had no styling because it had no markup --
   the field was never rendered on a job card at all. */
.job-notes {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.job-notes-text { margin: 2px 0 0; white-space: pre-wrap; }

/* ---------------------------------------------------------------- fact grid

   A label ABOVE its value, in columns that collapse to one on a phone. The
   rows it replaces on the Direct bookings page put the label and the value on
   one line at opposite ends, which reads as a receipt and leaves a long label
   fighting its own value for the same 300px.

   Deliberately NOT a change to `.loan-row-fact`. That class is three pages'
   worth of lender and loan rows (lender.js, loans.js), and widening a shared
   class to restyle one page is how a colour ends up doing two jobs that have
   to diverge. These are new names used by the booking page alone.

   `auto-fit` with a 180px floor rather than a hand-written breakpoint: two
   columns wherever two fit, one where they do not, and no media query to keep
   in step with a sidebar whose width is a variable. 180px is measured against
   the widest VALUE here -- "Added separately" at this size is about 125px --
   and not against the labels, which are prose and may wrap. */
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px 24px;
  margin: 16px 0 14px;
}

/* The standard grid-item defence: a track's `auto` minimum is its content, so
   a long unbroken string can push a column wider than its share.

   Measured, it changes nothing for THESE values -- a 40-character unbroken
   word at 390px produced zero page overflow with it, without it, and without
   `overflow-wrap` either. It is kept as the correct idiom for a grid item and
   not as a guard this layout has been shown to need, which is why no negative
   control claims to prove it. The real protection for a long value is the
   `overflow-wrap` below, and the page-overflow assertion in the browser test
   stands on its own. */
.fact-item {
  min-width: 0;
}

.fact-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);          /* measured 4.76:1 light, 6.31:1 dark */
  margin: 0 0 4px;
  line-height: 1.35;
}

.fact-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  /* A value too long for its column breaks rather than overflowing it. Only
     reached by a prose value; every value on this page today is money, a
     count, or an answer from a fixed set, and the browser test asserts each
     one occupies exactly ONE line at 1440px and at 390px. */
  overflow-wrap: break-word;
}

/* An unanswered value. Same size as a real one so the grid stays even, but
   plainly not an answer -- "Not stated" set in the weight of "$340" reads as
   a fact somebody chose. */
.fact-value.fact-unset {
  font-weight: 500;
  color: var(--muted);
}

/* The footnote under a fact grid: the things that are true of the whole card
   rather than of one value. Separated by a rule so it is not read as another
   fact, and marked so it is not read as body copy either. */
.fact-note {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}

.fact-note::before {
  content: "\2139";             /* information source */
  flex: 0 0 auto;
  font-size: 0.95rem;
  line-height: 1;
  color: var(--accent);
}

/* A fact grid inside a stay card sits tighter: the card already has a heading,
   a status badge and a meta line above it. */
.stay-card .fact-grid {
  gap: 14px 20px;
  margin: 12px 0;
}

/* ======================================================= the bookings hub

   Four tiles standing in for four sections that used to be four blocks of
   rows on one page. They reuse `.card .tile` -- the dashboard's tile shell --
   on purpose: the hover lift, the icon chip and the padding are already
   right, and a second tile component is a second one to restyle. What is NOT
   reused is `.tile-value`, which is 2rem Playfair for a COUNT; these tiles
   carry a state in words, and "Our standard wording" set in a display serif
   at 2rem is a headline, not a status.

   Its own grid rather than `.tile-row`, which is a fixed five columns. Four
   named settings want to reflow by how much room there is, and `auto-fit`
   drops to one column on a phone without a breakpoint of its own. */
.hub-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin: 4px 0 28px;
}

.hub-tile {
  gap: 2px;
}

/* "Open ->" reads through `--accent-ink`, not the `--accent` the shared
   `.tile-link` uses. MEASURED: gold on a white card is 3.37:1 at 0.82rem,
   which is under AA for small type, and `--accent-ink` is 11.53:1 light /
   9.08:1 dark. Scoped to `.hub-tile` deliberately -- the dashboard, the
   contractor portal and the Cleaning Pros page all use `.tile-link`, and
   widening a shared class to fix one page is how a restyle turns into three
   pages nobody asked to change. The 3.37:1 there is a real debt, still open. */
.hub-tile .tile-link {
  color: var(--accent-ink);
}

/* On a phone the four tiles are a column, and a column of four is 811px of
   scroll before the stays -- which is the thing a PM opens this page to do.
   One column stays: the dashboard's tiles go two-up at this width, but those
   carry a NUMBER and these carry a phrase, and two 171px tracks wrap "Your own
   payment page" over two lines. So the tile gets shorter instead: the icon
   chip sits beside the section's name rather than above it, which is the only
   row that was there purely for air. Measured at 390px: 811px of tiles down to
   618px, the stays from 1100px down the page to 907px, and every state still
   on one line. */
@media (max-width: 700px) {
  .hub-tiles {
    gap: 12px;
    margin-bottom: 20px;
  }

  .hub-tile {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-areas:
      "icon  label"
      ".     state"
      ".     sub"
      ".     link";
    column-gap: 12px;
    align-items: center;
    padding: 14px 16px;
  }

  .hub-tile .tile-icon {
    grid-area: icon;
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
    margin-bottom: 0;
  }

  .hub-tile .tile-label { grid-area: label; }
  .hub-tile .hub-tile-state { grid-area: state; margin-top: 2px; }
  .hub-tile .tile-sub { grid-area: sub; }
  .hub-tile .tile-link { grid-area: link; margin-top: 4px; }
}

/* The answer. Below the section's name, in the weight the name is not: a PM
   scanning these four is looking for which one is unanswered, and the name is
   the part they already know. */
.hub-tile-state {
  margin: 6px 0 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  /* A state is a phrase from a fixed set, but a long one ("A let under local
     rules") in a narrow column wraps rather than clipping, and the widest
     wrapped line always fits -- so the browser test measures lines, not
     overflow. */
  overflow-wrap: break-word;
}

/* Nobody has answered. Muted and lighter, the same distinction `.fact-unset`
   draws inside a card: "No payment page" set in the weight of "$285 a night"
   reads as a setting somebody chose. */
.hub-tile-state.hub-unset {
  font-weight: 500;
  color: var(--muted);
}

/* We could not ask. A THIRD reading, and deliberately not the second one: an
   unread setting rendered as an unset setting sends a PM to re-enter a
   payment link they already have. Amber, because it is about this page and
   not about their business. */
.hub-tile-state.hub-unknown {
  color: var(--ink-warn);
}

/* Back out of a section to the stays. Reads through `--accent-ink`, which is
   the token for type that has to come up on a dark page -- `--accent` is the
   gold used as a BUTTON FILL, and gold as small type is the pairing this
   codebase has already measured at 2.29:1. */
.hub-back {
  display: inline-block;
  margin: 0 0 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}

.hub-back:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
   A published property's public page (property.html).

   Reuses the stay/request card wholesale -- the same shell, the same price
   lines, the same section headings -- and adds only what a page with
   photographs and a calendar needs. A second visual language for the one page
   a stranger meets first would make the product look like two products.
   --------------------------------------------------------------------------- */

/* Wider than a stay card. 520px is right for a bill and wrong for a gallery:
   three photographs across a phone-width column are thumbnails nobody can see
   the room in. Still one column, because this page is read top to bottom. */
.property-card-page { max-width: 760px; }

/* WHOSE page this is, above our own mark. A property shown under the UseKUSA
   logo alone reads as ours to let, and we are not the host, not the merchant
   and not a party to anything agreed here. */
.pp-host {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.pp-host-logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  /* A literal white, not --panel. A host's logo is very often a dark mark on
     transparency, and on a dark surface it disappears -- the same "one token,
     two roles" trap as cream on gold, except here the second role belongs to
     somebody whose artwork we have never seen. A fixed light tile is the only
     ground we can promise it against. */
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 4px;
}
.pp-host-logo[hidden] { display: none; }
.pp-host-name {
  margin: 0;
  font-weight: 700;
  color: var(--text);
  font-size: 1.02rem;
}

/* The photographs. `auto-fill` with a floor rather than a fixed count, so a
   phone gets one column and a laptop three without a media query deciding it. */
.pp-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.pp-shot { margin: 0; }
.pp-shot img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
/* BELOW the photograph, never over it. Text on an image a host uploaded has no
   measurable contrast -- the ground is whatever they photographed -- and this
   codebase has already shipped a 2.29:1 pairing that looked fine in a
   screenshot. A caption on a known surface can be measured; a caption on an
   unknown one can only be hoped about. */
.pp-shot-room {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* The host's own prose. `pre-wrap` so the line breaks they typed survive
   without us parsing their text into <br> tags. */
.pp-about {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Which nights are taken. Three months side by side where there is room and
   stacked where there is not. */
.pp-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}
.pp-month { min-width: 0; }
.pp-month-name {
  margin: 0 0 6px;
  font-weight: 700;
  color: var(--text);
  font-size: 0.92rem;
}
.pp-week-heads,
.pp-days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.pp-week-heads {
  margin-bottom: 2px;
}
.pp-week-heads li {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
}
.pp-day {
  /* A square cell with the number centred. `aspect-ratio` rather than a fixed
     height so a narrow column shrinks the whole grid instead of overflowing
     it -- the failure a phone-width table has already taught us twice. */
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text);
  background: color-mix(in srgb, var(--ink-ok) 10%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--ink-ok) 28%, var(--line));
}
.pp-day-blank { background: none; border-color: transparent; }
/* Taken. Marked THREE ways -- the fill, the strike-through, and the word
   "taken" in .sr-only -- because styling alone says nothing to a screen reader
   and nothing in a high-contrast mode that drops the background. The number
   stays at --muted on a neutral tint rather than going coloured on a coloured
   ground, which is the contrast failure the gold button taught us. */
.pp-day-taken {
  background: color-mix(in srgb, var(--ink-neutral) 14%, var(--bg));
  border-color: color-mix(in srgb, var(--ink-neutral) 30%, var(--line));
  /* --text, NOT --muted, and measured rather than chosen. A muted number on
     this tint lands at 3.68:1 in light: over the 3:1 "obviously broken" floor
     this suite uses and under AA's 4.5 for body text -- and it is a figure
     somebody reads to decide whether to book. The three marks that say "taken"
     -- the fill, the strike-through and the word in .sr-only -- carry the
     meaning without the number having to go dim to help. At --text it measures
     11.34 / 11.32. */
  color: var(--text);
}
.pp-day-taken .pp-day-num { text-decoration: line-through; }
.pp-calendar-note { margin: 8px 0 0; max-width: 64ch; }
/* The platform line, under the host's. Smaller and quieter than the sentence
   above it, because the host's name is the one that matters on this page. */
.pp-platform { margin-top: 2px; font-size: 0.78rem; }
